Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Feature Requests : Run Default Script
New Topic New Poll Post Reply
Poster Message
hyperme
Level: Smitemaster
Avatar
Rank Points: 1062
Registered: 06-23-2006
IP: Logged
icon Run Default Script (+1)  
Currently, if you add scripting commands to an NPC set to a custom one, they override the default script. This makes sense. However, you have to redefine any default varibles and beheviors the custom NPC might have. So it would be nice to be able to run a custom NPC's default script from regular scripting.

This would also be useful if you want to make somekind of monster that guards certain areas, which are different based on rooms. (Yes, _MyScript varibles exist, but they only allow a fixed are for each monster.)

____________________________
[Insert witty comment here]
Qzvlkx?
03-01-2012 at 06:17 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Run Default Script (0)  
Merged your PR. Thank you!

Slated for 1.3.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
07-26-2021 at 09:48 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Run Default Script (+1)  
Tried this in 1.3.0.400. So far seems like a really useful feature, thank you.

Sadly, I can't use it to massively simplify my custom checkpoints because the Autosave command does not allow tokenisation in the checkpoint name, but still, looks really useful.

(I can understand why some commands, like Score Checkpoint, do not allow tokenisation, was just unfortunate in this one particular use case, as I have a pretty complex checkpoint script (the checkpoints you stand on to autosave, not score checkpoints!) so a hefty copy-paste each time, where I have to change only the Autosave name for each one)

[Last edited by kieranmillar at 06-06-2023 09:41 PM]
08-06-2021 at 10:59 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Run Default Script (0)  
kieranmillar wrote:
Tried this in 1.3.0.400. So far seems like a really useful feature, thank you.

Sadly, I can't use it to massively simplify my custom checkpoints because the Autosave command does not allow tokenisation in the checkpoint name, but still, looks really useful.

(I can understand why some commands, like Score Checkpoint, do not allow tokenisation, was just unfortunate in this one particular use case, as I have a pretty complex score checkpoint script so a hefty copy-paste each time, where I have to change only the Autosave name for each one)
Yeah, it's a great feature. Apologies for the continued script maintenance issue here.

IIRC, the CaravelNet server scans published holds up-front for the literal string names in Score Checkpoint commands to determine the list of score points to maintain server-side. I think we'd need to figure out a clean way to avoid breaking this workflow in order to add support for name interpolation in the score point strings.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 08-07-2021 03:39 PM]
08-07-2021 at 03:10 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Run Default Script (+1)  
mrimer wrote:
IIRC, the CaravelNet server scans published holds up-front for the literal string names in Score Checkpoint commands to determine the list of score points to maintain server-side. I think we'd need to figure out a clean way to avoid breaking this workflow in order to add support for name interpolation in the score point strings.
There would be no clean way. If variables were allowed to be resolved in Score Checkpoint names, it would become impossible to be sure you ever had a complete list of checkpoints from a level set. And I really don't think we want to lose that certainty.
08-07-2021 at 10:16 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Run Default Script (0)  
I think making Score Checkpoint tokenisable would be bad, I only brought it up as another example of something else that doesn't allow tokenising. The command where I ran into an issue here with lack of tokenising is the Autosave command.

[Last edited by kieranmillar at 08-08-2021 12:34 AM]
08-08-2021 at 12:34 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Run Default Script (0)  
Ah, I see I got distracted by your latter remark and unintentionally missed the point of the first part.

Any objections from anyone to adding support to making Autosave names tokenizable?

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
08-09-2021 at 05:40 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Run Default Script (0)  
mrimer wrote:
Any objections from anyone to adding support to making Autosave names tokenizable?
Bump. No objections. This would be handy, would eliminate a bunch of copy/paste for me.
06-06-2023 at 09:42 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Feature Requests : Run Default Script
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.