Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Author Topic: Modding the Tariff Rate  (Read 3378 times)

skeolan

  • Ensign
  • *
  • Posts: 3
    • View Profile
Modding the Tariff Rate
« on: October 26, 2014, 03:28:41 AM »

This seems like it should be so easy it probably doesn't constitute a "mod" but I'm hoping someone has tinkered enough with the configuration JSON files to help me figure out what I'm missing here.

Villanelo mentions modifying the tariff rate to change the feel and flow of the new trade economy:

... So I started looking at the files, and when I found a way to change the tariffs, I changed them, to 12% ...

What do I have now? A game where you have to pay A LOT of attention to where to buy, where to sell, and how much it costs you to move things... Now I FEEL like a trader...

But, I'm stumped on how to reproduce that change: I must be looking in the wrong places, because I tried a couple of different changes to existing game files and all the tariffs in-game are still 30%.

- Edited starsector-core\data\campaign\econ\economy.json to change "defaultTariff":0.3, into "defaultTariff":0.12,. I closed the game, made the edit, reopened and started a brand-new game from scratch to get it to regenerate the economy and such; made no difference.
- Edited saves\save-folder-12345\campaign.zip\campaign.xml -- a number of different <MS.StatMod s="default_tariff" t="FLAT" v="0.30"></MS.StatMod> elements that I changed to v="0.12" to no effect.

I ran a findstr for all instances of the term "tariff" under starsector-core\ but can't find anywhere else that isn't commented out. Evidently this JSON entry isn't what I'm looking for; What am I missing here?
There must be something fundamental about how these JSON and campaign.xml files modify the game.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 15352
    • View Profile
Re: Modding the Tariff Rate
« Reply #1 on: October 26, 2014, 10:21:47 PM »

The defaultTariff value in economy.json isn't actually used except for an internal simulation tool. It defaults to 0.3 (which is currently hardcoded, which isn't good - it should probably default to defaultTariff. I mean, that's why the value is there. However, not all is lost!

Each .faction file can have the following values configured (see hegemony.faction for a commented-out example):
"tariffFraction":0.4,
"tollFraction":0.1,
"fineFraction":0.25,

So, you can adjust it there - per faction - and it should work. These values are optional and most .faction files don't have them in them, making it difficult to find.
Logged

Probe1

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Modding the Tariff Rate
« Reply #2 on: April 05, 2017, 07:22:09 AM »

Hey Alex is this still handled the same way?  I appreciate that the threads 3 years old but its still the same topic of inquiry.  

I added in the recommended lines from Hegemony.faction into player_npc.faction from the Nexerelin mod http://fractalsoftworks.com/forum/index.php?topic=9175.0 .  Lines 24-26.  

https://pastebin.com/JW0zDGUS

It didn't have an effect in game and I'm still being charged 15% on Tariffs by my own faction  ::)  .  It doesn't require a new save does it? (Edit: Tested, new save did not help)
« Last Edit: April 05, 2017, 08:37:54 AM by Probe1 »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 2408
    • View Profile
    • Bitbucket profile
    • Email
Re: Modding the Tariff Rate
« Reply #3 on: April 05, 2017, 08:15:33 AM »

Nexerelin doesn't use the .faction tariff values; maybe I ought to make it do so.

In Nexerelin/exerelin_config.json there's a baseTariff variable and a freeMarketTariffMult (for markets with the Free Port condition). There's no way to set tariffs for a specific faction unfortunately.
Logged

cjusa

  • Captain
  • ****
  • Posts: 339
  • Missiles and Mecha, my boys. Missiles and Mecha
    • View Profile
    • Email
Re: Modding the Tariff Rate
« Reply #4 on: April 05, 2017, 08:20:38 AM »

Nexerelin doesn't use the .faction tariff values; maybe I ought to make it do so.

In Nexerelin/exerelin_config.json there's a baseTariff variable and a freeMarketTariffMult (for markets with the Free Port condition). There's no way to set tariffs for a specific faction unfortunately.
So I assume it would be changed under specific planets, or perhaps a planetary condition/event can be set to force tariffs?
Logged
"Light the Stars with your Incendiary Rounds!"
"They thought I was insane for thinking I could push Jangala into the sun! Boy, were they wrong."

Probe1

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Modding the Tariff Rate
« Reply #5 on: April 05, 2017, 08:35:35 AM »

Nexerelin doesn't use the .faction tariff values; maybe I ought to make it do so.

In Nexerelin/exerelin_config.json there's a baseTariff variable and a freeMarketTariffMult (for markets with the Free Port condition). There's no way to set tariffs for a specific faction unfortunately.
Thank you very much for the immediate response Histidine.  I first looked at exerelin_config.json which led me to google this thread after inserting
Code
	public static boolean followersTariff = 0f
into Followers faction.  As you said, neither subtype attempt has been carried on into the game.  I'll play around with the code some more today and see if I can't figure out java.
Logged