-
Notifications
You must be signed in to change notification settings - Fork 0
Gravity Parameters
While most stages throughout the franchise have a flat gravitational plane, only two stages simulate a small body with its own center of gravity. Those stages are Mario Galaxy and Windy Hill Zone.
Create a new key–value pair under the gravity_param table, where the key is the internal stage name, and the value is a sub-table specifying the gravity parameters, where:
-
is_gravity_normaldetermines if the stage should assume a flat gravitational plane. -
pos.xdetermines the position of the custom center of gravity along the x-axis. -
pos.ydetermines the position of the custom center of gravity along the y-axis.
Examples are given below:
[gravity_param]
Mario_Galaxy = { is_gravity_normal = true }[gravity_param]
Sonic_Windyhill = { pos.x = 0.0, pos.y = -50.0 }[gravity_param]
Metroid_Kraid = { is_gravity_normal = false, pos.x = 0.0, pos.y = 0.0 }To conform with how the game configures stages with a custom center of gravity, it is recommended to change the shape of the radar from a rectangle to a curved rectangle.
- Open
ui/param/info/hud_param.prcin a parameter editor. - Find the struct containing the target stage ID under the
stage_param_normal,stage_param_battle, orstage_param_endlist, depending on the form of the stage. - Change the value of
radar_shapetoradar_shape_fan.
Likewise, undoing the effect should reconfigure the value of radar_shape to radar_shape_square.
Regarding mod file distribution, keep in mind that this modification can result in file conflicts if two or more mods include this file. It may be wise to distribute the resulting mod file as a PRCX or PRCXML patch file to avoid this situation. A guide for creating a PRCX or PRCXML file can be found here.