Page 3 of 10

Posted: Sun, 6. Jan 08, 12:03
by jlehtone
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>

Posted: Sun, 6. Jan 08, 12:53
by Xenon_Slayer
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.

Posted: Sun, 6. Jan 08, 13:05
by jlehtone
: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?

Posted: Sun, 6. Jan 08, 14:13
by Xenon_Slayer
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.

Posted: Tue, 8. Jan 08, 16:50
by ChemODun
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.

Posted: Tue, 8. Jan 08, 16:57
by CBJ
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.

Posted: Tue, 8. Jan 08, 22:26
by ChemODun
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.

Posted: Tue, 8. Jan 08, 22:47
by Stevio
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>

Posted: Wed, 9. Jan 08, 01:36
by Toastie
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?

Posted: Wed, 9. Jan 08, 04:36
by Galaxy613
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.

Posted: Wed, 9. Jan 08, 08:41
by ChemODun
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.

Posted: Wed, 9. Jan 08, 09:16
by Sandalpocalypse
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?

Posted: Wed, 9. Jan 08, 09:20
by jlehtone
I would guess one ship (would be logical). Weren't there ways to access formation, so you can figure out the "job-wing"?

Posted: Wed, 9. Jan 08, 11:26
by Xenon_Slayer
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.

Posted: Wed, 9. Jan 08, 11:28
by Sandalpocalypse
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?

Posted: Wed, 9. Jan 08, 11:59
by Xenon_Slayer
The MD groups are not the same as current "Groups". The playership and two wingmen are not considered a group. A sector patrol created by Jobs can be considered a group but it is not the same thing. Those ships have a special group which is accessible through the Script commands I believe.

The MD Group Leader is just a special attribute an object in that group can have. You will be able to use the group leader variables such as {group.leader.name@Example Group}. There is nothing very special about the leader and groups can exist with no leader. It just makes co-ordinating group movement a little easier.

