Set Game State: Difference between revisions
No edit summary |
|||
(21 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
__FORCETOC__ | __FORCETOC__ | ||
{{todo|Also investigate this opcode in DR2}} | {{todo|Also investigate this opcode in DR2}} | ||
Internal Name: <code>WAK</code> | Internal Name: <code>WAK</code><br> | ||
Opcode: <code>0x33</code> in DR1, <code>0x3A</code> in DR2 | |||
The | The Set Game State opcode is an opcode that allows setting of various game state controlling variables. Some game states are integrated into the game in such a way that they have effects on the game automatically while other game states are free to use to store custom variables. It has 4 arguments that are as follows: | ||
* Argument 1: | * Argument 1: State | ||
* Argument 2: | * Argument 2: Operation | ||
* Argument 3: Short for argument | * Argument 3: Short for argument (Final result = Arg4 + (Arg3 * 255)) | ||
* Argument 4: Variable | * Argument 4: Variable | ||
The article itself will be split into sections based on the | The article itself will be split into sections based on the state argument, since this is what determines the effect 0x33 has on the game. | ||
== | |||
Argument 2, the operation, determines how argument 4 affects the state. The default operation, 0, directly sets the state to the given value. Operation 1 and 2 are add and subtract respectively and operation 3 and 4 are multiply and divide respectively. It should be noted that when using divide, the remainder will be discarded. | |||
== State 0 : Time of Day == | |||
{{needstestingdr2}} | |||
State 0 is used to control the "Time of Day" display on the HUD. Care should be taken when performing operations other than set on this State as setting it beyond 4 may cause unintended effects. | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 38: | Line 42: | ||
|} | |} | ||
== | == State 1: Name Colour == | ||
According to the scripts in the mobile port of the game, this script affects "name colour". Research needed. | |||
== States 2 and 3: Vibration == | |||
These States appear to have no function in the final release of the game. | |||
== State 4: Colour Set == | |||
According to the scripts in the mobile port of the game, this script sets the colour of something. | |||
== States 5 and 6: Wait == | |||
States 5 and 6 appear to be wait functions. Put simply, the game will wait for an amount of frames dependent on arguments 3 and 4. | |||
State 6 is labelled as "Wait Force". Research needed. | |||
== State 7: "Case" == | |||
Unknown. Research needed. | |||
== | == State 8: Map Load Player Placement == | ||
State 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 map loads, the player should be placed in position 2 (in this case, the player will be placed outside room 1-A as that is position 2 in BG 01). The "position IDs" for each room are currently unknown and so must be researched and documented. | This tells the game that when the next map loads, the player should be placed in position 2 (in this case, the player will be placed outside room 1-A as that is position 2 in BG 01). The "position IDs" for each room are currently unknown and so must be researched and documented. | ||
== | == State 9: "SCDATA_WAK_NONSTOP_MODE_CHK" == | ||
Unknown. Research needed. | |||
== State 10: Last Used Evidence == | |||
Internal Name: <code>SCDATA_WAK_KOTONADA_HIT_NO</code> | |||
During Nonstop Debates, this is set to the last piece of evidence that the player used to hit a weakpoint. | |||
== State 11: "SCDATA_WAK_MAXTIME" == | |||
Unknown. Research needed. | |||
== State 12: Skill Point == | |||
Apparently controls skill points. Research needed. | |||
== State 13: "SCDATA_WAK_SPEAK_ADD" == | |||
Unknown, related to trials. Research needed. | |||
== State 14: "SCDATA_WAK_RANDOM" == | |||
Apparently has something to do with randomization. Research needed. | |||
== State 15: Gamemode == | |||
{{needstestingdr2}} | {{needstestingdr2}} | ||
State 15 is used to change the current "mode" of the game. Currently, this only seems to affect the text displayed by saved games but it may also have other effects. | |||
This data is loaded from <code>Dr1/data/us/script/26_Menu.pak</code> | This data is loaded from <code>Dr1/data/us/script/26_Menu.pak</code> | ||
Line 87: | Line 126: | ||
|} | |} | ||
== | == State 16: "SCDATA_WAK_MONOKUMA_MEDAL" == | ||
Apparently something to do with Monokuma medals (Monocoins). | |||
== State 17: Unlocked Rule Pages == | |||
Determines how many pages of the school rules can be accessed. | |||
== State 18: Action Difficulty == | |||
Internal Name: <code>SCDATA_WAK_ACTION_DIFF</code> | |||
The current action difficulty of the game. | |||
{| | |||
!Value | |||
!Difficulty | |||
|- | |||
|0 | |||
|Gentle | |||
|- | |||
|1 | |||
|Kind | |||
|- | |||
|2 | |||
|Mean | |||
|- | |||
|} | |||
== State 19: Logic Difficulty == | |||
Internal Name: <code>SCDATA_WAK_INFERENCE_DIFF</code> | |||
The current logic difficulty of the game. | |||
{| | |||
!Value | |||
!Difficulty | |||
|- | |||
|0 | |||
|Gentle | |||
|- | |||
|1 | |||
|Kind | |||
|- | |||
|2 | |||
|Mean | |||
|- | |||
|} | |||
== State 23: Text Speed == | |||
{{dr2only}} | |||
State 23 appears to be a text speed function. Just like the wait function, the game will wait for an amount of frames dependent on arguments 3 and 4. |
Latest revision as of 03:55, 1 January 2019
To do: Also investigate this opcode in DR2 |
Internal Name: WAK
Opcode: 0x33
in DR1, 0x3A
in DR2
The Set Game State opcode is an opcode that allows setting of various game state controlling variables. Some game states are integrated into the game in such a way that they have effects on the game automatically while other game states are free to use to store custom variables. It has 4 arguments that are as follows:
- Argument 1: State
- Argument 2: Operation
- Argument 3: Short for argument (Final result = Arg4 + (Arg3 * 255))
- Argument 4: Variable
The article itself will be split into sections based on the state argument, since this is what determines the effect 0x33 has on the game.
Argument 2, the operation, determines how argument 4 affects the state. The default operation, 0, directly sets the state to the given value. Operation 1 and 2 are add and subtract respectively and operation 3 and 4 are multiply and divide respectively. It should be noted that when using divide, the remainder will be discarded.
State 0 : Time of Day
Needs testing in DR2 This information has only been researched in Danganronpa: Trigger Happy Havoc and requires testing in Danganronpa 2: Goodbye Despair |
State 0 is used to control the "Time of Day" display on the HUD. Care should be taken when performing operations other than set on this State as setting it beyond 4 may 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 |
State 1: Name Colour
According to the scripts in the mobile port of the game, this script affects "name colour". Research needed.
States 2 and 3: Vibration
These States appear to have no function in the final release of the game.
State 4: Colour Set
According to the scripts in the mobile port of the game, this script sets the colour of something.
States 5 and 6: Wait
States 5 and 6 appear to be wait functions. Put simply, the game will wait for an amount of frames dependent on arguments 3 and 4.
State 6 is labelled as "Wait Force". Research needed.
State 7: "Case"
Unknown. Research needed.
State 8: Map Load Player Placement
State 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 placed in position 2 (in this case, the player will be placed outside room 1-A as that is position 2 in BG 01). The "position IDs" for each room are currently unknown and so must be researched and documented.
State 9: "SCDATA_WAK_NONSTOP_MODE_CHK"
Unknown. Research needed.
State 10: Last Used Evidence
Internal Name: SCDATA_WAK_KOTONADA_HIT_NO
During Nonstop Debates, this is set to the last piece of evidence that the player used to hit a weakpoint.
State 11: "SCDATA_WAK_MAXTIME"
Unknown. Research needed.
State 12: Skill Point
Apparently controls skill points. Research needed.
State 13: "SCDATA_WAK_SPEAK_ADD"
Unknown, related to trials. Research needed.
State 14: "SCDATA_WAK_RANDOM"
Apparently has something to do with randomization. Research needed.
State 15: Gamemode
Needs testing in DR2 This information has only been researched in Danganronpa: Trigger Happy Havoc and requires testing in Danganronpa 2: Goodbye Despair |
State 15 is used to change the current "mode" of the game. Currently, this only seems to affect the text displayed by saved games but it may also have other effects.
This data is loaded from Dr1/data/us/script/26_Menu.pak
Argument 4 | Effect |
---|---|
17 | Daytime |
18 | Daily Life |
19 | Daily Life (Free Time) |
20 | Deadly Life |
21 | Deadly Life (Investigation) |
22 | Trial Verdict |
23 | Checkpoint |
24 | Class Trial |
25 | Pre-Trial Prep |
State 16: "SCDATA_WAK_MONOKUMA_MEDAL"
Apparently something to do with Monokuma medals (Monocoins).
State 17: Unlocked Rule Pages
Determines how many pages of the school rules can be accessed.
State 18: Action Difficulty
Internal Name: SCDATA_WAK_ACTION_DIFF
The current action difficulty of the game.
Value | Difficulty |
---|---|
0 | Gentle |
1 | Kind |
2 | Mean |
State 19: Logic Difficulty
Internal Name: SCDATA_WAK_INFERENCE_DIFF
The current logic difficulty of the game.
Value | Difficulty |
---|---|
0 | Gentle |
1 | Kind |
2 | Mean |
State 23: Text Speed
DR2 Exclusive This information is only relevant to Danganronpa 2: Goodbye Despair |
State 23 appears to be a text speed function. Just like the wait function, the game will wait for an amount of frames dependent on arguments 3 and 4.