Go Back   X2 Pandora Modproject Forum > English Section > Mod Universe

Mod Universe You can post here and Talk with other Peoples.

Reply
 
Thread Tools
Old 20.11.2008   #1
AmadanLegre
Member

 
Join Date: 20.11.2008
Posts: 102
Thanks: 1
Thanked 0 Times in 0 Posts
Star New To Modding

Hi, i'm kind of an old player of X2. I've played a bit, but I'm in no way an expert. I am, however, a fairly experienced programmer/scripter and i've used multiple languages. So I'm not afraid of trying to script something. Problem is I have no idea where to start. I know that with something like this it can take months to become familiar and years to master, so if I try something, I'd like to start simple. Does anyone have any advice for me? And.. how would I go about making a custom galaxy like the one you're able to select when you start a new game?

Kind of idea I have is just start up in my own ship and carve my own way without the help of that Ban Danna and the other manipulators. Just start fresh as my own pilot, maybe an argon mercenary of some sort or possibly something seedier. I kind of wonder why I don't have that option, that's what bothers me with these forced story-lines where you're given a preset name and plot. In this case, I kind of feel guilty running out on Ban Danna and going it alone - wonder what he'll tell everyone about this jerk that took off with a discoverer and never showed up again.

Last edited by AmadanLegre; 20.11.2008 at 16:07
AmadanLegre is offline   Reply With Quote
Old 20.11.2008   #2
Graceburn
X² Pandora Mod Team


 
Join Date: 25.03.2008
Location: Getsu Fune
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to Graceburn
Default Re: New To Modding

Custom Start wroks like that i think, welcome to the forums anyway
__________________
Graceburn is offline   Reply With Quote
Old 21.11.2008   #3
Chris Gi
KorintenKacker


 
Chris Gi's Avatar
 
Join Date: 08.02.2008
Location: Pilkunnussija
Posts: 3,728
Thanks: 10
Thanked 158 Times in 116 Posts
Send a message via ICQ to Chris Gi
Default AW: New To Modding

Yeah, I forgot: a warm welcome from me too.

Like Graceburn said: that's what Custom Galaxies are for. You get a X2 universe without Ban Danna (and without Saya ).

If you want to start scripting, this is a good starting point. Tired of this old Discoverer you get at the beginning? Then write a small script and change the starting place, ship etc. It's very easy if you know how to do it, you only need to know a few script commands and how to name this script.

The best way to learn writing to scripts is to look at the work of others. Get the MSCI Handbook from ES home page, it has some useful information on scripting, and look at other people's scripts.

If you want to change some of the starting conditions, you need to do the following: you need a custom map and a script. Let's assume the map you want to play is called MyMap (MyMap.xml). You need to name the script galaxy.MyMap.initplayership. It's always galaxy.{MapName}.initplayership. There is an example in the scripts folder galaxy.Example.initplayership for the Example map. If you know other programming languages, it's pretty easy to read.
Chris Gi is offline   Reply With Quote
Old 22.11.2008   #4
AmadanLegre
Member

 
Join Date: 20.11.2008
Posts: 102
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: AW: New To Modding

Quote:
Originally Posted by Chris Gi View Post
Yeah, I forgot: a warm welcome from me too.

Like Graceburn said: that's what Custom Galaxies are for. You get a X2 universe without Ban Danna (and without Saya ).

If you want to start scripting, this is a good starting point. Tired of this old Discoverer you get at the beginning? Then write a small script and change the starting place, ship etc. It's very easy if you know how to do it, you only need to know a few script commands and how to name this script.

The best way to learn writing to scripts is to look at the work of others. Get the MSCI Handbook from ES home page, it has some useful information on scripting, and look at other people's scripts.

If you want to change some of the starting conditions, you need to do the following: you need a custom map and a script. Let's assume the map you want to play is called MyMap (MyMap.xml). You need to name the script galaxy.MyMap.initplayership. It's always galaxy.{MapName}.initplayership. There is an example in the scripts folder galaxy.Example.initplayership for the Example map. If you know other programming languages, it's pretty easy to read.
I've got that far! I also made my first "hello world" script using the MSCI handbook (i'm on page 25 atm).

My question is whether or not I can change the initial settings for the ship when you select "<X2 Universe>" in the "New Game in Custom Universe". I don't see a "galaxy.X2 UNIVERSE.initplayership.xml." And I'm going to need to get a galaxy editor.
AmadanLegre is offline   Reply With Quote
Old 22.11.2008   #5
Gravemind
Administrator


 
Gravemind's Avatar
 
Join Date: 08.02.2008
Location: Ceo's Buckzoid
Posts: 667
Thanks: 17
Thanked 11 Times in 9 Posts
Send a message via ICQ to Gravemind Send a message via Skype™ to Gravemind
Default AW: Re: AW: New To Modding

Quote:
Originally Posted by AmadanLegre View Post
I've got that far! I also made my first "hello world" script using the MSCI handbook (i'm on page 25 atm).

My question is whether or not I can change the initial settings for the ship when you select "<X2 Universe>" in the "New Game in Custom Universe". I don't see a "galaxy.X2 UNIVERSE.initplayership.xml." And I'm going to need to get a galaxy editor.
hello,
the original x2 universe is in one of the cats of x2
you need to extract them with the x² archiver
__________________
Gravemind is offline   Reply With Quote
Old 23.11.2008   #6
Chris Gi
KorintenKacker


 
Chris Gi's Avatar
 
