Adding new sectors

Discuss and distribute tools and methods for modding. Moderator - Grognak
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Tue Sep 03, 2013 11:51 pm

Sleeper Service wrote:Do you use randomized text lists for the start event? You might know this but texts longer than 512 chars can cause crashes as well.


Well, i didnt know that. :) Anyways, i dont think i have a text box with so many chars, but i will look into it just in case.
My currently mods / wips ->
ImageImage
User avatar
Metzelmax
Posts: 363
Joined: Wed Sep 26, 2012 7:59 am
Location: Uz'ran Home Dimension

Re: Adding new sectors

Postby Metzelmax » Sun Sep 08, 2013 6:42 am

Does anyone know how many events there can be in one sector, because that maybe causing it, if there added to many events.

Code: Select all

<event name="NEBULA_EMPTY" min="100" max="100"/>

crashes the game, there as 20 seems fine. I dont want to go through all numbers. Anyone knows the limit?
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Adding new sectors

Postby Sleeper Service » Sun Sep 08, 2013 8:10 am

I tried to stay close to the numbers Vanilla sectors use. You could try model the event numbers after an existing sector for now.
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Adding new sectors

Postby 5thHorseman » Sun Sep 08, 2013 9:02 am

You don't have to go through all the numbers. Do a binary search.

20 works, 100 doesn't.
Try 60. If it fails, try 40. If it fails, try 30. Then 25, then 22, etc. That's if they fail. If say 30 works, then you'd try 35 becasue you know 30 works but 40 fails. Etc.

8 tries will tell you which of the 80 possible numbers will work. If 40's okay and you're happy with that, you can stop right there.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
Metzelmax
Posts: 363
Joined: Wed Sep 26, 2012 7:59 am
Location: Uz'ran Home Dimension

Re: Adding new sectors

Postby Metzelmax » Mon Sep 09, 2013 10:02 am

Yeah, I Know how binary search works. I'm just lazy.
Just tested it again and apparently it doesnt matter if you have to many events. I set on event to 50 but only gained 25 beacons in game.

So that's probably not what's causing it to crash.
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Mon Sep 09, 2013 10:14 pm

The only thing i know for sure, there is a limit of how many beacon events can be added in the beacon map, and that limit i dont think will be greater than 25 - 30 beacon events per sector. So if you use 10 events of a kind, you will have about 25 left to distribute your events.. but this doesnt mean the game will crash, just the game will ignore a number greater than that limit...
My currently mods / wips ->
ImageImage
XiaoXiaoMan
Posts: 14
Joined: Mon Sep 02, 2013 12:42 am

Re: Adding new sectors

Postby XiaoXiaoMan » Fri Sep 13, 2013 2:29 am

I'm glad I found this thread, because I'm having my own problems trying to play a custom sector. Like the OP, the game crashes as soon as I jump to the sector without even waiting until I've reached the other side. Ship vanishes... and crash. All files are APPEND files, but I can't seem to figure out what I'm doing wrong. Assistance, por favor?

The events.xml.append is modded from the events_engi XML.

autoBlueprints.xml.append

Code: Select all

<blueprintList name="SHIPS_LEGION">
   <name>XIAO_FAT</name>
   <name>XIAO_MANTIS_SCOUT</name>
   <name>XIAO_MANTIS_FIGHTER</name>
   <name>XIAO_ROCK_FIGHTER</name>
   <name>XIAO_ROCK_ROCK</name>
</blueprintList>

<shipBlueprint name="XIAO_ELITE" layout="rebel_long" img="xiao_elite">
   <class>Legion Fighter</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <oxygen power="1" max="2" room="0" start="true"/>
      <teleporter power="1" max="3" room="1" start="false"/>
      <shields power="4" max="8" room="2" start="true"/>
      <engines power="3" max="5" room="3" start="true"/>
      <medbay power="1" max="3" room="4" start="true">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <pilot power="1" max="3" room="5" start="true"/>
      <weapons power="4" max="10" room="6" start="true"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="10" load="WEAPONS_REBEL"/>
   <health amount="14"/>
   <maxPower amount="13"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="1" max="1" class="rock"/>
   <crewCount amount="0" max="1" class="slug"/>
   <crewCount amount="2" max="2" class="mantis"/>
   <crewCount amount="1" max="1" class="energy"/>
   <crewCount amount="1" max="2" class="human"/>
   <boardingAI>sabotage</boardingAI>
</shipBlueprint>

<shipBlueprint name="XIAO_MANTIS_FIGHTER" layout="mantis_fighter" img="xiaomantis_fighter">
   <class>Mantis Fighter</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <medbay power="1" max="3" room="0" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <teleporter power="1" max="3" room="1" start="true"/>
      <engines power="1" max="5" room="2" start="true"/>
      <weapons power="2" max="8" room="3" start="true"/>
      <doors power="1" max="3" room="4" start="false"/>
      <shields power="2" max="8" room="6" start="true"/>
      <pilot power="1" max="3" room="7" start="true"/>
      <oxygen power="1" max="3" room="9" start="true"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="10" load="WEAPONS_MANTIS"/>
   <health amount="9"/>
   <maxPower amount="11"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="0" max="1" class="rock"/>
   <crewCount amount="2" max="3" class="mantis"/>
   <crewCount amount="0" max="1" class="energy"/>
   <crewCount amount="1" max="2" class="human"/>
   <boardingAI>sabotage</boardingAI>
