Mission Director Basics and Installation

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Note: It doesn't matter too much whether <warp_object> works since the
jumpsector command serves the purpose. Still would be good to know about <warp_object> though.
XGamer
Posts: 2355
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer »

would be interesting to know what code you used when it did not work. As I just checked those <warp_*> actions and they all seem to work as intended for me ;)

Also note that for the Playership there is the <warp_player> action. ;)
And rather then using many <warp_object> actions for making several ships warp into another sector its better to group them and use <warp_group> to warp them all at once ;)

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.
User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Thanks XGamer for your helpful suggestions. I've managed getting warp commands working. :)

On a couple of different subject:

1. I've had zero luck getting <play_movie> to work. Everytime I use I get a CTD. I've tried specifying id's from Videos.txt, but nothing seems to work. I wonder if anyone has found success with this.

2. Not much luck either with <play_dialog>. I found an example given in the German forum which plays audio, but that's all. I'm assuming we should be able to get "actor" video on the monitor, or at least an image?

3. <play_cinematic> does work, but I'm not too happy with the results in terms of ability to control the camera.

So....my main interest at this point is ability to play videos and "dialogs".

Thanks.
XGamer
Posts: 2355
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer »

for <play_dialog> I've posted an example Code in the german thread already but Ill just give you the information I gave them as they had Problems with <play_dialog> too ;)

First of all: <play_dialog> has a few mandatory attributes such as actor which must be a valid actor which you must have created earlier using <create_actor>. Then play_dialog plays the TextID's from the PageID which the Actor u are using has as voice. The dialogid of course is another mandatory attribute.

So when looking at the following code I posted in the german Thread you might notice that this code plays the Text located in PageID 13 at TextID 42.

Code: Select all

    <cue name="Dialog Test Cue" version="1">
      <condition>
        <check_age value="{player.age}" min="8s"/>
      </condition>
      <action>
        <do_all>
          <create_actor voice="13" character="Damn Test Pilot" face="102" race="paranid" name="this.actor1"/>
          <play_dialog>
            <dialog>
              <line actor="this.actor1" dialogid="42" face="102"/>
            </dialog>
          </play_dialog>
        </do_all>
      </action>
    </cue>
If you still wonder how it comes I said its using PageID 13 take a look at the <create_actor> line. The voice attribute there specifies the PageID ;)
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.
User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Thanks XGamer!

Yes, I found your example on the German forum over the weekend, and it worked fine....at least to the extent of playing the audio. The question I have is should I be seeing display (image or video) in the monitor? All I'm getting is audio. I'm assuming (perhaps incorrectly) that specfiying a "face" means there should be some sort of associated image.
User avatar
Moonraven
Posts: 968
Joined: Wed, 27. Aug 03, 11:13
x3

Post by Moonraven »

I had a particial success with the <play_movie>-command. The ID is just the
filename (without extension) of the file in the mov-folder.

But after playing a bit of the movie, the gamegraphics was...hmm..some kind of abstract :D

Maybe i've done something wrong on the properties. I'll give it a shot later.
Gruß Moonraven
Wer lesen kann, ist ganz klar im Vorteil.
[ external image ]
CBJ
EGOSOFT
EGOSOFT
Posts: 53041
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

Some information on another possible problem:

In the "jumps" and "distance" sub-nodes of the various <find_...> actions such as <find_station> you may find that the "exact" attribute doesn't work correctly in all circumstances. A workaround is to use the "min" and "max" attributes and set them to the same value. Note that this problem only applies to this specific case, so "exact" attributes in other actions and sub-nodes should work fine.
User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

FYI: <set_highlight> "Set whether specified object is highlighted in sector map" does not seem to work.
ChemODun
Posts: 320
Joined: Mon, 12. Feb 07, 21:58
x3tc

Post by ChemODun »

Observe wrote:FYI: <set_highlight> "Set whether specified object is highlighted in sector map" does not seem to work.
I must work only in player sector.
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space
XGamer
Posts: 2355
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer »

Observe wrote:FYI: <set_highlight> "Set whether specified object is highlighted in sector map" does not seem to work.
This is wrong ;) <set_highlight> works very well :) Note that both the object and highlight attribute are mandatory ;) Also note that it does only work for ships NOT for Stations!

An example Code to see that it IS working can be found below ;)

Code: Select all

    <cue name="XGDBG005">
      <condition>
        <check_age value="{player.age}" min="10s"/>
      </condition>
      <action>
        <do_all>
          <create_ship typename="SS_SH_S_M3" name="this.ship" race="split" class="m3" racelogic="1" known="1"/>
          <set_highlight highlight="1" object="this.ship"/>
          <find_ship class="m4" nearest="1" includedocked="0" name="this.found">
            <sector sector="{player.sector}"/>
          </find_ship>
          <incoming_message author="XGamer Debugging Services" text="We Found the Ship {object.name@this.found} in {object.sector.name@this.found} with ID-Code: {object.code@this.found}. It has been set as your target now." popup="1"/>
          <set_target object="this.found"/>
          <set_highlight highlight="1" object="this.found"/>
        </do_all>
      </action>
    </cue>
In the above code I set the highlight seperately for the created ship in order to check that <set_highlight> is working. When creating ships you can use the highlight attribute in the <create_ship> action to create it highlighted. For already existing ships (I search one in the above code) its of course needed to use <set_highlight>
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.
User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Thanks XGamer! I'll give it another shot tonight. I'd tried highlighting an exiting created ship, but it didn't seem to have any effect. I'll double-check my attributes.
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Just wondering, has anyone managed to get director.htm to work on a non IE browser? My IE is absolutely crammed with spyware...
I'd rather not use IE unless I absolutely have to (It took a while to clean up my computer after I use it :S)
Diamonddragon
Posts: 1957
Joined: Sat, 7. Feb 04, 20:26
x3tc

Post by Diamonddragon »

Just open the director.xsd with your browser. That way, you wont have the filter feature of the .htm, but every browser has a build in search which was enough for me all the time ;) Apart from the filter, it normally shows the commands as it would in IE.
Es ist nicht das Schicksal, was die Zukunft bestimmt.
Script- und Modliste
Stu Austin
Posts: 2262
Joined: Tue, 23. Dec 03, 22:32
x4

Post by Stu Austin »

Hello all. Trying to learn the MD from the sample files by changing them around. I've got 2 files going on the bbs right off the get go. The main problem I'm having is getting them to pop up at certain times. I've tried putting in the player age thing but with no succes (for the below code I took it out).
This is one of the files Ive got. Could someone please help me with where to put the player age for it to pop up on the bbs at 4 minutes into gameplay? It would be greatly appreciated.

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="Owen Lake" alias="Xenon_Slayer" contact="E-Mail: Owen@Egosoft.com Skype" />
    <content reference="BM04" name="BM04 Ship Retreval" description="Retrieve Unmanned Ship"/>
    <version number="0.2" date="02/01/08" status="Sample" />
  </documentation>
  <cues>
    <cue name="BM04 Add Mission">
      <action>
        <add_bbs_quest name="BM04" priority="1000" max="1"/>
      </action>
      <cues>
        <cue name="BM04" instantiate="static">
          <condition>
            <check_all>
              <bbs_quest_evaluated quest="BM04"/>
              <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="BM04.Test Sector" sector="{player.sector}" min="1" max="2"/>
              <do_if value="{sector.race@BM04.Test Sector}" exact="{lookup.race@argon}">
                <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
              </do_if>
              <do_if value="{sector.race@BM04.Test Sector}" exact="{lookup.race@boron}">
                <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
              </do_if>
              <do_if value="{sector.race@BM04.Test Sector}" exact="{lookup.race@paranid}">
                <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
              </do_if>
              <do_if value="{sector.race@BM04.Test Sector}" exact="{lookup.race@split}">
                <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
              </do_if>
              <do_if value="{sector.race@BM04.Test Sector}" exact="{lookup.race@teladi}">
                <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
              </do_if>
              <set_sector name="BM04.Ship Sector" value="{sector@BM04.Test Sector}"/>
            </do_all>
          </action>
          <cues>
            <cue name="BM04 Mission Offer">
              <condition>
                <check_all>
                  <check_value value="{sector.exists@BM04.Ship Sector}" exact="1"/>
                </check_all>
              </condition>
              <action>
                <do_all>
                  <set_value name="BM04.Offer Race" exact="{player.dockobject.race}"/>
                  <create_actor name="BM04.Offer Actor" character="{random.pilot.{value@BM04.Offer Race}}" comment="For In Space Testing"/>
                  <set_value name="BM04.Random" min="0" max="100"/>
                      <offer_bbs_quest quest="BM04" author="{actor.name@BM04.Offer Actor}" text="[center][u]Ship Retreval[/u]\n\n As you are aware, our fleets have been engaged with the enemy across many sectors and our resources are stretched to breaking point.
