[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
Alee Enn
Posts: 2575
Joined: Sat, 28. Mar 09, 16:03
x4

Post by Alee Enn »

Thanks for the help, jlehtone.
sometimes when I right-click on the link to "save link as" it comes up as xspd.cgi
If I just cancel and re-save it it comes up as xsp, so that's ok.

Thanks to Cycrow's Plugin Manager, they install easily too :D

Thank You.
Igor.tverd
Posts: 266
Joined: Sun, 5. Oct 08, 10:06
x3ap

Post by Igor.tverd »

I know that when defining ship equipment and cargo with MD

Code: Select all

exact="#"
can be used, but when trying to do the same thing with creating a certain amount of identical ships it doesn't seem to work

Example:

Code: Select all

                  <create_ship typename="SS_SH_A_M3" race="player"  dockobject="this.BSG01" exact="45">
                    <sector x="0" y="10"/>
                    <position x="0" y="0" z="0" min="20km" max="30km" height="10km"/>
                    <equipment>
                      <ware typename="SS_SHIELD_C" exact="6" comment="25mj shield"/>
                      <ware typename="SS_WARE_TECH277" exact="1"/>
                      <ware typename="SS_WARE_LIFESUPPORT" exact="1"/>
                      <ware typename="SS_WARE_SW_EXPLORER" exact="1"/>
                      <ware typename="SS_WARE_SW_NAV_1" exact="1"/>
                      <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"/>
                      <ware typename="SS_WARE_TECH241" exact="1"/>
                      <ware typename="SS_LASER_MAM" exact="6"/>
                      <ware typename="SS_WARE_TR_TECH7" exact="30"/>
                    </equipment>
                  </create_ship>
This code only creates 1 Nova, not 45 as defined in exact="45". So my question is, what is a correct command to create multiple identical ships? Thank you in advance for any help provided.

Edit: Please ignore, I figured it out:

Code: Select all

<do_all min="45" max="45">
<create_ship  typename......
....
</do_all>
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. »

I have a stupid question to ask about Text id files for ship names and descriptions.

<page id="17" title="Boardcomp. objects" descr="0">

lists all objects and descriptions in the game.

If I create my own xxxx-L044 file do I need to list my ships and descriptions in the same page id 17 or can I change the 17 to another number like:

<page id="100000" title="Boardcomp. objects" descr="0">

As I've seen in some mods they have a different number instead of page id 17 when they have extra ships.

Any and all info really 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
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

17 to another number
No, you can't. Object names are always on page 17 - for the game.

Why this appendix "for the game"? Because you also have the possibilty to define object names on pages 300017 and 350017 (not sure about the last one, you simply have to check what Egosoft did). These pages are read into page 17 by the game.

I don't know why Egosoft created this weird mechanism, since it is absolutely no problem to define new object names directly on page 17.

One other thing to know is, that the objects description is always one ID after the objects name.

Code: Select all

<page id="17">
  <t id="50000">OBJECT NAME</t>
  <t id="50001">OBJECT DESCRIPTION</t>
</page>
Greetings,
ScRaT
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

Thanks for the info ScRaT_GER.

I'll use 17 then. I already knew about an item needing 2 id's, one for name and other for decription.

One extra Q on

Code: Select all

<t id="50000">OBJECT NAME</t>
  <t id="50001">OBJECT DESCRIPTION</t> 
Whats the numerical limit for t id=

I know the text file itself has to be between 7000 and 9999, checked what was being used in the scripts/mods sticky.

Info appreciated as always :)

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:
Igor.tverd
Posts: 266
Joined: Sun, 5. Oct 08, 10:06
x3ap

Post by Igor.tverd »

Argonaught. wrote:Thanks for the info ScRaT_GER.

I'll use 17 then. I already knew about an item needing 2 id's, one for name and other for decription.

One extra Q on

Code: Select all

<t id="50000">OBJECT NAME</t>
  <t id="50001">OBJECT DESCRIPTION</t> 
Whats the numerical limit for t id=

I know the text file itself has to be between 7000 and 9999, checked what was being used in the scripts/mods sticky.

Info appreciated as always :)

Argo.
The only limit is in the Tships file and that's "999999999".
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. »

Ah excellent, I can carry on now :)

Thanks for the info folks, very much 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:
Igor.tverd
Posts: 266
Joined: Sun, 5. Oct 08, 10:06
x3ap

Post by Igor.tverd »