</shipBlueprint>

<shipBlueprint name="XIAO_MANTIS_SCOUT" layout="mantis_scout" img="xiaomantis_scout">
   <class>Mantis Scout</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <oxygen power="1" max="3" room="0" start="true"/>
      <doors power="1" max="3" room="1" start="false"/>
      <pilot power="1" max="3" room="2" start="true"/>
      <teleporter power="1" max="3" room="3" start="false"/>
      <engines power="1" max="5" room="4" start="true"/>
      <medbay power="1" max="3" room="5" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <weapons power="2" max="8" room="6" start="true"/>
      <shields power="2" max="8" room="7" start="true"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="6" load="WEAPONS_MANTIS"/>
   <health amount="7"/>
   <maxPower amount="10"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="0" max="2" class="rock"/>
   <crewCount amount="2" max="4" class="mantis"/>
   <crewCount amount="0" max="2" class="human"/>
   <boardingAI>sabotage</boardingAI>
</shipBlueprint>

<shipBlueprint name="XIAO_FAT" layout="rebel_squat" img="xiao_squat">
   <class>Rebel Rigger</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <doors power="1" max="3" room="0" start="false"/>
      <shields power="2" max="8" room="1" start="true"/>
      <medbay power="1" max="3" room="2" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <engines power="2" max="4" room="3" start="true"/>
      <drones power="2" max="8" room="4" start="true"/>
      <pilot power="1" max="2" room="5" start="true"/>
      <weapons power="1" max="6" room="6" start="true"/>
      <oxygen power="1" max="2" room="7" start="true"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>3</droneSlots>
   <weaponList missiles="10" load="WEAPONS_REBEL"/>
   <droneList drones="4" load="DRONES_STANDARD"/>
   <health amount="9"/>
   <maxPower amount="8"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="0" max="1" class="rock"/>
   <crewCount amount="1" max="2" class="mantis"/>
   <crewCount amount="0" max="2" class="energy"/>
   <crewCount amount="2" max="3" class="human"/>
</shipBlueprint>

<shipBlueprint name="XIAO_ROCK_FIGHT" layout="rock_fight" img="xiaorock_fight">
   <class>Rock Fighter</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <shields power="2" max="8" room="0" start="true"/>
      <medbay power="1" max="3" room="1" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <doors power="1" max="3" room="2" start="false"/>
      <pilot power="1" max="3" room="4" start="true"/>
      <engines power="2" max="5" room="6" start="true"/>
      <oxygen power="1" max="3" room="7" start="true"/>
      <weapons power="2" max="8" room="8" start="true"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="10" load="WEAPONS_ROCK"/>
   <health amount="10"/>
   <maxPower amount="7"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="1" max="3" class="rock"/>
   <crewCount amount="1" max="2" class="mantis"/>
   <crewCount amount="0" max="1" class="energy"/>
   <crewCount amount="1" max="2" class="human"/>
   <aug name="ROCK_ARMOR"/>
</shipBlueprint>

<shipBlueprint name="XIAO_ROCK_SCOUT" layout="rock_scout" img="xiaorock_scout">
   <class>Rock Scout</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <shields power="2" max="8" room="0" start="true"/>
      <medbay power="1" max="3" room="1" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
      <weapons power="2" max="8" room="2" start="true"/>
      <pilot power="1" max="3" room="3" start="true"/>
      <engines power="1" max="5" room="4" start="true"/>
      <oxygen power="1" max="3" room="5" start="true"/>
      <doors power="1" max="3" room="6" start="false"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="6" load="WEAPONS_ROCK"/>
   <health amount="8"/>
   <maxPower amount="10"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="1" max="3" class="rock"/>
   <crewCount amount="1" max="1" class="mantis"/>
   <crewCount amount="0" max="1" class="human"/>
   <aug name="ROCK_ARMOR"/>
</shipBlueprint>

<shipBlueprint name="XIAO_PHALANX" layout="mantis_bomber" img="xiao_phalanx">
   <class>Mantis Bomber</class>
   <minSector>1</minSector>
   <maxSector>8</maxSector>
   <systemList>
      <pilot power="1" max="3" room="1" start="true"/>
      <engines power="1" max="5" room="2" start="true"/>
      <shields power="2" max="10" room="5" start="true"/>
      <oxygen power="1" max="3" room="6" start="true"/>
      <weapons power="2" max="10" room="7" start="true"/>
      <teleporter power="1" max="3" room="8" start="true"/>
      <doors power="1" max="3" room="10" start="false"/>
      <medbay power="1" max="3" room="11" start="false">
         <slot>
            <number>-2</number>
         </slot>
      </medbay>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>0</droneSlots>
   <weaponList missiles="14" load="WEAPONS_MANTIS"/>
   <health amount="11"/>
   <maxPower amount="11"/>
   <crewCount amount="1" max="1" class="engi"/>
   <crewCount amount="1" max="2" class="rock"/>
   <crewCount amount="2" max="4" class="mantis"/>
   <crewCount amount="0" max="1" class="energy"/>
   <crewCount amount="1" max="2" class="human"/>
   <boardingAI>sabotage</boardingAI>
