Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Stun and Death checks/labels (would make custom monsters so much easier)
New Topic New Poll Post Reply
Poster Message
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Stun and Death checks/labels (+2)  
In the current state of things, there's a lot of stuff that's harder to do in trying to make a custom monster than it really seems like it needs to be. If I want a monster to do something special when it dies or is stunned, or even if I simply wanted to make a custom brain that specific custom monsters responded to by behaving as if "brained" when a normal brain would brain regular monsters, it's possible but much harder than I'd like it to be. The following things would make this sort of thing easier:

-Wait for entity at [location or location range] to be Stunned: Returns true if there is currently a stunned monster at the specified location, false otherwise. This would be good for properly "braining" custom monsters with standard brains. Regular monsters act unbrained if the only brain(s) in the room is(are) stunned; custom monsters should do the same, but currently can't.

-OnStunned: A special label that the code GoSubs to automatically whenever the character running the script is stunned (by a stick or whatever). This would enable monsters to do all sorts of custom things when stunned or pushed by a stick-type thing. In particular this would allow "custom" brains to tell a variable that they've been stunned this turn. I'm aware this could be worked around by setting Imperative Not Stunnable and then detecting when the monster is pushed and "stunning" it manually in that case by a Wait 0 turn, but this comes without the "I'm stunned" graphic to let the player know what's going on.

-OnDeath: Similar to OnStunned, another special label the code GoTos to whenever the monster encounters any event that should kill it (so if it's Imperative invulnerable, this would still fire on it falling down a pit or being stabbed by briar). Characters with this label in them should not die for the purposes of scripting under any circumstances other than being given "Imperative Die", which a good scripter would only put inside of the OnDeath label itself. This would be good, again, for handling a custom brain. It would also be good for (for example) a custom monster that generates another custom monster when it dies, or a monster that explodes when it dies, so on, so forth.

-Wait for Entity at [location] to Die: If OnDeath is too difficult to include, putting this on an invisible external character who handles the aforementioned business would work as an alternative, firing only on turns when a monster in the indicated area dies. Right now (if I'm not mistaken), the only thing like this is a command that detects whether or not a monster has died in the entire room, which isn't terribly helpful.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

08-30-2015 at 02:45 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1299
Registered: 06-14-2005
IP: Logged
icon Re: Stun and Death checks/labels (0)  
For the last, it would be nice if the command followed the monster around. That is, you run Wait for Entity at [location] to Die aimed at a roach, and it only triggers when that roach dies.
08-30-2015 at 09:29 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
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Stun and Death checks/labels (0)  
I suppose that would be helpful if all the script did was wait for that monster to die and then do [whatever]. I didn't really think of that much since I tend to only ever use "wait for" commands as queries inside of an If statement.

A really nice thing would be a way to actually store as a variable a specific monster or character, chosen (for example) by its location at a specific point in time, and then to do things like detect or cause its death or find things near it all one would have to do is call that variable. But that seems well out of the scope of anything DROD's scripting is made to be capable of.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 08-30-2015 10:50 PM]
08-30-2015 at 10:50 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 Boards : Feature Requests : Stun and Death checks/labels (would make custom monsters so much easier)
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.