Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Pages: [1] 2

Author Topic: [0.95a] Dynamic Tariffs 1.3  (Read 28566 times)

Tuv0x

  • Ensign
  • *
  • Posts: 11
    • View Profile
[0.95a] Dynamic Tariffs 1.3
« on: December 16, 2020, 01:08:55 AM »

Dynamic Tariffs
Created by: Tuv0x
Download
Source

During a vanilla play-through, I decided that a 30% tariff while dealing with a faction I have good reputation with, just didn't make sense.
I figured I might as well break into the modding scene with a mod that handles this problem, not to mention it let me practice my seriously rusty Java.

DISCLAIMER:
I'm assuming there are no issues with 0.95a, this mod relies on very basic principles. If anything should come up reach out to me on Discord: Tuv0x#5263

What It Does:
Whenever you open a market, it modifies the tariff based on your reputation with the owning faction.
When you close a market, the modifications are removed, hence why this is a utility mod.

Compatibility:
This mod shouldn't have any issues with other mods because of the whitelist feature.
The whitelist in the settings.json are the only markets effected by this mod (currently only vanilla markets).
This was done because there are a handful of mods out there that handle markets in their own way when it comes to tariffs.
You could potentially have issues with this mod if you (or a mod) edited the default tariff in /data/campaign/econ/economy.json

Default Tariffs:
Suspicious: 30% Neutral: 25% Favorable: 20% Welcoming: 15% Friendly: 10% Cooperative: 5%
Commission discount: 5%
These are sort of random, I haven't tested them that much.
If you don't like these edit the settings.json


Thanks
Huge thanks to the folks in discord including:
LazyWizard, stormbringer951, extremely loweffort art god, Rubin, and Jaghaimo (for the capital P in modPlugin).

Be warned:
Take account of your faction reps when doing trader runs, it can make things more tricky

