Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: PriceChanger Utility Mod  (Read 7091 times)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7226
  • Harpoon Affectionado
    • View Profile
PriceChanger Utility Mod
« on: September 23, 2013, 02:55:23 PM »

Here is a utility mod that should allow everyone to easily change the prices of their resources. It is specifically designed to support multiple mods using it simultaneously and should have no compatibility issues except for resource name clashes or location name clashes. Attached below is the utility mod itself and a very basic implementation example: two resources (food and optics) with different prices at the hegemony, pirate, and tritach stations. To play with, enable both in the mods screen. Note that the example has a large CSV file for the resources. A python script is included in the example implementation that generates the large files easily.

Capabilities:
Register resources and their default prices.
Every sectorEntityToken you register gets its own set of prices. Its cargo is automatically kept up to date with this price set, which can be changed at any time.
----- If future mods enable trading with planets, other fleets, asteroids... this mod already works.
The player's inventory is automatically synched with the closest registered location.
Adding a new resource to the game adds that resource (with the default price) to all existing price maps. This allows future modded content to be added with 0 compatibility issues.
Get/set functions for individual and full pricemaps.
Add/remove resources for locations - extra convenience functions so you don't have to mess around with the resource id's.

Limitations:
Cannot change the value of supplies - swapping out the supply objects for ones with different ID's makes the game not recognize them as supplies.
Cannot change the value of fuel - same reason.
Cannot change the value of crew/marines - same reason.
-----If someone knows how to get around this, let me know!


Questions, comments, feature requests, or crash reports? This is NOT an economy mod - just the tools needed to change prices and a tiny example implementation.
Source is available for the curious but still being tweaked.

[attachment deleted by admin]
Logged

ssthehunter

  • Lieutenant
  • **
  • Posts: 53
    • View Profile
Re: PriceChanger Utility Mod
« Reply #1 on: September 24, 2013, 05:20:25 AM »

Hard mode, multiply all buy prices by 10.
Divide all sell prices by 3.
« Last Edit: September 24, 2013, 05:45:52 AM by ssthehunter »
Logged