</shipBlueprint>


events.xml.append

Code: Select all

<!--------------------------------
   XIAO EVENTLIST     ''   " " "
---------------------------------->



<eventList name="ITEMS_XIAO">
   <event load="XIAO_GIFT"/>
   <event load="XIAO_FLEET_DELAY"/>
<!--   <event load="XIAO_MONSTER"/> -->
   
   <event load="FIND_DRONE"/>
   <event load="FIND_WEAPON"/>
   <event load="REFUEL_STATION"/>
</eventList>

<eventList name="HOSTILE_XIAO">
   <event load="XIAO_REBEL_FIGHT"/>
   <event load="XIAO_PIRATE_FIGHT"/>
   
   <event load="PIRATE"/>
   <event load="PIRATE_CHOICE"/>
   <!--<event load="REBEL"/>
   <event load="SQUAT_WARNING"/> -->
   <event load="PIRATE_ASTEROID"/>
   <event load="PIRATE_SUN"/>
   <event load="PIRATE_NO_ESCAPE"/>
</eventList>

<eventList name="NEUTRAL_XIAO">
   <!--<event load="XIAO_UNLOCK_1"/> -->
   <event load="XIAO_STATION_DISTRESS"/>
   <event load="MANTIS_FIGHT_CHOICE"/>
   <event load="MANTIS_CIVILIAN"/>
   
   <event load="PIRATE_BRIBER"/>
   <event load="ASTEROID_EXPLORE"/>
   <event load="BROKEN_REBEL_DRONE"/>
   <event load="AUTO_DEFENSE_ITEM"/>
   
   <event load="ALISON_MANTIS_CREW"/> <!-- new alison written event -->
   
</eventList>

<eventList name="DISTRESS_BEACON_XIAO">
   <event load="XIAO_STATION_DISTRESS"/>
   <event load="DISTRESS_XIAO_REBEL"/>
   <event load="DISTRESS_XIAO_PIRATE"/>
   
   <event load="CIVILIAN_ASTEROIDS_BEACON"/> 
   <event load="FRIENDLY_BEACON"/>
   <event load="TRAP_BEACON"/>
   <event load="DISTRESS_TRAPPED_MINER"/>
   <event load="DISTRESS_INFESTATION"/>
   <event load="DISTRESS_SATELLITE_DEFENSE"/>
</eventList>

<!--
<eventList name="QUESTS_XIAO">
   <event load="QUEST_ESCORT"/>
   <event load="MERCHANT_REQUEST"/>
   <event load="FEDERATION_PLANET_SIGNAL"/>
   <event load="MERCENARY_WORK_START"/>
</eventList>
-->





<!-----------
      STRUCTURE!!!
   Others events necessary for strucrtural stuff
------------>

<event name="START_BEACON_XIAO">
   <text load="START_BEACON_XIAO"/>
</event>
<textList name="START_BEACON_XIAO">
   <text>You arrive in a sector controlled by the so-called "Legion." They're said to be a group of mercenaries of all races dedicated to fighting the Rebels. You hope they'll hear you out.</text>
   <text>The Legion may be a ragtag bunch of mercenaries, but they're a formidable force nonetheless. Maybe they'll aid your cause if they find out you oppose the Rebels.</text>
</textList>

<event name="STORE_XIAO">
   <text load="STORE_XIAO"/>
   <store/>
</event>
<textList name="STORE_XIAO">
   <text>A Legionnaire has set up a shop here. Pleased by your quest to stop the Rebels, he gladly shows you his wares.</text>
   <text>You arrive at a Legion trading post. You doubt they'll have a problem trading with you. After all, you're not a Rebel.</text>
   <text>A Mantis greets you as you pull your ship into the trading post. "We... 'relieved' the Rebels of some of this gear. I'm sure you could put it to better use."</text>
</textList>

<event name="NOTHING_XIAO">
   <text load="NOTHING_XIAO"/>