Join Date: 08.02.2008
Location: Pilkunnussija
Posts: 3,728
Thanks: 10
Thanked 158 Times in 116 Posts
Send a message via ICQ to Chris Gi
Default AW: New To Modding

Quote:
My question is whether or not I can change the initial settings for the ship when you select "<X2 Universe>" in the "New Game in Custom Universe". I don't see a "galaxy.X2 UNIVERSE.initplayership.xml."
No. A script named this way can't be made. You have a very limited character set in the internal script editor. Just letters, digits, and '.' and ','. In strings you can use '%', '-' and space too.
If you want to play the original X2 map, you need to extract it like Gravemind said. Then you need to rename it to 'X2Universe.xml' for example and your script to 'galaxy.X2Universe.initplayership'. This is the same as choosing <X2 Universe> in the "New Game in Custom Universe", except you can now change the initial settings.
Chris Gi is offline   Reply With Quote
Old 25.11.2008   #7
AmadanLegre
Member

 
Join Date: 20.11.2008
Posts: 102
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: New To Modding

Is there a way to have a script command menu on a station when you dock?

So far I only see the possibility of having a script command menu on one of the ship menues or on a station that you own (through the command console).

What I wanted to do was put the following command on the dock tab when you're docked at a station:
"Browse Recruitment Catalog Level 1..."

This would place it somewhere near the bulletin command menu or the "Comm with person aboard".

It looks like I have to put it on a ship menu though :/

On the bright side, I could probably check to see if they're docked. If they're not, the command wouldn't execute. Is there a way to make the command menu gray out or to disable it visiibly?
AmadanLegre is offline   Reply With Quote
Old 25.11.2008   #8
Chris Gi
KorintenKacker


 
Chris Gi's Avatar
 
Join Date: 08.02.2008
Location: Pilkunnussija
Posts: 3,728
Thanks: 10
Thanked 158 Times in 116 Posts
Send a message via ICQ to Chris Gi
Default AW: New To Modding

No, you can't add a command to a station you don't own - at least noone figured out how to do this.
Furthermore, ship commands are disabled while docked. Maybe the commands in the additional ship slots are working, I don't know, I haven't tested this.

But you can use a script to disable a command. (I'm not quite sure about the names, I have no X2 here at work):
To use a command, you need to connect a command with a script. This is done by the command 'set ship command upgrade ...'. There is a second version of this command with an additional parameter that takes a script.
This script is used to allow or disallow the use of a command. This is explained in the MSCI Handbook with a very basic example.

Last edited by Chris Gi; 25.11.2008 at 12:59
Chris Gi is offline   Reply With Quote
Old 25.11.2008   #9
AmadanLegre
Member

 
Join Date: 20.11.2008
Posts: 102
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: AW: New To Modding

Quote:
Originally Posted by Chris Gi View Post
No, you can't add a command to a station you don't own - at least noone figured out how to do this.
Furthermore, ship commands are disabled while docked. Maybe the commands in the additional ship slots are working, I don't know, I haven't tested this.

But you can use a script to disable a command. (I'm not quite sure about the names, I have no X2 here at work):
To use a command, you need to connect a command with a script. This is done by the command 'set ship command upgrade ...'. There is a second version of this command with an additional parameter that takes a script.
This script is used to allow or disallow the use of a command. This is explained in the MSCI Handbook with a very basic example.
Yep I've confirmed this just past few hours. I'm going to try the "Additional Ship Commands" menu.

I was hoping that the menu items would only come up when you dock. Failing that, I tried to get the menu items to be up at all times, whether you're docked or not. Still looking for an inbetween. I'll find one.
AmadanLegre is offline   Reply With Quote
Old 25.11.2008   #10
AmadanLegre
Member

 
Join Date: 20.11.2008
Posts: 102
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: New To Modding

A minor update. It does work with "Additional Ship Commands". However, you can't tell that these commands are present without selecting one of two slots in the "Additional Ship Commands" section. Both of the slots say "None" - that's misleading. A new user wouldn't know where the commands are because ther'es nothing to suggest they exist except a possible ware that might be needed to use the commands. I preferred using the custom/sepcial menu, but am prevented from doing so because it won't work when you're docked.

Some questions:

1) Is there a way to edit the "FROM:UNKNOWN" in a scripted incoming message?

2) Also, can anyone point me in the right direction as to how I can add a new ware to all trading stations? I also don't know where to start in creating a new ware, either.

EDIT: Yipee, I figured out how to change the "Message from:" field. Basically, you hadd "[author]name of source[/author]".

Also I found out how to change the button text at the end of an incoming transmission. You use [select value=""]button text[/select]. It looks like it's using a form to me. Form controls. Problem is that we don't have access to the action/get response code that responds to clicking on the buttons. I've used forms before so it was kind of familiar.

On the bright side, this means that both incoming messages and normal messages can have an extensive amount of formatting, which is kind of kool. I've already used [center], [justify], [right], [b], and so on. You can also color the text and arrange in columns (I think). Only problem is there's no interface except the joy of clicking a button that does nothing. If they could have allowed us to attach a script to the button ([select script="form.response1.xml"]Send a Yes![/select]), we could of asked players questions in incoming messages! (that would have been SWEET).

Last edited by AmadanLegre; 25.11.2008 at 20:16
AmadanLegre is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:55.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© X² Pandora Dev Team 2007-2016