Jump to content

Photo

Switchhook (Oracle Games) Script - Ready for Trial

switchhook hookshot item ffc script demo

  • Please log in to reply
7 replies to this topic

#1 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 November 2015 - 08:36 AM

Here's a new nugget for you: The Oracle Games Switchhook item.
 
The script is ready for trial, by those interested, but I'm not quite ready to commit it to the database. There are still a few very minor flaws, mostly due to checking Link's position, that I may decide to further rectify, and there is an option set that--while people may never use it--does not yet work as I intend.
 
If you aren't aware, the Switchhook is from 'Oracle of Ages', and 'Oracle of Seasons', and switches Link with an object, or an enemy. This fully replicates the behaviour of that item, and at present, uses an inherent combo flag for switchhook targets. I may later augment this with a user option, to use combo IDs.
 
For enemies, it either affects all enemies, or with a user option, affects enemies based on a specific NPCD. Details on how to use that option are in the script.
 
The script is applied to a hookshot class item, and works based on it. That allows you to have both hookshot, and switchhook targets in one game, using the same item. If people want a patch that disables normal hookshot behaviour for a switchshot, I can probably add in a small global function to do that.

Here's the Switchhook Script File and here is a Demo and Example Quest file that demonstrates what it does, and also contains the code in the buffer.
 
The script is fully self-contained, requiring only std.zh to run. It has all of ffcscript.zh (v1.1) embedded in it, as well as functions from stdCombos.zh, and some functions that I'm including in the std.zh update. Thus, if you see a function duplication error when compiling, find the function in switchhook.z that is duplicated, and remove it, as you are already using it, imported from elsewhere.
 
The script uses one item script, and one ffc script to operate.

Notable bugs/limitations:
If Link is halfway between two tiles, the position to which the combo (or enemy) snaps may be offset one tile further away than you expect. There are only a few ways to further refine this, and even in the Oracle games, there were bugs similar to this.This happens only infrequently.

If Link is below a combo, and overlapping it, the hookshot won't fire, so he may not be able to swap with it.

The user options to hardcode tiles for swapping, may not work as intended, and require further testing. This doesn't much matter, as most users will not want to use this feature, but it exists nevertheless.
 
To Any Users
If you decide to try this script, please inform me, and if you encounter any problems, please report them here.
 

Script File (requires ffcscript.zh)


Edited by ZoriaRPG, 21 November 2015 - 08:42 AM.


#2 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 21 November 2015 - 09:11 AM

This is pretty amazing. Just pointing out, as I have not tested the script yet, that the oracle games raise both link and the block up into the air, then switch them. 



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 November 2015 - 09:35 AM

This is pretty amazing. Just pointing out, as I have not tested the script yet, that the oracle games raise both link and the block up into the air, then switch them. 

 

Ah well, I forgot that it had a special animation. I can probably add that later, but it'd be pretty pointless, and would delay action in the game by watching it repeatedly. That lifting animation is not present here.

 

Adding it would also add layers of complexity to use, and set-up, as it'd need a host of special tiles, and wouldn't be as general. It feels like more of a per-game thing.


Edited by ZoriaRPG, 21 November 2015 - 09:36 AM.


#4 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 21 November 2015 - 11:17 AM

Just save the combo, draw the combo and replace it with whatever the replace tile is, lift both the draw combo and link up into the air (using , and then teleport. Not exactly simple, but extra set up for the users shouldn't be necessary.



#5 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 26 November 2015 - 05:56 AM

It has some bugs, for example, this duplication bug:

Stand like so:
zelda164.png

Fire:
zelda165.png

Repeat for profit:
zelda166.png

#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 November 2015 - 06:58 AM

It has some bugs, for example, this duplication bug:

Stand like so:
zelda164.png

Fire:
zelda165.png

Repeat for profit:
zelda166.png

 
You aren't using the file in the link, in the OP.
 
You're using the scratch file that I sent you, that I used for testing Misc Colours...and is using an old script--one that involved some alternative options enabled that weren't complete. (It just happened to be what ZC autoloaded, when I went to run the tests for you.)

That file wasn't actually meant to demonstrate anything other than Misc Colour use, so...you might want to try the one I packaged for distribution for the item / ffc scripts. :shrug:
 

Spoiler



#7 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 26 November 2015 - 07:30 AM

Ah okay, never mind my post then. I just assumed it was the same script and thought I should point out the odd behaviour that I saw, never mind then. :P

Edited by Lunaria, 26 November 2015 - 07:30 AM.


#8 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 November 2015 - 07:56 AM

Ah okay, never mind my post then. I just assumed it was the same script and thought I should point out the odd behaviour that I saw, never mind then. :P

 

Not a problem. I'd rather have a report that is in error, than no report at all.

 

Team and Evan played with an earlier version, and I nearly choked laughing at what they did with it. I was not expecting that it could teleport a Gleeok, but then again, I didn't know that a Gleeok would obey any coordinate changes. (Lanmolas sure don't.)

 

Apparently, it can also transpose Moldorm segments, but Patras are too tough to care about it. O, ZC segmented enemies, why must you be so erratic?

 

They also had fun with moving conveyors. Because of all those antics, I added back into the code, an option to toggle on 'Janked Enemy Behaviour'. I'm uncertain if anyone will ever use that, but it's there, and it doesn't eat up any real space, or use any limited resources, to add things like that.

 

The only real difference, is whether the hookshot dies when it hits an enemy, or if it stays alive (and retracts).

 

Grid positioning though, can occasionally still be odd. Without 8-way movement, perhaps not so much, but with that QR enabled, Link's position can be off, although I admit that I don't recall if I GridX()'d or GridY()'d the CenterLinkX() and CenterLinkY() instructions, or if it would ultimately matter in the slightest.





Also tagged with one or more of these keywords: switchhook, hookshot, item, ffc, script, demo

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users