EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
Post Mission Director Code Here!
Post new topic Reply to topic Goto page 1, 2, 3  Next
View previous topic :: View next topic
Author Message
LV
Sith Lord




Joined: 06 Nov 2002
Posts: 6359 on topic
Location: The Dark Side
Thank you for registering your game
modified
PostPosted: Wed, 10. Jun 09, 20:56    Post subject: Post Mission Director Code Here! Reply with quote Print

This may sink like lead but i've seen a few short md scripts over the last few days/weeks and it's work trying to have dedicated thread for short md code

I've created this thread so smaller md code can be posted so users can not only use it but also ask questions around what certain commands do.


Let's keep the idle chit chat down please Wink

to use this code people, copy and paste it into notepad and save it as a .xml file in the newly created director folder



first you need to open your x3 directory where your exe and other folders like scripts and t are and create a new folder called director


Any code posted in these forums like below can be put here even if you didn't write it as long as your post shows who did.

--------------------------------------------
I'll start with the...
Max Trade/Fight rank code by JMCorp


Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="tradefightcheat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <documentation>
    <author name="JMCorp" alias="JMCorp" contact="none" />
    <content reference="JMCCheat" name="trade fight cheat" description="add trade and fight ranks for no reason" />
    <version number="0.1" date="2/1/08" status="cheat" />
  </documentation>
  <cues>
    <cue name="JMCCHEAT001">
      <action>
        <do_all>
          <reward_player>
            <fightrank max="1000000"/>
          </reward_player>
          <reward_player>
            <traderank max="1000000"/>
          </reward_player>
          <reset_cue cue="JMCCHEAT001"/>
        </do_all>
      </action>
    </cue>
  </cues>
</director>



_________________
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses


Last edited by LV on Wed, 10. Jun 09, 21:04; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jlehtone



MEDALMEDALMEDAL

Joined: 23 Apr 2005
Posts: 16874 on topic
Location: GalNet BBS
Thank you for registering your game
PostPosted: Wed, 10. Jun 09, 21:03    Post subject: Reply with quote Print

Defying OP's idle chit warn I must note that the TC Download Library has a link pointing to this thread. Wink

Back to top
View user's profile Send private message
Nephtys





Joined: 26 Jun 2007



PostPosted: Sat, 1. Aug 09, 11:52    Post subject: Raising OFF Rang to highest Reply with quote Print

You want to skip most of the Final Fury Plot?


Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="FF Cheat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <documentation>
    <author name="username" alias="username" contact="contact details" />
    <content reference="FFCheat" name="FF Cheat" description="Cheat to skip FF" />
    <version number="1.0" date="today" status="sample" />
  </documentation>
  <cues>
    <cue name="Final Fury Cheat">
      <timing>
        <time exact="20s"/>
      </timing>
      <action>
        <set_mission_rank name="L2OFF" exact="notop8"/>
      </action>
    </cue>
  </cues>
</director>


This MD Code is good to understand the very basical usage of the MD. The Script is waiting 20s after loading and then setting your FF rank to Major.

Major is enough for triggering the last 2 Missions of Final Fury (starting with the great Khaak Invasion in M148).
As far as tests showed you have to do the first 3 Missions also. And dont use the MD script while you are doing a mission. If you are Ensign 65% and using the MD Script while you are doing the 3rd mission (just because i remember this part the most^^) you get Major status 20s after loading BUT after ending the mission you get Ensign 85%.
Use the Script (Using=Setting the file in the director directory (^^)) while you are waiting for the next mission. Then you just jump to Mission 15 (just before the final Mission)


_________________

Fear the drones!
Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13629 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sat, 1. Aug 09, 14:52    Post subject: Reply with quote Print

Great idea ! Very Happy


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Stu Austin



MEDALMEDALMEDAL

Joined: 23 Dec 2003
Posts: 1891 on topic
Location: Stella, North Carolina
Thank you for registering your game
PostPosted: Mon, 19. Oct 09, 23:58    Post subject: Reply with quote Print

Hello LV. I like the idea of this thread.
My question is in your code:
Code:

<reset_cue cue="JMCCHEAT001"/>


wouldn't that reset it continuosly? Is it suppose to be
Code:

<cancel_cue cue="JMCCHEAT001"/>


whereas you want the code to be canceled after the cue does its action?


