Jump to content

Photo

Updated Pegasus Boots Script


  • Please log in to reply
68 replies to this topic

#16 ywkls

ywkls

    Master

  • Members

Posted 30 December 2014 - 11:56 AM

That's what this was based on, I think. I was actually wondering whether it would permissible for me or Lejes to submit this, since he's the one who got it to work and I'm the one who requested it. I created a very brief example quest using the script, with everything set up and a copy of the script in the quest's buffer. If it would be alright with the staff, I'll post a link to that. 

Edit: I just noticed that the code for faster movement is different from what I'm using, but both versions work.


Edited by ywkls, 30 December 2014 - 12:06 PM.


#17 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 30 December 2014 - 12:25 PM

ywkls, did you test the pegasus boots with the hole/lava script?

I don't know if the script I used is the newest, but if you run into a hole, the sword continues the path, "catches" an item (if you have one on the screen, after the hole) and Link falls in the hole and is sent to the cave screen.

I will make a demo quest to show better how it is this "bug".



#18 ywkls

ywkls

    Master

  • Members

Posted 30 December 2014 - 02:05 PM

ywkls, did you test the pegasus boots with the hole/lava script?

I don't know if the script I used is the newest, but if you run into a hole, the sword continues the path, "catches" an item (if you have one on the screen, after the hole) and Link falls in the hole and is sent to the cave screen.

I will make a demo quest to show better how it is this "bug".

 

Unfortunately, no... I know of that script and have a working copy, but I'm not using it in my current quest. It may be as you say that they are incompatible. (I've seen many requests for combining them in somebody's quest and so far no signs that it has been resolved.) One of the reasons I'd requested this updated script is I was never quite sure just what parts of those attempts to combine various scripts did and it was easier just to get this one modified so that it worked. I know you had a thread about running boots, an item which increased your speed without working like the Pegasus Boots are designed. A basic explanation is that you assign flag 98 (General Use, Script 1) to any solid combo you want to be broken and the same flag to any walkable combo you don't want the boots to work on. I'm on the verge of starting a new quest, where I might add the hole/lava script and see how the two interact. But until then (or somebody comes up with a solution to that bug), that's all I think I can try.



#19 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 30 December 2014 - 02:13 PM

It's not that one in the database I don't think.



#20 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 30 December 2014 - 05:00 PM

Friends, I did a test file using 3 scripts: sideview ladder, hole/lava and pegasus boots.

Please note if these scripts are updated and configured correctly.

https://dl.dropboxus...me_testfile.rar



#21 justin

justin

    Adept

  • Members

Posted 30 December 2014 - 09:25 PM

ok, pegasus boots now work with the pits in your test quest.  just replace the Pegasus Boots item script with this

 

// [ITEM] PEGASUS BOOTS -------------------------------------------------------------------------------------------------------------------------------------------
 
item script PegasusBoots
   {
      void run(){
          if(Screen->ComboT[ComboAt(Link->X+8,Link->Y+8)] == CT_WATER || ComboFI(Link->X+8,Link->Y+8,CF_DASH) || Falling) Quit();
          PegasusDash = true;
          if(Link->InputB && !Link->InputA) StoreInput = 2;
          else if(Link->InputA && !Link->InputB) StoreInput = 1;
      }
}

 

when link respawns after falling in a pit he'll just continue pegasusing if the button is still held down.

 

not a huge fan of how the pegasus boots work with the ladder script.  running towards the top of the ladder making Link turn around a run the other way is odd.  when you're on the ladder you can't initiate a pegasus run, but you can pegasus run up the ladder starting on regular ground.  it would be fixed if you could use items on the ladder, not sure why you can't, i imagine it was intentional though it doesn't make much sense for a sideview ladder to not be able to use items.

 

 

some other things i noticed

 

1. from the pegasus global function.  the added comments are mine.  not sure what the purpose of the Rocsfeather_increaser is.  and why not use the constants instead of the item numbers?

//Item[91] = I_ROCSFEATHER
//Item[124] = Custom Item 2 I_ROCSFEATHER_INCREASER
if(Link->Item[91] && !Link->Item[124]){
   Link->Item[124]=true;
}

 

 

2. the sword dash is only set to work if the I_SWORD1 (wooden sword) is equipped to either A or B.  give Link a white sword, and he no longer holds it out while dashing.

 

3. in the constants.z file, the INV_COMBO_ID  isn't declared as a constant, just an integer.



