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

jlehtone
Posts: 17268
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Sun, 6. Jan 08, 13:03

Any obvious checks I should add before crash testing?

Code: Select all

  <cues>
		<cue name="JL01enterSector">
			<condition>
				<check_all comment="IFF player enters a Xenon sector.">
					<object_changed_sector comment="Player has entered a new sector."/>
					<check_value value="{player.sector.race}" exact="{lookup.race@xenon}"/>
				</check_all>
			</condition>
			<action>
				<find_ship race="Xenon" group="JL01.victims">
					<sector sector="{player.sector.race}"/>
				</find_ship>
			</action>
			<cues>
				<cue name="JL01deadXenon">
					<condition>
						<check_all comment="All initial Xenon have died and player is still in Xenon sector.">
							<any_object_destroyed group="JL01.victims"/>
							<check_value value="{player.sector.race}" exact="{lookup.race@xenon}"/>
							<check_value value="{group.object.count@victims}" exact="0"/>
						</check_all>
					</condition>
					<action>
						<!-- first test: direct retaliation -->
						<do_all count="({player.fightrank.rank}/3)">
							<create_ship class="m6" race="Xenon" group="JL01.avengers">
								<position object="{player.ship}" max="15km"/>
								<sector sector="{player.sector}"/>
								<equipment loadout="maximum"/>
								<command command="killenemies"/>
							</create_ship>
						</do_all>
					</action>
				</cue>
			</cues>
		</cue>
  </cues>
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 11232
Joined: Sat, 9. Nov 02, 12:45
x4

Post by Xenon_Slayer » Sun, 6. Jan 08, 13:53

The find ship action you have used will only find one ship. Use the multiple attribute and set max to something like 99. Also, the sector node says {player.sector.race} where it should be {player.sector}

<check_value value="{group.object.count@victims}" exact="0"/>
You have forgotten to localise the victims group. It should be {group.object.count@JL01.victims}.

There is no 'count' attibute in do_all. There is counter which increments by one each time. If you want it to perform several times use the exact attribute.

jlehtone
Posts: 17268
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Sun, 6. Jan 08, 14:05

:oops: never been careful in details.
Xenon_Slayer wrote:The find ship action you have used will only find one ship. Use the multiple attribute and set max to something like 99.
The one and only desired condition ought to be "whenever the player kills the last Xenon of a Xenon sector". But since the any_destroyed requires a group to test the race of killed ship by, and group has to be defined before condition ... or is there a simpler, more fool-proof way?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 11232
Joined: Sat, 9. Nov 02, 12:45
x4

Post by Xenon_Slayer » Sun, 6. Jan 08, 15:13

To see if a player destroys all ships in a Xenon sector could be difficult. The problem is that the ships are moving. Some are entering a sector, some are leaving. For that you will need to update the group every few seconds.
Actually knowing if it was the player who killed all the Xenon before could be a problem. You can increment a value every time any_object_destroyed_by_player is triggered. That would be the best option.
Also, checking if the sector race is Xenon is not a very solid basis for this mission. I suggest it is done per sector instead of looking at the race. It sounds like you want it per sector anyway. The way I would do it is to either make the mission watch one sector, or use the sector ID in the values you create so that they are different from one an other.

ChemODun
Posts: 320
Joined: Mon, 12. Feb 07, 22:58
x3tc

Post by ChemODun » Tue, 8. Jan 08, 17:50

CBJ wrote:
ChemODun wrote:May I post in this thread link to russian translation of Manual and MD files, when I will finish it?
Of course! Positive contributions are always welcome. :)
Ok.
Can I use russian analog word episode for naming cue in Manual?
Becouse, from my point of view cue - is a part of Mission, so - it's episode of mission.
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space

CBJ
EGOSOFT
EGOSOFT
Posts: 37675
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ » Tue, 8. Jan 08, 17:57

That's certainly not the way the naming works in the English version. A "cue" is taken from theatrical terminology, where it refers to the script line or action that signals to someone that they have to do something (e.g. one character in the play throws something on the floor, which is another character's "cue" to come onto the stage through a door). This terminology is carefully chosen to describe the functionality of the Mission Director, not the purpose for which it is used.

ChemODun
Posts: 320
Joined: Mon, 12. Feb 07, 22:58
x3tc

Post by ChemODun » Tue, 8. Jan 08, 23:26

CBJ wrote:That's certainly not the way the naming works in the English version. A "cue" is taken from theatrical terminology, where it refers to the script line or action that signals to someone that they have to do something (e.g. one character in the play throws something on the floor, which is another character's "cue" to come onto the stage through a door). This terminology is carefully chosen to describe the functionality of the Mission Director, not the purpose for which it is used.
Ok.

Word-for-word translation of cue writed in Russian equal with another term - replica, so usage this word-to-word translation is incorrect, from my point of view.

Most suitable - one is word-to word translation of term event, which sound like episode, but mean event.


P.S. Sorry for bad English. I have more experience when read and translate from English.
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space

User avatar
Stevio
Posts: 1983
Joined: Sat, 4. Jun 05, 10:36
x3tc

