Mission Director Basics and Installation
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
what do you need a compiler for ?
the mission director is not a programming language, its designed for a very specific task, creating missions via the use of game events.
due to the use of xml and the schema, theres no need for a "command dictionary" as everything you need is explained in the schema, you jsut need to use a program that can understand it
the mission director is not a programming language, its designed for a very specific task, creating missions via the use of game events.
due to the use of xml and the schema, theres no need for a "command dictionary" as everything you need is explained in the schema, you jsut need to use a program that can understand it
All you need is the VWD 2005 Express Edition which can be downloaded for free from the Microsoft Website. Link
And for the "Command Dictionary" just open director.htm in the Director Folder with any Browser such as Internet Explorer. It lists all available Commands, Variables and stuff that you can use and explains briefly what they do.
greetz
XGamer
And for the "Command Dictionary" just open director.htm in the Director Folder with any Browser such as Internet Explorer. It lists all available Commands, Variables and stuff that you can use and explains briefly what they do.
greetz
XGamer
X:BtF: 7/10 | X2: 8/10 | X3:R/TC/AP: 8/10 | X:R: 3/10 | X4: 0/10 (3 points for split ships and stations, 4.0 -> -50 points).
If you are raising pirate activity, give me meaningful ways to deal with them PERMANENTLY. Better things to do than replacing ships every 10 minutes, or babysitting ships getting harassed.
Stopped playing X4 with 4.0 due to outrageous, needless and pointless nerfs to everything. Don't change what wasn't broken in the first place.
If you are raising pirate activity, give me meaningful ways to deal with them PERMANENTLY. Better things to do than replacing ships every 10 minutes, or babysitting ships getting harassed.
Stopped playing X4 with 4.0 due to outrageous, needless and pointless nerfs to everything. Don't change what wasn't broken in the first place.
-
- Posts: 2262
- Joined: Tue, 23. Dec 03, 22:32
-
- Posts: 2262
- Joined: Tue, 23. Dec 03, 22:32
Yes, this Topic is the Very best place to ask for help regarding the Mission Director and Problems on making own missions. So just fire away
greetz
XGamer
greetz
XGamer
X:BtF: 7/10 | X2: 8/10 | X3:R/TC/AP: 8/10 | X:R: 3/10 | X4: 0/10 (3 points for split ships and stations, 4.0 -> -50 points).
If you are raising pirate activity, give me meaningful ways to deal with them PERMANENTLY. Better things to do than replacing ships every 10 minutes, or babysitting ships getting harassed.
Stopped playing X4 with 4.0 due to outrageous, needless and pointless nerfs to everything. Don't change what wasn't broken in the first place.
If you are raising pirate activity, give me meaningful ways to deal with them PERMANENTLY. Better things to do than replacing ships every 10 minutes, or babysitting ships getting harassed.
Stopped playing X4 with 4.0 due to outrageous, needless and pointless nerfs to everything. Don't change what wasn't broken in the first place.
Thanks for the reply.
Well what i have been working on was just trying to modify one of Xenon Slayers sample missions, it was BM04 Retrieve Unmanned Ship.
This is what it looks like, not much has changed other than giving the reward to the player.
The problem is, the mission becomes complete only when i automate the ship to return to the destination station when i am not inside it. Which is fine but i would like to be able to fly it in myself and change ships when i get there too.
How would i go about making it work, say for example, completing only after i return the ship at the station and switch to another ship that is docked there?
I realize i can make the negate variable go away, but if i do that i get rewarded and ship is taken away as soon as i dock. But then you run into problems, flying the same ship that's not suppose to be there.
I've fooled around a bit with other things like player_changed_ship and i just cant get anywhere with this.
Any suggestions?
Well what i have been working on was just trying to modify one of Xenon Slayers sample missions, it was BM04 Retrieve Unmanned Ship.
This is what it looks like, not much has changed other than giving the reward to the player.
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<documentation>
<author name="JM" alias="Troop5" contact="" />
<content reference="MMSR01" name="More Missions Ship Retreval 01" description="Retreive Unmanned Ship"/>
<version number="0.2" date="10/10/08" status="Sample" />
</documentation>
<cues>
<cue name="MMSR01 Add Mission">
<action>
<add_bbs_quest name="MMSR01" priority="500" max="1"/>
</action>
<cues>
<cue name="MMSR01" instantiate="static">
<condition>
<check_all>
<bbs_quest_evaluated quest="MMSR01"/>
<match_object object="{player.dockobject}" race="default"/>
</check_all>
</condition>
<action>
<do_all exact="5" comment="Checks if there is a suitable sector nearby for the unmanned ship to spawn in.">
<find_sector name="MMSR01.Test Sector" sector="{player.sector}" min="1" max="2"/>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@argon}">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@boron}">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@paranid}">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@split}">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@teladi}">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@pirate}" comment="1.5 The Reward">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
<do_if value="{sector.race@MMSR01.Test Sector}" exact="{lookup.race@xenon}" comment="Double The Reward">
<set_sector name="MMSR01.Ship Sector" value="{sector@MMSR01.Test Sector}"/>
</do_if>
</do_all>
</action>
<cues>
<cue name="MMSR01 Mission Offer">
<condition>
<check_all>
<check_value value="{sector.exists@MMSR01.Ship Sector}" exact="1"/>
</check_all>
</condition>
<action>
<do_all>
<set_value name="MMSR01.Offer Race" exact="{player.dockobject.race}"/>
<create_actor name="MMSR01.Offer Actor" character="{random.pilot.{value@MMSR01.Offer Race}}" comment="For In Space Testing"/>
<set_value name="MMSR01.Random" min="0" max="100"/>
<offer_bbs_quest quest="MMSR01" author="{actor.name@MMSR01.Offer Actor}" text="[center][u]Ship Retreval[/u]\n\n Greetings my name is {actor.name@MMSR01.Offer Actor} and i run a small space tour company. Recently one of my transporters was attacked by pirates on the way to a pickup destination, fortunately the pilot ejected and was picked up some time later. However it seems the attackers didn't destroy or take the ship for themselves, my transponder still reads its in the vicinity. I need someone to get my ship back. I will pay 4,500Cr for the retreval. It is no farther than 2 sectors from here. Please contact me if you are interested.[/center] \n\n[center][select value='Accept']Contact {actor.name@MMSR01.Offer Actor}[/select][/center]"/>
</do_all>
</action>
<cues>
<cue name="MMSR01 Accepted">
<condition>
<bbs_quest_selected quest="MMSR01" answer="Accept"/>
</condition>
<action>
<do_all>
<accept_bbs_quest quest="MMSR01"/>
<set_object name="MMSR01.Offer Station" value="{player.dockobject}"/>
<set_sector name="MMSR01.Offer Sector" value="{player.sector}"/>
<set_value name="MMSR01.Mission Start Time" exact="{player.age}"/>
<set_value name="MMSR01.Mission Time Limit" exact="100s"/>
<incoming_message author="{actor.name@MMSR01.Offer Actor}" popup="1" text="Thank you for responding. The Last Known Coordinates of the ship is 10.13.8 in the {sector.name@MMSR01.Ship Sector} Sector. Please find it and return it at your convinence."/>
<set_value name="MMSR01.Unmanned Ship Hull" min="22" max="60"/>
<set_value name="MMSR01.X Position" min="5" max="15"/>
<set_value name="MMSR01.Y Position" min="5" max="15"/>
<set_value name="MMSR01.Z Position" min="5" max="15"/>
<create_ship name="MMSR01.Unmanned Ship" class="tp" typename="{random.type@SS_SH_A_TP|SS_SH_B_TP|SS_SH_P_TP|SS_SH_S_TP|SS_SH_T_TP|SS_SH_A_TP_1|SS_SH_B_TP_1|SS_SH_P_TP_1|SS_SH_S_TP_1|SS_SH_T_TP_1}"
race="neutral" capturable="1" highlight="1" racelogic="1">
<position x="{value@MMSR01.X Position}km" y="{value@MMSR01.Y Position}km" z="{value@MMSR01.Z Position}km"/>
<sector sector="MMSR01.Ship Sector"/>
<equipment loadout="minimum"/>
<command command="none"/>
</create_ship>
<set_hull object="MMSR01.Unmanned Ship" exact="{value@MMSR01.Unmanned Ship Hull}"/>
</do_all>
</action>
<cues>
<cue name="MMSR01 Unmanned Ship Destroyed">
<condition>
<check_all>
<object_destroyed object="MMSR01.Unmanned Ship"/>
</check_all>
</condition>
<action>
<do_all>
<incoming_message author="{actor.name@MMSR01.Offer Actor}" popup="1" text="I had a bad feeling about hiring you. How could you let my ship be destroyed!? Well, not only do you NOT get paid. I have taken a substantial loss, i'll be sure not to contact you again."/>
<cancel_cue cue="MMSR01"/>
</do_all>
</action>
</cue>
<cue name="MMSR01 Unmanned Ship Destroyed by Player">
<condition>
<object_destroyed_by_player object="MMSR01.Unmanned Ship"/>
</condition>
<action>
<do_all>
<incoming_message author="{actor.name@MMSR01.Offer Actor}" popup="1" text="You idiot! You were suppose to retreve my ship, not destroy it! I'm considering putting this reward money into a bounty on your head!!"/>
<cancel_cue cue="MMSR01"/>
</do_all>
</action>
</cue>
<cue name="MMSR01 Unmanned Ship Captured">
<condition>
<match_object object="MMSR01.Unmanned Ship" race="player"/>
</condition>
<timing>
<time exact="3s"/>
</timing>
<action>
<do_all>
<incoming_message author="{actor.name@MMSR01.Offer Actor}" popup="1" text="You found my ship, well done! Now bring the ship back to the {object.name@MMSR01.Offer Station} in {sector.name@MMSR01.Offer Sector} for your reward. I have someone waiting to pickup the ship so be sure to have one of your own to transfer to if you are flying it in, so we may complete this transaction."/>
</do_all>
</action>
<cues>
<cue name="MMSR01 Ship Returned">
<condition>
<check_all>
<object_docked object="MMSR01.Unmanned Ship" param="{object@MMSR01.Offer Station}"/>
<check_value value="{player.ship}" exact="{object@MMSR01.Unmanned Ship}" negate="1"/>
</check_all>
</condition>
<action>
<do_all>
<incoming_message author="{actor.name@MMSR01.Offer Actor}" popup="1" text="Thank you for returning my ship. As promised, the sum of 4500Cr has been deposited into your Account. It's been a pleasure doing business with you."/>
<set_owner object="MMSR01.Unmanned Ship" race="{value@MMSR01.Offer Race}"/>
<reward_player>
<money exact="4500"/>
</reward_player>
<cancel_cue cue="MMSR01"/>
</do_all>
</action>
</cue>
</cues>
</cue>
</cues>
</cue>
</cues>
</cue>
</cues>
</cue>
</cues>
</cue>
</cues>
</director>
How would i go about making it work, say for example, completing only after i return the ship at the station and switch to another ship that is docked there?
I realize i can make the negate variable go away, but if i do that i get rewarded and ship is taken away as soon as i dock. But then you run into problems, flying the same ship that's not suppose to be there.
I've fooled around a bit with other things like player_changed_ship and i just cant get anywhere with this.
Any suggestions?
Hi
just try to use object_is_docked instead of object_docked, and it should work, since the object_docked is event driven unlike object_is_docked.
Like this
Hope that helps
MFG
Ketraar
Code: Select all
<object_docked object="MMSR01.Unmanned Ship" param="{object@MMSR01.Offer Station}"/>
<check_value value="{player.ship}" exact="{object@MMSR01.Unmanned Ship}" negate="1"/>
Like this
Code: Select all
<object_is_docked object="MMSR01.Unmanned Ship" param="{object@MMSR01.Offer Station}"/>
<check_value value="{player.ship}" exact="{object@MMSR01.Unmanned Ship}" negate="1"/>
MFG
Ketraar
In general. No.
The amount of commands available in TC that are missing in X3R MD is huge. You can try though, open the TC MD files with the X3R director.xsd and you'll see.
Not to speak that there are several bugs in the X3R MD, so that I have put it aside and there is no turning back, no more X3R MD... ever!
MFG
Ketraar
The amount of commands available in TC that are missing in X3R MD is huge. You can try though, open the TC MD files with the X3R director.xsd and you'll see.
Not to speak that there are several bugs in the X3R MD, so that I have put it aside and there is no turning back, no more X3R MD... ever!
MFG
Ketraar
-
- Posts: 2
- Joined: Sun, 26. Apr 09, 08:57
Just curious. I haven't been able to access a string set with <set_value>. The variable {value@val} returns '0'. Is there a way to compare a string's value, or insert a string inline?
So hypothetically the following would be possible.
So hypothetically the following would be possible.
Code: Select all
<do_all>
<do_choose >
<do_when value="{value@this.colorNum}" exact="0">
<set_value name="this.var" exact="Green"/>
</do_when>
<do_when value="{value@this.colorNum}" exact="1">
<set_value name="this.var" exact="Blue"/>
</do_when>
<do_when value="{value@this.colorNum}" exact="3">
<set_value name="this.var" exact="Yellow"/>
</do_when>
<do_when value="{value@this.colorNum}" exact="4">
<set_value name="this.var" exact="Red"/>
</do_when>
</do_choose>
<play_subtitles text="You have {value@this.var} lips."/>
<do_all>
Ok, so reading between the lines in this thread and the modding forum as a whole, MD really didn't come off in X3R?
It's a pity, as I recently dusted off X3R after a couple of years, and been impressed with how it had changed. Not getting X3TC in the short term, I don't think my PC would handle it well, and no budget for one just yet.
Anyway - the point is, I've been playing around with the MD and got some (what I think) great ideas BUT, not really getting anywhere with it. And the thing is I have no clue why. According to my understanding it should work.... but anyway - if someone is still reading this kinda stuff and can help, I'd be grateful.
So to cut to the chase, the mission I've been working on has a segment (ie CUE) which triggers when the player enters a certain sector. An Argon Escort group of 2xM3 and 3xM4 spawns with orders to 'protect player', sends a message to the player that the target is heading for the east gate and should be intercepted in the centre, and finally a XenonP spawns at the opposite side of the sector with orders to move to the sector beyond the east gate.
What I have so far is:
So the observed behaviour for the above is that only a single argon nova gets created, it has no commands, and is completely unresponsive at speed 0 (even when attacked by wandering Xenon)
I've tried different variations, such as creating them outside if a group with unique names, creating them as player owned ships (using reward_player) different orders, within their own <do_all> tags. racelogic on/off, allsorts.... no result. Rats.
So - does anyone have any idea why?
The mission arc I have planned requires the setup of various enemy, friendly and player groups of ships, with specific orders. Without this, it's probably pointless going further. Reading the manual and the schema, it should be possible.... Help!!!...? If anyone's still here that is!
It's a pity, as I recently dusted off X3R after a couple of years, and been impressed with how it had changed. Not getting X3TC in the short term, I don't think my PC would handle it well, and no budget for one just yet.
Anyway - the point is, I've been playing around with the MD and got some (what I think) great ideas BUT, not really getting anywhere with it. And the thing is I have no clue why. According to my understanding it should work.... but anyway - if someone is still reading this kinda stuff and can help, I'd be grateful.
So to cut to the chase, the mission I've been working on has a segment (ie CUE) which triggers when the player enters a certain sector. An Argon Escort group of 2xM3 and 3xM4 spawns with orders to 'protect player', sends a message to the player that the target is heading for the east gate and should be intercepted in the centre, and finally a XenonP spawns at the opposite side of the sector with orders to move to the sector beyond the east gate.
What I have so far is:
Code: Select all
<cue name="SB_XenonP_Cap_ch5_p1">
<condition>
<check_all comment="target sector is the unknown one NW of Getsu Fune">
<object_changed_sector />
<object_sector object="{player.ship}" exact="0">
<sector x="16" y="0" />
</object_sector>
</check_all>
</condition>
<timing>
<time exact="3s"/>
</timing>
<action>
<do_all>
<incoming_message author="Argon Escort Leader" text="We appear to be in time, our scans show the convoys are moving towards the east gate. We should intercept them somewhere near the centre of the sector." popup="1" />
<!-- Create the Argon Escort group -->
<create_ship leader="1" group="SB_XenonP_Cap.ArgonEscort" class="m3" highlight="1" race="argon" typename="SS_SH_A_M3" racelogic="0">
<position exact="1km" object="{player.ship}"/>
<equipment loadout="default">
<ware typename="SS_WARE_TECH213" exact="15" />
<equipment/>
<command command="protect" commandobject="{player.ship}"/>
</create_ship>
<create_ship group="SB_XenonP_Cap.ArgonEscort" class="m3" highlight="1" race="argon" typename="SS_SH_A_M3" racelogic="0">
<position exact="1km" object="{player.ship}"/>
<equipment loadout="default">
<ware typename="SS_WARE_TECH213" exact="15" />
<equipment/>
</create_ship>
<create_ship group="SB_XenonP_Cap.ArgonEscort" class="m4" highlight="1" race="argon" typename="SS_SH_A_M4" racelogic="0">
<position exact="1km" object="{group.leader@SB_XenonP_Cap.ArgonEscort}"/>
<equipment loadout="maximum">
<ware typename="SS_WARE_TECH213" exact="15" />
<equipment/>
</create_ship>
<create_ship group="SB_XenonP_Cap.ArgonEscort" class="m4" highlight="1" race="argon" typename="SS_SH_A_M4" racelogic="0">
<position exact="1km" object="{group.leader@SB_XenonP_Cap.ArgonEscort}"/>
<equipment loadout="maximum">
<ware typename="SS_WARE_TECH213" exact="15" />
<equipment/>
</create_ship>
<create_ship group="SB_XenonP_Cap.ArgonEscort" class="m4" highlight="1" race="argon" typename="SS_SH_A_M4" racelogic="0">
<position exact="1km" object="{group.leader@SB_XenonP_Cap.ArgonEscort}"/>
<equipment loadout="maximum">
<ware typename="SS_WARE_TECH213" exact="15" />
<equipment/>
</create_ship>
<set_group_command group="{SB_XenonP_Cap.ArgonEscort}" command="protect" commandobject="{group.leader@SB_XenonP_Cap.ArgonEscort}"/>
<!-- <set_command object="{group.leader@SB_XenonP_Cap.ArgonEscort}" command="protect" commandobject="{player.ship}"/>
-->
<!-- Create the Xenon P for the first convoy -->
<create_ship class="m6" race="xenon" racelogic="0" typename="SS_SH_X_M6" capturable="1" >
<position x="-20km" y="0" z="0" />
<equipment loadout="default"/>
<command command="movesector">
<sector x="17 y="0" />
</command>
</create_ship>
</do_all>
</action>
</cue>
I've tried different variations, such as creating them outside if a group with unique names, creating them as player owned ships (using reward_player) different orders, within their own <do_all> tags. racelogic on/off, allsorts.... no result. Rats.
So - does anyone have any idea why?
The mission arc I have planned requires the setup of various enemy, friendly and player groups of ships, with specific orders. Without this, it's probably pointless going further. Reading the manual and the schema, it should be possible.... Help!!!...? If anyone's still here that is!
I used to be indecisive, but now I'm not sure....
-
- EGOSOFT
- Posts: 13088
- Joined: Sat, 9. Nov 02, 11:45
Hi,
You have several tags closed incorrectly. <equipment/> should be </equipment>. If you are using a program such as Visual Web Developer, the XML errors should be underlined.
You have several tags closed incorrectly. <equipment/> should be </equipment>. If you are using a program such as Visual Web Developer, the XML errors should be underlined.
Come watch me on Twitch where I occasionally play several of the X games
Do I? RATS! Ok, back soon. Just using Notepad atm, btw.
PS, thanks
** update **
Umm, ok - so I'm a doofus....
Found a couple of unclosed text strings too. I know how the <equipment> one happened, it was originally a single line, and I forgot to close it properly when I added the wares in there.
Also forgot I could parse it using IE, been a real long time since I've done this sort of thing. Yes I know, get VWD2008e - and I will.....soon(tm)
Ok, upshot is that I got it working, however, if I issue group commands, the ships just do nothing. And if I specify a command for each ship in the create tags they act fine....
I don't see anything wrong with
but perhaps there is...
Other than that, I'll post with more news as it becomes more complete (if ppl are interested that is!) got 4/5 other ideas for mission arcs too.
PS, thanks
** update **
Umm, ok - so I'm a doofus....
Found a couple of unclosed text strings too. I know how the <equipment> one happened, it was originally a single line, and I forgot to close it properly when I added the wares in there.
Also forgot I could parse it using IE, been a real long time since I've done this sort of thing. Yes I know, get VWD2008e - and I will.....soon(tm)
Ok, upshot is that I got it working, however, if I issue group commands, the ships just do nothing. And if I specify a command for each ship in the create tags they act fine....
I don't see anything wrong with
Code: Select all
<set_group_command group="{SB_XenonP_Cap.ArgonEscort}" command="protect" commandobject="{player.ship}" />
Other than that, I'll post with more news as it becomes more complete (if ppl are interested that is!) got 4/5 other ideas for mission arcs too.
I used to be indecisive, but now I'm not sure....