XxSP1DERxX said:
I am just asking if you coded it so that it imported the XML as objects or what not, and then uses that.
It loads the XML files as the system is initialized. It then starts a timer. This timer periodically looks out to your XML file and sees if you changed it. If you did, it reloads the XML file. This is so you don't have to "bounce" (i.e., reboot) your shard in order to change the system. This is
supposed to be safe. Any errors in the XML file should be caught, worst case meaning random encounters stop happening until you fix the problem.
Internally the system creates templates from the xml, which are then "picked" when an encounter occurs by a sort of factory method that binds the range and probability to an actual description of an encounter. I.e., if you said "1:3", it picks 1,2, or 3. If you said ".25", it draws a random number to see if you get that.
Once the template is expanded, it tries to push the mobiles and items into the world.
In order to accomplish this, it uses a spiral search pattern around the player.
It searches
inwards from the described range in order to place top level mobiles and items. I did it this way because of dungeon passages. The tightness of a corridor means their could be more, not less, unplaceable terrain the further you go out.
Once a top level mobile is placed, sub mobiles are placed nearby (searching
outwards).
Sub items are always placed
in their parent item.
Items can be sub items of either mobiles or items.
Hope this helps.
C//
p.s., if you want to have a little fun, go into the SpawnFinder code, and turn on the bit of code that animates the search cursor. I needed this at first to make sure the searcher is working. It's fun to watch.