Users browsing this thread: 1 Guest(s)
Day / Night Cycle [beta release]

#1
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
FF6 Day / Night Cycle
version: beta 2
released on: 11/03/2018
author: madsiur
download
wiki entry


This hack is currently in beta stage. Tests have been made but the hack has not yet been tested extensively on a single playthrough. I am in fact looking for people to do a test playthrough.

This is a complete day / night cycle that work everywhere you want: on regular map, on world maps and during world map events or mode 7. The battle backgrounds can also reflect the time of the day.

The game goes through a day or night then will gradually switch to day or night by tinting the screen toward blue or the opposite. The day length is customizable as well as the number of color transitions, thought the default 9 is kinda optimal. You can also customize the length of a single transition. There is also the option to have a set of predefined night palettes instead of global palette tint but this feature has not been tested due to the lack of proper palettes.

If you use a map on the world map, after the tent event the day will be set to the beginnign of the morning. Also, if you are in a desert battle at night, the wavy effect will be disabled. You can check if it's daytime or nighttime in events with an unused event bit I've chosen. This event bit can also be changed if needed. This event bit would be useful for any change involving night time but this is out of scope for now.

Finally there is an unused event command ($69) that I now use to manage the cycle. 69 01 will freeze the cycle, meaning the timer will stop and period of the day will stay the same everywhere until 69 02 is used, which restart the timer. 69 03 disable the cycle, meaning the timer stop as well as the initial tinting everywhere. On the next map load, it will look as vanilla game. 69 04 enable the cycle meaning timer is restarted and initial tinting as well, meaning on next map load, the map will look the same as before the disable command (69 03). Note that 69 03 and 69 04 should be used right after a fade out or right before a map load. They are not meant to be used in the middle of an event because they could break the cycle and transitions.

Check the readme for more details.


[Image: fetch.php?media=ff3:ff3us:patches:madsiu...shot_a.png] [Image: fetch.php?media=ff3:ff3us:patches:madsiu...shot_b.png] [Image: fetch.php?media=ff3:ff3us:patches:madsiu...shot_c.png]


  Find
Quote  
[-] The following 5 users say Thank You to madsiur for this post:
  • Gi Nattak (10-05-2018), Lightning (10-06-2018), m06 (10-14-2018), Turbotastic (10-08-2018), Warrax (01-05-2019)

#2
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I fixed the two bugs mentioned yesterday and updated the download in first post. A few thing were suggested to add to this hack. I'll work on them soon:
  • Modifying the tent event so using a tent will make wake you up in the morning.
  • Removing wavy effect of desert background during the night.
  • Coding an event command to disable the cycle completely for some event not requiring it.

If you have other suggestions, please post them in this thread!
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Gi Nattak (10-05-2018)

#3
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
Great idea! I always wondered if a hack like this was possible, but I thought it would be too difficult to code.

Now you just have to incorporate different monsters at night, different villagers in towns, and different music. What a can of worms you opened! Lol.
  Find
Quote  

#4
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I've added the tent event and updated download in original post!






(10-06-2018, 12:33 AM)Lightning Wrote: Now you just have to incorporate different monsters at night, different villagers in towns, and different music. What a can of worms you opened! Lol.

Thanks man! Yeah those thing are great ideas but would be really hack specific, I'm not really planning of adding any of this for a base patch. As an example the monster idea could be different packs at night (with different formations) or another way would be make some or all monsters more difficult at night. As for the different NPC, dialogues or music, the only coding work is an event command to check the "night bit", all what you do with it is regular event stuff. But yeah there's a lot of possibilitites.
  Find
Quote  

#5
Posts: 89
Threads: 11
Thanks Received: 3
Thanks Given: 1
Joined: Dec 2015
Reputation: 3
Status
Debrave
Hm...would it be feasible to use this hack as a base to either apply statuses/change equipment bonuses based on when it is day or night or change available battle commands based on the time of day, or would this code have nothing to do with that, since it's event code?

At least now this lays the groundwork a zombie town like Romero in Breath of Fire, or create vampire NPCs, or maybe even locations that only appear in the day or in the night.
  Find
Quote  

#6
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(10-08-2018, 02:38 AM)Turbotastic Wrote: Hm...would it be feasible to uss this hack as a base to either apply statuses/change equipment bonuses based on when it is day or night or change available battle commands based on the time of day, or would this code have nothing to do with that, since it's event code?

Yes it would be possible. I need to add some "night bit" but then checking it in ASM would be really trivial. From there you can do whatever you want.
  Find
Quote  

#7
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I have not yet updated the download archive but this was done today:



  Find
Quote  

#8
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
Looking good!



  Find
Quote  
[-] The following 1 user says Thank You to Warrax for this post:
  • madsiur (10-11-2018)

#9
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I have updated the download archive (see 1st post) with the change shown above. In addition, you can now check in events if it's night or day with the following free event bit. The bit is set when it's nighttime:

Code:
!eventByte = $1E80   ; Night event bit byte ($1E80)
!eventBit = $04      ; Night event bit ($1E80:2)

Also, now the universal flag to freeze the tint on regular map is no longer there. Instead, the game use a table with 1 bit per map similar to the tint-enabling table. I updated the Excel sheet with this as well as renaming the macros, sheets and bin files to more relevant names.


What is left now would be to code an event command (two bytes) with the following flags as parameters:

Code:
$01 = Disable cycle
$02 = Enable cycle
$04 = Freeze cycle
$08 = Unfreeze cycle
$10 = Set nighttime
$20 = Set daytime
$40 = "open to suggestions"
$80 = "open to suggestions"
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • seibaby (10-12-2018)

#10
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
First post updated! I have finished coding the event command. Before getting into details, the hack is now version beta 1 since I technically finished coding everything I wanted. I'm looking for one person that could do a little playthrough and test this more extensively. Aside of the event command, I redid the readme which now has more details as well as commenting more code in the asm files.

Concerning the event command, this is what the readme say:

Finally there is an unused event command ($69) that I now use to manage the cycle. 69 01 will freeze the cycle, meaning the timer will stop and period of the day will stay the same everywhere until 69 02 is used, which restart the timer. 69 03 disable the cycle, meaning the timer stop as well as the initial tinting everywhere. On the next map load, it will look as vanilla game. 69 04 enable the cycle meaning timer is restarted and initial tinting as well, meaning on next map load, the map will look the same as before the disable command (69 03). Note that 69 03 and 69 04 should be used right after a fade out or right before a map load. They are not meant to be used in the middle of an event because they could break the cycle and transitions.

I did not felt the need to add a "set nighttime" and "set daytime" command parameters because the first one can be achieved with a regular tint event command and to set daytime (on next map load) one would only need to disable the cycle (69 03). At no point in an event you'd need to switch instantly to nighttime, it would logically always be on a map load, so to keep things simple it won't switch instantly and the command should be used where it makes sense.

Edit: Bonus! Added more patches, fixed a small bug and documented the code more. Redownload the zip file!
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite