[Req] MD ship commands help

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
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

[Req] MD ship commands help

Post by Argonaught. »

I'm looking for MD code that will tell a ship or group of ships to wander the galaxy.

Can anyone post a snippet of that code here for me so I can experiment with it.

The X2 MD guide doesn't list anything to do with sending ships to other sectors.


All / any help appreciated.

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
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra »

hm. I doubt that that exist as an actual command but you could do it like this:

Code: Select all

      <cue name="Command">
        <action>
          <do_all>
            <find_sector max="1" name="tempsector" race="default|terran|goner" comment="Depending on whether you want it to fly to xenon / kha'ak / pirate / yaki sectors."/>
            <set_command object="yourshiporgroup" command="movesector" commandobject="tempsector"/>
          </do_all>
        </action>
        <cues>
          <cue name="CommandRepeater" delay="30s">
            <condition>
              <match_sector sector="{object.sector@yourshiporgroup}" exact="{value@tempsector}"/>
            </condition>
            <action>
              <reset_cue cue="Commmand"/>
            </action>
          </cue>
        </cues>
      </cue>
Not sure whether it'll work that great but it's worth a try. ^^
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Thanks Enenra, I'll give it a go and see what happens.

I'm basically trying to create an enemy fleet that will wander the universe, visiting core sectors, or border as i haevn't decided yet.

I've looked at the Travelling Mechanic that Teladidrone but it's confusing with all the other stuff going on in it :S .

Anyway will try that on a ship and see if it goes wandering.

thanks again.

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:
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22408
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

generally, for moving ships around, its better to use scripts.

you have a script that handles the actual movement logic, then the MD will create the ships, and tell them to run your scripts.

this is pretty much how the standard md stuff works, either starting the ship command, or running the script directly to make it move.

but then it does depending on what u want the ships to do, weather you just want them to move from sector to sector, or weather you want them to patrol, attack enemies, etc
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Ah scripts :(

I couldn't create one of those to save my life.

Mainly they'll just wander around, since they are enemy to all I expect the locals to shoot at them and for them to respond. If noone attacks I'd like them to carry on.

Would it be possible to call an ego script to do that?

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:
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22408
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

if all you want to do is for them simply to fly around, then u prolly dont need a special script to do it.

in enenra's example, he uses one of egos scripts to do the movement. But setting a command on a ship is basically telling it to run the script thats assigned to that command.


another easier option would be an edit to the jobs file, adding a new job and telling the ships to patrol
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

In the MD I can get them to do whatever I like in sector using the command="" ,didn't know command="" was a script.

Main problem I can't work out is getting a ship to leave the sector it's spawned into. I'll have to mess around some more.

I thought of going the jobs/jobswings route but I can do so much more with the MD like setting names, increasing speed beyond what they would normally have etc and loadouts of weapons instead of the miss matched stuff the normal ships have.

I suppose I could get them to look for a station in the universe and to visit it then find another one to visit etc. Or tell them to follow a UFO if I can, they go everywhere afaik.

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:

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