</event>
<textList name="NOTHING_XIAO">
   <text>The debris floating around this beacon suggests a great battle unfolded here some time ago. A quick scan of the area reveals nothing of interest.</text>
   <text>You're fairly certain the Rebels once controlled this sector, judging by the swarms of destroyed Rebel ships. The Legion had long since cleared the sector and claimed it as their own.</text>
   <text>The Legion consists of alien races of all kinds, yet you're amazed to see all of them living together in relative harmony. Their common interest in bringing the Rebels to their knees is the very thing that binds them together.</text>
   <text>Hatred for the Rebels has never been more evident than it is here. A number of derelict ships drift around the vicinity with anti-Rebel messages scribbled on their hulls. One such message you notice reads, "REBEL SCUM."</text>
   <text>If there was anything of interest at this beacon, the Legion must have cleared it out. There's always no telling what they're up to.</text>
   <text>You're surprised by how peaceful this system is. You frown when you realize the Legion won't be happy once the Rebels show up.</text>
   <text>This beacon is surrounded with propaganda boasting of the Legion's leader, XiaoXiaoMan. If the messages are to be believed, a fight against him would be a most unpleasant experience. You'll believe it when you see it.</text>
   <text>Two heavily armed vessels, one Legion and one Rebel, are doing battle with one another in this sector. You attempt to pull the ship in closer, but the Legion ship hails you and demands you to stay out of their fight.</text>
   <text>A group of Legion ships pass by after you jump to this beacon, presumably patrolling for Rebels. At this rate, they won't be far behind.</text>
   <text>Legionnaires are always looking for trouble, it seems; you watch as two ships assault a defenseless Rebel transport and secure the cache before quickly jumping away. Upon closer inspection, you discover they already took everything of value.</text>
</textList>








<!-----------
      ITEMS!!!
   Events that give items
------------>

<event name="XIAO_GIFT">
   <text load="XIAO_GIFT"/>
   <autoReward level="RANDOM">standard</autoReward>
</event>
<textList name="XIAO_GIFT">
   <text>You're about to open fire on a Rebel ship when you realize it's manned by Legionnaires who had commandeered it. "We heard you were coming this way. Take this; you need it more than us."</text>
   <text>A Mantis ship manned by a Mantis and Zoltan can be seen preparing to battle the Rebels. They offer you some spare supplies before they leave.</text>
   <text>You arrive just in time to witness a Legion-controlled Rebel Fighter surprise a Rebel Cruiser by blasting it to bits while they weren't paying attention. You grab what you can before you leave.</text>
   <text>You pull in a package and find a note left with it: "Legion Care Package. What's ours is yours. Use it well" Looks like they won't mind if you take it.</text>
</textList>

<event name="XIAO_FLEET_DELAY" unique="true">
   <text>A group of Legionnaires are setting up a trap nearby for the Rebel fleet. "Greetings! Can you spare some missiles? We're leaving a nice little surprise for the Rebels and need a few more explosives to get the job done."</text>
   <choice>
      <text>Give them missiles.</text>
      <event>
         <text>They rig the trap and set a distress signal. "Thanks! They'll never know what hit 'em." They jump away, leaving the trap for the unsuspecting Rebels to find. That should keep the fleet busy for a while.</text>
         <item_modify>
            <item type="missiles" min="-2" max="-2"/>
         </item_modify>
         <modifyPursuit amount="-2"/>
      </event>
   </choice>
   <choice hidden="true">
      <text>Apologize and leave.</text>
      <event>
         <text>"We understand. We'll do what we can anyway. Stay safe."</text>
      </event>
   </choice>
</event>






<!-----------
      HOSTILE!!!
   Events that call up a fight for sure
------------>

<event name="XIAO_LEGION_FIGHT">
   <text load="XIAO_FIGHT_TEXT"/>
   <ship load="XIAO_FIGHT" hostile="true"/>
</event>
<textList name="XIAO_FIGHT_TEXT">
   <text>A ship bearing Legion colors hails you as you reach the beacon. They warn you not to cause the Legion any trouble. Before you can explain yourself, they raise their shields and charge their weapons.</text>
   <text>A Legionnaire vessel is patrolling at this beacon. Apparently they weren't informed of your arrival, for they power up their weapons as soon as they see you!</text>
   <text>The Legion's territory is considerably fortified; the Legionnaire stationed here doesn't stop to question whether you're a threat, and opens fire on you immediately.</text>
   <text>It's impressive to see aliens that normally don't get along putting all their differences aside and fighting together. You just wish they didn't think you're a threat. You have no choice but to retaliate.</text>
</textList>

<event name="XIAO_REBEL_FIGHT">
   <text>You're surprised to see a Rebel fighter managed to slip through the Legion's defenses. Perhaps it's time to do the Legion a favor.</text>
   <ship load="REBEL" hostile="true"/>
</event>

<event name="XIAO_PIRATE_FIGHT">
   <text>Even Legion space is prone to pirates, it seems. You doubt they'll mind if you take matters into your own hands.</text>
   <ship load="PIRATE" hostile="true"/>
</event>




<!-----------
      NEUTRAL!!!
   Events that could have a fight
------------>

<event name="LEGION_CHALLENGE" unique="false">
   <text load="LEGION_CHALLENGE_TEXT"/>
   <ship load="LEGION_CHALLENGER" hostile="false"/>
   <choice>
      <text>Fight the Legionnaire.</text>
      <event>
         <ship hostile="true"/>
         <text>You power up your weapons and prepare to show the Legionnaire what your ship can do.</text>
      </event>
   </choice>
   <choice>
      <text>Ignore him.</text>
      <event>
         <text>"Leave it to the Federation to recruit a coward like you." The Legion ship cuts communication before you can explain.</text>
      </event>
   </choice>
</event>
<textList name="LEGION_CHALLENGE_TEXT">
   <text>The Legion-owned craft at this beacon seems to have been waiting for you, and they hail you seconds after you arrive. "So, you're the one who'll save everyone from the Rebels? Prove it: fight us."</text>
   <text>You are hailed by the Legionnaire vessel as soon as you arrive at the beacon. "Hah! You expect to stop the Rebels with THAT? We're having a hard time believing that. Show us what you can do!"</text>
   <text>One of XiaoXiaoMan's Legionnaires awaits you at the beacon. "I heard you were coming this way. Let's see what you expect to do with that scrap heap."</text>
</textList>
<ship name="LEGION_CHALLENGER" auto_blueprint="SHIPS_LEGION">
   <surrender  chance="1" min="2" max="4" >
      <text load="LEGION_CHALLENGE_SURRENDER"/>
      <choice>
         <text>Accept their offer.</text>
         <event>
            <ship hostile="false"/>
            <autoReward level="HIGH">stuff</autoReward>
         </event>
      </choice>
      <choice>
         <text>Finish them off.</text>
         <event>
            <text>"You son of a-!" you cut communications and continue the attack.</text>
         </event>
      </choice>
   </surrender>
   <destroyed>
      <text>You quickly salvage what you can and leave before another Legionnaire shows up. They won't take kindly to you killing their own.</text>
      <autoReward level="LOW">standard</autoReward>
   </destroyed>
   <deadCrew>
      <text>With the crew dead, you take what you can and hope the other Legionnaires don't find out what happened here.</text>
      <autoReward level="MED">standard</autoReward>
   </deadCrew>
</ship>

<textList name="LEGION_CHALLENGE_SURRENDER">
   <text>"Okay, okay, calm down! You made your point, we underestimated you. Here, you can have this."</text>
   <text>"Your ship is more powerful than it looks! The Rebels made a mistake to pursue you. Take this; we don't need it anyway."</text>
   <text>"Alright already, we get it! You beat us! Take this and let us leave with our lives."</text>
</textList>

<event name="LEGION_SIM" unique="true">
   <text>An Engi stationed nearby opens communications with you. "Simulation system: standing by. Select opponent to commence." Apparently there's a combat simulator here. While the enemies aren't real, the damage they can do to your ship will be. The Engi awaits your selection.</text>
   <choice hidden="true">
      <text>Rebel.</text>
      <event>
         <text>"Simulation system: engaged. Now loading: Rebel Combat Simulator."</text>
         <ship load="LEGION_SIM_REBEL" hostile="true"/>
      </event>
      <text>Mantis.</text>
      <event>
         <text>"Simulation system: engaged. Now loading: Mantis Combat Simulator."</text>
         <ship load="LEGION_SIM_MANTIS" hostile="true"/>
      </event>
   </choice>
   <choice hidden="true">
      <text>Slug.</text>
      <event>
         <text>"Simulation system: engaged. Now loading: Slug Combat Simulator."</text>
         <ship load="LEGION_SIM_SLUG" hostile="true"/>
      </event>
   </choice>
   <choice hidden="true">
      <text>Rockmen.</text>
      <event>
         <text>"Simulation system: engaged. Now loading: Rockman Combat Simulator."</text>
         <ship load="LEGION_SIM_ROCK" hostile="true"/>
      </event>
   </choice>
   <choice hidden="true">
      <text>Ignore the station.</text>
   </choice>
   <!--
   <choice hidden="true">
      <text>Crystalline Beings</text>
      <event>
         <text>The Zoltan is quiet for a moment, and then whispers, "Are you sure? Well, so be it then." A huge wormhole opens, and from within it looms a Crystalline ship, prepared for war.</text>
         <ship load= ?!?!
               JUSTIN DO THIS STILL!!!!!!! JUSTIN - TO DO
      </event>
   </choice> --->
</event>

<ship name="LEGION_SIM_REBEL" auto_blueprint="REBEL_SKINNY">
   <destroyed>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="HIGH">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </deadCrew>
</ship>

<ship name="LEGION_SIM_MANTIS" auto_blueprint="MANTIS_FIGHTER">
   <destroyed>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="HIGH">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </deadCrew>
</ship>

<ship name="LEGION_SIM_SLUG" auto_blueprint="JELLY_CROISSANT">
   <destroyed>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="HIGH">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </deadCrew>
</ship>

<ship name="LEGION_SIM_ROCK" auto_blueprint="ROCK_FIGHT">
   <destroyed>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>Even though this was a simulation, you're amazed to see the remains are real! You gather what you can and exit the simulation.</text>
      <autoReward level="HIGH">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="LEGION_SIM_SUCCESS"/>
      </choice>
   </deadCrew>
</ship>


<event name="LEGION_SIM_SUCCESS">
   <text>"Simulation system: terminated. User performance: exceptional. Repairing hull and resupplying."</text>
   <item_modify>
      <item type="missiles" min="4" max="4"/>
      <item type="fuel" min="2" max="2"/>
      <item type="drones" min="3" max="3"/>
   </item_modify>
   <damage amount="-10"/>
</event>

