EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Remove a Gate via Galaxy Editor Script
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
memia





Joined: 28 Jul 2010
Posts: 48 on topic
Location: UK
Thank you for registering your game
PostPosted: Fri, 13. Aug 10, 23:47    Post subject: Remove a Gate via Galaxy Editor Script Reply with quote Print

Hi All,
I've create a small package that allows me to add some new sectors into my game.
All works well and I'm very happy with the new sectors.

I haven't modified the main x3_universe.xml file, rather I have created my own xml file containing the additional sectors (with gates added to existing sectors) and then added the new sectors using a MD script.

However, one thing I seem to have a problem with is removing existing gates from sectors.
As an example, I'd like to remove the 'N' gate from Xenon Sector 347 and the 'S' gate from Scale Plate Green.

I've tried the following in the sector xml file (sector is Xenon Sector 347):
Code:
<o t="1" x="11" y="7" r="6" size="20000000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
  <o id="3915" t="18" s="4" x="0" y="500000" z="21160000" gid="-1" gx="0" gy="0" gtid="-1" a="0" b="0" g="0"/>
</o>


I hoped this would change the N gate in the sector (id="3915") to subtype 4 (s="4" - destroyed).
However, all this does is add a new gate in the sector at the position of the N gate (so there are now two in the same place).

I've also tried the following:
Code:
<o t="1" x="11" y="7" r="6" size="20000000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
  <o id="3915" t="18" s="0" x="0" y="500000" z="21160000" gid="-1" gx="0" gy="0" gtid="-1" a="0" b="0" g="0"/>
</o>


I wondered whether this would then "disconnect" the N gate (s="0" and then gid and gtid="-1"). However this actually creates a new gate that connects to Kingdom's End.

Does anyone have an idea how to effective destroy these gates using this kind of approach?

Thanks in advance for any advice or help. Although I appreciate all responses I am already aware that I can modify the x3_universe.xml file but I don't want to do that so am looking for other solutions.
M


_________________
A security system is only as strong as its weakest link
Back to top
View user's profile Send private message Visit poster's website
dillpickle



MEDALMEDAL

Joined: 03 Nov 2008
Posts: 1154 on topic

Thank you for registering your game
PostPosted: Sat, 14. Aug 10, 00:59    Post subject: Reply with quote Print

If you're happy using MD, then this will remove the gates.
Code:
    <cue name="Destroy Gates">
      <condition>
        <check_age value="{player.age}" min="1s"/>
      </condition>
      <action>
        <do_all>
          <find_gate name="X347 North" gate="north" typename="SS_WG_NORTH">
            <sector x="11" y="7"/>
          </find_gate>
          <find_gate name="SPG South" gate="south" typename="SS_WG_SOUTH">
            <sector x="11" y="6"/>
          </find_gate>
          <destroy_object object="X347 North" explosion="0"/>
          <destroy_object object="SPG South" explosion="0"/>
        </do_all>
      </action>
    </cue>


Back to top
View user's profile Send private message
memia





Joined: 28 Jul 2010
Posts: 48 on topic
Location: UK
Thank you for registering your game
PostPosted: Sat, 14. Aug 10, 11:09    Post subject: Reply with quote Print

dillpickle,
That worked like a charm - thank you!
I've replaced the gates with broken ones so it all looks authentic now.

Great stuff - thanks.
M


_________________
A security system is only as strong as its weakest link
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sun, 20. Aug 17, 00:21

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.19579 seconds, sql queries = 17