Jump to content

Photo

items.zh

Header Zscript Items Equipment

  • Please log in to reply
5 replies to this topic

#1 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 23 March 2015 - 08:19 PM

https://dl.dropboxus...cripts/items.zh

 

https://1drv.ms/u/s!...pd1bZWFoFLq6x_Q
 
Update 3/26:
-some function name fixes
-added GetActiveEquipmentOfFamily()
-added demo script EquipmentSlotX
 
A header for managing and using Equipment as well as other item related functions.
This is a header I have been working on for a while. It started out as just some functions I made for my quest but when interest in those functions grew(and the quest died) I decided to make it into a header. It is still a WIP. Also even though I am pretty sure there is no items.zh already the name could change if needed.

The biggest part of this header is the ability to use Equipment on Inputs other than A and B. I wanted to make that very simple to do. I really want this to get plenty of testing so if you try it out please post some feedback. I am also sorry for it's state. Some organization, commenting, refining, and possibly renaming of some functions are still in order. I am also working on some example scripts to help people who are not scripters get some use out of this.
 
This script allows you to use
 

Use hardcoded equipment on all extra buttons

Use hardcode equipment on one button

 
Script that creates an Ex1 Equipment slot that functions like A and B
This one is a little more involve. You will need to make a new equipment slot
on you subscreen and then figure out the coordinates for Zscript and put it in the constants.
To select equipment for Ex1 press L and R. Demo file
Equipment Slot X


Edited by SUCCESSOR, 10 October 2017 - 01:24 PM.

  • Demonlink likes this

#2 Twilight-Prince

Twilight-Prince

    The Adversary

  • Members
  • Real Name:Starts with a letter of the alphabet.
  • Location:Way Out There

Posted 23 March 2015 - 08:57 PM

This has a LOT of potential for future quests that utilize a ton of items. It's essentially adding the C-Buttons to Zelda Classic! Bravo!


  • SUCCESSOR likes this

#3 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 23 March 2015 - 09:58 PM

It's essentially adding the C-Buttons to Zelda Classic! Bravo!

I wish it were that simple. Unfortunately since scripts stop running when the Active Subscreen opens creating extra "Equipment Slots" that function like A and B do is more involved. Which is why the example for that is not done yet and won't be functionally complete. Sad to say if you want that it comes down to scripting your own subscreen, which is what I was/am doing for my quests, to make it so you can select any item on A, B, X(Ex1), Y(Ex2). Once I do get that quest out I will release the scripts in full so people can see how I made my subscreen. I will also help anyone who wants to use this header, for any reason, if they need it.


Edited by SUCCESSOR, 23 March 2015 - 10:08 PM.


#4 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 23 March 2015 - 10:18 PM

Sad to say if you want that it comes down to scripting your own subscreen

This one's not nearly as hard as it seems though. I did it before with gratuitous use of DrawScreen and DrawTile, and now that Tango.zh exists, the whole process if even easier. I think one could feasibly write a simple tutorial on how to script a subscreen.

Now with that said, this header's amazing. I can foresee a lot of use from it in the future, so thanks for putting it together. By the way, would you like me to add it to the header index, or would you rather wait until it's not longer a WIP?

#5 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 23 March 2015 - 11:35 PM

This one's not nearly as hard as it seems though. I did it before with gratuitous use of DrawScreen and DrawTile, and now that Tango.zh exists, the whole process if even easier. I think one could feasibly write a simple tutorial on how to script a subscreen.

Now with that said, this header's amazing. I can foresee a lot of use from it in the future, so thanks for putting it together. By the way, would you like me to add it to the header index, or would you rather wait until it's not longer a WIP?

 

Scripting a subscreen can be easy but it is almost always tricky. You are right though and maybe after I get some more time and no one has done it I may make such a tutorial.

 

You can add this to the header index, that will be great. As long as you link to my dropbox file as it may change frequently. When it stops changing so frequently I will submit it to the script database.

 

Edit: I should have actually looked at that thread I would have seen that you would link to this thread. :tard:


Edited by SUCCESSOR, 23 March 2015 - 11:49 PM.


#6 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 26 March 2015 - 03:41 AM

A few small updates to the header. Nothing to get all worked up about.
 
I completed the example script for creating a new item slot. It of course requires you to have a space for it to draw on the subscreen. You adjust where it goes with the constants XSLOT_X and XSLOT_Y. Unfortunately it seems the coordinates for Y in the subscreen editor are a little different than Zscript so a little guesswork and trial and error goes into that. I made a little demo quest for this one. Use L and R to change the equipment in the X Slot.
 
The demo file
The script file


EDIT: Going to update this demo file a bit. Also need to add a bit to the code to make sure that L and R won't change EquipmentB if "Can select A-button Weapon on subscreen" rule is not enabled.
 
Currently working on detecting if the "Can select A-button Weapon on subscreen" rule is not enabled to manage functions that need or expect it.

EDIT AGAIN: Updated demo file. Fixed L and R shifting Equipment B, made it so if there are only 3 Active Equipment B and X will swap(instead of doing nothing).

Edited by SUCCESSOR, 26 March 2015 - 05:33 PM.




Also tagged with one or more of these keywords: Header, Zscript, Items, Equipment

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users