<!--<eventList name="SAVE_XIAO_STATION">
   <event>
      <text>The Engi station is stripped bare and there are signs of a fierce battle.  The Mantis must have left the distress call active to lure other ships into a trap.</text>
   </event>
   <event>
      <text>The station was in the process of being evacuated.  A number of civilian Engies offer their gratitude as they finalize their preparations to leave.  They offer some fuel as a reward.</text>
      <autoReward level="MED">fuel_only</autoReward>
   </event>
   <event>
      <text>The station hails you, "Gratitude.  Expected probability of defeat without assistance... 86.2 percent.  Request suitable reward."</text>
      <choice hidden="true">
         <text>Request fuel.</text>
         <event>
            <text>"Request granted.  Fuel transferring."</text>
            <autoReward level="HIGH">fuel</autoReward>
         </event>
      </choice>
      <choice hidden="true">
         <text>Request weapon.</text>
         <event>
            <text>"Request granted.  Weapon transferring."</text>
            <autoReward level="LOW">weapon</autoReward>
         </event>
      </choice>
      <choice hidden="true">
         <text>Request drone.</text>
         <event>
            <text>"Request granted.  Drone schematic transferring."</text>
            <autoReward level="LOW">drone</autoReward>
         </event>
      </choice>
      <choice req="engi" hidden="true">
         <text>(Engi Crew) Threat unresolved.  Current mission imperative: Protocol 52.34.</text>
         <event>
            <text>They respond, "Understood.  Re-establishment of Federation highest import.  Transmitting hidden base coordinates.  Repairing hull and attaching ship to ship ordnance."</text>
            <autoReward level="LOW">weapon</autoReward>
            <quest event="HIDDEN_FEDERATION_BASE_LIST"/>
            <damage amount="-10"/>
         </event>
      </choice>
   </event>
   <event>
      <text>They thank you for the assistance and when you tell them of your mission, one of the Engies ask if he can assist your crew.  You welcome him aboard.</text>
      <crewMember amount="1" class="engi"/>
      <autoReward level="LOW">standard</autoReward>
   </event>
</eventList> -->



<!-----------
      DISTRESS!!!
   Events that havea distress beacon 
------------>

<event name="XIAO_STATION_DISTRESS" unique="false">
   <text>An Engi ship nearby hails you: "This thing's not built for combat! Get 'em off us!"</text>
   <distressBeacon/>
   <choice>
      <text>Respond to the call and move in to assist.</text>
      <event load="XIAO_STATION_DISTRESS_LIST"/>
   </choice>
   <choice>
      <text>Keep your distance.</text>
      <event/>
   </choice>
</event>

<eventList name="XIAO_STATION_DISTRESS_LIST">
   <event>
      <text>You receive another message from the ship, this time with a Mantis at the com-log.  "Foolish meatsacks," he yells.  Sensors indicate the ship is moving in to attack and boarders teleport from the station.</text>
      <ship load="ENGI_MANTIS_CONTROLLED" hostile="true"/>
      <boarders min="1" max="2" class="mantis"/>
   </event>
   <event>
      <text>You approach to find a Mantis ship assaulting a small Engi space station.  You prepare for a fight!</text>
      <ship load="MANTIS_ENGI_STATION" hostile="true"/>
   </event>
</eventList>

<event name="DISTRESS_XIAO_PIRATE" unique="true">
   <text>The distress signal originates from a heavily damaged Legionnaire ship under attack by pirates. They hail you immediately: "We can't last much longer! Help!" Before you can stop to consider, the pirate ship shifts its attention to you!</text>
   <distressBeacon/>
   <ship load="DISTRESS_XIAO_PIRATE" hostile="true"/>
</event>

<eventList name="DISTRESS_XIAO_PIRATE_RESULT">

   <event name="DISTRESS_XIAO_PIRATE_RESULT1">
      <text>"Thanks for your help; we thought we were goners for sure. Take this as thanks."</text>
      <autoReward level="MED">stuff</autoReward>
   </event>
   <event name="DISTRESS_XIAO_REBEL_RESULT2">
      <text>The Legionnaire ship wisely escaped while you kept the Rebels busy.</text>
   </event>

</eventList>

<event name="DISTRESS_XIAO_REBEL" unique="true">
   <text>Legion ships in this area are battling a group of Rebels. "All ships, we are engaging Rebels, requesting backup! Repeat, we are engaging the Rebels! We need all the backup we can get!" You jump in to assist them.</text>
   <distressBeacon/>
   <ship load="DISTRESS_XIAO_REBEL" hostile="true"/>
</event>

<event name="DISTRESS_XIAO_REBEL_RESULT">
   <text>The Legionnaires are grateful for your assistance. They offer all the supplies they can spare before they leave.</text>
   <autoReward level="MED">stuff</autoReward>
</event>


<!-----------
      SPECIAL!!!
   Unique events
------------>

