What is the programing language.

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

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

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

What is the programing language.

Post by Xenon_Slayer »

What is the programing language used in X2. Im going to learn C++. Is that going to help?
Come watch me on Twitch where I occasionally play several of the X games
CBJ
EGOSOFT
EGOSOFT
Posts: 54309
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

The scripting language is unique to this game, but learning C++ will be a good starting point for programming in most languages.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Is there a step by step guide some where?
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek »

pick up 'teach yourself c++ in 30 days', not a bad 1st start
"Nature's first green is gold" . . . stay golden.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

In the shops or a download?

Anyway I just picked up the X2 mod package. (Proberbly a good place to start dont ya think.) :)
Come watch me on Twitch where I occasionally play several of the X games
Shara
Posts: 244
Joined: Tue, 24. Feb 04, 19:37
x2

Post by Shara »

Mod package is a good place to start for modding the game. But modding and scripting are two different things.

There is a pretty decent list of scripting commands here:

http://xscripting.com/forums/index.php?showtopic=47

And there are some good scripting resources here:

http://65.92.32.23:8080/modules.php?nam ... g_Handbook
User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek »

Burianek wrote:pick up 'teach yourself c++ in 30 days', not a bad 1st start
Sorry, this is a good 1st start to learning c++, not modding / scripting, though it will help. Misunderstood your question.
"Nature's first green is gold" . . . stay golden.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

I just tried to do some stuff but it is rearly confusing. Well, I guess i have a project for the week end.
Come watch me on Twitch where I occasionally play several of the X games
Shara
Posts: 244
Joined: Tue, 24. Feb 04, 19:37
x2

Post by Shara »

Burianek wrote: Sorry, this is a good 1st start to learning c++, not modding / scripting, though it will help. Misunderstood your question.

Scripting languages for games are unique to the game/engine they are made for. And since that is all they are - a scripting language - attempting to learn something like C++ beforehand is very much overkill. If you have never written code before, I would not attempt to learn C++ unless you had to, such as if you had to take a college course on it for CS curriculum.

If you really feel like you need to learn a language before attempting scripting, I would suggest a general-purpose scripting language, like Perl. It is not a strongly-typed language like C++, it is not nearly as complicated as C++, and it doesn't need to be compiled like C++. There's a Windows version of Perl made by ActiveState - Google it. Installation is easy.

Learning Perl would at least give you a basic fundamental knowledge of some programming contructs, like for/if/while loops, arrays, and function definition/declaration/calling.

But if all you wanted to do was write scripts for X2, I wouldn't even bother with that. Learn the X2 scripting language, play with it, experiment.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13129
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Shara wrote:
I would not attempt to learn C++ unless you had to, such as if you had to take a college course on it for CS curriculum.
Welcome to my hell starting in september!!!!!!!!!
Come watch me on Twitch where I occasionally play several of the X games
Shara
Posts: 244
Joined: Tue, 24. Feb 04, 19:37
x2

Post by Shara »

Xenon_Slayer wrote:
Shara wrote:
I would not attempt to learn C++ unless you had to, such as if you had to take a college course on it for CS curriculum.
Welcome to my hell starting in september!!!!!!!!!

Gotcha :)


Do yourself a favor then - Go get Kernighan's and Ritchie's C book, The C Programming Language.

Link here:
http://cm.bell-labs.com/cm/cs/cbook/

Get yourself the free gcc C compiler off the internet, and start learning C. Many of the things you will learn in your first C++ class will be things you can also do in C.

I won't try and interject too much of my opinion of C++ here - needless to say I'm extremely biased because of what I learned about programming languages as an undergraduate CS student. I'll just say this: if you learn C, you'll be very prepared for a C++ course, and you'll have learned one of the fundamental languages that most of today's high-level languages are built on. It kinda goes like this:

ADA -> C -> Everything else

If you know C you can write in anything else. Java, Perl, C++, C#, VB, Phython, Snowball... it won't matter.

Best advice I ever got as an undergraduate CS student:

"Languages are tools. After you learn the fundamentals of programming, and learn how to use one language, you should be able to pick up any language and use it with some degree of proficiency. Each tool is different, some are more suited for certain tasks than others. The job of the programmer is to know which tool is best for each job, and then use it."

Don't get stuck on one language - they all have their uses.

G'luck.
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

"Languages are tools. After you learn the fundamentals of programming, and learn how to use one language, you should be able to pick up any language and use it with some degree of proficiency. Each tool is different, some are more suited for certain tasks than others. The job of the programmer is to know which tool is best for each job, and then use it."
Spot on dude :)

Once you've got the underlying concepts figured out it all gets alot easyier from there.
For everything you ever wanted to know about X2,
and more......

[ external image ]
XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk »

If you know C you can write in anything else. Java, Perl, C++, C#, VB, Phython, Snowball... it won't matter.
actually.. you cant.
it'll surely be easier to learn any of those languages, but C doesnt have oop.. that's a fundamental concept of java for example ;)
blackspell
Posts: 128
Joined: Sat, 6. Mar 04, 20:18
x2

Post by blackspell »

but the concept stays the same, if you learn oop (with one language), you are able to code oop in any language.

and i wouln't recommend someone who never coded before to start with oop..
keep to the basics at the beginning ;)
Shara
Posts: 244
Joined: Tue, 24. Feb 04, 19:37
x2

Post by Shara »

Personally, I don't consider OOP to be a part of a language - it's a design model - a methodology. Some languages implement it intrinsically, like Java and C#, while others don't (like C++ and Perl), but it's still a separate concept, and really deserves it's own learning space.

It is definately something a first-year CS student shouldn't have to deal with.

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