Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Custom Hookshots
New Topic New Poll Post Reply
Poster Message
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2513
Registered: 09-10-2004
IP: Logged

File: hookshot data.xlsx (23.8 KB)
Downloaded 23 times.
License: Public Domain
icon Custom Hookshots (+2)  
Hey, here's my hookshot code that I wrote for the Custom Element Revival contest. I ended up doing it mostly from scratch as I didn't have access to Dischorran's script at the time.

It's also more complicated than necessary, as it covers two different types:
* one-turn-delay, ignore force arrow
* no-delay, obey force arrow
There's also some convoluted nonsense to check for golem/construct rubble.

I also made an excel sheet for generating the bits of the code that work out how it interacts with different tiles and monsters. So if you want to make one that behaves differently, you can do that as follows:

* open spreadsheet
* in columns D, set what you want to happen
* Block: hookshot is blocked, no further tiles are checked
* Stab: hookshot stabs the tile
* Pull: hookshot pulls the creature to Beethro
* Anchor: hookshot pulls Beethro to the creature
* <leave blank>: ignore that tile, check the next tile
* the output is in columns G, J, M, P. copy the code lines into a text document and search and replace "newline" with a newline character.[1]
* find the comments in the code that say
Set var ".Comment" : Blocking Creatures
and replace the section after that with the relevant code lines.

Complications (I could improve this perhaps)
* If a creature has two actions, you'll need to do that manually. e.g. Adders, Rattlers, Golems and Constructs need both anchor and stabs so they need to be manually added in.
* Pullable creatures need to be sorted by their safe ground, so if you pull them onto water or pits they'll fall or not fall appropriately.


DROD script:
Click here to view the secret text


[1] I think it wasn't possible to do this directly because when you cut and paste multiline cells out of excel it always sticks quotes around it.
06-23-2023 at 02:57 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 : Architecture : Custom Hookshots
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.