RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Xmlspawner2 v2.22

Status
Not open for further replies.

ArteGordon

Wanderer
I would say it has been about 50/50 in terms of addition of features, but I like the idea of providing an external trigger hook, both for trigger testing (one method), and trigger execution (another method). In the code it is already fairly clearly split along those two lines. Right now, the CheckTrigger method basically does what you outline for an XMLTrigger, and Spawn/OnTick carry out the XMLSpawner functions. I dont think I would split them into separate items, since it would be making it more inconvenient to do basic triggered spawning (requiring 2 items), but I certainly see the logic of your point.

Right now the gump system uses an external hook feature. You can give it the name of your own gump method on the spec line for triggering custom gumps. I like the idea of adding something similar for triggers, like a "UserTrigger" prop string in which you give it the name of your custom trigger method for custom trigger testing, and a "USERSET,methodname" keyword for custom trigger activation.

Excellent suggestions, I think I'll try them out right now :)
 

DeepFreez

Wanderer
ArteGordon said:
I dont think I would split them into separate items, since it would be making it more inconvenient to do basic triggered spawning (requiring 2 items), but I certainly see the logic of your point.
Thing is, if you look at how the spwaners are used. Most of the spawners are just simple things that replace monsters that were killed every now and then. All the rest of the functionality is completely unutilised.
Splitting the spawner and trigger into two items will only realy affect the cool trigger situations which will require some planning anyway. Making the trigger in this situation a seperate item might actually simplify the process and be more flexible.
Situations might arise where you create a spawner (with the current design) that doesnt actually spawn any things, thus wastig all the spawner functionality. Again here a split might be more useful.
 

ArteGordon

Wanderer
Actually, the spawners as now configured will work as trigger-only devices, since you dont have to actually spawn mobs or items to have them run, they can just trigger and SET/GIVE/TAKE etc. other mobs/items, and the fact that they have the potential to spawn items/mobs doesnt affect that at all.
I'm not as worried about the "wasted" resources that come from using the spawners without exercising all of the fancy triggering bells and whistles.
For instance, the difference between using a fully spawned world with xmlspawner2s vs a basic spawner like the original xmlspawner, or the distro spawners is on the order of around 500K-1meg in memory, total.
A quick test with one of my fully spawned test shards with around 4K spawners, 38K mobs, 180K items, gives a mem usage of 163.1M (internally reported) on startup with basic spawners, and 164.4M with xmlspawner2. Of course, that is a noisy measure, but is consistent with what you would expect just by calculating the difference in overhead from the scripts themselves. And since items/mobs themselves take up around 1K each, that difference would be eaten up by changing item counts on the order of a few hundred mobs/items which is down in the noise.
Additionally, since the xmlspawners can take on more mobs/spawner due to the way that they handle individual mob counts, the actual difference between an equivalently spawned world using xml and basic non-xmlspawners that may have more actual spawners to generate the same mob distribution, is further reduced, perhaps making them even lower than using standard spawners.
And the diff in cpu usage is basically nothing, since in basic spawning mode, they are virtually identical in what they are doing.

So my take on it would just be to use the single item in both capacities and not worry about it.
 

atriticuss

Wanderer
im still getting the errors arte, i deleted the zip file and redownloaded it and then unziped it to the custom script folder and made sure that i had the correct scripts, and i did but iot still gives me the error, im not sure why. i looked and i didnt find any other xmlspawners or anything either
 

ArteGordon

Wanderer
hmm. I'm thinking that it must be a file that was included in the 2.18 release that wasnt included in v2.19. Unfortunately, I dont have that zip to check on this (bad version control handling on my part). Maybe you could just look in the v2.18 zip if you have it and make sure that none of the files that were included in it are still in your custom script area.

also try doing a string search for QuestStatusGump on your files to see if it shows up anywhere else. It should only appear in QuestNote.cs and XmlQuestGump.cs
 

atriticuss

Wanderer
ok i think i found another problem, i tried making spawns inside containers
but when i make them movable to place them inside the containers, they become visable, and when i set visable to false they wont hide and are still visable, if i put them on the ground again they will becoem invisable but wont stay that way in any containers
 

locojj

Wanderer
NOOB

Ok, I feel like a noob asking this but after I download the file, LOL where do I put the scripts?

PLEASE LET ME KNOW

Thanks
 

ArteGordon

Wanderer
locojj, you can put them anywhere you want. Most people make a folder named Custom in their scripts directory where they place custom scripts. Since these dont modify or replace any other distribution files it doesnt matter where they go.

atriticuss, they are visible when you are a player? Note, as an admin even things with the visible flag off can be seen, but they are still invisible to players.
 

Kamron

Knight
I am also in favor of splitting the spawner up into multiple items becuase frankly it made my server go (2K spawners) from 80MB to 140MB and raised 5% CPU usage. With a future playerbase of over 100, that would translate from 150MB to 400MB and up to 30% more CPU usage. I have no use for about 75% of the functionality of the spawner, and there is no way to get rid of it short of removing it. Splitting it up may create more items, but it will also take away the overkill.
 

ArteGordon

Wanderer
yeah, that seems very high. It is possible if you have a lot of spawners with extensive spawn strings since the strings themselves are part of the resource load, but the actual usage should really only be about 1.3K per spawner (and any item, including any other type of spawner is probably around 1.1K).
Sounds like you might be comparing resource usage with and without spawners and their spawn, in which case those numbers would make sense.
If you arent using the triggering features, then there should be no impact on the CPU usage. Again, sounds more likely that you are comparing CPU usage with and without spawners and their spawn included.
Of course, you can correct me if I'm wrong since its just a guess, but otherwise I dont really understand your numbers.

(edit)
actually based on explicit testing I would revise those numbers downward to about 0.7K per spawner.
 

ArteGordon

Wanderer
In my testing, the differential resource usage for a spawner count like yours should be on the order of a few hundred K measured ingame, not 60M. That is, comparing the resource use of the current full-featured xmlspawner to an equivalent number of distro spawners.

From a clean install with no objects ([global delete), you have about 21M of resource usage. If you make 2000 xmlspawners (with no spawn), that goes up to 22.6M. If you make 2000 distro spawners it goes up to 22.5M.
If you repeat this you will get numbers that vary by a bit but are similar to these.

If I repeat this with each xmlspawner spawning one "orc", along with his spawn items, I go to 33.6M. That number includes the 2000 xmlspawners, 2000 mobs, and 9000 additional items.

If I repeat this using distro spawners I get 33.3M

and no difference in CPU usage (essentially zero) in any of those scenarios.
 
Status
Not open for further replies.
Top