[Discussion] Generic X3TC S&M questions II

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12101
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Posted.
Rednoahl wrote:especially when you introduce conversations into the mix.
Conversations are just an event like any other, and an simple one to check too.
Once you understand that MD is event driven, you will find that its easy.
Also note that MD is read from Top to bottom, so any action or condition that is above will be done/checked first. Same applies to cues. But that is all explained in the manual, which brings me to what Carlo said.
Carlo the Curious wrote:If you haven't seen it yet, the X3R sticky has a very basic guide (in the support files).
Yes and it should be the first thing to read for anyone who wants to code, although a lot of stuff is missing there, but the logic of it still applies to TC.

MFG

Ketraar
Image
Rednoahl
Posts: 1400
Joined: Sat, 3. Jan 09, 15:48
x4

Post by Rednoahl »

The director guide for Reunion is always loaded up while I'm working with the MD - I'm still trying to drill in my head "Action is the event which occurs a certain Timing after the Condition is met."

I've also got about 20 threads bookmarked (mainly googletranslated German) that are useful in places. A 4'x3' coffee table covered in notes and flow charts/plans and post it notes stuck all over the place. Once I can order all that information I might get a bit further than I am currently :D

I'm fairly pleased with my progress so far, it's just good to have another reference to look at when a problem occurs. Even though my progress has been slow, I am "getting" a bit more every day. I'm also glad that there are others here trying to get to grips with MD - more code for dissection!
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

I have compiled the MD questions from the X3R and the X3TC thread thats now locked.

Need to know can i post it all in one post for everyone as i saved it with the forums codes ie: quotes with posters name and code for the code posted.

It's a tad large, but it'll save folks from having to trawl through the threads.

I have them set out in Questions / Answers type format.

the odd question hasn't got an answer or the poster figured the problem out himself but never posted what it was.

Anyway let me know if I can post this large text in the forum.
If not I'll take a stab at trying to make it look pretty for DL instead.

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
Igor.tverd
Posts: 266
Joined: Sun, 5. Oct 08, 10:06
x3ap

Post by Igor.tverd »

@ Argonaught

Here's a quote from this thread by LV
LV wrote:This may sink like lead but i've seen a few short md scripts over the last few days/weeks and it's work trying to have dedicated thread for short md code

I've created this thread so smaller md code can be posted so users can not only use it but also ask questions around what certain commands do.
......
.....

Any code posted in these forums like below can be put here even if you didn't write it as long as your post shows who did.
I think it would be great if you posted what you've found, it would defiantly help in development of Missions and plots.
I have been doing similar search and have come upon some very helpful bits of MD code here and there, I still have a long way to go to clean it up and all.
Fantasy is the impossible made probable. Science fiction is the improbable made possible.
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Igor.tverd wrote:@ Argonaught

Here's a quote from this thread by LV
LV wrote:This may sink like lead but i've seen a few short md scripts over the last few days/weeks and it's work trying to have dedicated thread for short md code

I've created this thread so smaller md code can be posted so users can not only use it but also ask questions around what certain commands do.
......
.....

Any code posted in these forums like below can be put here even if you didn't write it as long as your post shows who did.
I think it would be great if you posted what you've found, it would defiantly help in development of Missions and plots.
I have been doing similar search and have come upon some very helpful bits of MD code here and there, I still have a long way to go to clean it up and all.
I forgot about that thread :S

it only has a small link for it in the sticky :( .

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12101
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Igor.tverd wrote:Any news on planet removal?
Basically it does not work. The MD fails to find any planet. So guess the only other option is to make a script and remove the planets using those, then add new ones with load_map or create_planet.

No idea on how to script though, have to pass.

MFG

Ketraar
Image
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Q: Columns and menu headings
Can headings be put into columns?
User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

Post by Lucike »

s9ilent wrote:Q: Columns and menu headings
Can headings be put into columns?
You mean this headings?

[ external image ]

Yes, of course. Look at this thread:

http://forum.egosoft.com/viewtopic.php?t=261816

Regards
Lucike
Image
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Yes I do, Cheers :)




Q:
I know that when a ship is running a script, and the ship dies, that the script stops, but, what happens if say
-shipmain is running a task, which then does a
-$ship1 -> call script xyz
-The ship1 script is half way through executing when ship1 dies

Does the script return null? or continue to run?
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

I'm currently making a script which causes damage when capitals blow up.

It's run off the Killed signal, and therefore gets the location and other data of the ship after it's been killed.

But as for a task... hm...

Not sure.




On to my question:


I couldn't find, anyway, a decent guide on how to make a gamestart. Sorry, I just couldn't! :lol:

Anyway provide any tips?
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
Rednoahl
Posts: 1400
Joined: Sat, 3. Jan 09, 15:48
x4

Post by Rednoahl »

Neither could I (not for ones that have missions in anyway) - I'm cheating a bit how mine is done by coding after the 3.05 gamestarts missions. It was the only way I could get my missions to trigger right from the word go. I'm not experienced enough to use the "ref" command yet - but I suspect that is the way forward.

I'm claiming start 210 by the way if nobody has done before me.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

EmperorJon wrote:I couldn't find, anyway, a decent guide on how to make a gamestart. Sorry, I just couldn't! :lol:
http://forum.egosoft.com/viewtopic.php?t=226913
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Yes, but the question is where do I get those XML files from, where do I extract them from and how... :cry:
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12101
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

L\true\gamestart.xml

\director\start.xml

If you want your mission to trigger only in your custom start the set condition of toplevel cue to

Code: Select all

<check_value value="{player.gamestart}" exact="xy"/>
xy= your gamestart ID nr. set in gamestart.xml

MFG

Ketraar
Image
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Use the X3 Editor to extract the cat files.
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Know, I mean where do I get gamestart.xml and start.xml from?
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
Rednoahl
Posts: 1400
Joined: Sat, 3. Jan 09, 15:48
x4

Post by Rednoahl »

EmperorJon wrote:Know, I mean where do I get gamestart.xml and start.xml from?
...second line down, from the link Carlo pointed at:

TC/director/start.xml
TC/L/true/gamestarts.xml

You must have had too good a holiday fella

:D


EDIT: ...and I must be too hungover - missed that Ketraar had already pointed that out. :oops:
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

:P
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
Rednoahl
Posts: 1400
Joined: Sat, 3. Jan 09, 15:48
x4

Post by Rednoahl »

Does anyone know what files the "overlays" are in cutscenes?

EDIT: ignore - I've found what I wanted (at least I think I have) but can't alter it because I haven't got a 3D program.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22417
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

s9ilent wrote:Yes I do, Cheers :)




Q:
I know that when a ship is running a script, and the ship dies, that the script stops, but, what happens if say
-shipmain is running a task, which then does a
-$ship1 -> call script xyz
-The ship1 script is half way through executing when ship1 dies

Does the script return null? or continue to run?
when a ship dies, all scripts on that stack are stopped, regardless of where they are.

so both the task and the called script will be stopped the moment the ship dies

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”