• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Kamisis12

Private
May 2, 2020
16
7
So I am pretty bad at modding. Know just a bit of C#(battletech modding). I need help fixing the slaves bought too fast problem. It is breaking the game for me and don't want to wait for a hotfix.

The bug report can be found in the link: https://forum.paradoxplaza.com/foru...ket-come-and-go-too-fast-to-buy-them.1474402/

Can anybody give me some guidance on where to look what to do. Couldn't find anything in the common folder. Think I need to dig in the dlls(starts wailing)
 
Probably not much that can be done.

As far as I can tell, the entire process of buying and selling slaves is handled in code, not script, and there are almost no defines that have been exposed to be accessible for modding. Only these few:

Code:
        SLAVE_BUY_EC_THRESHOLD = 1000 # if we have less ec than this, dont buy slaves
        SLAVE_BUY_UNEMPLOYMENT_THRESHOLD = 2 # if any one planet has this many unemployed pops, don't consider buying slaves for it
        SLAVE_BUY_HABITABILITY_THRESHOLD = 0.4 # if we cant find a planet with at least this much habitability for a prospective slave, dont buy it

        SLAVE_SELL_EC_THRESHOLD = 3000 # if we have more ec than this and a positive net income, then don't sell any slaves
        SLAVE_SELL_UNEMPLOYMENT_THRESHOLD = 1 # if any one planet has this many unemployed pops on it, consider selling one as a slave
        SLAVE_SELL_MIN_POPS = 1            # do not sell slaves from this planet if it has this amount of pops, or less

You could increase SLAVE_BUY_EC_THRESHOLD to a ridiculous high amount to prevent the AI from buying them, but aside from being rather cheesy, that comes with a few problems of its own, such as the likely outcome that the slave market fills up to its max of 100 pops and pops stay there forever, except if you buy them - forcing you to buy even the bad ones over time.
 
  • 1
Reactions: