[Discussion] Generic X3TC S&M questions II

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Gazz wrote:It's how X3 modding works. There are no half files. Only THE file or not THE file.
I can accept that, but that would imply that if two mods need to modify different parts of the wares file that they can not co-exist without being merged and I am pretty sure that that is not the case (at least from a user/developer perspective).

On that basis is that where things like the plug-in manager come into play which perhaps apply a mods deltas from the vanilla to a copy of the vanilla files that it creates perhaps? And if so, does that mean that for formal distribution I need to be looking at an SPK deliverable rather than a CAT/ZIP file?
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
jlehtone
Posts: 22477
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone »

Check the EMP mod. I think it is based on idea of adding a list of potential wares, and then scripts using it activate as many as required, rather than modding in their "one and only TWareT".

And yes, Plugin Manager works along the same lines, generating the game files dynamically from "sources".
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22413
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

Roger L.S. Griffiths wrote:
Gazz wrote:It's how X3 modding works. There are no half files. Only THE file or not THE file.
I can accept that, but that would imply that if two mods need to modify different parts of the wares file that they can not co-exist without being merged and I am pretty sure that that is not the case (at least from a user/developer perspective).

On that basis is that where things like the plug-in manager come into play which perhaps apply a mods deltas from the vanilla to a copy of the vanilla files that it creates perhaps? And if so, does that mean that for formal distribution I need to be looking at an SPK deliverable rather than a CAT/ZIP file?
If u use a spk file you can add a custom ware in that
U could also use emp but with emp you can't change the values so they might not always suit what you need
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Cycrow wrote:
Roger L.S. Griffiths wrote:
Gazz wrote:It's how X3 modding works. There are no half files. Only THE file or not THE file.
I can accept that, but that would imply that if two mods need to modify different parts of the wares file that they can not co-exist without being merged and I am pretty sure that that is not the case (at least from a user/developer perspective).

On that basis is that where things like the plug-in manager come into play which perhaps apply a mods deltas from the vanilla to a copy of the vanilla files that it creates perhaps? And if so, does that mean that for formal distribution I need to be looking at an SPK deliverable rather than a CAT/ZIP file?
If u use a spk file you can add a custom ware in that
Ok, rather than messing aroud with the EMP (as there is no gain at this time since I have found 3 unused wares in the main game), I have tried to use your Custom Wares but it is not flying... I have the wares configured in the Script Packager but they are not being applied in the game even when using the plugin.manager.getware script.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

SOLVED: Google helped after a few retypes of search For Colored text

Code: Select all

MD or Text file info needed.

I'm using the MD to create a small mod, it calls a text file as it loads.

(Excluding the use of scripts) 

Is it possible to add colored text to part of a text name on a ship/station using either MD or the text file? 
And what code does it use?

Forgive my noobness,

Thanks in advance,

Argo.
Sorry for causing inconvenience :) ,


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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12099
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Igor.tverd wrote:Hi again, I got another one of my MD questions. How would I go about removing ware from dock with MD?
Handling wares in docks does not work, as stated a few posts back.

MFG

Ketraar
Image
Igor.tverd
Posts: 266
Joined: Sun, 5. Oct 08, 10:06
x3ap

Post by Igor.tverd »

Ketraar wrote:
Igor.tverd wrote:Hi again, I got another one of my MD questions. How would I go about removing ware from dock with MD?
Handling wares in docks does not work, as stated a few posts back.

MFG

Ketraar
Yes, I have come to the same conclusion. MD seems like a very powerful tool, but I get the feeling that it's unfinished. Any news on planet removal?
Fantasy is the impossible made probable. Science fiction is the improbable made possible.
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Igor.tverd wrote:
Ketraar wrote:
Igor.tverd wrote:Hi again, I got another one of my MD questions. How would I go about removing ware from dock with MD?
Handling wares in docks does not work, as stated a few posts back.

MFG

Ketraar
Yes, I have come to the same conclusion. MD seems like a very powerful tool, but I get the feeling that it's unfinished. Any news on planet removal?
Any chance someone with the knowledge will release info on what can't be done with the MD at any stage?

I'm messing with it atm and it would be nice to a reference somewhere of what can't be done with it.

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12099
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Igor.tverd wrote:Any news on planet removal?
Nope sorry.
Argonaught. wrote:Any chance someone with the knowledge will release info on what can't be done with the MD at any stage?
I've said this a few times, I doubt that anyone would have the time to this, besides I think no one knows the full extend of the MD. Generally one could say that 99% of the commands work as intended, some actually can be used other than intended.

Best is to share experiences here. I know Stu made a guide, it should be linked in the MD Code Topic.

MFG

Ketraar
Image
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

I have Stu's already, basically just shows how to create a ship with equipment/wares in a specific sector.

I've read all I could that was available, I'm in no mans land now with no map to guide me :( .

I've moved a little beyond the tuts that are available:
Menagerie Shipyard

;)

Anyway I have a need of some help with this code:

Code: Select all

<do_if value="" >
                  
                    <play_text textid="1333"/>
                    <play_sound soundid="1008"/>
                    <incoming_message author="Menagerie Shipyard" text="Shipyard jumping" popup="1"/>

                    <find_sector sector="{player.sector}" name="spawn_sector Sector" min="1" max="250"/>
                    <find_gate gate="Ship_spawn_random.Gate">
                      <sector sector="spawn_sector Sector"/>
                    </find_gate>

                    <warp_player>
                      <position min="50km" max="70km" object="Ship_spawn_random.Gate"/>
                      <sector sector="spawn_sector Sector"/>
                    </warp_player>
                  
                </do_if>
