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)

Pages: 1 [2] 3

Author Topic: [0.96a-RC10] Dynamic Tariffs 2.0  (Read 109474 times)

q-rau

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #15 on: April 08, 2021, 03:11:25 PM »

Do you have any interest in having tariffs react to things other than player rep? I think it would be interesting if markets that were in a shortage lowered tariffs on incoming (ie player-sold) goods to attempt to alleviate it.
Logged

5ColouredWalker

  • Commander
  • ***
  • Posts: 125
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #16 on: April 11, 2021, 12:45:23 AM »

Do you have any interest in having tariffs react to things other than player rep? I think it would be interesting if markets that were in a shortage lowered tariffs on incoming (ie player-sold) goods to attempt to alleviate it.

Given that relieving a planet suffering shortages a couple of times easily makes you a millionaire, there's plenty of incentive without adjusting tariffs.
Course, what's really fun is when you load up on supplies, get to the destination, and the AI beat you too it.
Logged

AliTanwir

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #17 on: April 27, 2021, 12:25:14 AM »

Hi, is there any way to config the mod to apply to all markets? I know that some modded markets have their own tariffs but Im a bit lazy to write every modded market.
Logged

thorkellthetall

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #18 on: April 27, 2021, 02:39:21 PM »

Hi, is there any way to config the mod to apply to all markets? I know that some modded markets have their own tariffs but Im a bit lazy to write every modded market.

The easiest way to do this manually (that I've found) is to use console commands, use the "list" command for "list markets", open the log in the starsector core folder, and copy every market listed there. (Tab out and do this immediately after entering the command, as the output will just be at the bottom on the plaintext log file, but any other actions in game will push it up)
I threw it all into notepad++ then did a few regular expressions to clean it up.

Keep in mind that wrap around will mess up regular expressions for this purpose depending on the expression and the document.
Keep in mind match case too.
Regular expressions will execute from your current document position onward until it reaches the end, unless wrap around is enabled in which it will do whatever it feels like. Execute these from the beginning of the document.

In my case as of starsector .95a-RC15 with console commands version 2021.4.10 for .95a-RC12, and Dynamic Tariffs version 1.3 for .095a-RC12 my starsector log outputs lines that look like this (For anyone from the future that might want to do this, in case the way console commands outputs to the log changes):

Quote
   sphinx in Samarra Star System    (Hegemony, Cooperative)
   staloplanet in Rama Star System  (Hegemony, Cooperative)
   station_kapteyn in Isirah Star System    (pirates, Vengeful)

There is white space in the front, and potentially at the back. The values we need are the first part which is the market id, the rest is just information.

1. ctrl + H to open Replace
Tick Regular Expression on the bottom left.
Find What: \in.*$
Replace with:
(Above field is deliberately blank)
Replace All

2. Edit -> Blank Operations -> Trim Leading and Tailing Space

3. ctrl + H to open Replace
Tick Regular Expression on the bottom left
Find What: ^
(Above is the regex anchor meaning the beginning of a line)
Replace with: "
Replace All

4. ctrl + H to open Replace
Find What: $
(Above is the regex anchor meaning the end of a line)
Replace with: ",
Replace All

5. Ctrl + A (Select All)

6. Ctrl + J (Edit -> Line Operations -> Join Lines)
(By default this will properly place a space inbetween each collapsed line on the single line. I do not know if notepad++ can be configured otherwise but keep this in mind if it doesn't)

7. Delete the extra comma at the very end of your finished single line.

There, now you have everything. Take that one line and neatly Overwrite the whitelist in this mod's settings, as the existing whitelist is vanilla markets which this output will also have. I don't know what double listings will do and I'm not about to find out. Keep in mind the final market id will have a comma at the end which you need to delete if you haven't already.

Someone could probably make a .bat that does all this, but I do not know how to do that. Depending on the number of faction mods you are running and on your computer literacy level, it might be faster to just manually apply the market ids after fetching them with "list markets" instead of doing this set of instructions.

Keep in mind as the mod author stated, you do this at your own risk depending on what a mod does to its added markets, as it might create mustard gas or something.

Thanks for coming to my TedX Talk.
« Last Edit: April 27, 2021, 04:24:50 PM by thorkellthetall »
Logged

Kalos

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #19 on: May 01, 2021, 08:57:54 AM »

How does this interact with nexerelin Tariffs? (the 9 and 18%?)
Will this overide Nexerelin, or will nexerelin override this?
Logged

Tuv0x

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #20 on: May 11, 2021, 07:26:06 PM »

How does this interact with nexerelin Tariffs? (the 9 and 18%?)
Will this overide Nexerelin, or will nexerelin override this?

It shouldn't overwrite anything that Nexerelin does, at least from what other mod authors have told me when I was programming this. The mod uses a whitelist in the settings.json file, only the vanilla markets are effected.

The way the mod is set up it should work just fine with all mods, UNLESS they had changed something with the vanilla markets. Also, this mod is a utility mod, it can be removed and added whenever you want.

Sundivingdownloader

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #21 on: May 11, 2021, 11:25:52 PM »

May want to include a primary "dynamic tariffs" folder to the zip file, before you get weird bug reports about it not showing up on the list.  Pretty much standard.  I missed it, thanks to normally just unpacking mods in bulk when a new update comes.
Logged

Simulated Knave

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #22 on: May 17, 2021, 08:51:40 PM »

You spelled "epiphany" wrong in the tags in the whitelist. :)

Says a lot about how sympathetic the Path are that this is a wonderful mod that everyone should use and I think I'm the first person to notice.
Logged

BHunterSEAL

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #23 on: May 22, 2021, 10:32:28 PM »

May want to include a primary "dynamic tariffs" folder to the zip file, before you get weird bug reports about it not showing up on the list.  Pretty much standard.  I missed it, thanks to normally just unpacking mods in bulk when a new update comes.

Came here to post this, anyone unpacking multiple archives to their Mods folder is going to wind up with your mod dumped in as lose files.
Logged

Oni

  • Captain
  • ****
  • Posts: 383
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #24 on: June 24, 2021, 05:09:16 PM »

I wonder.... how feasible would making each level a multiple/fraction of the normal rate be?

Such as:

Suspicious: 2x
Neutral: 1.5x
Favorable: 1x
Welcoming: 0.5x
Friendly: 0.25x
Cooperative: 0.01x

That way you could make it affect all markets, even modded ones since it would use whatever rate is "normal" for its base.
Heck it'd probably work with Nexerelin which lowers the default tariff rate.
« Last Edit: June 26, 2021, 04:33:40 PM by Oni »
Logged

Starslinger909

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #25 on: October 14, 2021, 01:57:17 PM »

How do you install this?
Logged

WalkerBoh

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Dynamic Tariffs 1.3
« Reply #26 on: December 10, 2021, 08:43:49 PM »

How do you install this?

Unzip the zip file in to your Starsector /mods folder.  I noticed it has no folder of its own, so I created a new 'Dynamic Tariffs' folder first in my /mods folder, and unzipped it in to that folder.  Start the game, click Mods.. on the launch panel and find the mod in the list.  Double-click it to turn it ON, then click save.  When you start the game, that mod should now be active for a new game or a saved game.
« Last Edit: December 11, 2021, 10:19:33 AM by WalkerBoh »
Logged

Chief_Curtains

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] Dynamic Tariffs 1.3
« Reply #27 on: January 07, 2022, 08:04:00 PM »