It has always been our policy to try and ensure that any ships lost or captured are retrieved without undue delay but unfortunately on this occasion we cannot commit any resources to a retrieval mission, as none are available.
One of our captured M2's has been badly damaged during combat and is adrift according to our last communication. A skeleton crew was left aboard to try and save the ship as any resource in these times is worthwhile if it can be salvaged.
Once personnel from OSR Industries is aboard the captured M2, it will be turned over to you. We do not wish this ship to fall back into enemy hands and our intelligence indicates that the skeleton crew is awaiting your arrival.
Will you provide us with assistance? A scan of your fleet indicates that you have the resources for a successful retrieval of the captured ship. You would earn our eternal gratitude. We know that OSR Industries can use this ship to further exploit the alien technology that the ship holds.[/center] \n\n[center][select value='Accept_V1']Accept[/select][/center]"/>
                </do_all>
              </action>
              <cues>
                <cue name="BM04_v1 Mission Accepted">
                  <condition>
                    <bbs_quest_selected quest="BM04" answer="Accept_V1"/>
                  </condition>
                  <action>
                    <do_all>
                      <accept_bbs_quest quest="BM04"/>
                      <set_value name="BM04.Unmanned Ship Hull" min="58" max="60"/>
                      <find_gate name="BM04.Gate">
                        <sector sector="BM04.Ship Sector"/>
                      </find_gate>
                      <create_ship name="BM04.Unmanned Ship" class="m2" typename="SS_SH_X_M2"
                                   race="player" capturable="1" highlight="1" racelogic="1">
                        <position object="BM04.Gate" min="5km" max="10km"/>
                        <sector sector="BM04.Ship Sector"/>
                        <equipment loadout="minimum"/>
                        <command command="none"/>
                      </create_ship>

                      <set_hull object="BM04.Unmanned Ship" exact="{value@BM04.Unmanned Ship Hull}"/>                      
                      <incoming_message author="{actor.name@BM04.Offer Actor}" popup="1" text="Thank you. The ship is in {sector.name@BM04.Ship Sector}, near to the {object.name@BM04.Gate}. We hope you enjoy your new ship."/>
                      <cancel_cue cue="BM04"/>
                    </do_all>
                  </action>
                </cue>
              </cues>
            </cue>
          </cues>
        </cue>
      </cues>
    </cue>
  </cues>
</director>

XGamer
Posts: 2355
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer »

I wont look through all that code right now since im tired and have to stay up in about 4 hours :( but however it has already been mentioned that the BBS might not work correctly. Even though that Code has originally been written by Owen who usually knows what he does I dont expect critical errors in the code.
Ill check the code somewhen tomorrow or so if I have time ;) But note that the BBS might not work correctly though even if the code is correct it is possible that it doesnt work as the functions might be broken.

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.
Stu Austin
Posts: 2262
Joined: Tue, 23. Dec 03, 22:32
x4

Post by Stu Austin »

Thanks XGamer. :)
User avatar
Observe
Posts: 5086
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

@Stu: catch me on MSN is you have time to discuss this.
ChemODun
Posts: 320
Joined: Mon, 12. Feb 07, 21:58
x3tc

Post by ChemODun »

As I can understand, MD must be integrated in X3TC?

P.S. Manual to Russian translated about 90% of text.
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space
jeffwp27577
Posts: 19
Joined: Tue, 30. Dec 03, 05:30
x3tc

Post by jeffwp27577 »

Haven't done any scripting before, but thought I would give the MD a try. My question is, can someone point me to a list of what ship each shiptype represents? For example, I know "SS_SH_S_TS_1" is a Caiman, but which variant?
XGamer
Posts: 2355
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer »

jeffwp27577 wrote:Haven't done any scripting before, but thought I would give the MD a try. My question is, can someone point me to a list of what ship each shiptype represents? For example, I know "SS_SH_S_TS_1" is a Caiman, but which variant?
I would guess its the smallest Variant. But to be sure you would either need to try out by creating it and check or by checking the TShips File which is where the MD gets these Data from ;)

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.

Return to “X³: Reunion - Scripts and Modding”