Set Game State: Difference between revisions

From Spiral Framework
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
* Argument 3: Optional Reset Counter (for arg4 values above 255)
* Argument 3: Optional Reset Counter (for arg4 values above 255)
* Argument 4: Variable
* Argument 4: Variable
The article itself will be split into sections based on argument 1, since argument 1 is what determines the effect 0x33 has on the game. Argument 4 is typically the variable of a mode, where changing this will affect the game based on what the code is.
The article itself will be split into sections based on the mode argument, since this is what determines the effect 0x33 has on the game. Argument 4 is typically the variable of a mode and changing this changes the effect of the mode.
== 0 : Time of Day ==
== Mode 0 : Time of Day ==
When argument 1 is 0, the mode is time of day. The only value that seems to result in a change is argument 4, and only causes changes with a few values.
Mode 0 is used to control the "Time of Day" display on the HUD. Argument 4 is the only argument which should be used in this mode as other arguments could cause unintended effects.
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 36: Line 36:
|}
|}


== 5/6 : Wait ==
== Modes 5 and 6 : Wait ==
When argument 1 is 5 or 6, the mode is a wait function of sorts. Put simply, the game will wait at a designated point in the code for this amount of frames:
Modes 5 and 6 appear to be wait functions. Put simply, the game will wait at a designated point in the code for this amount of frames:
<pre>Arg4 + (Arg3 * 255)</pre>
<pre>Arg4 + (Arg3 * 255)</pre>


== 8 : Room Placement ==
== Mode 8: Map Load Player Placement ==
Mode 8 is used to determine where the player will appear in the next room. The meaning of argument 4 depends on the map being loaded. For instance, when exiting classroom 1-A, this code is run:
Mode 8 is used to determine where the player will appear in the next map loaded. The meaning of argument 4 depends on the map being loaded. For instance, when exiting classroom 1-A, this code is run:
<pre>0x33|8, 0, 0, 2</pre>
<pre>0x33|8, 0, 0, 2</pre>
This tells the game that when the next room loads, the player should be positioned outside room 1-A. The "position IDs" for each room are currently unknown.
This tells the game that when the next map loads, the player should be positioned outside room 1-A. The "position IDs" for each room are currently unknown and so must be researched and documented.


[[Category:Danganronpa: Trigger Happy Havoc]] [[Category: Opcodes]]
[[Category:Danganronpa: Trigger Happy Havoc]] [[Category: Opcodes]]

Revision as of 23:46, 23 March 2018

Hmmm...
To do:
Touch up the wording of the article to match it up with that of the rest of the Wiki

The 0x33 opcode is a multipurpose opcode that is used several times in the game with different effects depending on the arguments. It has 4 arguments that are as follows:

  • Argument 1: Mode
  • Argument 2: Unknown
  • Argument 3: Optional Reset Counter (for arg4 values above 255)
  • Argument 4: Variable

The article itself will be split into sections based on the mode argument, since this is what determines the effect 0x33 has on the game. Argument 4 is typically the variable of a mode and changing this changes the effect of the mode.

Mode 0 : Time of Day

Mode 0 is used to control the "Time of Day" display on the HUD. Argument 4 is the only argument which should be used in this mode as other arguments could cause unintended effects.

Argument 4 Effect
0 Daytime
1 Nighttime
2 Morning
3 Midnight
4 Time Unknown
5 Blue slash replaces the time; Normal nighttime theme
6 and onward White block covers the time; Normal daytime theme

Modes 5 and 6 : Wait

Modes 5 and 6 appear to be wait functions. Put simply, the game will wait at a designated point in the code for this amount of frames:

Arg4 + (Arg3 * 255)

Mode 8: Map Load Player Placement

Mode 8 is used to determine where the player will appear in the next map loaded. The meaning of argument 4 depends on the map being loaded. For instance, when exiting classroom 1-A, this code is run:

0x33|8, 0, 0, 2

This tells the game that when the next map loads, the player should be positioned outside room 1-A. The "position IDs" for each room are currently unknown and so must be researched and documented.