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 : Alternate forms of creatures and scripting
New Topic New Poll Post Reply
Poster Message
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2175
Registered: 09-10-2004
IP: Logged
icon Alternate forms of creatures and scripting (+2)  

I'd like to be able to detect golem and construct rubble. The "Wait for Entity" code only finds live monsters, and it looks like rubble has the same monster id as the active version so I can't use MyScript stuff to get around it.

I'd also like to be able to distinguish between awake and asleep evil eyes. There is an "Evil Eye (active)" in the entity list, but it does nothing if you try to "Generate Entity" or "Wait for Entity type" using it.
03-02-2020 at 04:16 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mauvebutterfly
Level: Smiter
Rank Points: 488
Registered: 05-03-2015
IP: Logged
icon Re: Alternate forms of creatures and scripting (+1)  
Fegundo ashes, too.

____________________________
106th Skywatcher
03-02-2020 at 06:01 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
averagemoe
Level: Master Delver
Avatar
Rank Points: 274
Registered: 03-22-2012
IP: Logged
icon Re: Alternate forms of creatures and scripting (+1)  
For Golems and Constructs, you can detect their remains by using the "Get Entity Direction" command. If they're dead, the "_ReturnX" value will be set to 4.

Fegundo ashes, though, have different orientations for each stage of their regeneration countdown.

____________________________
Black Lives Matter. And I don't mean that exclusively. Lives of all colors matter.
03-02-2020 at 06:52 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2175
Registered: 09-10-2004
IP: Logged
icon Re: Alternate forms of creatures and scripting (+1)  
The trouble is that an empty square also returns a 4 direction.

And there's not a way that I can see to tell between an empty square and rubble - Wait For Entity Type rock golem doesn't work, nor does Wait for Entity Monster.

You can posssssibly do something with "Appear", "Wait for Open Move" and "Disappear" but that requires a known empty square to be present next to the square you want, and I think force arrows and the like can mess it up.

---

Fegundo ashses are detectable by setting _MyScriptF to 27 - they have a separate ID to flying fegundos because they need more than one appearance (also they aren't flying and are stabbable)
Although apparently you can't use Generate Entity on them yet.

[Last edited by Rabscuttle at 03-03-2020 12:01 AM]
03-03-2020 at 12:00 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2175
Registered: 09-10-2004
IP: Logged
icon Re: Alternate forms of creatures and scripting (+2)  
quote:
Rabscuttle wrote:
You can posssssibly do something with "Appear", "Wait for Open Move" and "Disappear" but that requires a known empty square to be present next to the square you want, and I think force arrows and the like can mess it up.



Teleport to!

Step 1: check for everything else that could be blocking the square
Step 2: try to teleport there
Step 3: check your location, if you're on the square then it's free, otherwise there's probably rubble there.
Step 4: teleport back if you teleported.

You need a visible character somewhere and it should probably be flying to avoid hitting pressure plates.

Whenever you have eliminated the impossible, whatever remains, however imprubbleable, must be rubble
03-03-2020 at 11:40 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dying Flutchman
Level: Smiter
Avatar
Rank Points: 359
Registered: 01-27-2017
IP: Logged
icon Re: Alternate forms of creatures and scripting (+2)  
quote:
Rabscuttle wrote:
Teleport to!



Well, teleporting has its own problems.

Often, you can't actually move a character (that directly ends its turn), so you have to teleport to some place. But to do that, you have to check manually for all possible obstacles, monsters, water, pit etc., just to make sure that teleporting actually makes sense. You inevitably end up with either
a) a big list of checking conditions to check for all possible mischief or
b) a small list only checking some obstacles and not allowing to build rooms with other elements.

There is a workaround for this: teleport to a location nearby and use 'check for open move' to see if the square is available and decide on furthe raction. However, this isn't a good idea because teleporting back and forth across the room to check things out will still activate pressure plates, even if the character ends up at a different square at the end of all checking and decision making.

This is just a big build-up for my dire needs (as a corollary to this topic)

We would need something like
check for open square
that works like
check for open move
.

And, a forteriori

We would need
check for weapon on square
that returns true/false or a composite number that indicates all types of weapons present (e.g. 1=sword, 2=staff, 4=dagger, 8=pickaxe, 16=spear etc. The number 13 would then indicate that a sword, dagger and pickaxe are crossing on that square, or present in that rectangular region).

____________________________
Autocorrect is not my friend. Apologies for the typos.
03-04-2020 at 07:48 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 566
Registered: 06-23-2006
IP: Logged
icon Re: Alternate forms of creatures and scripting (+1)  
Wait for Monster Remains is probably something worth having, and depending on exact details wouldn't be that hard to implement.

Detecting active eyes is weird, since Evil Eye (Active) doesn't really exist. Probably a special case can be plumbed into the Wait for Entity Type code.

quote:
Dying Flutchman wrote: We would need

check for weapon on square

that returns true/false or a composite number that indicates all types of weapons present (e.g. 1=sword, 2=staff, 4=dagger, 8=pickaxe, 16=spear etc. The number 13 would then indicate that a sword, dagger and pickaxe are crossing on that square, or present in that rectangular region).



This exists! Technically. If you clone and compile the DROD source code, it's an additional scripting command you can use. It's unlikely to actually to end up in a new DROD version, but it's there.

Edit: Although the version I implement is an Or check rather than an And check, because that seemed more like what someone would want.

____________________________
[Insert witty comment here]
Qzvlkx?

[Last edited by hyperme at 03-04-2020 05:11 PM]
03-04-2020 at 05:10 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2175
Registered: 09-10-2004
IP: Logged

File: Rubble.hold (1.7 KB)
Downloaded 0 times.
License: Public Domain
icon Re: Alternate forms of creatures and scripting (+2)  
It turns out characters are actually really chill about where they can teleport to - they don't care about weapons, walls, mirrors, bombs. I think "Turn into Monster" might be an issue once they are on a questionable square, but as long as they are characters, all they care about is whether another creature is already there.

So, "check everything" is really overkill. All you need is to run "Wait for Entity <all>" which will detect all creature types except for rubble.

Demonstration in attached hold.
Every turn the wraithwing character in the bottom left will try to teleport to every square except those that "Wait For Entity" detects. It will report squares that it can't teleport to, which is only those with golem or contruct rubble.

[Last edited by Rabscuttle at 03-04-2020 11:07 PM]
03-04-2020 at 11:03 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dying Flutchman
Level: Smiter
Avatar
Rank Points: 359
Registered: 01-27-2017
IP: Logged
icon Re: Alternate forms of creatures and scripting (+1)  
quote:
Rabscuttle wrote:
It turns out characters are actually really chill about where they can teleport to - they don't care about weapons, walls, mirrors, bombs. I think "Turn into Monster" might be an issue once they are on a questionable square, but as long as they are characters, all they care about is whether another creature is already there.

So, "check everything" is really overkill. All you need is to run "Wait for Entity <all>" which will detect all creature types except for rubble.


Sure, regarding monsters, detecting remains is a much-need addition. But when teleporting, you'd also need a way to determine if architecture (or a weapon) gets in the way of doing meaningful things with your custom monster.

____________________________
Autocorrect is not my friend. Apologies for the typos.
03-05-2020 at 07:01 AM
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 : Alternate forms of creatures and scripting
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.