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 » Wed Aug 28, 2013 12:26 pm

Hi guys, im having problems trying to add a new sector like Metzelmax did in their mod. I dont have any idea what im doing wrong ->

Code: Select all

<sectorType name="CIVILIAN">
   <sector>CIVILIAN_SECTOR</sector>
   <sector>ENGI_SECTOR</sector>
   <sector>ENGI_HOME</sector>
   <sector>ZOLTAN_SECTOR</sector>
   <sector>ZOLTAN_HOME</sector>

   <sector>OM_SECTOR</sector>
</sectorType>


<!-- --------------------
STRUCTURE SECTORS
 ----------------------->

<!--default to prevent crashes if bad sector names are loaded-->
<sectorDescription name="STANDARD_SPACE" minSector="0" unique="false">
   <nameList>
      <name>Federation Space</name>
   </nameList>
   <trackList>
      <track>civilian</track>
      <track>cosmos</track>
      <track>milkyway</track>
   </trackList>
   <startEvent>START_BEACON</startEvent>
   <event name="STORE" min="2" max="3"/>
   <event name="ITEMS" min="1" max="2"/>
   <event name="NEUTRAL2" min="2" max="3"/>
   <event name="NOTHING" min="0" max="0"/>
   <event name="DISTRESS_BEACON" min="1" max="2"/>
   <event name="HOSTILE2" min="3" max="4"/>
   <event name="NEBULA" min="0" max="2"/>
   <event name="QUESTS" min="1" max="1"/>
   <event name="HOSTILE1" min="2" max="2"/>
   <event name="HOSTILE_BOARDING" min="0" max="0"/>
</sectorDescription>


<sectorDescription name="FINAL" minSector="7" unique="true">
   <nameList>
      <name>The Last Stand</name>
   </nameList>
   <trackList>
      <track>laststand</track>
   </trackList>
   <startEvent>BOSS_NEUTRAL</startEvent>
   <event name="STORE" min="1" max="1"/>
   <event name="BOSS_REPAIR_STATION" min="3" max="3"/>
   <event name="BOSS_HOSTILE" min="6" max="6"/>
   <event name="BOSS_NEUTRAL" min="7" max="10"/>
   <event name="OMICRON" min="1" max="2"/>
   <event name="OMICRON2" min="0" max="1"/>
   <event name="OMICRON3" min="0" max="1"/>
   <event name="OMICRON4" min="0" max="2"/>
</sectorDescription>

<sectorDescription name="OM_SECTOR" minSector="2" unique="false">
   <nameList>
      <name>Omicron Populated Sector</name>
   </nameList>
   <trackList>
      <track>rock</track>
      <track>wasteland</track>
   </trackList>
   <rarityList>
      <blueprint name="engi" rarity="3"/>
      <blueprint name="mantis" rarity="1"/>
      <blueprint name="energy" rarity="2"/>
      <blueprint name="slug" rarity="0"/>
      <blueprint name="rock" rarity="4"/>
      <blueprint name="human" rarity="1"/>
   </rarityList>
   <startEvent>START_BEACON_OMICRON</startEvent>
   <event name="STORE" min="3" max="4"/>
   <event name="ITEMS" min="1" max="3"/>
   <event name="NEUTRAL_CIVILIAN" min="2" max="4"/>
   <event name="DISTRESS_BEACON_CIVILIAN" min="0" max="2"/>
   <event name="NEBULA" min="1" max="2"/>
   <event name="QUESTS_CIVILIAN" min="1" max="2"/>
   <event name="OMICRON" min="2" max="4"/>
   <event name="OMICRON2" min="0" max="3"/>
   <event name="OMICRON3" min="1" max="1"/>
   <event name="OMICRON4" min="3" max="4"/>
   <event name="OMICRON5" min="1" max="3"/>
   <event name="OMICRON6" min="1" max="3"/>
</sectorDescription>


Any ideas??? i tried A LOT of times and i never get to see the omicron sector. Is there anything else we need to do for this to work??
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Adding new sectors

Postby kartoFlane » Wed Aug 28, 2013 1:47 pm

Most likely, you were just unlucky.
Try this

