[MOD] Station Structural Rebuild v0.01 22 May 2016

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

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

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

[MOD] Station Structural Rebuild v0.01 22 May 2016

Post by jth »

22 May 2016

Its about time that this one was publlshed :)

v0.01 is up on Steam, and Nexus

http://www.nexusmods.com/xrebirth/mods/484

Rebuilds player stations with bits missing.
Should work on stations that were created with current and older versions of X Rebirth.
May fix an issue where the station will not Repair to 100%

Comm the Architect
Select Show construction plan and then Repair
Instead of giving you the repair menu it will now offer a sub menu with two options
Repair (standard Repair)
Specialist Repair

If you pick the Specialist Repair then it will give you a price of one million credits plus parts and if you accept that then it will completely rebuild your station.

The price that it wants to charge you is generally an indicator of what is missing. Its 1,024,000 Cr plus the difference in value between the station in its orginal and rebuilt states (including its contents). Occasionally the price does some strange things if a production batch finishes or starts at exactly the wrong moment or a trade happens. If you get a couple of quotes before saying Yes to do the actual work that should remove that uncertainty.

After doing the work the price should always be 1,024,000 Cr (unless a production batch or trade happens at exactly the wrong time).

The Station Structural Rebuild mod
Works with the plot Integrative URV Forge
Completely rebuilds the station to the blueprints, this may create missing docks (if they are in the current plans)
If the station plans have been updated since you built the station then those changes will be made to the rebuilt station.
The number and type of turrets will be retained
The number of shields will be retained
Resets all the Control Entities on the station
The hull state, cargo and drones will be retained although any production in progress will be lost
The trade and protection ships that are attached to the station will be retained
Should be multi-lingual

Known issues
It may physically move a very old station sideways or backwards a bit when rebuilding it due to new planning regulations
As the Manager is reset this will also revert the Restrict trade to others to the default which is trade everything with everyone
Any production in progress will be lost
This requires an existing CV to be connected to the station as it plugs into the Architect dialog

jth
Last edited by jth on Thu, 26. May 16, 14:11, edited 13 times in total.
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

18 December 2015

This is an idea that I have been working on since October and was originally going to be part of Station Recyling but I think that it would be better off as a mod in its own right,

The idea behind the mod is to to repair build errors in space stations. These would include missing docks, production queues that have problems, stations that don't Repair properly (say they are 99% hull but won't let you fix the final 1%) or don't seem to recognise which modules are built. The whole range of early station issues. I hope that this might breath life into someones abandoned save games or encourage them to add another stage onto an unloved station or even finish the plot.

This was one of the two things that I was going to write when I started scripting but I simply couldn't figure out how to do it, so I wrote the Station Recycling and left it at that.

The advantage that Station Structural Rebuild has over Station Recycling is that its a lot quicker, cheaper and much more efficient. It inserts itself into the Architect Repair option which makes more sense.

To make it work Egosoft have kindly added a new buildlocation parameter to create_station which means that it will require 4.00 beta 4 HF2 or later to use. So I am currently finishing off the mod and awaiting the release of 4.00 before publishing.

Regards

jth
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

jth wrote: To make it work Egosoft have kindly added a new buildlocation parameter to create_station which means that it will require 4.00 beta 4 HF2 or later to use. So I am currently finishing off the mod and awaiting the release of 4.00 before publishing.
isnt 4.00 out for several months now?
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 ;)
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom »

Omg it's finally here! :D Really excited for this one. Vanilla station build always leaves some turrets and shields stuck in "constructing" status, even if Architect reports all finished. :/
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom »

UniTrader wrote:
jth wrote: To make it work Egosoft have kindly added a new buildlocation parameter to create_station which means that it will require 4.00 beta 4 HF2 or later to use. So I am currently finishing off the mod and awaiting the release of 4.00 before publishing.
isnt 4.00 out for several months now?
Note the timestamp on the second post: 18-December 2015. I think he meant to post about this earlier as an [idea] topic, probably included it for record-keeping. :)
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

UniTrader wrote:
jth wrote: To make it work Egosoft have kindly added a new buildlocation parameter to create_station which means that it will require 4.00 beta 4 HF2 or later to use. So I am currently finishing off the mod and awaiting the release of 4.00 before publishing.
isnt 4.00 out for several months now?
I am un-decided about the best way to go about taking an idea through to a mod and putting the the necessary info into a topic.

When its an idea the very first post really needs to say IDEA and describe the issue that the mod is supposed to fix or the additional feature that it provides.

I tend to rename the post when I switch it from IDEA to MOD and want to keep the history from the IDEA post too.

I understand that the timestamp is intentionally left as the creation time to avoid edits appearing at the top of the list of posts

When it turns into a mod the first post needs to be labelled MOD and be about the current version of the mod, so you need to move the idea post somewhere else. But then the time stamps wrong :( The first post could be considered to have a completely incorrect timestamp too as I edited it yesterday.

maybe we need to double post each IDEA with an empty second post so that the IDEA stuff has somewhere to go with roughly the right time stamp

Or create a new separate MOD post rather than rename the exisiting one but then you tend to loose the IDEA post

Maybe I should have just moved the IDEA content down the first post and put something like ****** ORIGINAL MESSAGE ******** between the two

jth
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom »

Could create a "Background" or "History" section in the first post, with a header in bold or large font so people know the idea behind the mod. :)

btw... there are some stations with Sequence "I" (struct_bt_alb_drone_complex_macro, struct_bt_alb_small_ships_complex_macro, and possibly some landmarks), so might wanna add that in.

Edit: Would you happen to know if there's a way to extract the complete buildplan from a station that hasn't been built? $station.completebuildplan does that for a station that already exists, but I can't figure out how to generate a full buildplan from a non-existent object.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

i worked around this by temporarily creating the Station in a presentation cluster (a cluster which is for temporary stuff and which usually only persists for a short time - if not seperately specified it isnt even saved to a savegame)

see this md file lines 156 to 170
https://github.com/UniTrader/UTCommandA ... t.xml#L156

PS and sorry about the small messup with the time - for new topics i usually only check the Posting Date by habit, not whats stated in the Post itself.. so for me it was like written yesterday ^^''
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 ;)
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom »

UniTrader wrote:i worked around this by temporarily creating the Station in a presentation cluster (a cluster which is for temporary stuff and which usually only persists for a short time - if not seperately specified it isnt even saved to a savegame)
Oh yeah, I know about temporary clusters - I use it in my ship spawning script (this is how I make them jump in next to the player, since I like being cinematic about it).

Was hoping there would be a simpler way to do it since the station macro already contains the full build plan...

Return to “X Rebirth - Scripts and Modding”