#22 justin

justin

    Adept

  • Members

Posted 31 December 2014 - 01:30 AM

actually the update item script above on its own doesn't fix the pits problem.  i had forgot that i added some lines elsewhere in my first attempt to make the scripts play nice.  so update the Pegasus Item script with that.  and in Utilities.z, in the Update_HoleLava function add the line,

PegasusDash = false;

in two places, after the if(Falling), and after the else if(Link->Z==0 && OnPitCombo() && !Warping)

 

 

I also added the functionality for the pegasus boots to recognize more than just the wooden sword.  my updated Utilities.z script file is at the bottom with all those fixes.

 

you'll also need to add the following constants to Constants.z

 

const int SPRITE_SWORD1  = 0;
const int SPRITE_SWORD2  = 1;
const int SPRITE_SWORD3  = 2;
const int SPRITE_SWORD4  = 3;

 

 

I also changed the way Link interacts with the sideview ladder script while Pegasus dashing.  My fix makes him collide with the ladders instead of dashing up, or trying around if dashing down towards.  I liked the dashing up, so maybe i'll add that back in.  Here's the code, change the sideview ladder script in the global loop after the waitdraw and before the waitframe.

 

if(usingLadder && !PegasusDash){
   Link->Dir = 0;
}else if(usingLadder && PegasusDash){
   PegasusCollision = true;
   DashCounter = 0;
}

 

 

Here's the updated Utilities.z

 


Edited by justin, 31 December 2014 - 01:34 AM.

  • Anthus likes this

#23 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 31 December 2014 - 07:33 AM

Working 100% now, Justin! Thanks so much!

Here is the updated file for those who want to use the scripts too:

 

https://dl.dropboxus...me_testfile.rar



#24 ywkls

ywkls

    Master

  • Members

Posted 31 December 2014 - 10:31 AM

