Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Changing tariff percentage  (Read 3272 times)

ECG163

  • Ensign
  • *
  • Posts: 5
    • View Profile
Changing tariff percentage
« 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.
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Changing tariff percentage
« Reply #1 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.

ECG163

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Changing tariff percentage
« Reply #2 on: August 03, 2019, 12:14:55 PM »

What do i actually do with that? Where do i put it? Does "50f" mean 50%?
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Changing tariff percentage
« Reply #3 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

ECG163

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Changing tariff percentage
« Reply #4 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.
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Changing tariff percentage
« Reply #5 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.

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Changing tariff percentage
« Reply #6 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.
Logged

Clibanarius

  • Ensign
  • *
  • Posts: 21
    • View Profile
Re: Changing tariff percentage
« Reply #7 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.
Logged

Hiruuamon

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Changing tariff percentage
« Reply #8 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.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Changing tariff percentage
« Reply #9 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.
Logged