_________________
Transcend Mod Team - AP, TC, Reunion
Back to top
View user's profile Send private message
Malakie





Joined: 13 Apr 2004
Posts: 651 on topic
Location: USA
Thank you for registering your game
PostPosted: Tue, 19. Jan 10, 05:20    Post subject: newbie and lost... Reply with quote Print

Hi all,

I have slowly been learning the script editor and how to use it hopefully with the goal of creating some scripts I have been wanting to see done in X3TC.

With that, I have also moved toward using th MD as well but I am comepletely stuck on what to do and where to start in X3TC.

I HAVE downloaded the X3R MD archive so I do have access to the manual however there are quite a few differences between X3R and X3TC MD coding and usage. For a newbie like me it is a bit confusing since there is no clear cut 'programmers handbook' for script and MD creation.

Is there or does anyone have a manual or pdf of all the X3TC information like the one that was done for X3R? Second, any luck in there also perhaps being a nice follow along tutorial for creating your first MD script from scratch?

What would be really nice and I think would actually boost the use of the MD for X3 enhancements, is a nice walk along tutorial for newbs that step by step helps you create MD packages..... Perhaps two that could then open a lot of avenues for creative ideas..

The first tutorial I think would be great is one walking through the creation of making a mission that the user can receive from stations or other ships. Say something simply like creating a small mission to retrieve a crate from some location in a sector. Using this script future MD creative from that template would allow newbs to not only learn step by step how to create an MD mission template but using that same new template they could now create more and more missions to play, enhancing and expanding the depth and capability as they now continue to learn more and more about design in the MD.

The second great template tutorial might be in how to create a ship, equip it, assign it to a faction and give it a mission in game... Then for some advanced learning, how to expand on that by creating a carrier ship and adding fighters to it that are equipped and ready to fly.

I am sitting here looking at my screen having downloaded the X3R MD stuff but not finding anything really useful for X3TC so far on the forums. Basically I am staring at my screen wanting to create something in the MD but at a completely loss on where to even start this moment.

In my director dir there are a few files and I have tried looking at those to see if I could figure anything out... The problem is some seem to be in pck file format which I am not sure how to open properly for this nor how to even create them for X3.

Anyhow, if someone had something like this available for newbs, I bet you might see a lot more stuff for X3 being created by many others who otherwise like me are not as well versed in coding in X3..

BTW, the other reason I want to learn this is because of another idea I have...... If I can learn the in's and out's of using the X3 script and MD editors, I plan on creating an external tool that can help newbs create simple MD scripts for their use by allowing them to have a point and click GUI without having to dig into files manually for editting.. Not an end all create all tool.. but something simplistic allowing for easy creation of certain script types.. maybe a ship generator or something along that lines.

So any help here on any of this learning stuff?


_________________
Take it light.....

Malakie

----------------------------------------------------
Back to top
View user's profile Send private message
Stu Austin



MEDALMEDALMEDAL

Joined: 23 Dec 2003
Posts: 1891 on topic
Location: Stella, North Carolina
Thank you for registering your game
PostPosted: Tue, 19. Jan 10, 07:24    Post subject: Reply with quote Print

Hello Malakie.
I agree. If we md coders can go ahead and start posting our work, it will help others to start using md.
At the following link on our forum, I have posted a file called director.rar which has all the director files in it. Download and extract them to your director directory in TC.

http://www.x3dmod.com/forum/viewtopic.php?f=2&t=563

