Jump to content

TLoZ: The Whistle of Wisdom

Photo

Stray Fairies


  • Please log in to reply
31 replies to this topic

#16 ywkls

ywkls

    Master

  • Members

Posted 28 May 2015 - 09:58 AM

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,

 

The real problem with using one counter for all fairies is that is you found 10 fairies in dungeon one, then 5 in dungeon 2 and your goal was 15 fairies for a reward; if you used one counter you'd get it from either dungeon's fairy.

 

 

So, I'm guessing with the other dungeons instead of script 1 I set script 2?
 

How would I go about doing that? Please tell me!

 

Depends on how many dungeons you have. For every dungeon you want to have fairies in, you'd want to have a different script counter. The first step to setting up your script counters is to initialize them, via script.

int FAIRY_COUNTER1 = CR_SCRIPT1;
int FAIRY_COUNTER2 = CR_SCRIPT2;
const MAX_FAIRIES = 15;///I'm using this as an example if you wanted to have the same amount of fairies in each dungeon. You don't have to. If you have different amounts in different dungeons and set them by variable, they have to be constants. Or you could just type 15 into the appropriate place in the global script.

//Repeat this for however many fairy counters you want, using all 25 Script Counters if you desire.

//In the global script, do this.

global script globalscript{
     void run(){
          Game->MCounter[FAIRY_COUNTER1] = MAX_FAIRIES;
          Game->MCounter[FAIRY_COUNTER2] = MAX_FAIRIES;
          ///Repeat for however many fairy counters you have. Without initializing these via script, they can't count anything. Must place this before while(true)
          while(true){
               //Other functions here.
               Waitdraw();
               //Other functions here.
               Waitframe();
          }
    }
}

The next step is to place the counter on the subscreen. Since each dungeon uses a different counter, that means a different subscreen for each dungeon. However, you can export an existing subscreen; then import it into an empty slot to create an exact copy (perhaps changing the name to help you distinguish them).

 

On the subscreen, you'd create a new counter, set the color of the counter, make sure it displayed the right number of digits (in this case two). It will ask you on that same page what that counter should display. You would change that to Script 1, Script 2, etc.



#17 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 28 May 2015 - 10:46 AM

The real problem with using one counter for all fairies is that is you found 10 fairies in dungeon one, then 5 in dungeon 2 and your goal was 15 fairies for a reward; if you used one counter you'd get it from either dungeon's fairy.

 

 

 So, did you just not read what I wrote? I know exactly what the problem is, hence the idea of resetting the items and counter when you leave the DMap, which would, very cleanly, function exactly as intended, with only one counter used. BUT, as MM pointed out, the REAL problem, here is that doing so is extremely tedious, and the counters are just easier. And NO, there is absolutely NO reason for him to actually use scripts in the counters, themselves. The stray fairy items are completely useable with no scripting, whatsoever, since everything the stray fairy item does is available via item editor.


Edited by Binx, 28 May 2015 - 10:48 AM.

  • ywkls likes this

#18 ywkls

ywkls

    Master

  • Members

Posted 28 May 2015 - 11:28 AM

 So, did you just not read what I wrote? I know exactly what the problem is, hence the idea of resetting the items and counter when you leave the DMap, which would, very cleanly, function exactly as intended, with only one counter used. BUT, as MM pointed out, the REAL problem, here is that doing so is extremely tedious, and the counters are just easier. And NO, there is absolutely NO reason for him to actually use scripts in the counters, themselves. The stray fairy items are completely useable with no scripting, whatsoever, since everything the stray fairy item does is available via item editor.

 

I understood what you wrote; but I wasn't sure that Joelmacool12 did so I was just trying to clarify that. As for how to reset the items and the counter... thought that might be tedious, now you've got me wondering how exactly you would do that? I know how to do the counter part, but not the item part...

 

What would you suggest as an alternative to using scripts for counters? While you could have the item itself control what counter it referenced and the onscreen counter would then reference the same thing; I didn't know that it was possible to set the counter to keep track of the collection of items that increased the script counters without first setting the maximum value of that counter. (Hence the suggested script.) I admit that I learned how to do this from another thread a while back, but I didn't think I was that wrong in my understanding.


Edited by ywkls, 28 May 2015 - 11:34 AM.


#19 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 28 May 2015 - 11:48 AM

This is true: You DO, in fact need to have your counter have a "carrier"-type item that sets the max counter value, but you can also do that just fine in the item editor itself, by using the "Increase Counter Max" dialogue and the "But Not Above" section on the normal item editor, "Pickup" tab. The way I have it set up is that every time you collect a stray fairy, it increases the MCounter[] by 1, but not beyond 15. Basically, it's like setting up rupees that act as their own wallet. Like MM said, what you'd have to do to reset the rooms is manually write down every room with a stray fairy, then reset those rooms' on-screen item manually, via script. It's probably too complicated for most people, and it would be a real problem if the dungeons span multiple DMaps. Really, I'd say it's probably only worth the effort if you're already using most of your counters.


  • ywkls likes this