Basically What it's supposed to do is:

check if player is docked at a specific station.
If he is then to send a message.
Then undock his ship.
And then to warp him to a random sector as penance for staying too long :)

I can't figure out what value I need to use, and I've tried them all.
There's alot of .dockobject commands but not enough explanation of how they are used.

I even unpacked the game to get at the mission MD files but too much code and params had me lost.

So be prepared for a ton of noob questions as I go along :P

Anyway hope someone can add the value I'm in need of.

PS. If someone could also add what value would be needed to check for other player/non player ships, it would help out massively

Much thanks in advance,

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12099
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

I've sent you a PM with your file including a few suggestions on how to structure it so it will only remove the station if player is not IS.

You also should look up the naming of cues and objects, unlike in scripts using dot to separate words is not a good idea, as its used to separate the cue name from the object name in local objects.

Have a look at the file and ask away if there are doubts.

MFG

Ketraar
Image
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

I compared both files and here are my conclusions.

Mine is like reading a dictionary, where some words still don't make sense but most do.

Yours is like trying to read ancient Egyptian before they found the Rosetta stone.

I'll go and try make sense of the changed stuff, but I'm already feeling defeated :(

Many Thanks,

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12099
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Argonaught. wrote:Mine is like reading a dictionary, where some words still don't make sense but most do.

Yours is like trying to read ancient Egyptian before they found the Rosetta stone.
hehe, well its simple actually.

1. Try to avoid multiple cues in Top-level as they will trigger at the same time, specially if they don't have conditions set, which brings me to 2.

2. Always set conditions for each cue so you can make sure it will only trigger when its supposed to.

3. use local variables and object referencing, meaning you should use cuename.objectname, or this.objectname (last will set the cuename where the object was found/created). Same applies for sectors and values.

4. For the SY destroy thingy:
I set up a value (as in local value) with the value (the amount) of 0 in the top level.
This value will get changed to 1 once the time has past, meeting one of the conditions set up in the cue where the SY gets destroyed. In that cue there is also a condition check for when the player is NOT (note the negate=1) in the sector which is matched.

Code: Select all

<match_sector sector="{player.sector}" exact="{object.sector@create_ufosy.UFOSY}" negate="1"/>
So basically it means that when the parent cue is done, the value is exact 1 (means the time is up) and player is in a sector other than the SY, it will trigger and do all the action in that cue.

As for your previous question about the 3 posts back, it looks good but you have to get rid of that SE punctuation. ;-)

MFG

Ketraar
Image
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Thanks for the explanation.

I'll keep your redo of mine as an example to refer to and re-read the md documents I have.
Some of it makes sense now.

I didn't know about the dots in cue names so will do away with those in future and stick to one word names.

Thanks for the help,

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Just need this little bit confirmed, think I have a handle on the cues situation.

top level cue is:

Code: Select all

<cues> <-- top Level
     stuff in between
      </action> <-- end of top level?
         
        <cues> <-- sub cue follow on if condition inside is met, if not it skips to the next sub cue?

            lots of code and stuff here
            end cue/cues etc
 
<\cues> <-- top level cues end

Am i correct in that small example, as I think thats where I was mostly messing up in my earlier experiments.

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12099
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Code: Select all

<director>
  <cues>
    <cue name="Toplevel">
      <condition>
        <!-- these conditions will get checked imedatelly -->
      </condition>
      <action>
        <!--stuff in between-->
      </action>
      <cues>
        <cue name="Sub cue 1 to toplevel">
          <condition>
            <!-- these conditions will only get checked once toplevel cue is activated -->
          </condition>
          <action>
            <!--stuff in between-->
          </action>
        </cue>
        <cue name="Sub cue 2 to toplevel">
          <condition>
            <!-- these conditions will only get checked once toplevel cue is activated same as sub cue 1 -->
          </condition>
          <action>
            <!--stuff in between-->
          </action>
          <cues>
            <cue name="Subcue to subcue 2">
              <condition>
                <!-- these conditions will only get checked once Sub cue 2 is activated -->
              </condition>
              <action>
                <!--stuff in between-->
              </action>
            </cue>
          </cues>
        </cue>
      </cues>
    </cue>
  </cues>
</director>
This is how MD is structured. Same level = same priority when it comes to check conditions. but they only trigger depending on what you put there.

MFG

Ketraar
Image
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Ok cool, thanks for that, I'll go study abit more for now.

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

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Ketraar

You should put a copy of your MD code example template that you posted above in the MD code thread. Some others may also find it useful.

MarCon
Rednoahl
Posts: 1400
Joined: Sat, 3. Jan 09, 15:48
x4

Post by Rednoahl »

mark_a_condren wrote:Ketraar

You should put a copy of your MD code example template that you posted above in the MD code thread. Some others may also find it useful.

MarCon
Agreed. I have found (so far) that it's fairly easy to get small bits of MD code to work, but stringing them together can be quite taxing - especially when you introduce conversations into the mix. Any basic explanations would be appreciated for future reference.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Rednoahl wrote:Agreed. I have found (so far) that it's fairly easy to get small bits of MD code to work, but stringing them together can be quite taxing - especially when you introduce conversations into the mix. Any basic explanations would be appreciated for future reference.
If you haven't seen it yet, the X3R sticky has a very basic guide (in the support files).

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”