Could I request an alternate version of the script justin submitted, please? I don't know which parts of it are included in the updated std.zh, although I do know that isSolid() is. Specifically, I'd like added back in the functions of holding the correct sword in front on Link and slashing bushes and grass when you run into them. (The first isn't included in mine and the second was buggy, so I left it out.) Here's my current Pegasus Boots script that I'm using.

Spoiler

 

And I believe this is the part I'd like to add, although I have no idea where to put it.

Spoiler

 

And I'm guessing this would have to go at the bottom.

Spoiler

 

I don't think I need the updated Hole/Lava script, since the version I have runs off an ffc and it warps you correctly even when hit by the Pegasus Boots and doesn't make the sword continue moving along the same path. Thanks to everyone who has expressed interest in getting this old script to work and who might help everyone interested use it!



#25 justin

justin

    Adept

  • Members

Posted 31 December 2014 - 11:48 AM

here's the Pegasus on its own.  it compiles and seems to work.  i tried it with bush->next and grass->next combo types, and it didn't seem buggy to me.

i think its the exact same script you had posted with the multiple sword thing added, and the bush slashing added back in.  i didn't compare them line for line, so maybe there was something else changed in your old version that i got rid of.  hopefully it still works with your hole script.  i added some more constants at the top, so make sure they match up to stuff in your questfile - specifically the sword sprites, and the NPC_ITEMSET constants.

 

the sword holdout thing will find if link is holding any item with a sword class, but the sprites are currently only setup to use the 4 default sword item#s.  if you add more swords, or change their item#s you'll need to edit that part of the script - add the relevant sprite constant and modify the if statement that uses those constants.

 



#26 ywkls

ywkls

    Master

  • Members

Posted 31 December 2014 - 12:08 PM

Thanks for the edit! It works with my hole/lava script, slashes stuff and carries the proper sword! I'm guessing that to add more sword sprites, I'd set up the constant number of the sprite at the top, then change this where the most powerful sword was at the top, then every other one was an else if (except for the last) in order or decreasing strength?

if(LinkSwordEquip()==I_SWORD4){
                mysword->UseSprite(SPRITE_SWORD4);
            }else if(LinkSwordEquip()==I_SWORD3){
                mysword->UseSprite(SPRITE_SWORD3);
            }else if(LinkSwordEquip()==I_SWORD2){
                mysword->UseSprite(SPRITE_SWORD2);
            }else{
                mysword->UseSprite(SPRITE_SWORD1);
            }
 

I was already including you and Lejes in my credits (you for the TradeSequence and him for his contribution to this) but somehow that doesn't seem like enough thanks for what you've done. By the way, I don't think anybody has answered the question that got this topic so much notice over the past few days; namely whether this could be put in the database. Since the current version works with the latest updates to 2.5 and has none of the bugs that the older ones on the forums retained and has been modified to include functionality with Hole/Lava, slashable stuff and as many swords as you want to use; it only partially resembles the original code. Anyways, thanks again!


Edited by ywkls, 31 December 2014 - 12:08 PM.


#27 justin

justin

    Adept

  • Members

Posted 31 December 2014 - 12:26 PM

Ya that's the if statement that would need modifying. Right now it's using the default sword item numbers, the I_SWORD constants from std.zh so if you change a sword item number you'd have to swap out that constant for the correct item number. Same if you add a sword, you'd need to add another else if with that item#, and the new sprite number. It doesn't necessarily have to be set strongest to weakest, I just did that so it was logical to read, and so it defaulted (else) to the wooden sword, so that a sprite would always be set - which is what would currently happen if you added a higher level sword now without changing anything.

Your Pegasus script didn't have the rocs feather bit, so I left it out in your updated version. I haven't tested it in accel2me's version either, so I'm not exactly sure what it does. If you want it back in just ask.

I don't mind people submit my changes to database, but it's not my script so it's not really my call. Although since it is just an updated version of the version in the old script database it's probably ok.

 

 

 

edit:

more testing.

 

in the PegasusBoots function find this

                if(Screen->ComboT[loc] == CT_BUSH) Screen->ComboD[loc] = 0;
                else if(Screen->ComboT[loc] == CT_TALLGRASS) Screen->ComboD[loc] = 0;

and replace with

                if(Screen->ComboT[loc] == CT_BUSH) Screen->ComboD[loc] = Screen->UnderCombo;
                else if(Screen->ComboT[loc] == CT_TALLGRASS) Screen->ComboD[loc] = Screen->UnderCombo;

 

Previously dashing into slash combos like a regular Bush or Tall Grass combo would show Combo 0, now they show UnderCombo.

 

More issues

- Link won't dash into drownable water, just stop beside it.

- Which gives me an idea how to better interact the Sideview Ladder and Pegasus Boot scripts.

- Link won't dash through slash combos when initiating the dash right beside them.

- still have no idea what the Roc's feather bit is for.  i'm guessing that you need to setup another Roc Item (Increaser) that makes Link jump further when dashing?

;


Edited by justin, 31 December 2014 - 01:19 PM.


#28 justin

justin

    Adept

  • Members

Posted 01 January 2015 - 02:06 AM

looked back at the original Pegasus Boots script by Joe123, and the Roc Item thing isn't in there, so no idea where that came from, or how to setup the Roc Increaser item for it to work.

 

I have fixed a lot of the things I considered bugs with the Pegasus script (water interaction, initiating a dash next to slashable combo), and improved on the interaction between the Sideview Ladder and Pegasus scripts.

 

add this variable to globalvariables.z

bool CanDrown = true;

if the quest rule drowning is on set to true, and have your water walkable.  Link will drown and stop dashing.

if the quest rule drowning is off set to false, and have your water unwalkable.  Link will stop dashing beside the water (not crash).

 

still a slight bug with the flippers, where Link dives (? i think) immediately after dashing into the water.

 

here's Utilities.z, and [ITEM] pegasus boots.z

 
@ywkls, i'll just pm you the updated pegasus boots alone script.
 
Spoiler

Edited by justin, 01 January 2015 - 02:08 AM.


#29 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 01 January 2015 - 09:42 AM

Another part of the script that can be modified is:

 

if(ComboFI(Link->X+8,Link->Y+8,CF_DASH) && Screen->ComboS[loc] == 1111b){
                //Screen->ComboD[loc]=INV_COMBO_ID;
                Screen->ComboD[loc]=Screen->UnderCombo;   // <------------------------------------------------------------------------------
                
                if(Screen->ComboF[loc] == CF_DASH) Screen->ComboF[loc] = 0;
                Game->PlaySound(SFX_PEGASUSBREAK);
}


#30 justin

justin

    Adept

  • Members

Posted 01 January 2015 - 09:46 AM

Ya, the idea of that INV_COMBO_ID is to set it to a combo you want your Pegasus block to become when you break it. But ya, you could just have it break into the under combo.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users