[Discussion] Generic X3TC S&M questions III

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

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

Post Reply
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11818
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Fri, 5. Aug 11, 18:09

Seams to me you are missing some attributes in the check.

Code: Select all

<conversation_completed actor="{ref to actor of the conversation here}" conversation="TRPRSC101.Banks C1" answer="{this is what you put in outcome="" in conversations}"/>
Not 100% sure about the actor but sure the outcome (aka answer) is mandatory

Hope that helps.

MFG

Ketraar
Image

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Fri, 5. Aug 11, 18:53

Its actually this part of the code that wont trigger

Code: Select all

<cue name="TRPRSC101.A1 Fire and Ice Trade Agreement"> 
                  <condition> 
                    <conversation_completed conversation="TRPRSC101.Gogoelos C1"/> 
                  </condition> 
                  <timing> 
                    <time exact="5s"/> 
                  </timing> 
                  <action> 
                    <do_all> 
                      <incoming_message author="eldyranx3" popup="0" text="Debug"/> 
                    </do_all> 
                  </action> 
                </cue>
TRPRSC101.Banks C1 triggers now just fine. Initially it didn't, which is what my last post was about. Its TRPRSC101.Gogoelos C1 that wont trigger now.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Fri, 5. Aug 11, 20:01

As Ketraar said: Have you tried to put the "answer" attribute into the condition <conversation_completed>?

Greetings,
ScRaT

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Fri, 5. Aug 11, 22:01

Code: Select all

<conversation name="TRPRSC101.Gogoelos C1" description="A1 contact with Libaras Tismanos Gogoelos IV">
    <player text="{8461,305}">
      <npc text="{8461,401}">
        <player text="{8461,306}">
          <npc text="{8461,402}">
            <player text="{8461,307}" outcome="ready"/>
              </npc>
            </player>
          </npc>
        </player>
  </conversation>

Code: Select all

 <cue name="TRPRSC101.A1 Fire and Ice Trade Agreement">
                  <condition>
                    <conversation_completed actor="TRPRSC101.Libaras Tismanos Gogoelos IV" conversation="TRPRSC101.Gogoelos C1" answer="ready"/>
                  </condition>
                  <timing>
                    <time exact="5s"/>
                  </timing>
                  <action>
                    <do_all>
                      <incoming_message author="eldyranx3" popup="0" text="Debug"/>
                    </do_all>
                  </action>
                </cue>
Does not trigger the debug message either. :cry:

gutoue
Posts: 11
Joined: Fri, 13. Jan 06, 15:46
x4

Post by gutoue » Sat, 6. Aug 11, 07:01

Hi, very nice thread.

I got some old scripts for X3R, I put these to the scripts folder of the X3TC(with extended mod). But I can not find these scripts in the in-game editor. I s there any convertion required?

Thx

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24961
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sat, 6. Aug 11, 11:19

