Difference between revisions of "School Mate/Modding/Sdt codes"

From Hgames Wiki
Jump to: navigation, search
m (MaintenanceBot moved page School Mate sdt codes to School Mate/Modding/Sdt codes: Moving to new article structure)
(Replacing hgame template with game template)
 
Line 1: Line 1:
{{hgame|game=School Mate|company=IllusionGames|category=IllusionGames|modpage=Illusion Games general}}
+
{{School_Mate}}
 
Information on data types contained within each block based on code by Alamar.
 
Information on data types contained within each block based on code by Alamar.
  

Latest revision as of 22:23, 28 March 2014

Illusion

all characters are at least 18


School Mate [edit]

Story

Gameplay

Technical Help

Modding


Information on data types contained within each block based on code by Alamar.

0

Comment

Text - Comment text

1

Dialogue

Int32 - Seems to be incremented for each code 1 block
Text - Name of speaker, 設定1 to display no name
Text - Sound file to play, empty string for no sound
Int32 - number of lines of text

(Below is repeated for each line)
Byte - Some sort of flag? Always 0 in known sdt files.
Byte, Byte, Int32, Int32 - Read only if above byte is non-zero. Never happens in sdt files seen so far, purpose unknown.
Text - Line of text
(End repeated section)

2

Gradually blends the entire screen from/to a given color over a given amount of time.

Byte - 0 blends from the given color to a scene. 1 blends the entire screen to the given color. Screen will stay blended until another code 2 restores it to normal.
Int32 - Color
Int32 - Time to spend blending, in seconds.

3

Does not appear in sdt files seen so far.

4

Unknown

Int32 - always 2
Text - always "NULL" or "siro.ema"
Int32 - always 0
Int32 - always 0
Int32, Int32 - always [64,48] when text is "NULL", [1024,768] when text is "siro.ema"

5

Does not appear in sdt files seen so far.

6

Specifies name of sound file.

When sound file name is not "NULL", always followed by a block 7 and a block 8.
Int32 - id assigned to loaded sound.
Text - Name of sound file. Sometimes "NULL" to unload a sound.
Byte - Unknown
Byte - Unknown

7

Unknown. Often occurs between code 6 and code 8, but not always. count7a is always 1 and count7b always 1 or 2 in seen sdt files.

int count7a = ReadInt32(reader);
for (int i = 0; i < count7a; i++)
{
byte count7b = ReadByte(reader);
ReadInt32(reader);
ReadInt32(reader);
if ((count7b > 0) && (count7b <= 2))
{
ReadInt32(reader);
}
}

8

Believed to start playback of sounds specified in block 6.

Int32 - Matches the Int32 in a previous block 6.

9

Transfers to another .sdt file.

Text - name of .sdt file to move to.
Int32 - Unknown. Seems to be 0 most if not all of the time.

10

Label for jumps within a file. (See Code 22.)

Text - Label name

11

Displays a multiple-choice menu.

Int32 - Number of choices (always 2 in sdt files seen so far)

(Below is repeated for each choice)
Int32 - Number of commands for if this option is chosen.
Text - Text for this option.
(data) - Commands for if this option is chosen.
(End repeated block)


12

Unknown. Always followed by a code 13, a code 25, and a code 9 (jump to another file), but this may be a coincidence.
All 5 examples of this code occur at the end of a file.
Code 13 has only been seen following this code.
Code 25 occurs in many other places.

Text - Always "sm00_00.pp" in sdt files seen so far.
Int32 - Always 4294967295 in sdt files seen so far.

13

Unknown. Always seen preceded by a code 12.

14

Handles some scene transition logic

Int32 - sub-opcode
Byte - Always 0
Byte - Always 0
Int32 - Parameter

The first int32 is a sub-opcode.

  • 1 determine the type of H. However, the game also checks elsewhere, and changing this value may result in incorrect behavior of the game.
  • 3 indicates going back to main menu. Parameter always 1.
  • 4 determines what the girl wear. Parameters:
    • 0 = underwear + stockings, shoes etc
    • 1 = default bikini
    • 2 = personal dress
    • 3 = school uniform
    • FF = player's choice.
  • 5 determines the location. Parameter value corresponds to lines in adv_load_map.lst

