Return to “Scripting & Modding”

Post

No experience coding, where to start to learn LTSL?

#1
I have absolutely no experience with coding and wouldn't know where to start. Do any of you more experienced chaps have any, preferably free or cheap, resources or suggestions that I might look into to learn a thing or two? With the idea that I want to work with LTSL in the future.
The victorious strategist only seeks battle
After the victory has been won
Whereas he who is destined to defeat first fights
And afterwards looks for victory

-Sun Tzu
Post

Re: No experience coding, where to start to learn LTSL?

#3
It looks like LTSL is a bit similar to Python.

You might take a look at some Python tutorials. If you can get reasonably comfortable with that, the structure of LTSL shouldn't be too hard for you to pick up.

I think it's a good idea to properly set expectations, though, so be aware that learning the grammar of LTSL is only the first step. The next step, and probably the more difficult one, will be to understand what in the world Josh's LTSL code is actually doing.

I have a feeling he's writing working code. That is very different from writing code with which to learn a language. The actual LTSL scripts from which Limit Theory is constructed may not have a lot of hand-holding in them.

Those who can figure out what the heck Josh's code is doing should be able to start tweaking things and creating new features pretty quickly.

I hope. :)
Post

Re: No experience coding, where to start to learn LTSL?

#7
HoratioScumdog wrote:I have absolutely no experience with coding and wouldn't know where to start. Do any of you more experienced chaps have any, preferably free or cheap, resources or suggestions that I might look into to learn a thing or two? With the idea that I want to work with LTSL in the future.
A big problem there is motivating yourself to "just learn programming" like you would do with Python or any of the other suggestions.

I would recommend X3:TC or AP.

They have a very powerful script language and you can "immediately" see the results ingame without compiling anything or writing a game engine first...
You can learn how to make scripts work in a realtime game world, use hotkey controls or menus, manipulate objects and cargo, write AI scripts, and use hooks to the engine to make stuff happen.

The process for going about things in a realtime game world takes some getting used to because when your script uses actions that take time (fly there) you need to make sure the script doesn't continue after that on the assumption that nothing else had changed in the meantime.

The syntax will be a little different but not in any way that matters. All scripts in those games are just math with fancy trappings. Just the wording differs.
There is no "I" in Tea. That would be gross.
Post

Re: No experience coding, where to start to learn LTSL?

#8
DigitalDuck wrote:There's a small, subtle difference between scripting and programming, although generally speaking skills are transferable from one to the other.
I've made exactly that point myself when someone has asked a question like, "How can I become a working programmer?"

That's a sufficiently different arc than the path toward modding games that I usually try to nudge them toward actual languages (and more formalized instruction).

For learning how to mod games, though, Gazz makes a great point. The more immediate and painless the feedback, the better chance you have of keeping someone engaged in the early process of learning how to do this stuff. Being able to see useful results quickly helps with that.

I wouldn't say it's The Answer, though, because ultimately this programming stuff always gets hard. If you're not already innately the kind of person who enjoys grappling with abstract challenges like language idiosyncrasies ("why isn't anything happening when I click in that input field?") and logical formulations ("why are these numbers wrong?") and high-level pattern configuration ("why is this code so slow?"), then there is no language or environment that is so awesome that you'll want to keep trying. You either like coding enough to push through to competence and then to mastery, or you don't.

It doesn't hurt to make the starting point enjoyable, though, as long as it's understood that the next parts get harder.
Post

Re: No experience coding, where to start to learn LTSL?

#9
A game like X3 (or LT) also has many parts that one can interact with so it's easy to find something you want to change.

Having an actual project - no matter if realistic or not - is a big help in self-motivation.
Learning script commands and syntax like cramming vocabulary isn't fun. Digging for the next command to get one step closer towards something tangible just doesn't feel as much like a chore.

Oh, it's probably not as efficient as learning a language by the book and "in the right order" but that is the difference between programming and modding.
Modding has to be fun because it's not likely you're going to get paid for it. =)


And yes, eventually it gets harder as you level up your coding skill and set yourself greater challenges.
The MARS script is around one megabyte. A megabyte of script, no graphics or sound...
It also employs some scary task juggling with up to a dozen tasks running simultaneously on a single object and communicating with each other, self-updating in case of new code being detected, stuff like that.
Still, IMO a lot of the challenge in "learning modding" is getting over the initial hump and getting results. Any results. Once you get to that point it gets easier to stay hooked.
There is no "I" in Tea. That would be gross.
Post

Re: No experience coding, where to start to learn LTSL?

#10
Thanks so much for the feedback everyone! Seems like python is a good starting point. I found an interactive python tutorial. Should I start with Python 2 or 3?
I have also dusted off my copy of X3 TC and have been tooling around in there some. I even managed to cheat myself in some money and change my faction relations and standing, found some tutorials on youtube for those and they seemed like a simple and easy place to start. Thanks again guys!
The victorious strategist only seeks battle
After the victory has been won
Whereas he who is destined to defeat first fights
And afterwards looks for victory

-Sun Tzu
Post

Re: No experience coding, where to start to learn LTSL?

#12
The one "boring" item you absolutely positively cannot skip are data types and arrays.
These are handled a bit different in every language.

In X3 all arrays are pointers so two separate scripts can access the exact same "physical" array and both scripts can alter the contents at any time.
That's a fair bit beyond Hello World and changing faction relations but you will run into that because script commands use arrays to output things like search results and sometimes to accept parameters.
There is no "I" in Tea. That would be gross.

Online Now

Users browsing this forum: No registered users and 4 guests

cron