Posted: Wed, 9. Jan 08, 14:01
by Toastie
ChemODun wrote:
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.
To be honest it may be easier to define the term Cue early on (in case any readers don't know what one is) and then just use 'Cue' or even 'кю'.
The same would go for any set MD terminology which appears regularly in the examples. I know it's not beautiful russian, but it may be more easy to follow the examples that way.

Posted: Wed, 9. Jan 08, 17:41
by Toastie
I just noticed that the sample mission file BM47_XXXT has text IDs in instead of text. Here's the version WITH text (excuse the big code-snip, I can't upload in here).

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="BBS_Lottery" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <documentation>
    <author name="Toastie" />
    <content name="BBS_Lottery" description="BBS-based lottery quest" reference="BM47_XXXT"/>
    <version date="31 Jul 07" number="1.0" status="Beta Test"/>
  </documentation>
  <cues>
    <cue name="BM47LotteryMainCue" comment="This is the top-level cue, the start point for our quest">      
      <condition>
        <check_age value="{player.age}" min="5s" comment="Conditions to determine when, or where, or under what circumstances your BBS Mission should appear"/>
      </condition>
      <action>
        <do_all>
          <add_bbs_quest name="BM47Lottery" priority="50" max="1" comment="Priority= How often your quest should occur on a scale of 0-100. Max= Max amount of the same quest per station"/>
        </do_all>
      </action>
      <cues>
        <cue name="BM47Lottery Mission Offer" instantiate="static" comment="This will offer the Lottery Mission to the player">
          <condition>
            <bbs_quest_evaluated quest="BM47Lottery" comment="Will evaluate your quest by its given priority and max you set above"/>
          </condition>
          <action>
            <offer_bbs_quest quest="BM47Lottery" author="Spamelot Lottery" text="[center]Would you like to buy a lottery ticket and win more than a guaranteed 1,000,000Cr?\n\nThey cost only 1,000Cr!\n\n[select value='yes']You bet![/select]\n[select value='no']Forget it![/select][/center]"/>
          </action>
          <cues>
            <cue name="BM47 Mission Accepted" comment="If the player accepts your quest">
              <condition>
                <check_all>
                  <bbs_quest_selected quest="BM47Lottery" answer="yes"/>
                </check_all>
              </condition>
              <action>
                <do_all comment="Here we can see how the do_choose works">
                  <do_choose comment="if the player has at least 1000Cr (the cost of a ticket), then the quest is accepted and 1000Cr is debited from the player's account.">
                    <do_when value="{player.money}" min="1000">
                      <accept_bbs_quest quest="BM47Lottery"/>
                      <reward_player>
                        <money min="-1000" comment="this is the 1000Cr being taken from the player"/>
                      </reward_player>
                    </do_when>
                    <do_otherwise comment="do_otherwise is the case if the player doesn't have the 1000Cr for a ticket.">
                      <incoming_message author="Spamelot Lottery" text="You cannot buy a ticket with money you don't have.  Goodbye."/>
                      <cancel_cue cue="lucky dip" comment="here we cancel the next (and subsequent) cue so the draw doesn't take place if no funds are available"/>
                    </do_otherwise>
                  </do_choose>
                </do_all>
              </action>
              <cues>
                <cue name="lucky dip">
                  <condition>
                    <cue_is_complete cue="BM47 Mission Accepted" comment="once all of the actions of the previous cue have been completed this cue will be triggered"/>
                  </condition>
                  <action>
                    <do_all comment="here we are setting some values as local variables to provide 6 'random' lottery numbers. In the lucky dip message, we can see how those variables are used to show the player's lotto numbers.">
                      <set_value min="1" max="7" name="this.rand1"/>
                      <set_value min="8" max="17" name="this.rand2"/>
                      <set_value min="18" max="25" name="this.rand3"/>
                      <set_value min="26" max="33" name="this.rand4"/>
                      <set_value min="34" max="42" name="this.rand5"/>
                      <set_value min="43" max="49" name="this.rand6"/>
                      <incoming_message author="Spamelot Lottery" text="Your lucky dip numbers are:\n\n[center]{value@this.rand1} {value@this.rand2} {value@this.rand3} {value@this.rand4} {value@this.rand5} {value@this.rand6}\n\nGood luck![/center]"/>
                    </do_all>
                  </action>
                  <cues>
                    <cue name="draw" comment="a certain amount of time after ticket purchase">
                      <timing>
                        <!--<time min="20s" max="25s" comment="The 20-25s is just a debug time to shorten testing"/>-->
                        <time min="2h" max="4h"/>
                      </timing>
                      <action>
                        <do_all>
                          <set_value name="this.prize" min="1000000" max="1500000" comment="Prize is somewhere between 1 and 1.5 million Cr"/>
                          <!--<set_value name="this.lotterynum" min="1" max="2" comment="the odds of winning are 50/50 for debug purposes"/>-->
                          <set_value name="this.lotterynum" min="1" max="100000" comment="the odds of winning are 1 in 100000"/>
                          <do_choose comment="another do_choose... useful blighters ;)">
                            <do_when value="{value@this.lotterynum}" max="1" comment="if 'this.lotterynum' is evaluated as being 1 (ie 1 in 100000) then the enclosed actions will be performed.">
                              <incoming_message author="Spamelot Lottery" text="Congratulations! You've won the jackpot!\n\n[b]{value@this.prize} Credits[/b] are being transferred to your account." comment="whichever random number between 1 and 1.5 MCr is evaluated above is inserted here as the prize"/>
                              <reward_player>
                                <money min="{value@this.prize}" comment="and we now add the value of 'this_prize' to the player's account"/>
                              </reward_player>
                            </do_when>
                            <do_otherwise comment="if the value of 'this_lotterynum' is evaluated to a number other than 1 then the message below is sent instead.">
                              <incoming_message author="Spamelot Lottery" text="Sorry, you have not won a prize this time. Please try again soon."/>
                            </do_otherwise>
                          </do_choose>
                        </do_all>
                      </action>
                    </cue>
                  </cues>
                </cue>
              </cues>
            </cue>
            <cue name="BM47 Mission Rejected" comment="If the player declines your quest, ie doesn't want to buy a ticket">
              <condition>
                <bbs_quest_selected quest="BM47Lottery" answer="no" />
              </condition>
              <action>
                <do_all>
                  <incoming_message author="Spamelot Lottery Services" text="Too bad! You look the lucky type." />
                  <accept_bbs_quest quest="BM47Lottery"/>
                </do_all>
              </action>
            </cue>
          </cues>
        </cue>
      </cues>
    </cue>
  </cues>
</director>
Hope that helps.

Posted: Wed, 9. Jan 08, 23:21
by Sandalpocalypse
The sample mission in the book uses textIDs too xD but it tells you what they say, so, heh.

Posted: Thu, 10. Jan 08, 15:11
by Apollo911
uoes anyone know if Using the MD is it possible to initiate BBS like missions via contact with a ship?

i.e you a comm a ship and are offered a mission?

Cheers!