Hopefully you have Visual Web Developer 2008 Express Edition from Microsoft (a free program) installed.
Here is a code for a super Nova I created. It has extra engine and rudder tunings.

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <documentation>
    <author name="Stu Austin" alias="Stu Austin" contact="http://www.x3dmod.com" />
    <content reference="Nova" name="N1" description="Simple 'Nova' template" />
    <version number="0.1" date="4-8-2008" status="testing" />
  </documentation>
  <cues>
    <cue name="nova_1">
      <condition>
        <check_all>
          <check_age value="{player.age}" min="20s"/>
        </check_all>
      </condition>
      <action>
        <do_all exact="1" comment="Number of times for the Nova to spawn in at the same time.">
          <find_sector x="1" y="3" comment="Finds Argon Prime and assigns a name which can be used later" />
          <create_ship name="Argon Nova" class="m3" typename="SS_SH_A_M3_1"
              race="player" capturable="1" highlight="1" racelogic="1">
              <position x="1km" y="1km" z="1km" comment="position of the ship in the spawned sector" />
              <sector x="1" y="3" comment="argon prime"/>
              <equipment loadout="none">
                <ware typename="SS_WARE_TECH213" exact="-30" comment="engine tunning"/>
                <ware typename="SS_WARE_TECH213" exact="30" comment="engine tunning"/>
                <ware typename="SS_WARE_TECH246" exact="-30" comment="rudder tunning"/>
                <ware typename="SS_WARE_TECH246" exact="30" comment="rudder tunning"/>
                <ware typename="SS_WARE_TECH251" exact="-216" comment="cargo bay"/>
                <ware typename="SS_WARE_TECH251" exact="216" comment="cargo bay"/>
                <ware typename="SS_WARE_SW_FIGHT_1" exact="1"/>
                <ware typename="SS_WARE_SW_FIGHT_2" exact="1"/>
                <ware typename="SS_WARE_SW_SPECIAL_1" exact="1" comment="special command software"/>
                <ware typename="SS_WARE_WARPING" exact="1" comment="jumpdrive"/>

                <ware typename="SS_WARE_SCANNER2" exact="1" comment="duplex scanner"/>
                <ware typename="SS_WARE_SW_NAV_1" exact="1"/>
                <ware typename="SS_WARE_SW_TRADE_1" exact="1"/>
                <ware typename="SS_WARE_SW_TRADE_2" exact="1"/>
                <ware typename="SS_WARE_BEAMING" exact="1" comment="transporter device"/>
                <ware typename="SS_WARE_TECH226" exact="1" comment="boost extension"/>
                <ware typename="SS_WARE_TECH231" exact="1" comment="SETA"/>
                <ware typename="SS_WARE_TECH277" exact="1" comment="trading system extension"/>
                <ware typename="SS_WARE_TECH241" exact="1" comment="docking computer"/>
                <ware typename="SS_WARE_TECH275" exact="1" comment="mineral scanner" />
                <ware typename="SS_WARE_TECH209" exact="200" comment="salvage insurance"/>
                <ware typename="SS_LASER_PRG" exact="9" comment="phase repeater gun"/>
                <ware typename="SS_SHIELD_C" exact="2" comment="2 25mj shields"/>
                <ware typename="SS_MISSILE_HTSK" exact="5" comment="5 thunderbolt missiles"/>
              </equipment>
              <command command="none"/>
          </create_ship>
          <incoming_message author="{TerraCorp}" popup="1" text="Here is an Super M3 Nova from TerraCorp. It can be found in Argon Prime. "/>
                  <cancel_cue cue="nova_1"/>
                </do_all>
              </action>
            </cue>
          </cues>
</director>


The next code is for same ship but it does not have extra ware but equipment loadout is "maximum".
Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <documentation>
    <author name="Stu Austin" alias="Stu Austin" contact="http://www.x3dmod.com" />
    <content reference="Nova" name="N1" description="Simple 'Nova' template" />
    <version number="0.1" date="4-8-2008" status="testing" />
  </documentation>
  <cues>
    <cue name="nova_2" comment="use unique cue names so as not to have double cues">
      <condition>
        <check_all>
          <check_age value="{player.age}" min="20s"/>
        </check_all>
      </condition>
      <action>
        <do_all exact="1" comment="Number of times for the Nova to spawn in at the same time.">
          <find_sector x="1" y="3" comment="Finds Argon Prime and assigns a name which can be used later" />
          <create_ship name="Argon Nova" class="m3" typename="SS_SH_A_M3_1"
              race="player" capturable="1" highlight="1" racelogic="1">
              <position x="1km" y="1km" z="1km" comment="position of the ship in the spawned sector" />
              <sector x="1" y="3" comment="argon prime"/>
              <equipment loadout="maximum"/>
              <command command="none" comment="this sets the ship to do different things"/>
          </create_ship>
          <incoming_message author="{TerraCorp}" popup="1" text="Here is an Nova from TerraCorp. It can be found in Argon Prime. "/>
                  <cancel_cue cue="nova_2"/>
                </do_all>
              </action>
            </cue>
          </cues>
</director>
[url][/url]

To try these, select new game, custom, x3universe.


_________________
Transcend Mod Team - AP, TC, Reunion
Back to top
View user's profile Send private message
Ketraar
Moderator (PortuguÍs)
Moderator (PortuguÍs)