#20 ywkls

ywkls

    Master

  • Members

Posted 28 May 2015 - 12:07 PM

Ah... I'd forgotten about that Increase Counter Max and But Not Above option because they usually don't work properly for me.

 

Fortunately, I'm not using a lot of counters so I wouldn't need the more complicated version. Thanks for the reminders.


  • Binx likes this

#21 Joelmacool

Joelmacool

    Addicted to Overwatch

  • Moderators
  • Real Name:Joel
  • Location:Country of Europe

Posted 28 May 2015 - 01:18 PM

I'm confused, do I use scripts or not? lol

Also binx I don't want to create a brand new subscreen type, I just want to add a little column with the 4 different stray fairies: the level 1 one, level 2 ones etc.
Is there an easier way of doing that?

http://prntscr.com/7agpa8

This is the subscreen so far, how would I go about adding the counters for the fairies?

This is what it looks like in game mode:
http://prntscr.com/7agvm7

Also, as you can see I didn't set the counter for each stray fairy yet, could you tell me how to do it? (there are 4 dungeons so 4 sets of 15 fairies.)


Edited by Joelmacool12, 28 May 2015 - 01:46 PM.


#22 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 28 May 2015 - 02:57 PM

You don't have to build a whole subscreen, just scroll down to the part where I talk about adding counters. It's in the section labelled "Passive Subscreen"


  • Joelmacool likes this

#23 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 28 May 2015 - 05:51 PM

ywkls' script just sets the capacity of every fairy counter. You don't actually need it as you can get the same effect by setting "Increase Counter Max"/"But Not Above" on each fairy item. So you don't need scripts.


  • Joelmacool and Binx like this

#24 Joelmacool

Joelmacool

    Addicted to Overwatch

  • Moderators
  • Real Name:Joel
  • Location:Country of Europe

Posted 29 May 2015 - 04:02 AM

http://prntscr.com/7aofyk

So is this correct? I have a feeling it is not lol
Do I need to set a counter for each stray fairy?



#25 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 29 May 2015 - 04:34 AM

http://prntscr.com/7aofyk

So is this correct? I have a feeling it is not lol
Do I need to set a counter for each stray fairy?

 

This looks alright, but you actually don't have to set "Item 2" and "Item 3". I don't know what these are for, but what really matters for each counter is "Item 1". Yes, you need a counter for each type of stray fairy you have. Good luck!



#26 Joelmacool

Joelmacool

    Addicted to Overwatch

  • Moderators
  • Real Name:Joel
  • Location:Country of Europe

Posted 29 May 2015 - 06:47 AM

This looks alright, but you actually don't have to set "Item 2" and "Item 3". I don't know what these are for, but what really matters for each counter is "Item 1". Yes, you need a counter for each type of stray fairy you have. Good luck!

So I just leave those as rupees? Also one question: How would I set it up for the other stray fairies? (I have 4 dungeons so thats 4 sets of 15). Do I do script 2, 3 and 4 on Item 1 for the other columns? http://prntscr.com/7aprqr So for Swamp its script 1, castle is script 2 and so on?



#27 Shane

Shane

    💙

  • Moderators
  • Pronouns:He / Him
  • Location:South Australia

Posted 29 May 2015 - 07:11 AM

I think the Stray Fairies seem cool. (。◕‿◕。)


Edited by Shane, 29 May 2015 - 07:15 AM.

  • Joelmacool likes this

#28 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 29 May 2015 - 07:12 AM

"Counter 2" and "Counter 3" are meant for the Counter Block element and useless for the Counter element. Leave those as-is. So, set up an additional counter per dungeon, and set Counter 1 to the counter you want that Counter element to display.

 

So basically, you're on the right track.



#29 Joelmacool

Joelmacool

    Addicted to Overwatch

  • Moderators
  • Real Name:Joel
  • Location:Country of Europe

Posted 29 May 2015 - 07:21 AM

"Counter 2" and "Counter 3" are meant for the Counter Block element and useless for the Counter element. Leave those as-is. So, set up an additional counter per dungeon, and set Counter 1 to the counter you want that Counter element to display.

 

So basically, you're on the right track.

I still don't understand, do I use "script 2" for the other dungeon and then "script 3" for the dungeon after that? So if the item is set to script 1, the counter must be script 1 too? I think I get it now.



#30 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 29 May 2015 - 11:39 AM

right, so, if you have 4 dungeons, you need 4 custom counters (one for each area) and 4 "stray fairy" custom items (one to reference each counter).
  • Joelmacool likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users