Oh dear, it seems everybody else just didn't look quite hard enough... You all thought it was impossible, you all denied the truth! But it looks like the tables have turned...A wild tutorial appeared!
Marth used Post!
It was super-effective!
As you may know from reading the thread's title, I have finally figured out how to alter the game's gravity settings, or rather, the speed and way which a unit falls. The reason I care so deeply about doing this is for the Sol Map Pack, which, if you know anything about it, pretty much requires changes to the gravity if it is to truly simulate cosmic environments such as Luna, or Pluto, or Venus, or Titan. Nonetheless, this works well and is a good enough simulation of low gravity.
Anyway, enough of that - onto the tutorial.
****Note that the changes made in this tutorial are specifically configured for Luna’s gravity. Edit them for your own map as needed.****
- Browse to data_ABC\Common\scripts\ and open up globals.lua. Scroll down until you see this:
Code: Select all
Land = { Size = 3, Vec = { {0.0,-1.0,0.0}, {0.0, 0.2, 0.0}, {0.0, 0.0, 0.0}, }, Slope = { {0.0, 0.2, 0.0}, {0.0, -0.2, 0.0}, {0.0, 0.0, 0.0}, }, Ore = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, }, RSlope = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, }, Time = { .17, .17, .17 }, }
- The last set of values – the Time values – is what we want to change. For Luna, I set them all to 17.17. Here’s what that would look like:
Code: Select all
Time = { 17.17, 17.17, 17.17 },
- Once you’ve made your changes, save and exit. Then, browse to data_ABC\Common\odfs\ and open up com_inf_default.odf. Here, we will edit the jump values. First, change JumpHeight to 6.8. Then change JumpForwardSpeedFactor to 1.8, and JumpStrafeSpeedFactor to 1.6. Now, under SprintAccelerateTime, add this line:
Code: Select all
// So units don't hurt themselves from jumping in low-gravity atmospheres CollisionScale = "0.0 0.0 0.0"
- Now, in the ControlSpeed section, change the jump thrust factor to 0.09, so it looks like this:
Code: Select all
ControlSpeed = "jump 0.09 0.03 0.35" // 0.03 0.03 0.35
- Save and close. Next, browse to data_ABC\Common\ and open ingame.req. Delete all of the contents in the file – minus any of your own custom things that you want to keep loaded – and change it so it looks like this:
Code: Select all
ucft { REQN { "animbank" "human" "humanfp" "humanlz" } REQN { "class" "com_item_powerup_ammo" "com_item_powerup_health100" "com_item_powerup_health25" "com_item_powerup_dual" "com_item_powerup_offense" "com_item_powerup_defense" "com_item_powerup_energy" "com_inf_default" } }
- Save and close. Now, open up your mission’s LUA, and add these lines above ReadDataFile(“ingame.lvl”):
So it looks like this:Code: Select all
ReadDataFile("dc:common.lvl") ReadDataFile("dc:ingame.lvl")
Code: Select all
ReadDataFile("dc:common.lvl") -- This loads globals.lua ReadDataFile("dc:ingame.lvl") -- This loads com_inf_default ReadDataFile("ingame.lvl")
- Save and exit. Now run VisualMunge and munge with Common checked.
- Once it’s finished munging, browse to data_ABC\_LVL_PC\, copy common.lvl and ingame.lvl, and paste them into GameData\addon\ABC\data\_LVL_PC\.
- Run Battlefront and have fun with low gravity!
I plan on adding onto this tutorial, making it more comprehensive - all once I learn more about the values and parameters in globals.lua myself. I also plan on creating a proof-of-concept video pretty soon in the near future, so be on the lookout for that as well.
If anybody has any questions or queries, you know what to do.