Jump to content

Photo

SCRIPT: LttP Dark Rooms

dark light candle fire link to the past lttp

  • Please log in to reply
16 replies to this topic

#1 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 12:04 AM

I am making a Forest/Shadow themed dungeon. It has a gimmick involving lighting candles to completely light up a room. However, with the help of a Deku Leaf item, you can also blow out the candle to make paths visible only when the room is dark (for those who played the Dark Palace in Link Between Worlds may see where this is going). 

 

What I need help with is a script involving a screen to be dark, but Link is still visible with a little circle of light surrounding him like in LttP or MC. When he lights a candle, the darkness goes away and when he blows the candle out, it comes back. 

 

What I also need help with is how to trigger the candle to light up and go back to being unlit on the same tile. That probably doesn't involve scripting, but I don't know how to resolve that. Let me know how any of this is possible.

 

~ Epad



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 24 August 2014 - 06:28 AM

How are  you making the rooms dark? Are you using the in-built dark room flag, or are you scripting the darkness as a draw effect?

I'm not certain how ZC handles dark rooms internally, however I assume that Layer 0 is converted all to black. I'd need information on how ZC does that; as if it merely turns layers black, then you could always draw fake Link sprites above those layers.

 

If you're using a scripted darkness effect, then you could do the same, while drawing a translucent dark layer beneath the ffc Link effect for drawing Link, and another translucent layer over Link to shade him.  Then, draw the circle as an ffc over the highest darkness layer.

 

P.S. This belongs in script requests, although a topic on how dark rooms work internally may fit in this forum.



#3 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 08:29 AM

Yes I want the darkness as a draw effect, which I am assuming uses scripts. I don't have that script, but I am sure someone would lead me to one. All I need is that circle as the only area of visibility, I don't really need Link to have a shade over him.

 

Also, I know this should be in the Script Requests page, but I never got any replies to any of my other request until I posted my recent forum.

 

~ Epad



#4 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 24 August 2014 - 02:52 PM

http://www.mediafire...jlf/torches.qst

 

Candle on a torch lights the screen, using the wand blows it out. Since this isn't using ZC's built in darkness effect, the dark/light transition is pretty abrupt. Drawing a more gradual effect that looks nice would probably take a lot of experimentation. The darkness will also drop between rooms. You can fix that by making the script global instead of an FFC, but that would require more changes, like building a new torch trigger and specifying which rooms it's active in. Credit to Freya for the draw function used here.


Edited by Lejes, 24 August 2014 - 02:53 PM.


#5 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 24 August 2014 - 03:12 PM

also having the drawing functions run in global will create A LOT of lag very quickly. I ran into this problem while scripting a lttp style lamp light cone. The more drawing and checks you need to perform will crate lag. While having the screen go dark when the torches are out is straight forward, either draw a black square or don't. However if you want to have paths/combos appear when the room is dark and not have then drawn over will require more checks.

 

I can think of a few ways to do this...

one is to draw the dark square on a lower layer like layer 4. The combo's you want to see will need to be place on a layer higher up by a draw function so they player can't see them until the room is dark. This could cause problems with secrets.

the other is to have the drawing function draw transparent squares over the combos that need to be seen when the screen is dark. Depending on the amount of drawing needed this could cause lag.



#6 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 04:36 PM

I compiled the script from torch.qst into my quest and it works...at least the candle part, I didn't make my Leaf item yet  :shrug:

 

My two gripes with this script:

#1: The flame layer always seems to be above Layer 2. Can we set the flame on Layer 2 or below?

#2: The flame sprite doesn't animate since the constant is running the tile page. Can't I just enter "const int FLAME_COMBO?" That way it can animate?



#7 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 24 August 2014 - 05:18 PM

Screen->DrawBitmap(2, RT_BITMAP0, 0, 0, 256, 176, 0, 56, 256, 176, 0, true);
Screen->FastCombo(4, this->X, this->Y, FLAME_TILE, FLAME_CSET, OP_OPAQUE);

The first number in the parentheses is the layer it's drawn to, so you can change it to whatever. Combo drawing takes all the same arguments as tile drawing, so you can just change the function name like this and it will work. You can also easily change which weapons activate/deactivate the torch.



#8 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 06:32 PM

Great! Does it also trigger & retrigger secret combos? If not, is there any way to do so?



#9 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 24 August 2014 - 06:54 PM

Sure, it's easy to trigger secrets and even to make them permanent. Not sure what you mean by retrigger, though.



#10 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 06:58 PM

Retrigger as in when I blow out the torches the secret combos goes back as the original combo, how do I do that?



#11 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 24 August 2014 - 07:19 PM

Maybe I'm not looking hard enough but I can't see a way to do that. You can set the screen secrets to untriggered, but the secret combos still won't change back until you leave and reenter the room. The only other ways I can see are to manually set the combos, or to mess around with layers and drawing functions like cavthena suggested. I don't have a perfect grasp of how they work, though.



#12 Shosci

Shosci

    Gaming Topics and Live Streams

  • Members
  • Real Name:Eshaan

Posted 24 August 2014 - 07:29 PM

I'll try setting a trigger within the combo editor, maybe that can work



#13 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 24 August 2014 - 07:39 PM

I could set it up so that you could set trigger and revert combos solely within ZQuest. ZScript can't access the IDs of secret combos, unfortunately, so you'd have to set the before and after in the FFC's arguments tab. You'd have to decide which kind of combo flag or whatever the script would check for (flags 98 - 102 are good for this).


Edited by Lejes, 24 August 2014 - 07:40 PM.


#14 Dwiese1998

Dwiese1998

    Recipient of Ways

  • Members
  • Real Name:Dylan
  • Location:Bismarck North Dakota

Posted 05 December 2014 - 08:04 PM

Sorry for the bump, but I have a question about this script,

zelda019.png

So this is what the screen looks like before i light the torch.

zelda021.png

And this is what it looks like after i light the torch, I want to show a lit animated torch, how would i do so?

I tried using secret combo flags as well but this always shows up.



#15 Dwiese1998

Dwiese1998

    Recipient of Ways

  • Members
  • Real Name:Dylan
  • Location:Bismarck North Dakota

Posted 05 December 2014 - 08:44 PM

Okay I got it to work but there seems to be some lag before the torch is lit, it works, but it takes a couple seconds.


Edited by Dwiese1998, 05 December 2014 - 09:53 PM.




Also tagged with one or more of these keywords: dark, light, candle, fire, link, to, the, past, lttp

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users