TLoZ: The Whistle of Wisdom
Stray Fairies
#1
Posted 27 May 2015 - 02:24 PM
How would I make it an item that function like a heart piece except you'll need to collect 15 of them?
How would I make it so you could see how much you got on the subscreen?
How would I make it so the great fairy of the area would tell you at first "collect all the stray fairies" but then when you got them all she would give you a prize? Just like MM?
Tell me if this is possible please!
#2
Posted 27 May 2015 - 02:35 PM
All of them can be done with minor scripting. For the fairies themselves, the easiest way is to use a scripted counter (there are 25 of them, so not bad) Define
const int CR_STRAYFAIRY = 7; //set to whichever scripted counter you want to use, 7 is Script 1
to assign it to a counter slot, then set
Game->MCounter[CR_STRAYFAIRY] = 15; //This makes the counter max out at 15 fairies
inside the while(true) loop of your global script. Then you make an item like the fairy, but reference the strayfairy counter and increase by 1, rather than increasing the life counter.
Setting the counter on the subscreen will allow you to keep track of how many you've found.
Unfortunately,that was the easy part. I know there is a way to check how many you have with either scripts or string control codes, and return different strings depending on how many you have, but I'm not entirely sure HOW to do it.
EDIT:Hell, for the counter, itself,you could actually skip the scripting, provided you don't place MORE than 15 stray fairies in an area.
Edited by Binx, 27 May 2015 - 02:42 PM.
- Joelmacool and Logos like this
#3
Posted 27 May 2015 - 02:36 PM
All of them can be done with minor scripting. For the fairies themselves, the easiest way is to use a scripted counter (there are 25 of them, so not bad) Define
const int CR_STRAYFAIRY = 7; //set to whichever scripted counter you want to use, 7 is Script 1to assign it to a counter slot, then set
Game->MCounter[CR_STRAYFAIRY] = 15; //This makes the counter max out at 15 fairieswith either a global script.
Setting the counter on the subscreen will allow you to keep track of how many you've found.
Unfortunately,that was the easy part. I know there is a way to check how many you have with either scripts or string control codes, and return different strings depending on how many you have, but I'm not entirely sure HOW to do it.
Lol I'm so confused. Thanks for the help, what part of the process is this?
#4
Posted 27 May 2015 - 02:53 PM
Ok, I'll run you through the first two steps hopefully a little better explained. First, make a "Fairy" class custom item in the item editor, with 0 HP gain, 0 MP gain, and whatever step speed you want. Then under the "Pickup" tab, set the "Counter Reference" dropbox to Script 1, "Increase Amount" to 1, "Increase Counter Max:" 1 "But not above:" 15. That's your actual stray fairy item. Then just place the "Script 1" counter on your subscreen, like any other counter, and you'll be able to keep track of them. Then the only step left is making the Great Fairy say different stuff and empty the counter when you have enough stray fairies. Basically, you don't need the scripting, at all, for the item, itself, so ignore that part.
Edited by Binx, 27 May 2015 - 02:54 PM.
- Joelmacool likes this
#5
Posted 27 May 2015 - 02:56 PM
Then under the "Pickup" tab, set the "Counter Reference" dropbox to Script 1, "Increase Amount" to 1, "Increase Counter Max:" 1 "But not above:" 15. That's your actual stray fairy item. Then just place the "Script 1" counter on your subscreen,
So, this step is for the script you put on the earlier post? And if so, I should set it up like an original script?
Oh, nvm, just saw your edit.
Edited by Joelmacool12, 27 May 2015 - 02:57 PM.
#6
Posted 27 May 2015 - 03:06 PM
Yeah... I kinda forgot, momentarily, that you only need scripts if you want the counter item to do something special, itself.
- Joelmacool likes this
#7
Posted 27 May 2015 - 03:11 PM
I have a script that let's NPC's (like the Great Fairy) dispense rewards once you have collected the correct amount of items.
That script can be found here.
http://www.purezc.ne...=scripts&id=155
You can have as many of these as you want, for any type of counter (arrows, hearts, rupees, bombs, super bombs, or one of the script counters). Reference the std_constants to find out the right script number.
As for changing the value of the counter, or making the fairy say different things; that can be done via string control codes. If you don't know how to use them; there's a help button on the string message box which provides instructions on how to set those up.
You could use the string control codes to do everything you've suggested without any scripting at all, in fact but I figured that you wanted something a little more complicated. If you need any help figuring out how to set this up, just ask.
- Joelmacool likes this
#8
Posted 27 May 2015 - 03:16 PM
Edited by ZeldaPlayer, 27 May 2015 - 03:16 PM.
- Joelmacool likes this
#9
Posted 27 May 2015 - 05:58 PM
FYI, if you want to be rewarded for collecting all the fairies in a dungeon, you'll want to create a separate counter and fairy item for each dungeon.
- Joelmacool likes this
#10
Posted 27 May 2015 - 06:17 PM
Isn't there a way you could just reset the locations of the items if you exit the DMap before finding them all and empty the counter? Seems like it would be a little cleaner and it would save him from having to use 10 or more counters for this alone,
- Joelmacool likes this
#11
Posted 27 May 2015 - 07:09 PM
I think that might actually be harder... you'll have to write down the rooms that have fairies in them in the script, and reset all their item states. It gets worse if your dungeon covers multiple DMaps. Considering there are 25 custom counters, most people won't have a problem using up one per dungeon on this. Unless you just have a TON of dungeons.
- Joelmacool likes this
#12
Posted 27 May 2015 - 07:32 PM
True, he's not using 20 custom counters already, like I am (not a joke. I really should find a way to cut that down), so, saccing 9-10 of them shouldn't be too bad
- Joelmacool likes this
#13
Posted 27 May 2015 - 07:34 PM
Stray fairies sounds cool. ill check out your game, you putting out bold ideas!
- Lightwulf, Joelmacool and ZeldaPlayer like this
#14
Posted 28 May 2015 - 04:31 AM
Ok, I'll run you through the first two steps hopefully a little better explained. First, make a "Fairy" class custom item in the item editor, with 0 HP gain, 0 MP gain, and whatever step speed you want. Then under the "Pickup" tab, set the "Counter Reference" dropbox to Script 1, "Increase Amount" to 1, "Increase Counter Max:" 1 "But not above:" 15. That's your actual stray fairy item. Then just place the "Script 1" counter on your subscreen, like any other counter, and you'll be able to keep track of them. Then the only step left is making the Great Fairy say different stuff and empty the counter when you have enough stray fairies. Basically, you don't need the scripting, at all, for the item, itself, so ignore that part.
So, I'm guessing with the other dungeons instead of script 1 I set script 2?
Then just place the "Script 1" counter on your subscreen, like any other counter, and you'll be able to keep track of them.
How would I go about doing that? Please tell me!
Edited by Joelmacool12, 28 May 2015 - 04:31 AM.
#15
Posted 28 May 2015 - 05:02 AM
same way you add any other counter. counters are one of the basic elements in the subscreen editor, just add it in via the subscreen editor. Check out my subscreen tutorial if you need more information, but adding counters is certainly one of the easier subscreen tricks.
Edited by Binx, 28 May 2015 - 05:45 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users