Page 4 of 10

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!

Posted: Thu, 10. Jan 08, 15:15
by al_main
You could easily have a ship comm the player using an incoming question when the player got to a certain distance, etc. But having the player comm the ship would need some kind of workaround, eg some kind of user defined hotkey in scripts, which creates or does something that the MD can detect and know the player is trying to use the comms on their target.

Posted: Thu, 10. Jan 08, 15:41
by Apollo911
al_main wrote:You could easily have a ship comm the player using an incoming question when the player got to a certain distance, etc. But having the player comm the ship would need some kind of workaround, eg some kind of user defined hotkey in scripts, which creates or does something that the MD can detect and know the player is trying to use the comms on their target.
Cheers! So I'd have to specify a hotkey first? And then when the ship is targeted and that hotkey was pressed it would send an incoming message to the player?

Posted: Thu, 10. Jan 08, 15:53
by Sandalpocalypse
TBH, the nonstandard comms systems are a pain in the butt to use. :|
The ship asking you within a certain range is much more convenient for the player and to script. Like in the Lost in Space script.

Posted: Thu, 10. Jan 08, 20:37
by Observe
Please forgive me if this is already covered: Can I load/call a Mission from a "standard" script written in the script editor?

Posted: Thu, 10. Jan 08, 21:03
by SymTec ltd.
This is not intended for the MD, and should not be done.

I'm going to tell you a way:

1. write a MD-plugin that starts once the player-ship-name is changed to a certain string
2. change the player-ship-name to the certain string.

:roll: - and remember you are not supposed to do this. :D

Posted: Thu, 10. Jan 08, 21:12
by Observe
Thank you SymTec ltd.! I'll keep in mind what I'm "not supposed" to do. :wink:

One more thing: Am I correct in assuming Global Variables defined in "regular" scripts are accessible for Missions scripts?

Posted: Thu, 10. Jan 08, 21:16
by SymTec ltd.
no, if you mean MD-plugins by "Mission scripts".

Posted: Thu, 10. Jan 08, 21:17
by Diamonddragon
The MD can only start a script. It has no way to know anything SE related.

Posted: Thu, 10. Jan 08, 21:21
by CBJ
Just to clarify something, Observe, you are perhaps thinking of the MD as if it were a programming language. It isn't. You cannot "call" anything in the MD, either from inside it or outside it. Every action within the MD is performed in response to a set of conditions being met. The only way to make something happen in the MD is to satisfy a set of conditions that the MD understands - SymTec's suggestion is an example of this, but he's not joking when he says you shouldn't do it as it would be highly inefficient as well as pretty annoying for the player.

Regarding the relationship between scripts and the MD, the only think you can do is start a script from the MD. There is no access to anything else relating to scripts from within the MD environment.

Posted: Thu, 10. Jan 08, 21:30
by Observe
Thanks for clarification CBJ! Oh, and SymTec ltd, re the offer you made in post which promptly "disappeared", I'm content to work with what MD currently supports. :)

Posted: Fri, 11. Jan 08, 02:09
by MJALowe
CBJ, there is the name of the pilot i believe (might have been name of ship)

its one of the things symtec did to get that unloged incomeing question thing of his to do its thing...and it works wonders...with that i can finally consider makeing a menu system for the unreleased advanced features of IFTSOS...before it would have been too anoying what with the log book getting filled....or too command/hotkey intensive - no release date yet...im not even done with the menu let alone the functionality of all the options

Posted: Fri, 11. Jan 08, 22:34
by Tenlar Scarflame
Alright, I'm most likely just thick...

but I've created a "director" folder in my X3 directory, moved the "Helloworld" example out of "samples" and into "director," started a new game and changed my name to "Thereshallbewings." But I have not yet received any sort of "Hello world" message. I also tried the question templates, they won't show either, and neither will the mission I'm writing.

Flog me for being a noob, but what am I missing? :roll:

EDIT

And I'm running X3 v 2.5, that's probably relevant.

Posted: Sat, 12. Jan 08, 00:31
by B-O'F
Hi Tenlar Scarflame,

Have you reset the Mission Director? - I had the same problem until I did so.

You must be in space, not docked.
Press the Enter key on the Numeric Key Pad, this will display a panel called Main - at the bottom is Mission Director.
Click on this - if it shows something under Cues, then all is well.
If it does not show something under Cues, then click on Reset Mission Director.

Boron - Ol Fh'art

Posted: Sat, 12. Jan 08, 00:41
by Tenlar Scarflame
Now working. Knew it would be something silly. :P Thanks much B-O'F.

Posted: Sat, 12. Jan 08, 00:46
by B-O'F
Hi Tenlar Scarflame,

No problem - learn by your mistakes (as I did), they then stick.... I have learned a lot that way......

This should have been explained in the original post on instalation, but wasn't (yet! - could it please be added?)

Boron - Ol Fh'art