<event name="XIAO_BOSS_FIGHT" unique="true">
   <text>You arrive at the beacon and are greeted by what appears to be a blue Rebel fighter. At the helm is none other than the leader of the Legion, XiaoXiaoMan. He hails you as soon as you arrive: "So you're the one they sent to save the Federation?"</text>
   <ship load="XIAO_BOSS" hostile="false"/>
   <choice hidden="true">
      <text>"We are."</text>
      <event>
         <text>"Then I have a proposition for you. If you can prove your worth against me, I will offer you supplies to help you on your journey. Maybe I'll even patch up your hull after I've finished giving your ship a beating if I'm feeling generous. What will it be?"</text>
         <choice hidden="true">
            <text>Accept.</text>
            <event>
               <text>That's quite a lot of talk from a mercenary like him. You power up the weapons.</text>
               <ship hostile="true"/>
            </event>
         </choice>
         <choice>
            <text>Decline.</text>
            <event load="XIAO_BOSS_CANCEL"/>
         </choice>
      </event>
   </choice>
   <choice>
      <text>Leave.</text>
      <event load="XIAO_BOSS_CANCEL"/>
      </event>
   </choice>
</event>
<event name="XIAO_BOSS_CANCEL">
   <text>"Have it your way." He cuts the transmission. You expect him to attack, but his weapons remain offline, allowing you to charge your FTL without incident.</text>
</event>
<ship name="XIAO_BOSS" auto_blueprint="XIAO_ELITE">
   <surrender  chance="1" min="2" max="4" >
      <text>XiaoXiaoMan hails you: "Cease fire! You are indeed a formidable opponent. Perhaps there's still hope for the Federation. You have defeated me. Allow my crew to patch up your hull and give you supplies."</text>
      <choice>
         <text>Accept the gift and leave.</text>
         <event>
            <ship hostile="false"/>
            <damage amount="-10"/>
            <autoReward level="HIGH">standard</autoReward>
         </event>
      </choice>
   </surrender>
   <destroyed>
      <text>Well, you obviously cheated. Nothing for you. Begone.</text>
   </destroyed>
   <deadCrew>
      <text>There are no more life signs detected on the ship. However, you notice a shuttle flying away from the now-derelict ship. XiaoXiaoMan must have escaped somehow amidst the chaos. He disappears before you have time to track him. Perhaps now would be a good time to leave...</text>
      <autoReward level="MED">standard</autoReward>
   </deadCrew>
</ship>

<event name="XIAO_PHALANX_FIGHT" unique="true">
   <text>An impressive Mantis ship awaits at this beacon, captained by XiaoXiaoMan's Mantis lieutenant, Phalanx. His weapons and shields come online as soon as he spots you and refuses all hails.</text>
   <ship load="XIAO_PHALANX" hostile="true"/>
</event>

<ship name="XIAO_PHALANX" auto_blueprint="LEGION_PHALANX">
   <surrender  chance="1" min="2" max="4" >
      <text>You're taken by surprise when Phalanx hails you. "Well fought. Your resolve to save the Federation is admirable. Allow us to patch up your hull and give you some supplies."</text>
      <choice>
         <text>Accept.</text>
         <event>
            <ship hostile="false"/>
            <damage amount="-10"/>
            <autoReward level="HIGH">standard</autoReward>
            <event>
               <text>"Maybe the Federation has a chance after all. Best of luck, friend." Before you jump, one of Phalanx's crew beams on board your ship and offers his services.</text>
               <crewMember amount="1" class="mantis"/>
            </event>
         </event>
      </choice>
   </surrender>
   <destroyed>
      <text>Well, you obviously cheated. Nothing for you. Begone.</text>
   </destroyed>
   <deadCrew>
      <text>No more life signs detected. Phalanx appears to have escaped amidst the action so he could live to fight another day.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Leave.</text>
      </choice>
      <choice hidden="true" req="teleporter">
         <text>(Crew Teleporter) Teleport over and check for survivors.</text>
         <event>
         <text>You discover a sole survivor, remarkably with only a few cuts and bruises. He shrugs it off and offers to join your cause. "Phalanx won't mind," he tells you. "He was pleased with the fight you put up."</text>
               <crewMember amount="1" class="mantis"/>
         </event>
      </choice>
   </deadCrew>
</ship>


events_ships.xml.append

Code: Select all

<!--------------------------------

   LEGION SHIPS
   
---------------------------------->

<ship name="XIAO_FIGHT" auto_blueprint="SHIPS_LEGION">
   <surrender  chance="0.5" min="3" max="4" load="PIRATE_SURRENDER"/>
   <escape  chance="0.5" min="2" max="4" load="PIRATE_ESCAPE"/>
   <gotaway>
      <text>The Legionnaire jumped away.</text>
   </gotaway>
   <destroyed>
      <text>The ship has been destroyed. You have a feeling XiaoXiaoMan won't be happy about this.</text>
      <autoReward level="MED">standard</autoReward>
   </destroyed>
   <deadCrew>
      <text>XiaoXiaoMan will probably be upset when he finds out some of his men have been killed.</text>
      <autoReward level="HIGH">standard</autoReward>
   </deadCrew>
</ship>