Post by Stevio » Tue, 8. Jan 08, 23:47

i am making a circuit of markers like that in the race mission in freedoms reach,
each marker is named this.mark{index@this}
so the id will increment (rather than decrement i hope)
each marker i want placed between 5 and 8km from each other, so i want to use the last marker as the ref object for the next marker

at the moment i have this;
<set_value name="this.last" exact="{index@this}-1"/>
<position min="5km" max="8km" object="this.mark{this.last}"/>

thats right isn't it?


heres a snipit:

Code: Select all

          <cues>
            <cue name="cotgbfready">
              <condition>
                <check_all>
                  <cue_is_complete cue="cotgbfstart"/>
                  <object_position max="200m">
                    <position object="cotgbfstart.startmark"/>
                  </object_position>
                </check_all>
              </condition>
              <timing>
                <count exact="20"/>
              </timing>
              <action>
                <do_all>
                 <set_value name="this.last" exact="{index@this}-1"/>
                 <create_object name="this.mark{index@this}" typename="SS_SPECIAL_MARKER" class="special">
                   <position min="5km" max="8km" object="this.mark{this.last}"/>
                 </create_object>
                </do_all>
My Scripts
Image
So say we all!

Toastie
Posts: 1223
Joined: Thu, 8. Apr 04, 20:40
x3tc

Post by Toastie » Wed, 9. Jan 08, 02:36

ChemODun wrote:Word-for-word translation of cue writed in Russian equal with another term - replica, so usage this word-to-word translation is incorrect, from my point of view.
How about ' Намёк ' for 'cue' (literally means hint), this is another theatrical term for cue?

Galaxy613
Posts: 2517
Joined: Tue, 28. Dec 04, 03:19
x3

Post by Galaxy613 » Wed, 9. Jan 08, 05:36

Toastie wrote:
ChemODun wrote:Word-for-word translation of cue writed in Russian equal with another term - replica, so usage this word-to-word translation is incorrect, from my point of view.
How about ' Намёк ' for 'cue' (literally means hint), this is another theatrical term for cue?
Yeah, I think 'hint' would be a decent replacement for 'cue'. Because cues are basically hints for when to do something.
10,000 Lightyears of awesomeness

ChemODun
Posts: 320
Joined: Mon, 12. Feb 07, 22:58
x3tc

Post by ChemODun » Wed, 9. Jan 08, 09:41

Toastie wrote:
ChemODun wrote:Word-for-word translation of cue writed in Russian equal with another term - replica, so usage this word-to-word translation is incorrect, from my point of view.
How about ' Намёк ' for 'cue' (literally means hint), this is another theatrical term for cue?
Yes. It's another term for cue, but in Russian it will be look not well.
Sorry for Russian next:
Russian wrote: Например так - условие активации намека, хронометраж намека, блок действий намека.
Или так -
условие активации эпизода, хронометраж эпизода, блок действий эпизода.
Есть еще вариант - нить или поток.
Нить миссии, активация нити, хронометраж и блок действий нити
Another variant - russian analog of word thread, which means mental step. One mind thread may go by one way or another way.
Last edited by ChemODun on Wed, 9. Jan 08, 11:13, edited 2 times in total.
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space

User avatar
Sandalpocalypse
Posts: 4216
Joined: Tue, 2. Dec 03, 23:28
x4

Post by Sandalpocalypse » Wed, 9. Jan 08, 10:16

Just to be clear about find ship: If I did race=pirates multiple=1 max=1, would it find one Jobs-group of pirates and tag all of them with that group label?

If the above is true, and you did player race instead, would the player + ships escorting him be found as a group?

jlehtone
Posts: 17268
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Wed, 9. Jan 08, 10:20

I would guess one ship (would be logical). Weren't there ways to access formation, so you can figure out the "job-wing"?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 11232
Joined: Sat, 9. Nov 02, 12:45
x4

Post by Xenon_Slayer » Wed, 9. Jan 08, 12:26

Sandalpocalypse wrote:Just to be clear about find ship: If I did race=pirates multiple=1 max=1, would it find one Jobs-group of pirates and tag all of them with that group label?

If the above is true, and you did player race instead, would the player + ships escorting him be found as a group?
No Sorry. The find ship will find random ships which meet the criteria. The Multiple attribute will allow several ships to be found, the max attribute sets the maximum number of ships which can be found. If you set it to "1" then it will not find multiple ships.

There is no way to look at a ship and check if it has wingmen or following ships. Be advised though, if you want to run a mission on existing objects, be careful about how many you add to MD tracking. It is not exactly designed to watch all Pirate groups in the universe for example. Although that could lead to a more lively universe it may cause some performance issues. Adding all local Pirate groups in one sector, and updating the group every few minutes should keep the numbers low and more manageable.

User avatar
Sandalpocalypse
Posts: 4216
Joined: Tue, 2. Dec 03, 23:28
x4

Post by Sandalpocalypse » Wed, 9. Jan 08, 12:28

That should be alright. Tracking every pirate in the sector will work for me, I just wasn't sure if multiple grabbed wings or not.

What does being a group leader mean, then?

Post Reply

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