MEDALMEDAL

Joined: 21 May 2004
Posts: 8470 on topic
Location: Guimar„es (Portugal)
Thank you for registering your game
PostPosted: Tue, 19. Jan 10, 13:22    Post subject: Re: newbie and lost... Reply with quote Print

Malakie wrote:
I HAVE downloaded the X3R MD archive so I do have access to the manual however there are quite a few differences between X3R and X3TC MD coding and usage. For a newbie like me it is a bit confusing since there is no clear cut 'programmers handbook' for script and MD creation.

Using the X3R Manual is a good way to start, look up there how MD works and the logic behind it. All the steps are 1:1 for X3TC. Once you understand the logic of MD you can start building your own stuff, here I recomend to have a look at others files and the vanilla files, so you can have an idea on how to aply the commands.

Quote:
Second, any luck in there also perhaps being a nice follow along tutorial for creating your first MD script from scratch?

There is one/several in the X3R manual, as said above, the steps are the same for both.

Quote:
What would be really nice and I think would actually boost the use of the MD for X3 enhancements, is a nice walk along tutorial for newbs that step by step helps you create MD packages..... Perhaps two that could then open a lot of avenues for creative ideas..

Again as for the tutorial use the existing manual.
A tutorial for creative thinking will be rather hard to achieve IMO, think that MD has a HUGE amount of ways to be (mis)used, no way a tutorial would cover anything near to all possibilities, plus I doubt anybody would want to spend that much time in it, as its better used in coding.
I still think the best method is the try&error&peeking&asking method is the best way to go.

Quote:
I am sitting here looking at my screen having downloaded the X3R MD stuff but not finding anything really useful for X3TC so far on the forums.

There are several Missions/mods that use MD just look in here, download them and have a peek. You also can extract the Vanilla files and have a look there too. So there is plenty from where you can get "inspiration".

As I suggest in the German forums if you have doubts post them here somebody will sure help/explain.

MFG

Ketraar

Back to top
View user's profile Send private message Send e-mail
Stu Austin



MEDALMEDALMEDAL

Joined: 23 Dec 2003
Posts: 1891 on topic
Location: Stella, North Carolina
Thank you for registering your game
PostPosted: Tue, 19. Jan 10, 23:51    Post subject: Reply with quote Print

I have made a small pdf tutorial which can be found here:
http://www.x3dmod.com/forum/viewtopic.php?f=2&t=563
Its called Stu_md_tutorial

It is by no means complete but will get you going if you want to attempt using md. I will be adding more content to it if anyone is interested.
stu


_________________
Transcend Mod Team - AP, TC, Reunion
Back to top
View user's profile Send private message
Ketraar
Moderator (PortuguÍs)
Moderator (PortuguÍs)

MEDALMEDAL

Joined: 21 May 2004
Posts: 8470 on topic
Location: Guimar„es (Portugal)
Thank you for registering your game
PostPosted: Mon, 1. Feb 10, 18:40    Post subject: Reply with quote Print

Quote:
and there is no way i can add a sector in the current save game?

Since this was rased rather often in the last few days here the code on how to load custom map files.

Code:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <cues>
    <cue name="Loadmap_*******" comment="its imperative that you use a custom name">
      <condition>
        <check_all>
          <check_value value="{player.name}" exact="loadmeamap" comment="change condition to anything that fits your purposes"/>
        </check_all>
      </condition>
      <timing>
        <time exact="2s"/>
      </timing>
      <action>
        <do_all>
          <load_map file="mymap" comment="map name WITHOUT file extension"/>
        </do_all>
      </action>
    </cue>
  </cues>
</director>


Note: Just create the things you want to ADD, save your map as you feel like (just not as x3universe Wink)

MFG

Ketraar

Back to top
View user's profile Send private message Send e-mail
enenra





Joined: 08 Apr 2005
Posts: 6152 on topic

Thank you for registering your game
PostPosted: Tue, 9. Feb 10, 16:08    Post subject: Reply with quote Print

Two simple snippets which might be of interest to some. Smile

Code:
<set_owner object="enemyship" race="neutral"/>
<set_relation object="enemyship">
 <relation object="{player.ship}" relation="enemy" mutual="1"/>
</set_relation>