Hi, is there any way to config the mod to apply to all markets? I know that some modded markets have their own tariffs but Im a bit lazy to write every modded market.

The easiest way to do this manually (that I've found) is to use console commands, use the "list" command for "list markets", open the log in the starsector core folder, and copy every market listed there. (Tab out and do this immediately after entering the command, as the output will just be at the bottom on the plaintext log file, but any other actions in game will push it up)
I threw it all into notepad++ then did a few regular expressions to clean it up.

Keep in mind that wrap around will mess up regular expressions for this purpose depending on the expression and the document.
Keep in mind match case too.
Regular expressions will execute from your current document position onward until it reaches the end, unless wrap around is enabled in which it will do whatever it feels like. Execute these from the beginning of the document.

In my case as of starsector .95a-RC15 with console commands version 2021.4.10 for .95a-RC12, and Dynamic Tariffs version 1.3 for .095a-RC12 my starsector log outputs lines that look like this (For anyone from the future that might want to do this, in case the way console commands outputs to the log changes):

Quote
   sphinx in Samarra Star System    (Hegemony, Cooperative)
   staloplanet in Rama Star System  (Hegemony, Cooperative)
   station_kapteyn in Isirah Star System    (pirates, Vengeful)

There is white space in the front, and potentially at the back. The values we need are the first part which is the market id, the rest is just information.

1. ctrl + H to open Replace
Tick Regular Expression on the bottom left.
Find What: \in.*$
Replace with:
(Above field is deliberately blank)
Replace All

2. Edit -> Blank Operations -> Trim Leading and Tailing Space

3. ctrl + H to open Replace
Tick Regular Expression on the bottom left
Find What: ^
(Above is the regex anchor meaning the beginning of a line)
Replace with: "
Replace All

4. ctrl + H to open Replace
Find What: $
(Above is the regex anchor meaning the end of a line)
Replace with: ",
Replace All

5. Ctrl + A (Select All)

6. Ctrl + J (Edit -> Line Operations -> Join Lines)
(By default this will properly place a space inbetween each collapsed line on the single line. I do not know if notepad++ can be configured otherwise but keep this in mind if it doesn't)

7. Delete the extra comma at the very end of your finished single line.

There, now you have everything. Take that one line and neatly Overwrite the whitelist in this mod's settings, as the existing whitelist is vanilla markets which this output will also have. I don't know what double listings will do and I'm not about to find out. Keep in mind the final market id will have a comma at the end which you need to delete if you haven't already.

Someone could probably make a .bat that does all this, but I do not know how to do that. Depending on the number of faction mods you are running and on your computer literacy level, it might be faster to just manually apply the market ids after fetching them with "list markets" instead of doing this set of instructions.

Keep in mind as the mod author stated, you do this at your own risk depending on what a mod does to its added markets, as it might create mustard gas or something.

Thanks for coming to my TedX Talk.

I just want to chime in, this is amazing assistance. I'm not the one you were replying to but this reply is fantastic and really helped me get this done!
Logged

CreamPanzer

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.95.1a] Dynamic Tariffs 1.3
« Reply #28 on: February 04, 2022, 04:56:39 PM »

Great Mod, I am enjoying it. And it motives me to increase the relation with other factions.

However, in my next play, I am planning to install Nexerelin. It mentions tariff change as well. Will this cause troubles?

Thanks.
Logged

Xarlas

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.95.1a] Dynamic Tariffs 1.3
« Reply #29 on: February 26, 2022, 02:48:24 PM »

It seems this mod does not change the rate for player owned markets (colonies).
Is this intended ?
Logged
Pages: 1 [2] 3