The script editor

The place to discuss scripting and game modifications for X²: The Threat.

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

Mossiac
Posts: 2
Joined: Tue, 3. Feb 09, 10:48

The script editor

Post by Mossiac »

Hi all

I have been playing around with the script editor in X2 and was wondering if there is any way that I can add weapons and shields to a freight bay or the weapon slots or something??

Grant
User avatar
Shadow dream
Posts: 1840
Joined: Thu, 1. Mar 07, 11:39
x3tc

Post by Shadow dream »

nope. For shields you have to make a mod.
in the TShips you just select the ship you'd like to change and change the amount of the shields.

Adding stuff to the cargo is no problem at all, that can be done by script (Trade command - add ware). to install weapons you use the instal ware command (i guess). the same works with shields, as long as there are free slots for those

Shadow
Wahre Gentlemen behalten sogar umzingelt von Löwen ihren Leitsatz: Ladies first.
Wann lernt die Gesellschaft endlich, dass Geld erst die Probleme macht, die wir haben?
[ external image ]
Topic - Gallery - Forum - Freiheit
Mossiac
Posts: 2
Joined: Tue, 3. Feb 09, 10:48

Post by Mossiac »

Is it possible for a step by step guide as all the things i have tried wont work

Grant
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

This is done by using one of these two instructions (both from Trade Commands):

<RetVar/IF> <RefObj> -> add<Var/Number> units of <Var/Ware>
<RetVar/IF> <RefObj> -> install <Var/Number> units of <Var/Ware>

<RefObj> means the ship you want to add the laser or shield to, <Var/Number> will take the number of shields or lasers you want to add, and <Var/Ware> will take the type of laser or shield you want to add.

The first instruction will add the lasers or shields to the cargo bay, the second will install it in a free weapon or shield slot.

Remember this only works if
- the ship can take the cargo size of the chosen weapon/shield
- the ship has enough room for at least one unit
- in case of the install instruction the ship needs a free slot and must be able to use the ware (otherwise it simply adds the weapon/shield to the cargo bay).

If you just want to cheat weapons/shield, you should use the Cheat Pack. There's a script for adding wares to a ship.
--------------------------------

[ external image ]

Return to “X²: The Threat - Scripts and Modding”