Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: ECG163 on August 03, 2019, 11:44:08 AM

Title: Changing tariff percentage
Post by: ECG163 on August 03, 2019, 11:44:08 AM
Is there any way of modding the tariff percentage? I tried doing what a post from 2014 said, but it didn't work at all.
Title: Re: Changing tariff percentage
Post by: Sundog on August 03, 2019, 12:13:16 PM
Code
Global.getSector().getEconomy().getMarket("id_of_market").getTariff().modifyPercent("my_tarrif_modification", 50f);
There may be ways to do it without scripting, but I'm not aware of one.
Title: Re: Changing tariff percentage
Post by: ECG163 on August 03, 2019, 12:14:55 PM
What do i actually do with that? Where do i put it? Does "50f" mean 50%?
Title: Re: Changing tariff percentage
Post by: Sundog on August 03, 2019, 12:36:59 PM
Ok, so I think I found an easier way to modify tariffs. You should be able to change the defaultTariff setting in \data\campaign\econ\economy.json
Title: Re: Changing tariff percentage
Post by: ECG163 on August 03, 2019, 12:39:24 PM
That doesn't work. I tried it, it did nothing. I've also tried changing the tariff fraction in each of the .faction files, aswell as changing the campaign.xml in my save folder. None of them work.
Title: Re: Changing tariff percentage
Post by: Sundog on August 03, 2019, 04:17:32 PM
Hmm. Yup. I just tested it and it looks like that default is set at sector generation, so that setting will only be applied to a new game.
Title: Re: Changing tariff percentage
Post by: Harmful Mechanic on August 03, 2019, 10:52:33 PM
Yeah, it's set at generation, not dynamically, so you need to create a new sector for it to take effect.

You may also be able to change it after sector generation on a per-market basis by running code in a console command; I'm not able to test this right now, however.
Title: Re: Changing tariff percentage
Post by: Clibanarius on August 05, 2019, 10:29:12 AM
If you use Nexerelin, exerelin_config.json in the base folder of the mod has an entry that controls tariff rates across most places in the game world.
Title: Re: Changing tariff percentage
Post by: Hiruuamon on October 18, 2019, 04:31:19 PM
I was able to change my tariff rate in my current game by changing my save file.  There are a lot of rates to change, but I used notepad +++ and I also changed in in the overall galaxy, so if I generate a new game, I'll be set.  A dynamic rate change between 5-30% depending on global condition would be nice and would encourage dynamic trading, rather than just boring single route...dunno why this idea wasn't implement, unless they wanted battles, battles, battles.  I set all of my tariff rates to 10%, btw.  30% all the time for both buying and selling is absolutely ridiculous, imho.
Title: Re: Changing tariff percentage
Post by: Alex on October 18, 2019, 04:41:40 PM
IIRC if you put:

"tariffFraction":0.1,

In a .faction file, that would change the tariffs for that faction to 10%. Can use another number, of course.