<ship name="DISTRESS_XIAO_PIRATE" auto_blueprint="SHIPS_PIRATE">
   <destroyed>
      <text>With the pirate ship destroyed, you gather what you can and contact the Legionnaire ship.</text>
      <autoReward level="LOW">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="DISTRESS_XIAO_PIRATE_RESULT"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>With the pirate ship cleared out, you gather what you can and contact the Legionnaire ship.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="DISTRESS_XIAO_PIRATE_RESULT"/>
      </choice>
   </deadCrew>
</ship>

<ship name="DISTRESS_XIAO_REBEL" auto_blueprint="SHIPS_REBEL">
   <destroyed>
      <text>You gather what you can from the remains of the ship and attempt to contact the Legion ships.</text>
      <autoReward level="LOW">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="DISTRESS_XIAO_REBEL_RESULT"/>
      </choice>
   </destroyed>
   <deadCrew>
      <text>No more life signs detected on the ship. You attempt to hail the Legion ships.</text>
      <autoReward level="MED">standard</autoReward>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="DISTRESS_XIAO_REBEL_RESULT"/>
      </choice>
   </deadCrew>
</ship>


sector_data.xml.append

Code: Select all

<sectorType name="CIVILIAN">
   <sector>LEGION_SECTOR</sector>
   <sector>LEGION_SECTOR</sector>
   <sector>LEGION_SECTOR</sector>
   <sector>LEGION_SECTOR</sector>
</sectorType>

<sectorDescription name="LEGION_SECTOR" minSector="0" unique="false"> 
   <nameList>
      <name>Legion Controlled Sector</name>
   </nameList>
   <trackList>
      <track>engi</track>
      <track>cosmos</track>
      <track>milkyway</track>
   </trackList>
   <rarityList>
      <blueprint name="engi" rarity="1"/>
      <blueprint name="mantis" rarity="1"/>
      <blueprint name="energy" rarity="3"/>
      <blueprint name="slug" rarity="3"/>
      <blueprint name="rock" rarity="2"/>
      <blueprint name="human" rarity="1"/>
   </rarityList>
   <startEvent>START_BEACON_XIAO</startEvent>
   <event name="STORE_XIAO" min="2" max="3"/>
   <event name="NOTHING_XIAO" min="1" max="2"/>
   <event name="ITEMS_XIAO" min="3" max="3"/>
   <event name="DISTRESS_BEACON_XIAO" min="1" max="3"/>
   <!--<event name="QUESTS_XIAO" min="1" max="1"/>-->
   <event name="NEUTRAL_XIAO" min="5" max="7"/>
   <event name="HOSTILE_XIAO" min="5" max="7"/>
</sectorDescrption>
Last edited by XiaoXiaoMan on Fri Sep 13, 2013 7:45 pm, edited 1 time in total.
User avatar
kartoFlane
Posts: 1480
Joined: Mon Jan 14, 2013 10:20 pm

Re: Adding new sectors

Postby kartoFlane » Fri Sep 13, 2013 12:52 pm

blueprints.xml.append

Just a misspelling, I hope? I don't know how smart FTL is about parsing XML files, but it'd be better to put events in events.xml, just to be sure.

Code: Select all

<event name="START_BEACON_XIAO">
   <text load="START_BEACON_XIAO"/>
</event>
<textList name="START_BEACON_XIAO">

Very bad naming habit. Always use unique namespaces, lest FTL (and anyone reading the files) will get confused, and won't know which thing to load. Adding a _TEXT suffix to textLists is a good, clear alternative.
Superluminal2 - a ship editor for FTL
XiaoXiaoMan
Posts: 14
Joined: Mon Sep 02, 2013 12:42 am

Re: Adding new sectors

Postby XiaoXiaoMan » Fri Sep 13, 2013 7:49 pm

kartoFlane wrote:
blueprints.xml.append

Just a misspelling, I hope? I don't know how smart FTL is about parsing XML files, but it'd be better to put events in events.xml, just to be sure.


Typo on my part. I fixed it on my post. It's an append for events.xml, not blueprints.xml.

Code: Select all

<event name="START_BEACON_XIAO">
   <text load="START_BEACON_XIAO"/>
</event>
<textList name="START_BEACON_XIAO">

Very bad naming habit. Always use unique namespaces, lest FTL (and anyone reading the files) will get confused, and won't know which thing to load. Adding a _TEXT suffix to textLists is a good, clear alternative.

I could've sworn I saw the vanilla files using the same technique I used. Still, it makes sense. I'll give it a try and report back.
XiaoXiaoMan
Posts: 14
Joined: Mon Sep 02, 2013 12:42 am

Re: Adding new sectors

Postby XiaoXiaoMan » Fri Sep 13, 2013 9:31 pm

Nope, it still didn't work. What am I doing wrong?

I just looked at the crashlogs, and most if not all appear to be the same:

Code: Select all

Version =  1.03.3

Stack Trace:

1 - 0x0047b515
2 - 0x005a0ef8
3 - 0x0069415b
4 - 0x004010fd
5 - 0x77bb9f72 RtlInitializeExceptionChain
6 - 0x77bb9f45 RtlInitializeExceptionChain

Who is online

Users browsing this forum: No registered users and 27 guests