liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

Some new SaveSystem fields used by Maniac

Open florianessl opened this issue 10 months ago • 7 comments

I nearly forgot I was sitting on these values for a week. I haven't seen any documentation on these new fields anywhere yet, so I wrote some down while I was trying out the new functionalities.

All of these new fields seem to only be serialized, whenever one of the new command variants is actually used.

Only '0x86' seems to always turn up inside saves, even without using any new commands. Can't figure that one out yet, it's alway 1.

Display Text Settings

SaveSystem,maniac_window_size_width,f,Int32,0x2D,0,0,0,
SaveSystem,maniac_window_size_height,f,Int32,0x2E,0,0,0,
SaveSystem,maniac_font_name,f,DBString,0x2F,,0,0,
SaveSystem,maniac_font_size,f,Int32,0x30,0,0,0,
SaveSystem,maniac_spacing_char,f,Int32,0x8E,0,0,0,(Editor value - 1)
SaveSystem,maniac_spacing_line,f,Int32,0x8F,0,0,0,(Editor value - 1)

Image

Change Faceset

SaveSystem,maniac_face_index,f,Int32,0x38,0,0,0,
SaveSystem,maniac_face_anim_end_idx,f,Int32,0x39,0,0,0,
SaveSystem,maniac_face_anim_interval,f,Int32,0x3A,0,0,0,
SaveSystem,maniac_face_interval_variation,f,Int32,0x3B,0,0,0,
SaveSystem,maniac_face_frame_per_cell,f,Int32,0x3C,0,0,0,
SaveSystem,maniac_face_fpc_variation,f,Int32,0x3E,0,0,0,
SaveSystem,maniac_face_anim_options,f,Int32,0x3F,0,0,0,

Image

Flag values for 'maniac_face_anim_options'

SaveSystem,ManiacFaceAnimation,force_update,1
SaveSystem,ManiacFaceAnimation,enable_animation,2
SaveSystem,ManiacFaceAnimation,enable_turnaround,4
SaveSystem,ManiacFaceAnimation,once,8
SaveSystem,ManiacFaceAnimation,limit_interval_variation_to_positive,16
SaveSystem,ManiacFaceAnimation,limit_fpc_variation_to_positive,32
SaveSystem,ManiacFaceAnimation,apply_interval_to_turnaround,64

New Command 'Control Message'

Similar to the Battle hooks, but these are also serialized inside save data.

SaveSystem,maniac_ctrl_msg_hook_targets,f,Int32,0x32,0,0,0,
SaveSystem,maniac_ctrl_msg_callback_ce,f,Int32,0x42,0,0,0,
SaveSystem,maniac_ctrl_msg_callback_sys_number,f,Int32,0x43,0,0,0,
SaveSystem,maniac_ctrl_msg_callback_sys_text,f,Int32,0x44,0,0,0,
SaveSystem,maniac_ctrl_msg_callback_user_number,f,Int32,0x45,0,0,0,
SaveSystem,maniac_ctrl_msg_callback_user_text,f,Int32,0x46,0,0,0,

Image

Flag values for 'maniac_ctrl_msg_hook_targets'

SaveSystem,ManiacCtrlMsgHookTargets,user_event,1
SaveSystem,ManiacCtrlMsgHookTargets,create_window,2
SaveSystem,ManiacCtrlMsgHookTargets,destroy_window,4
SaveSystem,ManiacCtrlMsgHookTargets,text_rendering,8

florianessl avatar Feb 13 '25 19:02 florianessl

Great work, imo can be added to 0.8.1 so we have these chunks in. Though depends on #492 which gives more "Flag Flexibility" ;).

Ghabry avatar Feb 27 '25 14:02 Ghabry

@florianessl what is maniac_face_index doing? Is that different to face_id we already save?

Ghabry avatar Mar 03 '25 13:03 Ghabry

@Ghabry Testing revelead this to be the same as the already existing face_id, just duplicated. But it might actually store the current face index in case the animation feature is used. So would still need some investigation.

florianessl avatar Mar 03 '25 13:03 florianessl

The Window stuff and Hooks is fine but I'll omit the Face part for now until more research is done. Too much stuff that confuses me. These flags: Turnaround (?). Apply Interval at Turnaround (?). Frames per Cell (?), FPC Variation (?) o_O

Ghabry avatar Mar 18 '25 16:03 Ghabry

It looks like an animation system to doeyes blinking animations, and maybe mouth flaps too? seems to consider random intervals between frames too. This is what TPC help says about faceset stuff:

@msg.face

[argument]
Character string                   File name
String variable               File name

Numeric value                     File index
Variable                     File index
a..b                    Animated index a~b

.left                  Left alignment (default)
.right                  Right placement
.hrev                
.hreverse              Flip horizontally
.force                  Forced change even in situations where movement is suppressed, such as when text is being displayed.

[Arguments for animation]
.interval(a, b, c)      Wait time. Base frame a, random number increase/decrease b, flag c to limit random numbers to addition
.fpc(a, b, c)           Display time for one image. Base frame a, random number increase/decrease b, flag c to limit random numbers to addition
.once                  Do not loop animation
.loopback(a)            Loop back after finishing the specified range. Flag a for whether to set an interval by wrapping

jetrotal avatar Mar 18 '25 16:03 jetrotal

Sure and now explain to me what "Loop back after finishing the specified range. Flag a for whether to set an interval by wrapping" is supposed to mean ;).

Ghabry avatar Mar 18 '25 16:03 Ghabry

hm... from maniacs discord:

// Loop interval
// Basic frame: a, random variation: b, flag: c (restricts the random change to addition only)
.interval (a) (b) (c)   

// Frame per Cell
// Basic frame: a, random variation: b, flag: c (restricts the random change to addition only)
.fpc (a) (b) (c)   

// Do not loop the animation
.once

// After the specified range is completed, reverse direction
// Flag a determines whether to insert an interval during the reversal
.loopback (a)

// Force execution during moments when normal operation is disabled (e.g., while text is being displayed)
.force

looks like a ping-pong animation style where:

  • plays a sequence of frames (1...2...3...4)
  • wait for a frames? seconds? game ticks?
  • plays the sequence in reverse (3...2...1)

jetrotal avatar Mar 18 '25 16:03 jetrotal