[Video Tutorial] Mission Director Basics
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Yes sorry, its always assumed you know these things, bad habit too actually.
Anyway, the files you have to extract are in the cats, depending on which game you use (TC or AP) they will be located in different locations, TC main installation folder for TC and \addon for AP.
The best would be to extract all cats into a working folder starting with the lower numbers and working your way up, overwriting as you go. This makes sure you have the latest version.
For single files its the other way around, open the highest cat and extract the needed files, and work your way down if the higher cat does not contain all the files you need. In this case never overwrite any files.
This method is true to any modding activity.
MFG
Ketraar
Anyway, the files you have to extract are in the cats, depending on which game you use (TC or AP) they will be located in different locations, TC main installation folder for TC and \addon for AP.
The best would be to extract all cats into a working folder starting with the lower numbers and working your way up, overwriting as you go. This makes sure you have the latest version.
For single files its the other way around, open the highest cat and extract the needed files, and work your way down if the higher cat does not contain all the files you need. In this case never overwrite any files.
This method is true to any modding activity.
MFG
Ketraar
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Rather than hunting for files, it is more reliable (and quicker) to find the file in VFS (Virtual File System).
You can Open from VFS from the file menu or:
VFS automatically manages the Addon folder if you set the Game Profile correctly (Options/Configuration). So just look in the Director folder for the files that you want.
Two ways to export a file:
You can Open from VFS from the file menu or:
- Pull down Plugins menu.
- Choose Cat Manager.
VFS automatically manages the Addon folder if you set the Game Profile correctly (Options/Configuration). So just look in the Director folder for the files that you want.
Two ways to export a file:
- Drag and drop from VFS to Windows Explorer.
- Pull down the Files menu and choose Extract Files.
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Agreed.Ketraar wrote:Anyway, having a full extracted working copy of the games is IMO the simplest way to mod
I have never seen VFS make a mistake. If you move or modify a file outside of X3 Editor, then you may have to close and reopen X3 Editor to re-read the files.
- (It *should* be sufficient to "Reload game data" but that sometimes does not do the entire job.)
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
-
- Posts: 34
- Joined: Sat, 18. May 13, 03:39
There does appear to be a problem with the way X3E2 extracts files (Using the Extract Files botton) with more then one "." (Period) in the file name. (As are most of the MD files in AP)DrBullwinkle wrote: I have never seen VFS make a mistake. If you move or modify a file outside of X3 Editor, then you may have to close and reopen X3 Editor to re-read the files.
For example, "0.1 Assassinate 1" is extracted as "0.xml"
This problem is compounded when extracting the entire directory, where any file in the format #.*.pck (ex. "0.19 Escort Convoy.pck") will be replaced by any other file starting with the same number (ex. "0.4 Return Wares.pck"). For each of these examples "0.xml" will be created and replace the previous "0.xml" file.
However, dragging the file (or folder) out of the VFS (to say your desktop) has the desired effect, with the file(s) named properly.
I'm not even sure how I ended up here, or why I'm even looking at MD files, or why this is my first post; I think it started a few days ago, looking for a script to remove rocks from a sector, now I have editors, studios, commandline tools, 100's of bookmarks, coffee stains...
Edit:
Neither of these methods produce the dircetor.htm/.css/.xsl files displayed in the first video.DrBullwinkle wrote:Rather than hunting for files, it is more reliable (and quicker) to find the file in VFS (Virtual File System).
You can Open from VFS from the file menu or:
- Pull down Plugins menu.
- Choose Cat Manager.
The only convoluted way to get to these files, is to open VFS (Plugins->Cat Manager) then go to File->Open Catalog and open each .cat file in your AP/TC folder. For AP it appears that 2 files are in 01.cat and the other 4 are in 02.cat
Oh, and after all that, these files only work with Internet Explorer. I haven't had IE installed on a computer for nearly a decade.
Last edited by MeltingPointSP on Tue, 28. May 13, 04:07, edited 1 time in total.
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Think of the coffee stains as a "badge of honor" for having learned something so important.MeltingPointSP wrote:I'm not even sure how I ended up here, or why I'm even looking at MD files, or why this is my first post; I think it started a few days ago, looking for a script to remove rocks from a sector, now I have editors, studios, commandline tools, 100's of bookmarks, coffee stains...
And, just so that your first post will not go to waste:
Remove Rocks (Mini Asteriods) (Laux)
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
-
- Posts: 34
- Joined: Sat, 18. May 13, 03:39
Thanks for the link, more code I can assimilate into my rock removal script that is quickly spiraling out of control.DrBullwinkle wrote:
Think of the coffee stains as a "badge of honor" for having learned something so important.
And, just so that your first post will not go to waste:
Remove Rocks (Mini Asteriods) (Laux)
On a more serious note, I'm very quickly learning why there are so few modders for this game. I would cry if it wasn't so funny. I truly hope X:Rebirth has a more sane modding environment.
Thank you Ketraar for find time to create this tutorials.I have problem to understand what is going on in Naming Convention part 2.My code is same as code in last second of video(part 2) but when i change name to Tutorial in game,ships(or ship) are created but first message is "Group Objects amount" (and always is zero no mater how many ships are created) not "Hello {player.name},welcome to MD tutorial."I was thinking that first message would be Hello then Group . Please Ketraar or somebody help me understand what i m doing wrong.
Here is code:
Thank you for quick replay.If it is typo i will punish my self, no X for whole day.
Edit: added code-tags, so that the formatting doesn't get lost. X2-Illuminatus
Code: Select all
<cues>
<cue name="MDTutorial_TopLevel" delay="2s">
<condition>
<check_all>
<check_value value="{player.name}" exact="Tutorial"/>
</check_all>
</condition>
<timing>
<time exact="2s"/>
</timing>
<action>
<do_all>
<incoming_message author="Ketraar" text="Hello {player.name},welcome to MD tutorial."/>
<do_all min="1" max="5" counter="ships">
<create_ship name="this.TutorialShip{counter@ships}" group="this.TutorialGroup" race="argon" racelogic="0" typename="SS_SH_A_M1">
<position object="{player.ship}" min="10km" max="20km"/>
<sector sector="{player.sector}"/>
</create_ship>
</do_all>
</do_all>
</action>
<cues>
<cue name="MDTutorial_Hail" delay="2s">
<condition>
<check_all>
<check_value value="{object.distance@MDTutorial_TopLevel.TutorialShip1}" max="5km" />
</check_all>
</condition>
<action>
<do_all>
<set_value name="this.Objects" exact="{group.object.count@MDTutorial_TopLevel.TutorialGroup}"/>
<incoming_message author="Ketraar" text="Group Objects amount: {value@this.Objects}"/>
</do_all>
</action>
</cue>
</cues>
</cue>
</cues>
</director>
Edit: added code-tags, so that the formatting doesn't get lost. X2-Illuminatus
Doesnt look like a typo, try adding a cue_complete condition in the MDTutorial_Hail cue like this
This may help avoid the sub cue to trigger too soon and getting both messages at same time, where the last one will be "on top" in your inbox.
MFG
Ketraar
Code: Select all
<cue name="MDTutorial_Hail" delay="2s">
<condition>
<check_all>
<cue_is_complete cue="MDTutorial_TopLevel"/>
<check_value value="{object.distance@MDTutorial_TopLevel.TutorialShip1}" max="5km" />
</check_all>
</condition>
MFG
Ketraar
Thank you X2-Illuminatus i overlooked that option.
Here is code now:
I changed position object to be able to see ships and not to fly around to find them.First message trigger after change name second not at all.I waited for 5 min.Forgot to say , doing all this in AP 3.0.
Here is code now:
Code: Select all
<cues>
<cue name="MDTutorial_TopLevel" delay="2s">
<condition>
<check_all>
<check_value value="{player.name}" exact="Tutorial"/>
</check_all>
</condition>
<timing>
<time exact="2s"/>
</timing>
<action>
<do_all>
<incoming_message author="Ketraar" text="Hello {player.name},welcome to MD tutorial."/>
<do_all min="1" max="5" counter="ships">
<create_ship name="this.TutorialShip{counter@ships}" group="this.TutorialGroup" race="argon" racelogic="0" typename="SS_SH_A_M1">
<position object="{player.ship}" min="3km" max="6km"/>
<sector sector="{player.sector}"/>
</create_ship>
</do_all>
</do_all>
</action>
<cues>
<cue name="MDTutorial_Hail" delay="2s">
<condition>
<check_all>
<cue_is_complete cue="MDTutorial_TopLevel"/>
<check_value value="{object.distance@MDTutorial_TopLevel.TutorialShip1}" max="5km" />
</check_all>
</condition>
<action>
<do_all>
<set_value name="this.Objects" exact="{group.object.count@MDTutorial_TopLevel.TutorialGroup}"/>
<incoming_message author="Ketraar" text="Group Objects amount: {value@this.Objects}"/>
</do_all>
</action>
</cue>
</cues>
</cue>
</cues>
</director>
Well make sure you are max 5km to the Target ship, collision avoidance can sometimes move objects from the desired position even if you set them to be within 3-5 km. To test properly I suggest you spawn only 1 ship so you can narrow down the issue (change the max=5 in the do_all to max=1).
Cant see anything wrong from here, unfortunatelly I have no valid AP installation to try it myself.
MFG
Ketraar
Cant see anything wrong from here, unfortunatelly I have no valid AP installation to try it myself.
MFG
Ketraar
-
- Posts: 1159
- Joined: Mon, 3. Nov 08, 14:25
If you're going to use {object.distance@object) you need to get your units correct:
Should be:
{object.distance@object} will be looking for a value in whatever the base distance measurement is, and specifying "km" in the value will be throwing it. {object.distance.km@object} and {object.distance.m@object} are more manageable variations.
Other ways to do it would be:
For this first ship in the group, or:
For any ship in the group.
You don't technically need:
You can just use:
Code: Select all
<check_value value="{object.distance@MDTutorial_TopLevel.TutorialShip1}" max="5km" />
Code: Select all
<check_value value="{object.distance.km@MDTutorial_TopLevel.TutorialShip1}" max="5" />
Other ways to do it would be:
Code: Select all
<condition>
<check_all>
<object_position object="MDTutorial_TopLevel.TutorialShip1" max="5000m">
<position object="{player.ship}"/>
</object_position>
</check_all>
</condition>
Code: Select all
<condition>
<check_all>
<any_object_position group="MDTutorial_TopLevel.TutorialGroup" max="5000m">
<position object="{player.ship}"/>
</any_object_position>
</check_all>
</condition>
You don't technically need:
Code: Select all
<set_value name="this.Objects" exact="{group.object.count@MDTutorial_TopLevel.TutorialGroup}"/>
Code: Select all
<incoming_message author="Ketraar" text="Group Objects amount: {group.object.count@MDTutorial_TopLevel.TutorialGroup}"/>
With dillpickle correction
and Ketraar
working properly.Thank you people.
Code: Select all
<check_value value="{object.distance.km@MDTutorial_TopLevel.TutorialShip1}" max="5" />
Code: Select all
<cue_is_complete cue="MDTutorial_TopLevel"/>
-
- Posts: 228
- Joined: Thu, 13. Mar 14, 23:52
Ketraar I hope you are still monitoring this post as I have a question to ask about library files within the x3 TC MD. I would like to call a library file within the cue of another file. Basically when a check value passes within the cue the library is called for. I've played with the <cue ref=""/> but there is no way to control what happens. It just reads the tag of the cue itself, does everything within the library file, then continues down into the cue own conditions and actions. I have tried to disable this cue from a parent cue by giving the cue a name and then using that name within the parent cue to cancel the actions of it. for example:
<cue name="this" ref="something"/>
I've tried:
<cue>
<conditions>
<check_all>
<cue_exists cue="this">
</check_all>
<actions>
<do_all>
<cancel_cue cue="this">
</do_all>
</cue>
<cue ref="something" name="this"/>
And that doesn't stop the cue from running. I just don't know what to do. How do you call a library and have the ability to safely use it within a do_all function?
<cue name="this" ref="something"/>
I've tried:
<cue>
<conditions>
<check_all>
<cue_exists cue="this">
</check_all>
<actions>
<do_all>
<cancel_cue cue="this">
</do_all>
</cue>
<cue ref="something" name="this"/>
And that doesn't stop the cue from running. I just don't know what to do. How do you call a library and have the ability to safely use it within a do_all function?
Re: [Video Tutorial] Mission Director Basics
I looked through the files of the Director folder and I had a doubt, but since I'm not strong in this, I want to clarify with knowledgeable people.
Tell me, is there a mistake here?
and
and
My suggestion...
or
and
and
It seems to me that there is an extra bracket in the first two options, and one is missing in the last example.
Or is it still correct? Then explain why, if not long and not difficult.
The document opened in VS, but it doesn't show that the extra curly or parentheses, neither open nor closed , is a bug. He completely ignores them.
Tell me, is there a mistake here?
Code: Select all
<set_value name="this.hour" exact="(({value@this.test}-{value@this.hour_okr}*60*24))/60)" comment="hour"/>
Code: Select all
<set_value name="this.day" exact="(({value@this.test}-{value@this.day_okr}*60*24*30))/60/24+1)"/>
Code: Select all
<set_value name="this.ShipPrice" exact="{value@this.Price}-({value@this.Price}*(100-{object.hull@this.Gaea}/100)"/>
Code: Select all
<set_value name="this.hour" exact="(({value@this.test}-{value@this.hour_okr}*60*24)/60)" comment="hour"/>
Code: Select all
<set_value name="this.hour" exact="({value@this.test}-{value@this.hour_okr}*60*24)/60" comment="hour"/>
Code: Select all
<set_value name="this.day" exact="(({value@this.test}-{value@this.day_okr}*60*24*30)/60/24+1)"/>
Code: Select all
<set_value name="this.ShipPrice" exact="{value@this.Price}-({value@this.Price}*(100-{object.hull@this.Gaea}/100))"/>
Or is it still correct? Then explain why, if not long and not difficult.
The document opened in VS, but it doesn't show that the extra curly or parentheses, neither open nor closed , is a bug. He completely ignores them.