Script Editor on/off

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

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

NavaCorp
Posts: 2253
Joined: Tue, 16. Nov 04, 12:08
x3tc

Script Editor on/off

Post by NavaCorp »

Hi everyone. I was wondering if someone can answer a particular question. :)

Is the script editor activation reversible? Can I use it, then cancel this function?

I need it only to assign new conquered sectors to me in my current game but I don't want to keep it in game cause it makes cheating possible.

So...is there a magic word to switch it off...maybe "sgniwebllahserehT" rather than "Thereshallbewings"...? :D

Hope you can help me. :)
summersa74
Posts: 63
Joined: Sat, 7. Feb 04, 22:05
x4

Post by summersa74 »

AFAIK, you're stuck with it.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

nope, once its turned on in ur game, you cant turn it off again.

however, in x3, it is possible to load a script without enabling the script editor. but u will need to create the script first, so you could enable the script editor, create the script, then reload the game, and the script editor will no longer be running.

the script would be a setup.* script so it loads automatically.

then just run ur save game with a mod enabled, this will put it into modified mod and will load the setup script without the script editor installed, althou you game will still be classed as modified.

not sure if this works in x2, coz i've never tryed it, but its likly to be the same
NavaCorp
Posts: 2253
Joined: Tue, 16. Nov 04, 12:08
x3tc

Post by NavaCorp »

:( Thanks for the info but the script I have to use, need the SE to be launched and can't run automatically (is to change the owner of a sector).

Oh well...I'll do it by modding the map...
Last edited by NavaCorp on Thu, 30. Mar 06, 21:46, edited 1 time in total.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

any scripts can work by running altomatically ;)
even something simple like changing the ownership will work
NavaCorp
Posts: 2253
Joined: Tue, 16. Nov 04, 12:08
x3tc

Post by NavaCorp »

The script is that below. How can I modify it to run automatically?
How can I make it to show as a command in the game interface? :?

Code: Select all

<?xml version="1.0" standalone="yes" ?>
<?xml-stylesheet href="x2script.xsl" type="text/xsl" ?>
<script>
<name>AAA.Capture.sector</name>
<version>2</version>
<engineversion>25</engineversion>
<description>AAA - Change Sector Owner</description>
<arguments>
<argument index="1" name="Sector" type="Var/Sector" desc="Race" />
<argument index="2" name="RaceCible" type="Var/Race" desc="Race Cible" />
</arguments>
<sourcetext>
<line linenr="001" indent=""><var>$Sector -&gt;</var><text> set owner race to </text><var>$RaceCible</var></line>
<line linenr="002" indent=""><text>return </text><var>null</var></line>
</sourcetext>
<codearray>
<sval type="array" size="10"><sval type="string" val="AAA.Capture.sector" /><sval type="int" val="25" /><sval type="string" val="AAA - Change Sector Owner" /><sval type="int" val="2" /><sval type="int" val="0" /><sval type="array" size="2"><sval type="string" val="Sector" /><sval type="string" val="RaceCible" /></sval><sval type="array" size="2"><sval type="array" size="5"><sval type="int" val="1030" /><sval type="int" val="131074" /><sval type="int" val="0" /><sval type="int" val="131074" /><sval type="int" val="1" /></sval><sval type="array" size="3"><sval type="int" val="103" /><sval type="int" val="0" /><sval type="int" val="0" /></sval></sval><sval type="array" size="2"><sval type="array" size="2"><sval type="int" val="14" /><sval type="string" val="Race" /></sval><sval type="array" size="2"><sval type="int" val="16" /><sval type="string" val="Race Cible" /></sval></sval><sval type="int" val="0" /><sval type="int" val="0" /></sval>
</codearray>
</script>
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

wwell, u'll need to edit it in the script editor in the game, any save game with the script editor will do.

if you want it as a command, just create a setup script, something like setup.plugin.capture
any script name starting with setup will automatically run when loading a modified game.

in that script, you just register the command and the script it calls.
the only thing you cant do without enabling the script editor, is manually run scripts, but u shouldn't really need to do that with any scripts thou.

but like i said, the game has to be in modifed mod for them to run
NavaCorp
Posts: 2253
Joined: Tue, 16. Nov 04, 12:08
x3tc

Post by NavaCorp »

Thanks...I'll try to see what I can do... :)

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