15

Unknown; appears to be some kind of if/then/else construct

Int32 - Number of times to repeat loop A. Always 1 in known sdt files.
Byte - Always 0
Int32 - (Number of commands for if true?)
Int32 - (Number of commands for if false?) (Always 0 in known sdt files.)

(Loop A)
Int32, Byte, Byte, Byte, Int32 - Unknown; possibly condition to be tested.
(End loop A)

(data) - Commands (for if condition is true?)

(data) - Commands (for if condition is false?)

16-19

Not present in any known sdt files.

20

Stops script execution.

21

Not present in any known sdt files.

22

Jumps to a label within the file. Labels are set by code 10.

Text - Name of label

23-24

Not present in any known sdt files.

25

Delay, can be skipped by pressing mouse.

Int32 - Duration in milliseconds.

26

Loads information from/based on .lst files. (Unconfirmed, but seems highly likely.)

Int32 - 0 for adv_load_map.lst, 1 or higher for adv_load_cha.lst. Has not been seen higher than 3.
Byte - 0 if Int32 is 0, 1 otherwise (0 for map, 1 for character?)
Text - Seems to be either "adv_load_cha.lst", "adv_load_map.lst", or "NULL"
Int32 - Refers to a line in the .lst file. 0 if text is "NULL"

With adv_load_map.lst, loads a location for the scene.

With adv_load_cha.lst, loads characters for the scene. Int32 is a number which is used by other commands to refer to that character.

When text is "NULL", unloads the map or a character from memory. (Based on value of Int32.) Always done before a second map is loaded.

27

Unknown
In some randomly selected examples, always preceded by a code 30 or another code 27.

Int32
Byte
Int32
Int32

28

Tilt Head?
In some randomly selected examples, was always followed by a code 29.

Int32 Character Id
Int32
Int32
Byte

29

Unknown

Int32 - Unknown
Int32 - Always 0xFFFFFFFF if text value is "NULL"
Text - Often "NULL", sometimes what looks like a mesh name

30

Moves a character to a new pose

Int32 - Character id from a code 26 line
Int32 - Always -1 (0xFFFFFFFF)
Int32 - Pose to switch to
Byte - Always 0
Byte - Always 0
Byte - Always 0 or 1

31

Sets a character's expression.

Int32 - Character id, from a previous code 26.
Int32 - Code for eye expression
Int32 - Code for mouth expression
Byte - Always 0 or 1

32

Moves a character to a specified location
Often seems to be preceded by code 26 and followed by code 33.

Int32 - Character id
Byte - Always 0
Int32 - Interval to spend walking, in milliseconds
Float32
Float32
Float32
Byte - Always 0 or 1

33

Make a character face a given direction

Int32 - Character id
Byte
Int32 - Interval to spend turning to face new direction
Int32 - Usually 0
Float32 - New direction. Not sure if relative or absolue.
Int32 - Usually 0
Byte

34-35

Not present in any known sdt files.

36

Add/remove a mesh to a character, such as clothing.

Int32 - Character id
Int32
Text - Contains the name of a mesh of that character. (May be in head or body .xx file. Names can be found in the cat*.lst files)
Byte - 0 to add, 1 to remove.

37

Unknown

Float32

38

Code 38 is capable of either zooming or moving the camera forward/backward. Details unknown.

Byte - Always 0
Int32 - Time to spend moving camera
Float32
Float32
Float32
Byte - Always 0 or 1

39

Camera movement

Byte
Int32 - Time to spend moving camera
Int32 - Float?
Int32 - Float?
Int32 - Float?
Byte

40

Not present in any known sdt files.

41

Unknown

Int32
Int32

42

Unknown
Seems to often be followed by 43-47 in sequence.

43

Unknown

44

Unknown

45

Unknown

46

Unknown

47

Unknown

48

Gradually blends the entire scene to/from the given color. Dialog text will still be displayed. Screen stays blended until the next code 48.

Byte - 1 to blend to the color, 0 to blend from it.
Int32 - Color
Int32 - Time to spend blending, in milliseconds.

49

Unknown

Int32
Byte