Where to begin learning scripting?
- Aeonic
- Militia Commander
- Posts: 469
- Joined: Sun Jun 14, 2009 1:05 am
- Location: Designing his dream ship.
Suppose I want to create some new random stations that come with some basic missions, perhaps similar to the mining stations. Where would I begin learning how to do this?
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.


- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
Basically the forums are full of tidbits, so you read as much of them as possible. Then you download a similar mod from xelerus, and pick it apart. Then you ask questions here. The vanilla files (unpacked with TransData) is the authorative source. You will find alot of examples in there. The wiki is slowly getting more content, but it is still lacking when it comes to learning modding from scratch. Using the in game console to explore scripting is a very good resource as well. Finally, IRC is probably the best resource. We are quite a few of us here that i believe gladly would help answer any modding questions.
.]
.]
IRC is definitely your best bet for one important reason. It's interactive.
Ask any question you like, some one will at lease be able to point you in the direction to look for an answer if nothing else.
Check out the stations 101 Tutorial on the Wiki and familiarize yourself with the different elements of the .xml. Ask questions. Here, IRC, chances are there are others that have tried/done or are doing something that you want to and may be able to help. Keep your questions concise, nobody answers "OMG, I keep getting an error!!! HELPELPELP" without knowing your question we can't help.
I hope this helps!
Ask any question you like, some one will at lease be able to point you in the direction to look for an answer if nothing else.
Check out the stations 101 Tutorial on the Wiki and familiarize yourself with the different elements of the .xml. Ask questions. Here, IRC, chances are there are others that have tried/done or are doing something that you want to and may be able to help. Keep your questions concise, nobody answers "OMG, I keep getting an error!!! HELPELPELP" without knowing your question we can't help.
I hope this helps!

Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
- Aeonic
- Militia Commander
- Posts: 469
- Joined: Sun Jun 14, 2009 1:05 am
- Location: Designing his dream ship.
There's no resource out there that starts to explain what any of the scripting code actually MEANS?
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.


- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
Not really, no. The functions list on xelerus is indispensible, but other than that its just trial and error. Again, the best resource is IRC. I am very often on, and I'd be happy to give you an intro and try to answer any questions you have.Aeonic wrote:There's no resource out there that starts to explain what any of the scripting code actually MEANS?
.]
The method I use for modding is a very effective one: splicing. Say I want an auton that loots wrecks and installs any installable loot it finds. Well, there's allready a mod for an auto-looting auton, so I copy that. I then find some code that does device installing, and implant that code into the looting code. The result is a mod which performs more or less like I want it to. That's actually the way geneticists modify the genomes of plants and animals, they take some DNA from a potato, and find the gene for freeze resistance from a flounder. They then just shoot the flounder DNA into the potato DNA with a gene gun. The result is a frost-resistant potato.
[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Because there are no tutorials for modding, all the people here just self-taught themselves by reading the vanilla XMLs or by taking apart mods made by veteran players (that in most cases are also excellent programmers).It sounds like nobody really has a clue how to do the scripting. Razz
Do searches on the Forums, we already have plenty of tidbits left around in various topics.
If you cannot find anything, feel free to ask, we will try to answer at the best of our abilities.

- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
Hmmm...Aeonic wrote:It sounds like nobody really has a clue how to do the scripting.
Any of us who think we have a clue, and there are at least a dozen of us running around these forums, got our clue from reading the existing scripts which demonstrate and explain most everything needed. Anything else we learned through trial and error.SG-1 Goa'uld wrote:How dare you defy me?
Use the vanilla script in combination with the excellent function library on xelerus and everything will become crystal clear for you. (one little function at a time)
If you want to really get a grip on the scripting language, look to it's roots in LISP, although the version we use for T-Mods was built by George from (apparently) scratch and just roughly based on LISP. Reading up on LISP will help you understand the structures and all the (a (b(c)) d()), but the real secret to T-Modding is knowing and using the built-in functions. Which are all available and, for the most part, well explained on xelerus.
Obviously look at the stations in the game and figuring out how they work with missions is a great place to start. There are lots of awesome missions scripting examples to pick apart and re-design for your purposes.Aeonic wrote:Suppose I want to create some new random stations that come with some basic missions, perhaps similar to the mining stations. Where would I begin learning how to do this?
Start a thread in the Shipyards after you set up the basic extension file and write out your concepts of what you want the mod to do - when you hit a snag, do what I do and post your problem, experiments, and finally your solution. (hopefully)
Quite a few mods around here that are script intensive got where they are today by a combination of help from people here on the forums and on the IRC channel.
Good luck, and have fun. Oh, and if you want to buy a book for 49.99, I think digdug is writing a T-Mod for Noobs manual, should be out sometime before version 2.5
Heh, I'll write a book for free that'll come out sooner, just because I like to be competitive. Of course, DigDug is a far more experienced modder than I, but ah well.
[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad