Request : More expensive ships
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 127
- Joined: Fri, 31. Jul 20, 21:56
Request : More expensive ships
Could someone make the ships more expensive to buy? We could set the price as we want in a menu interface by setting a percentage, I am thinking of a script by doing this it will be compatible for all mods and DLC.
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Request : More expensive ships
The way you describe it isn't nearly as easy as you think. The price you pay is based on wares.xml which can't be changed by md. It may be possible with lua changes but would break every single update/dlc most likely.
Edit: it may be possible using a negative discount but i don't know of any modder other than myself who has really messed with discounts/commissions in x4.
Edit: it may be possible using a negative discount but i don't know of any modder other than myself who has really messed with discounts/commissions in x4.
-
- EGOSOFT
- Posts: 818
- Joined: Sun, 14. Dec 03, 13:05
Re: Request : More expensive ships
ohhh ... that's a good way to do apply extra costs, deadair!
here's how i apply discounts/commissions in my Reputations and Professions mod.
in this example, the discounts/commissions are penalties for having the mercenary Reputation.
these are added when the player docks at a station. but i'm sure it can be added anytime:
Spoiler
Show
Code: Select all
<signal_cue_instantly cue="AddRemoveTradeDiscount" param="table[
$discount = -25 / 4 * 2,
$discountId = 'kProfs_mercenary_discount_penalty',
$discountName = {161815, 555},
$station = $station,
$isRemove = 0
]" comment="Mercenary trade discount penalty" />
<signal_cue_instantly cue="AddRemoveTradeCommission" param="table[
$commission = -25 / 4 * 2,
$commissionId = 'kProfs_mercenary_commission_penalty',
$commissionName = {161815, 555},
$station = $station,
$isRemove = 0
]" comment="Mercenary trade commission penalty" />
Spoiler
Show
Code: Select all
<cue name="AddRemoveTradeDiscount">
<conditions>
<event_cue_signalled />
</conditions>
<actions>
<set_value name="$discount" exact="@event.param.$discount" />
<set_value name="$discountId" exact="@event.param.$discountId" />
<set_value name="$discountName" exact="@event.param.$discountName" />
<set_value name="$station" exact="@event.param.$station" />
<set_value name="$isRemove" exact="@event.param.$isRemove" />
<debug_text text="'$isRemove: ' + $isRemove" chance="UserSettings.$debugChance" />
<do_if value="(not $isRemove) and (not player.hasdiscount.{$station}.{$discountId})">
<add_player_discount id="$discountId" amount="$discount" object="$station" name="$discountName"/>
<debug_text text="'player.hasdiscount.{$station}.{' + $discountId + '}: ' + player.hasdiscount.{$station}.{$discountId}" chance="UserSettings.$debugChance" />
</do_if>
<do_elseif value="$isRemove and player.hasdiscount.{$station}.{$discountId}">
<remove_player_discount id="$discountId" object="$station"/>
<debug_text text="'player.hasdiscount.{$station}.{' + $discountId + '}: ' + player.hasdiscount.{$station}.{$discountId}" chance="UserSettings.$debugChance" />
</do_elseif>
<reset_cue cue="this" />
</actions>
</cue>
<cue name="AddRemoveTradeCommission">
<conditions>
<event_cue_signalled />
</conditions>
<actions>
<set_value name="$commission" exact="@event.param.$commission" />
<set_value name="$commissionId" exact="@event.param.$commissionId" />
<set_value name="$commissionName" exact="@event.param.$commissionName" />
<set_value name="$station" exact="@event.param.$station" />
<set_value name="$isRemove" exact="@event.param.$isRemove" />
<debug_text text="'$isRemove: ' + $isRemove" chance="UserSettings.$debugChance" />
<do_if value="(not $isRemove) and (not player.hascommission.{$station}.{$commissionId})">
<add_player_commission id="$commissionId" amount="$commission" object="$station" name="$commissionName"/>
<debug_text text="'player.hascommission.{$station}.{' + $commissionId + '}: ' + player.hascommission.{$station}.{$commissionId}" chance="UserSettings.$debugChance" />
</do_if>
<do_elseif value="$isRemove and player.hascommission.{$station}.{$commissionId}">
<remove_player_commission id="$commissionId" object="$station"/>
<debug_text text="'player.hascommission.{$station}.{' + $commissionId + '}: ' + player.hascommission.{$station}.{$commissionId}" chance="UserSettings.$debugChance" />
</do_elseif>
<reset_cue cue="this" />
</actions>
</cue>
just plug the data in (e.g. an id so that it can be used in the removal, the discount/commission bonus or penalty itself, a straight text in the description, and the station to apply the discount/commission).
it can likely be applied faction-wide rather than per-station. need doc reading to confirm. (i'm too lazy to go to the docs.

someone just needs to put it all together in a mod!
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Request : More expensive ships
It can be applied to a station only. If anyone is interested in making this, look at how signal leaks apply a discount to stations.kuertee wrote: ↑Sun, 6. Mar 22, 16:13ohhh ... that's a good way to do apply extra costs, deadair!
here's how i apply discounts/commissions in my Reputations and Professions mod.
in this example, the discounts/commissions are penalties for having the mercenary Reputation.
these are added when the player docks at a station. but i'm sure it can be added anytime:then these are the actual add/remove discount/commission codes:SpoilerShowCode: Select all
<signal_cue_instantly cue="AddRemoveTradeDiscount" param="table[ $discount = -25 / 4 * 2, $discountId = 'kProfs_mercenary_discount_penalty', $discountName = {161815, 555}, $station = $station, $isRemove = 0 ]" comment="Mercenary trade discount penalty" /> <signal_cue_instantly cue="AddRemoveTradeCommission" param="table[ $commission = -25 / 4 * 2, $commissionId = 'kProfs_mercenary_commission_penalty', $commissionName = {161815, 555}, $station = $station, $isRemove = 0 ]" comment="Mercenary trade commission penalty" />
so ... discounts/commission don't need any special DB entries.SpoilerShowCode: Select all
<cue name="AddRemoveTradeDiscount"> <conditions> <event_cue_signalled /> </conditions> <actions> <set_value name="$discount" exact="@event.param.$discount" /> <set_value name="$discountId" exact="@event.param.$discountId" /> <set_value name="$discountName" exact="@event.param.$discountName" /> <set_value name="$station" exact="@event.param.$station" /> <set_value name="$isRemove" exact="@event.param.$isRemove" /> <debug_text text="'$isRemove: ' + $isRemove" chance="UserSettings.$debugChance" /> <do_if value="(not $isRemove) and (not player.hasdiscount.{$station}.{$discountId})"> <add_player_discount id="$discountId" amount="$discount" object="$station" name="$discountName"/> <debug_text text="'player.hasdiscount.{$station}.{' + $discountId + '}: ' + player.hasdiscount.{$station}.{$discountId}" chance="UserSettings.$debugChance" /> </do_if> <do_elseif value="$isRemove and player.hasdiscount.{$station}.{$discountId}"> <remove_player_discount id="$discountId" object="$station"/> <debug_text text="'player.hasdiscount.{$station}.{' + $discountId + '}: ' + player.hasdiscount.{$station}.{$discountId}" chance="UserSettings.$debugChance" /> </do_elseif> <reset_cue cue="this" /> </actions> </cue> <cue name="AddRemoveTradeCommission"> <conditions> <event_cue_signalled /> </conditions> <actions> <set_value name="$commission" exact="@event.param.$commission" /> <set_value name="$commissionId" exact="@event.param.$commissionId" /> <set_value name="$commissionName" exact="@event.param.$commissionName" /> <set_value name="$station" exact="@event.param.$station" /> <set_value name="$isRemove" exact="@event.param.$isRemove" /> <debug_text text="'$isRemove: ' + $isRemove" chance="UserSettings.$debugChance" /> <do_if value="(not $isRemove) and (not player.hascommission.{$station}.{$commissionId})"> <add_player_commission id="$commissionId" amount="$commission" object="$station" name="$commissionName"/> <debug_text text="'player.hascommission.{$station}.{' + $commissionId + '}: ' + player.hascommission.{$station}.{$commissionId}" chance="UserSettings.$debugChance" /> </do_if> <do_elseif value="$isRemove and player.hascommission.{$station}.{$commissionId}"> <remove_player_commission id="$commissionId" object="$station"/> <debug_text text="'player.hascommission.{$station}.{' + $commissionId + '}: ' + player.hascommission.{$station}.{$commissionId}" chance="UserSettings.$debugChance" /> </do_elseif> <reset_cue cue="this" /> </actions> </cue>
just plug the data in (e.g. an id so that it can be used in the removal, the discount/commission bonus or penalty itself, a straight text in the description, and the station to apply the discount/commission).
it can likely be applied faction-wide rather than per-station. need doc reading to confirm. (i'm too lazy to go to the docs.)
someone just needs to put it all together in a mod!
-
- EGOSOFT
- Posts: 818
- Joined: Sun, 14. Dec 03, 13:05
Re: Request : More expensive ships
oh ... too bad it can't be applied faction-wide. so the application of the discount/commission needs to be on the dock event - which is how it works in my mod.
also, by the way, that code snippet above already works in my mod, Reputations and Profession, which applies discounts/comissions depending on your profession (e.g. Trader) and/or reputation (e.g. prices for Viglante and Mercenaries reputations are more because they are not as trusted as Defenders). also those discounts/commissions are additional to whatever else the base game gives you. (no need to dig through signal leaks xml, unless you really want to.)
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Request : More expensive ships
Discounts can be applied faction wide but not commissions iirc from my testingkuertee wrote: ↑Sun, 6. Mar 22, 18:43oh ... too bad it can't be applied faction-wide. so the application of the discount/commission needs to be on the dock event - which is how it works in my mod.
also, by the way, that code snippet above already works in my mod, Reputations and Profession, which applies discounts/comissions depending on your profession (e.g. Trader) and/or reputation (e.g. prices for Viglante and Mercenaries reputations are more because they are not as trusted as Defenders). also those discounts/commissions are additional to whatever else the base game gives you. (no need to dig through signal leaks xml, unless you really want to.)
-
- Posts: 127
- Joined: Fri, 31. Jul 20, 21:56
Re: Request : More expensive ships
So if I understand correctly, it is possible to do this with negative discounts like in reputation and profession.kuertee wrote: ↑Sun, 6. Mar 22, 18:43oh ... too bad it can't be applied faction-wide. so the application of the discount/commission needs to be on the dock event - which is how it works in my mod.
Also, by the way, that code snippet above already works in my mod, Reputations and Profession, which applies discounts/comissions depending on your profession (e.g. Trader) and/or reputation (e.g. prices for Viglante and Mercenaries reputations are more because they are not as trusted as Defenders). also those discounts/commissions are additional to whatever else the base game gives you. (no need to dig through signal leaks xml, unless you really want to.)
I have a little idea, a kind of "invisible reputation" that appears at the beginning of the game, that you can't get rid of, that increases the purchase price of the ship, and if it doesn't work do it on all the wares.xml thanks to a script that is coded with a line like "for all the wares", even if I think it's a bit more complicated than that
Do you think this is a good idea or solution?
-
- Posts: 1842
- Joined: Mon, 10. Aug 09, 02:09
Re: Request : More expensive ships
If you want to make ships more expensive to balance the game, ship prices will not cut it.
Intall 2 mods: "Getting Paid" and "Wear and Tear"
the result is that you will be forcecd to employ engineering crews and pay them every hour, and that will increase economic burden on your empire and slow down explosive growth of income. You will still grow, but slower.
Intall 2 mods: "Getting Paid" and "Wear and Tear"
the result is that you will be forcecd to employ engineering crews and pay them every hour, and that will increase economic burden on your empire and slow down explosive growth of income. You will still grow, but slower.
-
- Posts: 127
- Joined: Fri, 31. Jul 20, 21:56
Re: Request : More expensive ships
I already have those two mods. Ah yes, I see, I'll raise the salary of the employees, it's something in my beginner skills. I'll see if it's possible, and I'll make NPCs more expensive to buy, for example 500,000 credits for the soldier and the engineers. And if possible increase their salary. Thanks, I didn't see this problem like that.djrygar wrote: ↑Fri, 11. Mar 22, 08:21 If you want to make ships more expensive to balance the game, ship prices will not cut it.
Intall 2 mods: "Getting Paid" and "Wear and Tear"
the result is that you will be forcecd to employ engineering crews and pay them every hour, and that will increase economic burden on your empire and slow down explosive growth of income. You will still grow, but slower.
Like this for a heavy fighter, 3 employees, the ship will make 1.8M taking into account the hull.
A Corvette, 15 employees, 9.5M, taking into account the hull
A carrier, 200 employees, 120 000 000, taking into account the hull