You can use that to have a ship fight the player without summoning the race's wrath upon the player in the process (using the original race) or having every ship in the sector attack it (using enemy race).
Thanks to Ketraar for the tip. Smile

Code:
<reward_player>
 <notoriety>
  <relation race="split" exact="{reward.notoriety.split@average}" operation="subtract"/>
 </notoriety>
</reward_player>


This is one way you can punish the player.

Code:
<reward_player>
 <notoriety>
  <relation race="split" exact="{penalty.notoriety.split@average}"/>
 </notoriety>
</reward_player>


But it's also possible to do it like this.

Just two things I learned today. Smile


_________________
Back to top
View user's profile Send private message
Argonaught.





Joined: 06 Nov 2002
Posts: 1618 on topic
Location: Omnipotence rules!
Thank you for registering your game
PostPosted: Tue, 16. Feb 10, 19:05    Post subject: Reply with quote Print

This one below is similair to Stu's but it creates a Terran M1 in Kingdom End with extra speed, cargo and rudder.

However it's not friendly and will kill stuff, It is also not affiliated with any of the known races so it will kill them too afaik.


Code:
<?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="Argonaught" alias="Argonaught" contact="argonaught@iol.ie" />
    <content name="Rogue Terran Warship" description="creates an enemy ship" />
    <version number="0.1" date="15.2.2010" status="Testing"/>
  </documentation>
  <cues>
    <cue name="Rogue Terran Warship">
      <condition>
        <check_all>
          <check_age value="{player.age}" min="1m"/>
        </check_all>
      </condition>
      <timing>
        <time exact="1m"/>
      </timing>
      <action>
        <do_all exact="1">
          <create_ship capturable="1" class="m1" typename="SS_SH_USC_M1" race="enemy" racelogic="1">
            <position x="50km" y="50km" z="1km"/>
            <sector sector="Kingdom End"/>
            <equipment loadout="maximum"/>
            <cargo>
              <ware typename="SS_WARE_TECH213" exact="30"/>
              <ware typename="SS_WARE_TECH246" exact="30"/>
              <ware typename="SS_WARE_TECH251" exact="30"/>
            </cargo>
            <command command="killenemies"/>
            <pilot name="Terry the Terrible" race="other1" shipname="Rogue Terran Warship"/>
          </create_ship>
        </do_all>
      </action>
    </cue>
  </cues>
</director>


You can create your own race with the race="other1" setting and make use of imported ships to setup another race in the game.
Afaik you can create upto 3 extra races using the race="other1" , race="other2" , race="other3" settings, but don't quote me, I may be totally wrong.

Still learning but I created this using the original MD guide and have dl'd Stu's guide for later reading.

Argo.


_________________
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP

I lurk alot for the most part now
Thumb up
Back to top
View user's profile Send private message Visit poster's website
Rednoahl



MEDALMEDALMEDAL

Joined: 03 Jan 2009
Posts: 898 on topic
Location: Huddersfield. U.K.
Thank you for registering your game
PostPosted: Thu, 25. Mar 10, 22:07    Post subject: Reply with quote Print

Not full code, but it took me a long while to find out what "discipline" meant.

Code:

<cue>
  <action>
    <do_all>
      <create_offer discipline="XXXXP" comment="Plot"/>
      <create_offer discipline="TXXX" comment="Trade"/>
      <create_offer discipline="XFXX" comment="Fight"/>
      <create_offer discipline="XXBX" comment="Build"/>
      <create_offer discipline="XXXT" comment="Think"/>
    </do_all>
  </action>
</cue>


Back to top
View user's profile Send private message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 7178 on topic
Location: Nottinghamshire, UK
Thank you for registering your game
PostPosted: Thu, 25. Mar 10, 22:39    Post subject: Reply with quote Print

What does that do?

I get the Plot, TradeFightBuildThink, but does it just add more missions or what?


_________________
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
Back to top
View user's profile Send private message Send e-mail
Argonaught.





Joined: 06 Nov 2002
Posts: 1618 on topic
Location: Omnipotence rules!
Thank you for registering your game
PostPosted: Fri, 26. Mar 10, 02:06    Post subject: Reply with quote Print

I think that code is in relation to the type of mission icons in/on stations etc
Not sure though tbh.

Argo.


_________________
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP

I lurk alot for the most part now
Thumb up
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Thu, 14. Dec 17, 00:32

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.17776 seconds, sql queries = 29