Full Version : #NOTILES bug
xmlspawner >>Troubleshooting >>#NOTILES bug


<< Prev | Next >>

Allmight- 08-20-2006
Found a bug with #NOTILES.

I was spawning the wilderness around Covetous mountains, and was using the notiles command to avoid spawning in the dirt areas of the mountains. Well, it works fine, no spawns on the dirt. BUT, i got spawn ontop of the mountains.

It's like i was using the "*" command to allow spawns on unpassable terrain.

Happens with all types of animals. Have seen snakes, hinds, brown bears and more spawn ontop of covetous mountains.

// Allmight


ArteGordon- 08-20-2006
it explicitly checks the impassable tiledata flag and prevents inclusion of those, so it shouldnt be picking any actual impassable tiles. It is possible that those are passable, but just inaccessible tiles.
If you can post a spawner that reproduces this I can take a look.

(edit)

nm, I think I may have found the bug.

posting a new xmlspawner2.cs in the v3.15 beta

The change is in the FindTileLocations method around line 9500

CODE

// non-excluded tiles must also be passable
                       if (excludetilelist != null && excludetilelist.Count > 0)
                       {
                           excludetile = excludetilelist.Contains(stile.ID & 0x3FFF) || (sflags & TileFlag.Impassable) != 0;
                       }
                       else
                       {
                           excludetile = false;
                       }

Allmight- 08-20-2006
Here you go.

CODE
<Spawns>
 <Points>
   <Name>TestSpawn</Name>
   <UniqueId>6066e64a-140d-46fa-b6b4-91df72064930</UniqueId>
   <Map>Trammel</Map>
   <X>2351</X>
   <Y>786</Y>
   <Width>30</Width>
   <Height>32</Height>
   <CentreX>2366</CentreX>
   <CentreY>802</CentreY>
   <CentreZ>-32768</CentreZ>
   <Range>20</Range>
   <MaxCount>10</MaxCount>
   <MinDelay>60</MinDelay>
   <MaxDelay>120</MaxDelay>
   <Team>0</Team>
   <IsGroup>False</IsGroup>
   <IsRunning>True</IsRunning>
   <IsHomeRangeRelative>True</IsHomeRangeRelative>
   <DelayInSec>True</DelayInSec>
   <Duration>0</Duration>
   <DespawnTime>0</DespawnTime>
   <ProximityRange>-1</ProximityRange>
   <ProximityTriggerSound>500</ProximityTriggerSound>
   <TriggerProbability>1</TriggerProbability>
   <InContainer>False</InContainer>
   <MinRefractory>0</MinRefractory>
   <MaxRefractory>0</MaxRefractory>
   <TODStart>0</TODStart>
   <TODEnd>0</TODEnd>
   <TODMode>0</TODMode>
   <KillReset>1</KillReset>
   <ExternalTriggering>False</ExternalTriggering>
   <SequentialSpawning>-1</SequentialSpawning>
   <AllowGhostTriggering>False</AllowGhostTriggering>
   <SpawnOnTrigger>False</SpawnOnTrigger>
   <SmartSpawning>False</SmartSpawning>
   <Amount>1</Amount>
   <Objects2>#NOTILES,113,124; Hind:MX=10:SB=0:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1</Objects2>
 </Points>
</Spawns>


Hope this helps.


Allmight- 08-20-2006
Hehe, that was fast work.... as usual.

Will try the new fix and see if that did the trick.


ArteGordon- 08-20-2006
sorry. Fix was incomplete. I fixed static test but forgot the check on land tiles. Updating again with the full fix.

ArteGordon- 08-20-2006
works now.

Allmight- 08-20-2006
Odd, i just tried, and they still spawn on the mountain, and some fall through

And i use the same spawner i posted above.

ArteGordon- 08-20-2006
get the version I just posted in the 3.15 beta. The fix I posted earlier is incomplete. It left out the land tile check.

CODE

// non-excluded tiles must also be passable
                   if (excludetilelist != null && excludetilelist.Count > 0)
                   {
                       // also require the tile to be passable
                       excludetile = ((lflags & TileFlag.Impassable) != 0) || excludetilelist.Contains(ltile.ID & 0x3FFF);
                   }
                   else
                   {
                       excludetile = false;
                   }

Allmight- 08-20-2006
Ok, seems i managed to download before you posted the update. Now it seems to work. They still spawn inside the mountain, but that is normal since there was a cave in there i forgot about, so ill just add that one to the notiles list.

Thanks for the fix.

ArteGordon- 08-20-2006
sorry. noticed another small bug. It was checking the landtile instead of itemtile data for statics when testing for impassability so it incorrectly allowed spawning on some impassable static tiles. The check has been fixed in the latest 3.15 beta.

Allmight- 08-21-2006
Ah, good work. Will download it then.