[HELP] Scripting Help

The place to discuss scripting and game modifications for X³: Reunion.

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

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

[HELP] Scripting Help

Post by Cycrow » Mon, 8. May 06, 01:13

I've been asked quite a few times about making basic scripts, so i decided to make a small guide for enalbing the script editor and creating your first script.

can be found here

Guides Available
  • Enabling the Script Editor
  • Creating Your First Script
  • Money Cheat Script - How to add script commands
  • Manually Running Scripts
  • Notority Cheat Script
  • Creating Text Files
  • Using Command Slots
  • Conditional Statements
  • Using Script Arguments
  • Adding custom Wares
  • Creating a Hotkey script
  • Creating an AL Plugin
Last edited by Cycrow on Sun, 13. Sep 15, 15:53, edited 3 times in total.

Brand-X
Posts: 232
Joined: Thu, 15. Sep 05, 23:48
x3

Post by Brand-X » Mon, 8. May 06, 08:15

Thanks, Cycrow.

I'll probably find it very useful.

:)

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 8. May 06, 18:15

Added some more to the page, will most likly be adding more to it over time

so far its dealing with those you want to make a few simple scripts, like adding money/notorty, etc

Brand-X
Posts: 232
Joined: Thu, 15. Sep 05, 23:48
x3

Post by Brand-X » Tue, 9. May 06, 05:38

I loaded a fresh copy of x3 on my second hard drive and started a new game, as the Bankrupt Assassin. Followed your directions and gave myself 10 mil. Easiest money I ever made. And it showed up as soon as I closed the editor window and looked at my player statistics.

So I tried the race rank thing and initially used a value of 40, but when I closed the editor and checked my stats, that part hadn't seemed to have changed. So I reduced the value to 20, saved and pressed 'r' , then exited to look at my stats. They still hadn't changed. Did I do something wrong?

Yout tut is very nicely presented, by the way. Looks good and loads up fast over dial-up.

Stevo Primus
Posts: 194
Joined: Wed, 11. Feb 04, 14:26
x3tc

Post by Stevo Primus » Tue, 9. May 06, 08:26

Well, Cycrow, I'm shocked..... :o

In the "add notoriety" script the first variable is the race that you intend to add/remove rep to/from and the second variable is where you would insert "player" as the race!

Other than that the guide's looking nice!

Hope that clears that one up for you IntergalacticBadAss...

Stevo :wink:

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 9. May 06, 16:31

ah i didn't notice that

that'll teach me to write it when im half asleep :P

i will update the corrected version

Brand-X
Posts: 232
Joined: Thu, 15. Sep 05, 23:48
x3

Post by Brand-X » Wed, 10. May 06, 02:17

Yeah, that was it.

Thanks, Stevo :)

I can see how it could easily happen tho.
The syntax is somewhat misleading, at least to a noob like myself.

It literally says - 'Argon increase notoriety: race = player: value = xx'
Which works.

But it looked better the first way, more logical.

'Player increase notoriety: race = Argon: value = xx'
Which didn't work.

:P

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 27. Jun 06, 17:08

I've added 2 new sections of help.

:arrow: Creating Text Files
:arrow: Using Command Slots

kylereich
Posts: 325
Joined: Mon, 17. Nov 03, 16:38
x3

Post by kylereich » Tue, 25. Jul 06, 00:36

Cycrow. First off, thanks for the tutorial.

After I stumbled onto your large script library, I began to have a few ideas of my own. Having never scripted within X2 or X3 your tutorial has set me on my path. However, I noticed a couple typo's that should probably be fixed. Under the Using Command Slots section, you have the following code listed:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<language id="44">
<page id="2008" title="Script Cmd Names" descr="">
 <t id="240">COMMAND_TEST_TRADE_COMMAND</t>
</page>

<page id="2010" title="Script Cmd Names" descr="">
 <t id="240">Test Trade Command
</page>

<page id="2011" title="Script Cmd Shorts" descr="">
 <t id="240">Test
</page>
</language>

In the section below, I've added "</t>" in the second and third code portions:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<language id="44">
<page id="2008" title="Script Cmd Names" descr="">
 <t id="240">COMMAND_TEST_TRADE_COMMAND</t>
</page>

<page id="2010" title="Script Cmd Names" descr="">
 <t id="240">Test Trade Command</t>
</page>

<page id="2011" title="Script Cmd Shorts" descr="">
 <t id="240">Test</t>
</page>
</language>

Thanks again, and keep up the excellent work!

-Kyle

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 25. Jul 06, 03:50

ah i didn't notice those :oops:

thanks

i must forgot to change the tag so it displays in html

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sat, 25. Nov 06, 04:29

i've updated the help page, now includes guildes for wares, hotkeys and AL plugins

User avatar
Cker
Posts: 87
Joined: Wed, 11. Jan 06, 09:39
x4

Post by Cker » Fri, 5. Jan 07, 08:52

Was thinking of looking at it, but...
Doesn't seem to be working, has the page moved or been deleted? :(

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Fri, 5. Jan 07, 13:04

it was down, but it should be back up again now.

however, some ppl are having problems viewing the site for some reason.

u could try going to http://86.20.166.202/x3/scripts/help and c if that works

User avatar
Cker
Posts: 87
Joined: Wed, 11. Jan 06, 09:39
x4

Post by Cker » Fri, 5. Jan 07, 13:23

Huzzah, the first link is working again.
But your second link isn't, i better save what you've written quickly :lol:

Metalic Crab
Posts: 89
Joined: Fri, 17. Feb 06, 23:57
x3

Post by Metalic Crab » Tue, 30. Jan 07, 20:54

neither link is working anymore :(
A man with nothing can still offer his life.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Wed, 31. Jan 07, 00:05

bad timing im afraid, i was moving the server.

try it now

Neurosys
Posts: 12
Joined: Sat, 30. Jun 07, 12:23
x3

Post by Neurosys » Sat, 14. Jul 07, 22:49

I think I borked something. I was doing the loading text files portion. I made the 449000.xml just like it says... I double checked all the tags and whatnot i put it in X3\t and I made a script that has

load text: id=9000
return null

and I have a second that says

$bs = readtext: page=9000 id=1
write player logbook: $bs
return null

when I tried the second one it just wrote ReadText9000-1 to my log so I figured "ok, I have to get it to find my file and load it up via the first script"
so I go back to the first one with the load text cmd in it and I press r and execute it and viola! X3 crashes. everytime. Im confused. Did I miss a step?

User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Sat, 14. Jul 07, 22:57

Most probably, the game cannot read your textfile. :D What did you write in it?

Neurosys
Posts: 12
Joined: Sat, 30. Jun 07, 12:23
x3

Post by Neurosys » Sat, 14. Jul 07, 23:15

thanks symtec

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 15. Jul 07, 18:49

paste the contents of your text file, perhaps u've made a mistake in it somewhere

Post Reply

Return to “X³: Reunion - Scripts and Modding”