I have a small question, I can swear that I saw somewhere before, but can't remember the answer :(
Is there a relative value (seen in Tware, Tships, etc to credits value converter anywhere? Or maybe just a tip on how much to multiply by.
Some help would be great.
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. »

MD Resetting cues.

I want the game to recheck the load text cue when game starts.
Here's my code:

Code: Select all

  <cues>
    <cue name="LoadText">
      <action>
        <do_all>
          <load_text fileid="9555-L044"/>
        </do_all>
      </action>
    </cue>
  </cues>


Where would I place:

Code: Select all

<reset_cue cue="LoadText"/>
In order to do that?


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 »

No idea why you would want to load the file more than once. Usually loading it at the begining of the mission does it. Once loaded it should be automatcally loaded every time you load your save.

I also don't know any condition to check if you loaded a save.

MFG

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

Post by Argonaught. »

It's a text file I'm using in my game of ship names/descriptions that I alter every now and then to test ships.

I had a different text file name before that was from someone elses mod that had a ton of other stuff listed in it. I decided to create my own text file with just the stuff I loaded seperately in a fake patch.

Problem is the new text file is not being read into the game and the ships are showing as readtext17 etc.

I figured since I had already named the cue that I'd need to place a reset in it somewhere so It would basically reset if I changed anything in the text file.

This isn't for a mission it's just a name/decription for objects file only.

What about a setting that reruns it?

Or will I need to rename the cue in order for it to load up?

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
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Is there anything that argues against using a simple setup script with the following content:

Code: Select all

load text: id=9555
Greetings,
ScRaT
User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. »

ScRaT_GER wrote:Is there anything that argues against using a simple setup script with the following content:

Code: Select all

load text: id=9555
Greetings,
ScRaT
Had a script before, but since I can't get to grips with the script editor for creating anything other than a text file load, I figured i'd play with the MD instead and do everything the MD way as it's a lot more friendly to noobs like me :)

I figured it out, I'd made abit of a mess in my text file (I forgot to change page id="100000" to page id="17" (I was experimenting with a new page id but found out here it wouldn't work)) and thats why it didn't load, see told you I was a noob.

Thanks for the replies though, really appreciate the help and assistance.

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 »

Ok for testing purposes you can set up a simple loop this works for every action that needs to get repeated.

Code: Select all

    <cue name="Topleveltestcue" delay="2s">
      <condition>
        <check_value value="{player.name}" exact="activate"/>
      </condition>
      <action>
        <do_all>
          <load_text fileid="xyz"/>
          <incoming_message author="debug" text="textfile loaded"/>
        </do_all>
      </action>
      <cues>
        <cue name="Testsubcue">
          <condition>
            <check_value value="{player.name}" exact="reset"/>
          </condition>
          <action>
            <do_all>
              <reset_cue cue="Topleveltestcue"/>
              <incoming_message author="debug" text="cue reseted"/>
            </do_all>
          </action>
        </cue>
      </cues>
    </cue>
MFG

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

Post by Argonaught. »

Thanks for the loop code Ketraar, I've copied it for later use :)

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:
Skyler1990
Posts: 23
Joined: Sat, 31. Jan 09, 20:42
x3tc

Pirateship from x²

Post by Skyler1990 »

I have a question to all modders, could someone convert the pirateship from x² to x³TC?, with the this dates, mainlaser, Gamma kyon emitter and other, the one turret back, 2 beta kyon emitter,and may some other laser, cargo hold so 13000 units, and shields 5x 25MJ.

it would be nice if somebody could do this for me, and others. Because i think, im not the only one, that want the old pirateship back.

Ty Skyler



If this is no the right topic, im very sorry.
dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle »

I am using MD to create an abandoned TP, and want it to have some Marines in it's cargo. The marines are showing up, except they are all named 'Unknown Object' with their race as 'Neutral'.

Code: Select all

          <create_ship name="angel1" capturable="1" class="tp" race="none" typename="SS_SH_B_TP_SPECIAL">
            <position x="-10km" y="10km" z="-10km"/>
            <sector x="1" y="2"/>
            <equipment>
              <ware typename="SS_WARE_LIFESUPPORT" exact="1"/>
              <ware typename="SS_WARE_SOLDIER_2" min="5" max="10"/>
            </equipment>
            <command command="none"/>                                                        
            <hull min="5" max="60"/>
          </create_ship>
Oddly enough, I can create a crate with Marines in it, which once collected show normal names and races.

Code: Select all

          <create_crate name="Special" secret="0" invincible="1">
            <position x="-11km" y="10km" z="-11km"/>
            <sector x="1" y="2"/>
            <ware min="6" max="10" typename="SS_WARE_SOLDIER_2"/>
          </create_crate>
Is there a way to have properly named marines on an abandoned ship?
Alternatively I can set the ship to a race, then get the pilot to abandon ship, but I'd need a way to prevent a pilot destroying equipment when he bails out.

Any help appreciated...
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Does the 'find all sectors within however many sectors' fetch an array?

I assume it must...

Wondering.

EDIT: Forget that, that's not what I need.

I need to be able to get an array of every big ship.

Most efficient way anyone?
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Code: Select all

$ships = get ship array: of race null class/type={Bigship}
I'm not sure if {Bigship} is the correct name, since I'm playing in german. You simply have to choose the class, which represents big ships. ;)

Greetings,
ScRaT
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Yeah, I used that.

Big Ship is in there, along with IIRC, Huge Ship. :lol:
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

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