|
||
|
|
#1076 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
If you take a spawned world with the distro spawner and look at memory use and Save file size, and then spawn it in the same way with xmlspawners using resource-saving features like smartspawning, what you will find is that your overall memory use, save file size, and save times will all be significantly reduced. So individual elements may use more, but the system as a whole actually uses less.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#1077 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 808
|
As an xmlspawner user I can confirm everything Arte says. This spawner, on an individual basis, uses more memory and serializes more data then other spawners, but that's the price you pay for flexibility with a spawner that can do everything from simple spawning to advanced quests. However, when you turn on smartspawning and allowing smartoptimize to do it's thing within very little time your NPC mobile count (and items they wear) will be cut considerably. On my test shard it was cut by over 1/3rd and item count reduced by at least 75k items! Regardless of how much resources xmlspawner uses the tradeoff of saved resources with smartspawning will be far greater.
I wouldn't worry too much about serialization, it doesn't really add that much compared to a what a user can do with one castle and hording items! I've got a couple of projects that serialize around a few hundred bytes, but in the overall picture that's not really all that much.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx |
|
|
|
|
#1078 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
All tests were run on a fresh RunUO installation. All objects other than the spawners were deleted. To test them under actual spawning loads, I used Nerun's full world spawns of all facets. This gave an equivalent set of 8092 spawners and their spawns for each system. Test 1 - No Spawn condition The first test was for serialized saves and memory use with all spawners turned off and no active spawns (This gives the basic mem use and save size per spawner). Save size was taken as the size of the Item Save folder. Mem use was taken as the value reported in the [admin information panel. Mem values were always taken immediately after restarting the server. Save sizes (size of the Saves/Items folder) were as follows: No spawners: 0M Premiumspawner: 1.18M XmlSpawner: 3.80M Megaspawner: 3.32M Gigaspawner: 1.73M Total mem usage was as follows: No spawners: 24.7M Premiumspawner: 30.4M XmlSpawner: 39.6M Megaspawner: 72.0M Gigaspawner: 64.9M This gives the following load/spawner values in bytes Premiumspawner: 146 save, 741 mem XmlSpawner: 480 save, 1924 mem Megaspawner: 410 save, 5931 mem Gigaspawner: 213 save, 4968 mem Test 2 - Fully Spawned condition Under spawned conditions (all spawners activated and respawned), the following results were obtained (Because each system spawns slightly differently, the total number of items/mobiles varied as follows Premiumspawner: 27100 mobs, 75072 items XmlSpawner: 26250 mobs, 75275 items Megaspawner: 26467 mobs, 75530 items Gigaspawner: 26156 mobs, 75153 items - Ilshenar would not spawn so 2 existing Fel spawners were increased to bring mob/item numbers to comparable levels) Total save sizes (size of the Saves folder) were as follows: Premiumspawner: 18.6M XmlSpawner: 21.0M Megaspawner: 20.5M Gigaspawner: 19.0M Total mem usage was as follows: Premiumspawner: 103M XmlSpawner: 113M Megaspawner: 147M Gigaspawner: 140M Conclusion As you can see, xmlspawner does use more memory and has a larger save footprint than the trimmest distro equivalent (Nerun's), but the overall differences are not that great. For over 8000 spawners, the total difference in save file size is around 2.5M, and the mem difference is about 10M. In comparison to megaspawner and gigaspawner, it has a slightly larger save but requires significantly less mem. If you activate smartspawning you easily make up any differences. Just using the vanilla [optimalsmartspawning command that ends up selecting 44% of the spawners (3458) for smartspawning gives you these values save: 13.4M mem: 95.5M mobs: 14537 items: 45219 which is less than any other spawned configuration. (edit) updated with gigaspawner benchmark numbers (edit) formatted to make it easier to read
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#1079 (permalink) |
|
Forum Expert
|
Thanks for the exact numbers, Arte
![]() MegaSpawner seems to have a memory leak, that adds about 40mb to the memory just when you drop in the scripts (at least when i removed it from our shard we had just about that amount less memory usage) (and we did not even use any megaspawners) |
|
|
|
|
#1080 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#1081 (permalink) | |
|
Forum Expert
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,836
|
Quote:
A "memory leak" is some sort of recurring activity that causes increasing consumption of memory. The ultimate consequence of a "memory leak" on any system is that the running program eventually runs out of memory and crashes. C// |
|
|
|
|
|
#1084 (permalink) | |
|
Forum Expert
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,836
|
Quote:
C// |
|
|
|
|
|
#1085 (permalink) |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
please take off-topic discussion to a separate thread.
Thanks.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
#1086 (permalink) |
|
Lurker
Join Date: Nov 2003
Posts: 17
|
Hi Arte, some new requests for you
The CAST keyword: I think that now it takes the magery level of the trigmob and cast the spell with that skill value. Am I right? If this is true, do you think that is possible for you to modify this and add, for example something like: CAST,[skill],[spell] where the [skill] is the value that the spawner must use for his cast? And... ops, I forgot the other one I will edit later if i will remember the other modification ![]() |
|
|
|
|
#1087 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
When I was first implementing it I fiddled with ways to create a dummy mob that would do the actual casting and so would allow full specification of caster attributes, but that had its own problems. The other possibility would involve modifying the existing spell class to support independent specification of skill bonuses. Not a big deal, but it would involve adding some distro (not core) mods. (edit) oh, forgot to say that you are right about the spells using the magery lev of the trigmob with CAST
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum Last edited by ArteGordon; 12-05-2005 at 02:54 PM. |
|
|
|
|
|
#1088 (permalink) |
|
Newbie
Join Date: Aug 2004
Age: 26
Posts: 35
|
I'm very excited by XmlSpawner Quest features.
But I have some questions on it. Firstly, I don't understand, when XmlQuestPoints is attached to char. I think on first quest completion, but after some testing I find that it isn't sometimes true. For example, making some small autocompleted quest doesn't attach XmlQuestPoints. May be it should be done as XmlPoints (attached to all newly created chars)? Another question: can objective1-objective5 be converted to array/ArrayList (and all other connected attributes also)? I'm looking towards implementing this for my shard and wonder, why it hasn't already be done? And lastly, why XmlQuestPoints attachment doesn't save full info about quests (for example, about non-repeatable one or about times for next repeat). Thanks for this GREAT code. |
|
|
|
|
#1089 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
Code:
private void QuestCompletionAttachment()
{
bool complete = IsCompleted;
// is this quest repeatable
if((!Repeatable || NextRepeatable > TimeSpan.Zero) && complete)
{
// then add an attachment indicating that it has already been done
XmlAttach.AttachTo(Owner, new XmlQuestAttachment(this.Name, NextRepeatable.TotalMinutes));
}
// have quest points been enabled?
if(XmlQuest.QuestPointsEnabled && complete && !PlayerMade)
{
XmlQuestPoints.GiveQuestPoints(Owner, this);
}
}
I may very well consider expanding the system to arbitrary numbers of objectives, but I dont have any immediate plans for this. It is more of an interface constraint than a fundamental design constraint. Note that you can always make quests with arbitrary numbers of objectives by making use of the XmlQuestBook which can hold multiple individual QuestHolders. So that you can create extended quests that require completion of more than a single questholder by simply adding them to an XmlQuestBook (like a BOD book for quests). You are right that repeatability status of individual quests is not saved in the quest history. I may add that in the next update.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#1090 (permalink) |
|
Forum Novice
Join Date: Feb 2004
Posts: 113
|
Hi Arty, very silly nooby question but i have been away fomr RunUO a while.
I havnt seen anything on how to upgrade XMLSpawner. Do i need to update any of the distro file edits or just replace the xmlspawner in Custom folder with the new version? Sorry if it makes no sense, writing one handed here ![]() Thanks |
|
|
|
|
#1091 (permalink) | ||
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
There was an additional optional installation step added (step 12) that you might want to take a look at Quote:
If it has been over a year since you have upgraded (v2.72) you might want to check installation steps 10 and 11 which were added as well.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
||
|
|
|
|
#1093 (permalink) |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
the only thing that you might want to look out for would be any changes that you made to default settings in the xmlspawner scripts. Otherwise upgrading should always be as easy as just extracting the latest version over the existing installation.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
#1096 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#1097 (permalink) |
|
Lurker
Join Date: Nov 2005
Age: 22
Posts: 10
|
The problem is exacly that i've extracted them all (1/3,2/3,3/3,X-tras,support, made some changes according by instructions) in one Scripts\Custom\ folder. Unfortunately all secondary scripts cant see a main one... where is solution here?
|
|
|
|
|
#1098 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
(edit) and double check to make sure that the xmlspawner2.cs script was extracted. if the error is actually complaining about the Server.Engines.XmlSpawner2 namespace, then make sure that you have the XmlAttach.cs and XmlAttachment.cs scripts extracted.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum Last edited by ArteGordon; 12-15-2005 at 01:16 PM. |
|
|
|
|
|
#1099 (permalink) |
|
Lurker
Join Date: Nov 2005
Age: 22
Posts: 10
|
I've tried to reinstall pack, without x-tras and taking only Stealing.cs and Container.cs from support pack. Made required format change for this two original files, and recieve new errors:
http://maerun-world.pbnet.ru/Screen1.gif |
|
|
|
|
#1100 (permalink) | |
|
Forum Master
Join Date: Aug 2003
Posts: 5,688
|
Quote:
This means that the LOOTPACK keyword wont work for you, but everything else will be fine. Code:
/*
case itemKeyword.LOOTPACK:
{
// syntax is LOOTPACK,type
if(itemkeywordargs.Length == 2)
{
LootPack lootpack = null;
string loottype = itemkeywordargs[1];
if(loottype.ToLower() == "poor")
{
lootpack = LootPack.Poor;
}
else
if(loottype.ToLower() == "meager")
{
lootpack = LootPack.Meager;
}
else
if(loottype.ToLower() == "average")
{
lootpack = LootPack.Average;
}
else
if(loottype.ToLower() == "rich")
{
lootpack = LootPack.Rich;
}
else
if(loottype.ToLower() == "filthyrich")
{
lootpack = LootPack.FilthyRich;
}
else
if(loottype.ToLower() == "ultrarich")
{
lootpack = LootPack.UltraRich;
}
else
if(loottype.ToLower() == "superboss")
{
lootpack = LootPack.SuperBoss;
}
else
{
status_str = "Invalid LOOTPACK type: " + loottype;
return false;
}
int m_KillersLuck = 0;
if(trigmob != null)
{
m_KillersLuck = LootPack.GetLuckChance( trigmob );
}
Mobile mob = null;
if(o is Mobile)
{
mob = (Mobile)o;
}
bool converterror = false;
try
{
// generate the nospawn component of the lootpack
// the spawn component (basically gold) requires a mobile and wont work in containers
lootpack.Generate( mob, pack, false, m_KillersLuck );
// note, because Generate does a test for TryDropItem for stackables which requires a valid mob argument, any stackable generated in a container will fail
// it just happens that gold is a stackable and is added at spawn, so just test for a valid mobile and only do the atspawn generate for them.
if(m != null)
lootpack.Generate( mob, pack, true, m_KillersLuck );
}
catch {status_str = "Unable to add LOOTPACK"; converterror = true;}
if(converterror) return false;
}
else
{
status_str = "LOOTPACK takes 1 arg : " + itemtypestr;
return false;
}
break;
*/
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|