Setting up trade objectives to a construction vessel

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Clownmug
Posts: 419
Joined: Wed, 11. Dec 13, 02:39
x4

Setting up trade objectives to a construction vessel

Post by Clownmug »

I'm currently trying to make a md script which creates generic missions for building a station. Everything is working fine except the spawned construction vessel has 2 copies of all its buy offers. This seems to be because the md.RML_Deliver_Wares script re-creates trade offers rather than tracking the original ones.

Is there another way to setup trade objectives that I don't know about? I've tried using md.RML_Accept_Trade_Orders but that script doesn't always keep track of the objectives and the mission fails after completing all the trades. I've also tried removing the original buy offers but it seems like the construction vessel automatically generates them again.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Would it work if you did the ware deliveries before the build order is given? I may be stating the obvious here but that would be my solution.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

if the script you are referencing doesnt have this functionality why not add it there? that would be my approach ^^
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Clownmug
Posts: 419
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug »

YorrickVander wrote:Would it work if you did the ware deliveries before the build order is given? I may be stating the obvious here but that would be my solution.
That might work but I'd need a way to determine the required build resources from the build plan.
UniTrader wrote:if the script you are referencing doesnt have this functionality why not add it there? that would be my approach ^^
I guees that would be a last resort but the script seems very complicated.
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

Clownmug wrote:
YorrickVander wrote:Would it work if you did the ware deliveries before the build order is given? I may be stating the obvious here but that would be my solution.
That might work but I'd need a way to determine the required build resources from the build plan.
Try looking in LIB_Generic... There is a script in there that is called by the campaign scripts that tell the Devres stations to start building. It does some calculations with the build plan resource costs though most of that is part of a commented out cheat function.

Its what I played with to get my stations in Hiigara Crossroads to build. Though I think it needs some work as it tends to stall out. Still a good reference if you just want examples though.
Clownmug
Posts: 419
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug »

Exavier724 wrote:
Clownmug wrote:
YorrickVander wrote:Would it work if you did the ware deliveries before the build order is given? I may be stating the obvious here but that would be my solution.
That might work but I'd need a way to determine the required build resources from the build plan.
Try looking in LIB_Generic... There is a script in there that is called by the campaign scripts that tell the Devres stations to start building. It does some calculations with the build plan resource costs though most of that is part of a commented out cheat function.

Its what I played with to get my stations in Hiigara Crossroads to build. Though I think it needs some work as it tends to stall out. Still a good reference if you just want examples though.
Yes, I'm already using the Build_NPC_Station library from there, I actually modified it to use with this mission. The section for cheat resources uses the neededslotresources property but that only works after the module starts construction I believe.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

YorrickVander wrote:Would it work if you did the ware deliveries before the build order is given? I may be stating the obvious here but that would be my solution.
I'm not sure what the total mass for all station's Stage 1 components come too but there's a change that a CV (260 k m3) might not carry them all without a tweak.

Total masses I have measured in the past:

HoA Cell Recharge Fac
Stage 1: 258 k m3
All stages: 306 k m3

Albion Construction Shop
Stage 1: 105 k m3
All stages: 673 k m3

Albion High Tech Fab
Stage 1: 88 k m3
All stages: 326 k m3

Although maybe all stage 1 station volumes and XL ship storage volumes have been balanced around each other :)

Return to “X Rebirth - Scripts and Modding”