FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Implement variable transport speeds #6309

Open Basilisk3 opened 4 days ago

Basilisk3 commented 4 days ago

Implement transports moving at different speeds depending on how many and which types of units they have loaded. Closes #6186.

Description of the proposed changes

Stat changes:

Transport MaxAirspeed: 10 --> 10.75 (Tech 1 Transports) MaxAirspeed: 13.5 --> 14.5 (Tech 2 Transports) MaxAirspeed: 15 --> 17.5 (The Continental)

Land units UnitWeight: 0.15 (Tech 1 land units) UnitWeight: 0.3 (Tech 2 land units) UnitWeight: 0.6 (Tech 3 land units) UnitWeight: 1 (ACUs and SACUs) UnitWeight: 1 (Tech 4 land units for compatibility with survival maps)

The UnitWeight stat can be tweaked for each unit individually, though I did not do it here for consistency reasons. For example, you can make LABs lighter than tanks. The UnitWeight stat has also been made visible in the UI in the additional unit details displayed when Show Armament Detail in Build Menu is enabled.

Additional context

Checklist

Basilisk3 commented 4 days ago

@EvildrewFAF This is my own implementation of this idea. You are obviously free to do whatever you want with it. Since your implementation is more detailed, overriding this would be the easiest solution to keep your mod compatible. Alternatively you could build your own implementation on top of this one.

@Garanas @lL1l1 If you have time, please consider giving this a review. I would be very thankful if someone could populate the UnitWeight stat with a script, so I do not have to do it manually.

Garanas commented 3 days ago

Are you referring to this blueprint value: https://github.com/FAForever/fa/pull/6279

lL1l1 commented 3 days ago

Also the stat should be added to blueprints-units.lua's post-processing for mod compatibility.

Basilisk3 commented 3 days ago

Also the stat should be added to blueprints-units.lua's post-processing for mod compatibility.

Done. Thanks for reviewing.

Basilisk3 commented 2 days ago

Are you referring to this blueprint value: #6279

The UnitWeight stat is now populated via blueprints-units.lua. We could also populate the field in the blueprints themselves to make the stat more visible.

Garanas commented 1 day ago

Are you referring to this blueprint value: #6279

The UnitWeight stat is now populated via blueprints-units.lua. We could also populate the field in the blueprints themselves to make the stat more visible.

I'll look into it for you 👍