[MOD] Shipyard Capital Repair Fix/Hack

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

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

User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

[MOD] Shipyard Capital Repair Fix/Hack

Post by pilakin »

The Shipyard will now repair your Capital Ship!

https://www.dropbox.com/s/y9i1lk7uv6ll5 ... Repair.zip

[ external image ]

For interested ppl, it's about this piece of script

Code: Select all

                    <do_if value="$upgrade?">
                      <build_object_upgrades buildmodule="$BuildModule" sequence="''" stage="0" buildplan="$Buildplan" buildlimit="$upgrade_buildlimit" />
                    </do_if>
                    <do_elseif value="$droneplan?">
                      <do_all exact="$droneplan.count" counter="$i">
                        <add_ammo object="$ship" macro="macro.{$droneplan.{$i}.{1}}" amount="$droneplan.{$i}.{2}" />
                      </do_all>
                      <signal_cue cue="DronesFinishedDelay" />
                    </do_elseif>
                    <do_elseif value="$ammoplan?">
                      <do_all exact="$ammoplan.count" counter="$i">
                        <add_ammo object="$ship" macro="macro.{$ammoplan.{$i}.{1}}" amount="$ammoplan.{$i}.{2}" />
                      </do_all>
                      <signal_cue cue="DronesFinishedDelay" />
                    </do_elseif>
                    <do_elseif value="$component?">
                      <repair_object buildmodule="$BuildModule" sequence="''" stage="0" hullfraction="$fraction" buildlimit="$buildlimit" />
                    </do_elseif>
First of all, <do_elseif value="$droneplan?"> triggers so the script never even gets to the <do_elseif value="$component?"> part. And even if you manipulate it to do so, the repair_object command doesn't seem to do anything at all. what I did is adding a set_object_hull command to change the hull status of the ship. Do you have any experience with the repair_object command, is it really not working or am I missing sth? I'd strongly guess it should withdraw resources from the builder (shipyard) and repair the ship, where set_object_hull simply sets the hull to a value, no resources involved.
Last edited by pilakin on Fri, 6. Dec 13, 12:09, edited 2 times in total.
ZenosEbeth
Posts: 21
Joined: Fri, 29. Nov 13, 23:11

Post by ZenosEbeth »

Thanks for the mod , I'm going to install it even though most of my shipyards are occupied by half built stuff that never gets completed. :)

Return to “X Rebirth - Scripts and Modding”