Code: Select all

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

and see if you're still not encountering your new sector.
Superluminal2 - a ship editor for FTL
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Adding new sectors

Postby Sleeper Service » Wed Aug 28, 2013 2:28 pm

I had similar problems when working on the New Enemy Classes mod. FTL always appeared to be favouring its vanilla enemies over the custom made ones. A got around this in the end by making copies of all vanilla enemy blueprints and giving them new IDs. After replacing the vanilla ships in the lists with the "modded" copies, probabilities seemed to normalized. KartoFlane fixed the same problem by simply adding his ships another time to the list.

You could try this with sectors as well, in case you generally feel that your sector never shows up. Did you ever encounter it? Putting only on sector in the list does verify that it can show up, it does not guaranty that it shows up with normal probability in mixed vanilla lists though. At last from my experience. Could still just be bad luck of course. Some lists (weapons, drones) seem to work perfectly fine.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Wed Aug 28, 2013 3:11 pm

That worked.. still, it cost me 4 tries until i could get the first custom sector appear..

I supossed there is no way to raise the rarity of sectors??
My currently mods / wips ->
ImageImage
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Adding new sectors

Postby Sleeper Service » Wed Aug 28, 2013 4:16 pm

As mentioned, you could try to add the sector multiple times to the list. That should make it appear more often.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Wed Aug 28, 2013 11:51 pm

Sleeper Service wrote:As mentioned, you could try to add the sector multiple times to the list. That should make it appear more often.


Oh well, didnt think in that.. lol. :lol: , thanks for the tip.
My currently mods / wips ->
ImageImage
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Wed Aug 28, 2013 11:58 pm

I am experimenting crashes, everytime i click in the map beacon once i go into a custom sector. The custom sector loads, but it looks like there is a problem with the events since i cant get the beacon map to show up (crashes everytime).

Ani ideas? i used the same events from the events.xml.append file, and thats the place where they should be, i am right?? do i need to place events for a custom sector somewhere else?? as i read in the previous posts, i shouldnt..
My currently mods / wips ->
ImageImage
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Adding new sectors

Postby Sleeper Service » Mon Sep 02, 2013 10:10 am

The events should definitely be placed in existing .append files. Custom stuff like events_yourSector.xml.append does not seem to work. Here is my experience from debugging Sector Extension:

Crashes on sector load or jump button point out that there is something wrong in the event lists the sector uses. I recommend to check each of these lists, even the vanilla ones (if you use them). Check each of your sector custom IDs for consistency, or use kartoFlanes error checker first.

I got the sneaking suspicion that some stuff going on in vanilla lists does not work when they are used in a custom sector description. Make sure all the events in the lists do exist. I think I once saw that vanilla lists sometimes contain some cut events, (_GHOST?) They seems to be purged in vanilla somehow, but the lists cause crashes in custom sector descriptions.

I started to use as little as vanilla lists as possible to have full control about what is in the lists. If you use vanilla lists you might want to make copies with new ID's of these for your sector and purge anything from them that seems unusual. There was one pirate list that contained another event list as an event (DISTRESS_BEACON?). Another thing that seems to work in vanilla, but again this might be a crash cause in custom sector descriptions.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Adding new sectors

Postby speedoflight » Tue Sep 03, 2013 11:26 am

Thanks for the tips, Sleeper Service, actually the crashes are random, i mean, just yesterday i got into a custom sector and it didnt crash when i used the map beacon. But i almost didnt change anything since the last crash. So, i dont think i will able ever to find the cause of those crashes, i already used the error checker and it didnt find anything wrong, no information messages, no error messages, nothing at all. All the events exists, in fact as i said, they are the very same events i used in the other sectors (the vanilla ones).

So, at this point, i just dont have any choice but to see if the crashes are continuos or just rare. I just hope it is not the first.
My currently mods / wips ->
ImageImage
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Adding new sectors

Postby Sleeper Service » Tue Sep 03, 2013 12:23 pm

If the crashes are rare then the problem might exist in a single event, causing crashes only if this event is drawn out of the event pool on sector creation. If the error checker does not detect the problem then it will indeed be hard to find out which event it is.

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.