Made tweakunits load before tweakdefs and extended available tweakunits/defs slots - #6597
Made tweakunits load before tweakdefs and extended available tweakunits/defs slots#6597goldjee wants to merge 2 commits into
Conversation
|
10-30 probably need to be added here as well https://github.com/beyond-all-reason/spads_config_bar/blob/main/etc/battlePresets.conf#L10-L29 |
|
Thanks for pointing out! Sent a PR there as well. |
|
Do not merge this PR before an announcement is made so all current tweak users can modify their tweak scripts accordingly. |
|
@PtaQQ Please coordinate announcing and merging the two PRs.
|
|
Also don't we need a Chobby PR to expand the tweak inputs to 30? |
|
@AntlerForce can you check the above question pls? |
Disclaimer: Am not tweak enthusiast From what I can tell the answer is No. We don't need a chobby PR because modoptions config is pulled from the game repo itself. The only tweak-specific code in chobby is one line that automatically enables legionfaction if the tweak references legcom and this part which provides a summary (or failure report) if the key starts with tweakdefs/tweakunits: |
|
@PtaQQ Reminder to coordinate release of this |
|
@PtaQQ Don't forget.... |
|
@PtaQQ :) |
Work done
Altered the processing order of tweaks so tweakunits are prioritized over tweakdefs. This change allows setting up simple unit definitions and then tweak them in bulk using tweakdefs. For example, one might want to add new units for a lobby, and then apply an optional tweak that iterates over all the units in the game and removes their metal cost. Previously it wasn't possible.
Changed available tweakunits and tweakdefs slots from 10 to 30 to allow more heavily modded lobbies.
Addresses Issue(s)
Test steps
!bset tweakunits<N> <base64>, where N is omitted for slot 0, and max N is 29. The commands should be accepted without errors. The lobby should start normally and expected unit definitions added by the commands should be added to the game.!bset tweakdefs<N> <base64>, where N is omitted for slot 0, and max N is 29. The commands should be accepted without errors. The lobby should start normally and expected tweaks should be applied.Example "no metal cost" tweakdefs script:
Corresponding
bsetcommand: