Closed tnevolin closed 3 years ago
I don't quite follow you here. On vanilla binary/Transcend all factions get 2 starting colonies. The fact that all factions get assigned an extra colony there might be an oversight but not sure if people want to change it. The fix doesn't take difficulty into account, maybe it should. So how many do you think is the correct number of colonies to spawn vs difficulty/faction type?
There are 2 distinct mechanics here.
First one is not broken. No need to fix it.
Second one is broken for all later starters computer players due to bonus colony algorithm not being execute for them.
Check this. It properly fixes it by running the actual balance algorithm. https://github.com/tnevolin/thinker-doer/blob/ba131567e1b4a9350f783a11465cf79dad40ddc1/src/patch.cpp#L170
The end result is still that alien factions don't get an extra colony compared to others on Transcend even if some other piece of code spawns a colony while another does not. Don't like using magic global variables for patches either. Honestly I think balance function code is mostly redundant for gameplay and it would not make sense to replicate it in open source. Just think about the design there for a moment. Thinker already tries to balance faction starting locations with faction_placement so then running some other piece of code to "balance" them is very redundant. I'll just remove the fix and let it run on vanilla defaults now. Maybe think later if balance() could be replaced with something else.
Absolutely. Do what you think is right.
https://github.com/induktio/thinker/blob/ac4852e37634e22c7e11bd15451d3834a3e09f47/src/patch.cpp#L132
You are fixing the wrong thing here. Alien factions DO get their extra colonies as defined in their configuration file.
The problem is that late starters (alien faction + Cult of Planet) are not getting their bonus colony due to game conditions which has nothing to do with faction preconfigured extra colony.
Test your game with three above factions and you'll see that alien factions get extra colony but Cult does not.
The correct fix is described here already. You can just import my code which is already embedded into mod_setup_player. https://github.com/induktio/thinker/issues/15