X4: Foundations

X4: Foundations

115 ratings
Buy And Sell Stations
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
26.034 KB
29 Apr, 2024 @ 8:11am
7 May, 2024 @ 4:47pm
2 Change Notes ( view )

Subscribe to download
Buy And Sell Stations

Description
Player can sell stations to other factions and buy stations from other factions.

This mod is made by General Vash and all I did was make it compatible with 6.0. I asked and have received permission to upload this to steam so it can be enjoyed by everyone.

If and when General Vash starts modding again and he decides to expand on this mod I will take this one down and you can subscribe on his new version should it ever come to pass.

Enjoy being a station real estate mongol

=================================================
Usage and more expanded description
=================================================

This mod allows buying and selling of stations, except for defense stations, wharfs, shipyards, trade stations, or any faction's headquarters. These were excluded from purchase because I thought that governments would be extremely reluctant to sell strategic resources.

You can speak to any station manager and get an appraisal for the station, which prints to the logbook.
The appraisal for buying stations is as follows:

- The price of all the station's modules, the price of all drones, the price of all the station's cargo at max valuation, plus the price of the station's build plot. This is the base price.

- Then, every station owned by the faction which produces the same products of the station being appraised are evaluated for their relative prices to get the product which has the highest average relative price within the faction. That relative price is divided by 10 to arrive at a value between -0.1 and +0.1. Negative maximums are set to 0. This becomes the exponent accounting for product scarcity, i.e the scarcest product of a station which has relative price of +45% results in an exponent of 1.045, with a factor of 0 being an exponent of 1.

- If the station being appraised is the last station producing some ware owned by the faction, they automatically assign an exponent of 1.1 regardless of the relative price of the ware. This is to make it more difficult to monopolize every station producing some ware.

- The exponent is applied to base price. Formula ( Price of all modules + price of all drones + price of all cargo + price of build plot) ^ (1 + (relative price of scarcest product / 10 )

The appraisal for selling stations is as follows:

- The price of all the station's modules, the price of all drones, the price of all the station's cargo at max valuation, plus the price of the station's build plot. This is the base price.

- Then, the relation of the player with the faction buying the station is checked, and a flat percent bonus is applied for good relations. The bonus scales up to 30%

=======================================
Compatibility
=======================================

Compatibility with Recycle Ships and Stations: His mod replaces my mod's dialogue for owned stations, but doesn't affect buying AI stations. Thanks to iforgotmysocks for this mod, which helped me figure out the dialogue system and provided a good starting point for my work. His mod does not appraise owned stations' cargo or build plot, so you'll sell for less. His method of transferring ownership doesn't use the library for this purpose, but I haven't tested whether there are bugs with the station accounts in Recycle Ships and Stations.

Other mods which add conversation options to station managers probably also interfere with my mod...I tried to look at Extended Conversation Menu but couldn't figure out how to get that to work.
58 Comments
Celludriel  [author] 18 Jun @ 3:06am 
@DMan90 if that warf is not designated as a defense station it should work. However just to be sure save your game in a seperate savefile before you attempt it
DMan90 17 Jun @ 3:07am 
I'm wanting to sell a warf to the Argon who've had their warf destroyed. Will it work or is it gonna be a big waste of materials?
F1tgal911 14 Jun @ 1:32pm 
Ahh kk.
Celludriel  [author] 12 Jun @ 11:23pm 
I believe you never could sell defense stations. The reasoning being there are missions to let you build defense stations for other factions.
F1tgal911 12 Jun @ 10:15am 
Can confirm this mod works in 7.6 but cannot sell defence stations anymore.
Celludriel  [author] 23 May @ 8:43am 
There are probably options for it but as said before this isn't really my mod, just something I supported to keep it playable. I rather not start cutting and fiddling with the original frame ore vision. Adding a faction is the most in intrusive way of fixing extra factions.
Disrupted 21 May @ 4:14pm 
Couldn't you just delete the "isplanneddefencestation and not event.object.station." for that?
Celludriel  [author] 17 May @ 8:57am 
you don't, you add more factions in a new cue and add it to the array.

fe:

<set_value name="$validFactions" exact="[faction.antigone, faction.argon, faction.holyorder, faction.ministry, faction.paranid, faction.teladi, faction.hatikvah, faction.scaleplate, faction.alliance]"/>
<include_actions ref="AddBoronFaction" />

<library name="AddBoronFaction">
<actions>
<do_if value="faction.boron? and @faction.boron.isactive">
<append_to_list name="$validFactions" exact="faction.boron"/>
</do_if>
</actions>
</library>
Slartibartfast 16 May @ 5:25pm 
If I wanted to remove the restriction on buying/selling defense stations, how could I do that?
Celludriel  [author] 16 May @ 6:49am 
I believe that is because Xenon / Kaak isn't in the allowed list of factions in the script. When I find some spare time I'm off work from 18th June till 30 June I could take a look at it