[Question] How to make a ship invulnerable

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

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

Jaxartes
Posts: 253
Joined: Tue, 2. Aug 11, 12:37
x4

[Question] How to make a ship invulnerable

Post by Jaxartes »

I would like to make a construction ship which is attached to a station invulnerable, how do I do that?
burger1
Posts: 3273
Joined: Fri, 21. Aug 09, 22:51
x3tc

Post by burger1 »

Maybe try setting the hull of the four construction ships to -1 or a really large number and see what happens? -1 might not work?

\assets\units\size_xl\Macros

units_size_xl_builder_ship_dv_macro
units_size_xl_builder_ship_macro
units_size_xl_builder_ship_ol_macro
units_size_xl_builder_ship_plot_01_macro

change
<hull max="1400000" />
Jaxartes
Posts: 253
Joined: Tue, 2. Aug 11, 12:37
x4

Post by Jaxartes »

Thanks for the reply.

I didn't mean to change the CV's in general, I wanted just specific ones to to be invulnerable, so I think I have to change the save somewhere.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Savegame Editing is a possibility, but i wont support that for another purpose than Mod Compatibility because its effectively more work than a proper solution in most cases..

i would suggest an MD script which sets the Plot-Invulnearable Flag when a CV deploys. (currently not at home, so cannt look up whats necesary for that)

alternatively i think its possible to assign a new CV to aa Station, doing this is about the same amount of work as the previous approach i think.. maybe a little bit more
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 ;)
burger1
Posts: 3273
Joined: Fri, 21. Aug 09, 22:51
x3tc

Post by burger1 »

Jaxartes wrote:Thanks for the reply.

I didn't mean to change the CV's in general, I wanted just specific ones to to be invulnerable, so I think I have to change the save somewhere.
Rename your construction vessel so you can find it using the control F search function. I named this construction vessel Construction Vessel Albion. There's a <hull value= in the save file. Change it to something else?

<component class="ship_xl" macro="units_size_xl_builder_ship_macro" connection="connection_builddummy01" attacker="[0x6b4d]" attackmethod="hitbymissile" attacktime="471397.666" name="Construction Vessel Albion" owner="player" knownto="player" id="[0x3a91]">
<listeners>
<listener listener="[0x3833]" event="killed"/>
<listener listener="[0x3a9a]" event="killed"/>
<listener listener="[0x3a9b]" event="killed"/>
<listener listener="[0x3ab0]" event="killed"/>
<listener listener="[0x81604]" event="killed"/>
<listener listener="[0x6b4d]" event="killed"/>
</listeners>
<offset>
<position x="-2372.248" y="-401.541" z="-24715.506"/>
<rotation yaw="-38.8509"/>
</offset>
<hull value="1386500" time="471397.701"/>
<commander type="manager"/>
<shields>
<summary state="collapsed" parent="[0x3a91]" connection="connection_shieldgen02"/>
<summary state="collapsed" parent="[0x3a91]" connection="connection_shieldgen01"/>
</shields>
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

You can change the minimum limit for the hull.

Find the ship in the savegame and add a min attribute.
e.g <hull min="1000"/>

Keep in mind that that would be just for the ship, not the different things on it.
Jaxartes
Posts: 253
Joined: Tue, 2. Aug 11, 12:37
x4

Post by Jaxartes »

Thank you, I will test this and come back if I manage anything.
Jaxartes
Posts: 253
Joined: Tue, 2. Aug 11, 12:37
x4

Post by Jaxartes »

Setting hull min= to a value worked, thanks for the help.

Return to “X Rebirth - Scripts and Modding”