Settings.json
Spoiler
dt_percents defines what tariffs should be at each level of reputation from Suspicious to Cooperative.
dt_granular if set to true (default) will offer all values in-between the set percents based on your actual reputation level. Note: if set true, if you reach 100 reputation with a faction your tariffs will be 0%.
dt_commission if enabled (default) will give you a discount when commissioned with the market's owning faction.
dt_commDiscount is how much it should discount (default is 5%)
dt_whitelist contains all of the vanilla market id's, these will be the only markets that are effected, if you wish to add some markets, just add their market id's to the list.
[close]
Changelog:
Spoiler
1.3 - Added Granular Tariffs (percentage tariffs in between each milestone)
1.2h - Hotfix for crashing when a market doesn't exist, added commission feature that can lower tariffs further in markets you are commissioned with.
1.1 - Reworked the code a bit. Instead of modifying on every market open/close, it now modifies all whitelisted markets when you load your save. Before you save, it removes all modifications, and after you save (if you're just quick saving) it reimplements all of the modified changes. It will also do this on the fly if your rep changes with a faction (I see you selling all those drugs on the black market).
1.0 - Release!
[close]


Tartiflette

  • Admiral
  • *****
  • Posts: 3312
  • Toss a coin to your Modder, O' valley of plenty
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #1 on: December 16, 2020, 02:58:23 AM »

While I think 0% for cooperative is going too far (why is there a black market then?) but I will definitely use it with more conservative values, 10% at best probably. Good work regardless, and thanks for making it mod friendly!
Logged
 

IonDragonX

  • Captain
  • ****
  • Posts: 495
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #2 on: December 16, 2020, 05:28:29 AM »

Thanks, Tuv0x!
Since you also added your modding guide, you might want to edit your profile signature to hyperlink to both of your contributions.

Chairman Suryasari

  • Captain
  • ****
  • Posts: 363
  • The Deployer of John Lennon's.
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #3 on: December 16, 2020, 07:31:29 AM »

It's good concept, it's give reason of why other trader keep loyal to one faction in the game world, and 0 tariff for cooperative is reasonable imo, i mean i'm conquering about 5-6 pirate colony already, atleast make my 7th conquest easier. It's always bother me why the Hegemony always complaining why i keep buying marines on the black market to takedown Kazeron when they put stupid tariff of 30%.
Logged
"Kids under 13 shouldn't have access to the internet. if 10yo me were on tumblr and read about suicide and depression 5 hours a day, every day, god knows i would jump off a bridge if my parents ever yell at me."

-Some random Youtube comment on video about Sonic OC.

Vex2

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #4 on: December 16, 2020, 10:01:25 AM »

Good idea for a mod and I'm honestly surprised its not been done before now I think about it.
I do agree with Tartiflette, but chances are most players will have their own idea on what makes a good value.

Will definitely be downloading this for next time the SS itch kicks in, will give a better incentive to finally try a trader run.
Logged

Tuv0x

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #5 on: December 16, 2020, 12:55:29 PM »

While I think 0% for cooperative is going too far (why is there a black market then?) but I will definitely use it with more conservative values, 10% at best probably. Good work regardless, and thanks for making it mod friendly!

The Devil's Advocate in me wants to to say that if you wanted to keep "clean" while in a playthrough, you could earn a 0%. But like I said, the values I chose were kind of random, and imbalance is kind of inevitable based on the player's perspective.
I had lots of help from the Discord to make sure there was a solution to make this mod friendly, glad I could do so!

Thanks, Tuv0x!
Since you also added your modding guide, you might want to edit your profile signature to hyperlink to both of your contributions.

No problem!
I will go ahead and add them!

Good idea for a mod and I'm honestly surprised its not been done before now I think about it.
I do agree with Tartiflette, but chances are most players will have their own idea on what makes a good value.

Will definitely be downloading this for next time the SS itch kicks in, will give a better incentive to finally try a trader run.

I was surprised it didn't exist as well.

I might have found a small hitch for trader runs, which I will be looking further into. Basically, when going to a market and trying to find surplus/shortage, I don't know how the math is done for the prices bought/sold, so the Dynamic Tariffs might screw you over if your Tariff with the shortage market is higher than the market you are buying from.
I will see what I can do with the tooltips and see if it is something I can patch up.

Coward

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #6 on: December 16, 2020, 01:50:59 PM »

Oh cool, this way I don't end up doing all my business in the Magec system to escape tariffs.

Have you thought about adding an option where commissioning with a faction reduces their tariffs on top of the opinion modifier? That seems like a more reasonable way to achieve a 0% tariff than just reaching cooperative rank.
Logged

Tuv0x

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.0
« Reply #7 on: December 16, 2020, 04:05:01 PM »

Oh cool, this way I don't end up doing all my business in the Magec system to escape tariffs.

Have you thought about adding an option where commissioning with a faction reduces their tariffs on top of the opinion modifier? That seems like a more reasonable way to achieve a 0% tariff than just reaching cooperative rank.

Sounds like a good option, I like this. I'm in the middle of rewriting it to fix the current trade issue (deficits/surplus trading), I can definitely implement something like this, and make it a toggled option in the json (true:false) with how much MORE the tariff should be modified.

PreConceptor

  • Lieutenant
  • **
  • Posts: 67
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.2h
« Reply #8 on: December 23, 2020, 03:53:18 PM »

Nice idea. If I'm understanding it correctly, it won't work with mod-added markets unless you add the to the whitelist, correct?
Logged

Tuv0x

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.2h
« Reply #9 on: December 24, 2020, 08:41:41 PM »

Nice idea. If I'm understanding it correctly, it won't work with mod-added markets unless you add the to the whitelist, correct?

Correct, there are a lot of mods that have custom markets that manage their own tariffs, this was the only safe way to implement this idea and have it compatible with anything out there. Vanilla markets are the only whitelisted markets in the stock settings.json

Arathorn

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #10 on: March 28, 2021, 05:08:00 PM »

Testing it on 0.95a RC10, all is working so far. Got 0% tariff from a cooperative + commissioned faction, and a 10% tariff from a welcoming faction.
Logged

theloathable

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #11 on: March 30, 2021, 04:13:49 PM »

Testing it on 0.95a RC10, all is working so far. Got 0% tariff from a cooperative + commissioned faction, and a 10% tariff from a welcoming faction.

Thanks :).
Logged

lazloner

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #12 on: April 02, 2021, 06:59:27 PM »

What's the best way to get a list of mod-added markets? I'm pretty new to modding ss so I don't know if mods include a list of markets they add or not.
Logged

Hamyr

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #13 on: April 05, 2021, 11:17:36 PM »

Testing it on 0.95a RC10, all is working so far. Got 0% tariff from a cooperative + commissioned faction, and a 10% tariff from a welcoming faction.
Downloaded this mod and it is NOT compatible with 0.95a-RC12; I can't activate it in the Loader Mods screen.
Logged

dk1332

  • Commander
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #14 on: April 05, 2021, 11:41:58 PM »

Downloaded this mod and it is NOT compatible with 0.95a-RC12; I can't activate it in the Loader Mods screen.

It's because you didn't edit the mod_info.
Logged
Pages: [1] 2