Yes, you have to change the engine version in the scripts.
Translation of what SymTec ltd. [url=http://forum.egosoft.com/viewtopic.php?t=217581]here[/url] in german wrote:Scripts can be loaded in X3TC, when you open them with a text editor and change
  • the engine version from 32 to 44:
    <engineversion>44</engineversion>
  • the variable of the engine version in the code array to 44:
    <sval type="array" size="10">
    <sval type="string" val="a.test"/>
    <sval type="int" val="
    44"/>
However, if you can load a script in the script editor doesn't mean that it will work. The more complex a script is, the more unlikely it is that it will work without further adjustments.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Thu, 11. Aug 11, 17:50

Probably a much easier question to answer than the last. Is there a better way of doing this?

Code: Select all

<cue name="TRPRSC101.A2 Chasing Svaoilfari M5 Armed">
                          <condition>
                            <check_all>
                              <object_exists object="Chasing Svaoilfari Scout"/>
                              <check_value value="{player.ship}" exact="{object@Chasing Svaoilfari Scout}"/>
                              <check_any>
                                <check_value value="{player.ship.equipment.SS_LASER_EMP.exists}" exact="1"/>
                                <check_value value="{player.ship.equipment.SS_MISSILE_POLTERGEIST.exists}" exact="1"/>
                              </check_any>
                            </check_all>
                          </condition>
                          <timing>
                            <time exact="5s"/>
                          </timing>
                          <action>
                            <do_all>
                              <incoming_message author="{actor.name@TRPRSC101.Rana Banks}" popup="0" text="{8461,218}"/>
                              <reset_cue cue="TRPRSC101.A2 Chasing Svaoilfari M5 Disarmed"/>
                            </do_all>
                          </action>
                          <cues>
                            <cue name="TRPRSC101.A2 Chasing Svaoilfari M5 Disarmed">
                              <condition>
                                <check_all>
                                  <object_exists object="Chasing Svaoilfari Scout"/>
                                  <check_value value="{player.ship}" exact="{object@Chasing Svaoilfari Scout}"/>
                                  <check_any>
                                    <check_value value="{player.ship.equipment.SS_LASER_EMP.exists}" exact="0"/>
                                    <check_value value="{player.ship.equipment.SS_MISSILE_POLTERGEIST.exists}" exact="0"/>
                                  </check_any>
                                </check_all>
                              </condition>
                              <timing>
                                <time exact="5s"/>
                              </timing>
                              <action>
                                <do_all>
                                  <incoming_message author="{actor.name@TRPRSC101.Rana Banks}" popup="0" text="{8461,219}"/>
                                  <reset_cue cue="TRPRSC101.A2 Chasing Svaoilfari M5 Armed"/>
                                </do_all>
                              </action>
                            </cue>
                          </cues>
                        </cue>
Is there a better way to check to see if this particular ship that the player is flying has EMP's or Missiles installed, give a warning, and then give confirmation when they are subsequently disarmed?

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Thu, 11. Aug 11, 18:30

I'm not a 100% sure, that I understand what you want to do, but maybe using <do_when> would reduce the code duplication a bit, because you can move the checks out of the condition into the action.

I don't understand what this is supposed to mean:

Code: Select all

<object_exists object="Chasing Svaoilfari Scout"/>
<check_value value="{player.ship}" exact="{object@Chasing Svaoilfari Scout}"/>
Greetings,
ScRaT

dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle » Thu, 11. Aug 11, 18:51

ScRaT_GER wrote:I'm not a 100% sure, that I understand what you want to do, but maybe using <do_when> would reduce the code duplication a bit, because you can move the checks out of the condition into the action.

I don't understand what this is supposed to mean:

Code: Select all

<object_exists object="Chasing Svaoilfari Scout"/>
<check_value value="{player.ship}" exact="{object@Chasing Svaoilfari Scout}"/>
Greetings,
ScRaT
<do_when> would be my choice for something like this, depending on what the desired result is.

<object_exists object="Chasing Svaoilfari Scout"/> is unnecessary, as if {player.ship} is exactly{object@Chasing Svaoilfari Scout} then it quite obviously exists.... :wink:

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Thu, 11. Aug 11, 19:40

Sorry, I should have been clearer. Those parts are reduntant, agreed. What about this part:

Code: Select all

 <check_value value="{player.ship.equipment.SS_LASER_EMP.exists}" exact="1"/>
 <check_value value="{player.ship.equipment.SS_MISSILE_POLTERGEIST.exists}" exact="1"/>

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Thu, 11. Aug 11, 19:52

Those parts are reduntant, agreed. What about this part:
It isn't. How else would you check if those wares exist in the cargo?

Greetings,
ScRaT

dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle » Thu, 11. Aug 11, 20:14

Code: Select all

<check_value value="{player.ship}" exact="{object@Chasing Svaoilfari Scout}"/>
This bit isn't necessarily redundant - you can use it to ensure the player uses a specific ship for a mission instead of one they'd prefer to use.

As ScRaT_GER said the checking for equipment isn't redundant if you're using it for a condition check.

It would help knowing what you are trying to achieve, as the approach could be quite different. Is it a case that you want to check the player is in a particular ship, and if armed a message sent, which is repeated periodically until you disarm when a different message is sent?
Or is it a case that the mission won't continue until you are disarmed, and a single message telling you you are armed and need to lose your weapons to continue?

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Thu, 11. Aug 11, 21:52

dillpickle wrote:Or is it a case that the mission won't continue until you are disarmed, and a single message telling you you are armed and need to lose your weapons to continue?
There will be a later point in the mission that will fail if the player is in that ship and it is armed. I could just put that check in while entering the key sector, but I want the player to know that they have triggered a potential mission fail condition, and to be able to know when it is safe to proceed once they ditch the weapons.

A little bit more complicated than it needs to be, but I like immersion.

User avatar
heratik
Posts: 1210
Joined: Tue, 3. May 11, 16:31
x3tc

Post by heratik » Fri, 12. Aug 11, 20:27

Sorry for the noob question, but if I download some scripts, as long as I have a set of saves I use for modified and a set for vanilla. If I move the relevant files in/out of the Script and T folders when appropriate, can I switch between modified and vanilla games?

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 12. Aug 11, 21:35

Or you can just copy the entire TC folder and keep two completely separate installations.

Just don't mix and match the savegames. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
heratik
Posts: 1210
Joined: Tue, 3. May 11, 16:31
x3tc

Post by heratik » Fri, 12. Aug 11, 22:02

Cheers Gazz!

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Fri, 2. Sep 11, 21:22

Is there a trick to getting a new sector to show up on the universe map through the MD? Or do I have to do something not MD related?

Code: Select all

<cue name="TRPRSC101.A6 Building Asgard">
          <condition>
            <check_value value="{value@TRPRSC101.PlotProgress}" exact="6"/>
          </condition>
          <timing>
            <time min="1m" max="3m"/>
          </timing>
          <action>
            <do_all>
              <incoming_message author="eldyranx3" popup="0" silent="0" text="Loading Asgard"/>

              <load_map file="TRP_Map_ASGD"/>
              <find_sector name="TRPRSC101.Asgard" x="9" y="0" comment="TRPRSC101 Plot Sector"/>
              <find_sector name="TRPRSC101.Neptune" x="9" y="1"/>
              <add_map>
                <sector sector="TRPRSC101.Asgard"/>
              </add_map>
              <alter_sector object="TRPRSC101.Asgard" security="core" population="0" size="75km"/>
              <set_sector_override sector="TRPRSC101.Asgard" textid="1021800" race="atf"/>
              <set_sector_known sector="TRPRSC101.Asgard" known="1"/>

              <!--Create Neptune Terran North Jump Gate-->
              <create_gate gate="north" known="1" typename="SS_WG_TJ_NORTH" race="terran" safety="0">
                <position x="0km" y="0km" z="40km"/>
                <sector sector="TRPRSC101.Neptune"/>
                <destination sector="TRPRSC101.Asgard" gate="south"/>
              </create_gate>

              <!--Create Asgard Terran South Jump Gate-->
              <create_gate gate="south" known="1" typename="SS_WG_TJ_SOUTH" race="terran" safety="0">
                <position x="0km" y="0km" z="-40km"/>
                <sector sector="TRPRSC101.Asgard"/>
                <destination sector="TRPRSC101.Neptune" gate="north"/>
              </create_gate>

            </do_all>
          </action>
        </cue>

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<universe>
	<o id="1634" f="1" t="1" x="9" y="0" r="14" size="27500000" m="0" p="179706" qtrade="0" qfight="0" qbuild="0" qthink="0">
		<o t="2" s="6" neb="0" stars="0"/>
		<o f="1" t="3" s="1" x="-1102931227" y="-687972107" z="108199201" color="16777160"/>
		<o f="1" t="3" s="10" x="-1093769121" y="-456608099" z="67933720" color="3297370"/>
		<o f="1" t="4" s="125" x="-37252205" y="263878530" z="-115974098" color="328963" fn="0"/>
		<o f="1" t="4" s="73" x="-14543588" y="375785235" z="-156926499" color="328963" fn="0"/>
		<o f="1" t="4" s="20" x="147298221" y="-272093611" z="188080253" color="990735" fn="0"/>
	</o>
</universe>
I can fly info the sector just fine, and any property in that sector shows up in the list just fine, but it just doesn't show up on the universe map. I'm going off the code in the ANH Plot, so I'm probably missing something non-MD related.

Thanks in advance!

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11818
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Fri, 2. Sep 11, 23:33

Making sectors visible ingame is done via 00749.bod. You need to:
a) edit your 00749.bod to contain the sector(s) you want added
b) use an existing one like SunBlades bod, that will have most sectors within 17x21 (or other scripts/mods that help you create your own bod)

The sector will work just fine for NPC and mostly for you too. Problems known for player are that you cant access the universemap and therefore cant also use the jumpdrive.

So, no, not possible done via MD.

MFG

Ketraar
Image

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Sat, 3. Sep 11, 04:35

Thanks for the heads up Ketraar!

gefer8
Posts: 96
Joined: Thu, 1. Sep 11, 01:45

Post by gefer8 » Sun, 4. Sep 11, 22:16

I want more info about complexes. Google doesn't seem to help me, so I want to know if there's a better way to connect stations then just randomly guessing the co-ordinates.

Post Reply

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