Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 11-23-2005, 09:57 AM   #1076 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Sotho Tal Ker
I heard the spawners usw very much memory and serialization data - is this true? And do you have any plans on optimizing this? (if it is true)
Well, it is true that the individual spawners do use more memory than simpler spawners like the distro spawner since there are more properties available for configuration and those use memory, but the real question is whether the system as a whole uses more resources.

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
ArteGordon is offline  
Old 11-23-2005, 10:52 AM   #1077 (permalink)
CEO
Forum Novice
 
CEO's Avatar
 
Join Date: Jun 2004
Age: 49
Posts: 808
Default

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
CEO is offline  
Old 11-23-2005, 02:50 PM   #1078 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Sotho Tal Ker
I heard the spawners usw very much memory and serialization data - is this true? And do you have any plans on optimizing this? (if it is true)
Here are some hard numbers for you. I just ran these benchmarks with the most recent versions of 4 systems, Nerun's premium spawner 4.0.9 (the closest to distro), XmlSpawner 3.04, Megaspawner 3.68, Gigaspawner 1.4.4

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
ArteGordon is offline  
Old 11-23-2005, 05:38 PM   #1079 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 28
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

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)
Sotho Tal Ker is offline  
Old 11-23-2005, 07:51 PM   #1080 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Sotho Tal Ker
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)
I'll update that post with gigaspawner numbers as well once the benchmark finishes.
__________________
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
ArteGordon is offline  
Old 11-23-2005, 08:17 PM   #1081 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,836
Default

Quote:
MegaSpawner seems to have a memory leak, that adds about 40mb to the memory just when you drop in the scripts...
I now what you meant, Sotho, but to be clear:

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//
Courageous is offline  
Old 11-23-2005, 10:31 PM   #1082 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 28
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

It just uses more than it should.
Sotho Tal Ker is offline  
Old 11-29-2005, 04:16 AM   #1083 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 24
Posts: 4,688
Default

A memory leak doesn't always cause it to crash. Like sotho said, it just causes an indesired increase. And this usually cannot be decreased, because its unknown to the program.
XxSP1DERxX is offline  
Old 11-30-2005, 06:27 AM   #1084 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,836
Default

Quote:
Originally Posted by XxSP1DERxX
A memory leak doesn't always cause it to crash. Like sotho said, it just causes an indesired increase. And this usually cannot be decreased, because its unknown to the program.
No, generally a memory leak will cause a server to crash. It would have to mean that the server is allocating memory it's not ever giving up, which would mean that every time some function is called the memory footprint would go up. I suppose you could have one of those hot swap enterprise class machines where you can add physical memory on the fly, but for the rest of us mere mortals, "memory leak" means "crash"... eventually.

C//
Courageous is offline  
Old 11-30-2005, 08:23 AM   #1085 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

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
ArteGordon is offline  
Old 12-05-2005, 06:49 AM   #1086 (permalink)
Lurker
 
Join Date: Nov 2003
Posts: 17
Default

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
Vento Divino is offline  
Old 12-05-2005, 08:27 AM   #1087 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Vento Divino
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
I can look into this, but changing spell behavior is a little tricky since it just calls the existing spell casting methods, and those methods generally make the caster checks for skill levels themselves.
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.
ArteGordon is offline  
Old 12-07-2005, 01:54 PM   #1088 (permalink)
Newbie
 
Join Date: Aug 2004
Age: 26
Posts: 35
Default

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.
seirge is offline  
Old 12-07-2005, 02:15 PM   #1089 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by seirge
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.
There is a small bug in the quest points system that will be fixed in the next release in which repeatable quests dont give points (and wont add the questpoints attachment if one is not present) so that is what you are probably seeing. If you would like to make the change yourself it is a simple fix. In xmlquestholder.cs change the QuestCompletionAttachment method to look like this

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);
			}
		}
The actual reason that the objectives and other related properties are explicitly named instead of being put into arrays is simply so that they can be viewed and modified as regular properties, e.g. via the props gump.

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
ArteGordon is offline  
Old 12-12-2005, 05:33 AM   #1090 (permalink)
Forum Novice
 
Join Date: Feb 2004
Posts: 113
Default

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
LFFPicard is offline  
Old 12-12-2005, 06:18 AM   #1091 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by LFFPicard
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
just replace the xmlspawner scripts in your custom folder. You do not need to update any distro file edits.

There was an additional optional installation step added (step 12) that you might want to take a look at

Quote:
- added a new Installation step 12 that just provides a suggested addition to basecreature.cs to enhance the use of smartspawning by preventing Paragon and rummaging mobs from being smartspawned.
but, it is completely optional.

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
ArteGordon is offline  
Old 12-12-2005, 06:48 AM   #1092 (permalink)
Forum Novice
 
Join Date: Feb 2004
Posts: 113
Default

Thanks Arty your allways quick with support witch is very appreciated.
i will look into this later when my wrist dont hurt so much (I hate football)
LFFPicard is offline  
Old 12-12-2005, 08:33 AM   #1093 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

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
ArteGordon is offline  
Old 12-12-2005, 10:25 AM   #1094 (permalink)
Forum Novice
 
Join Date: Feb 2004
Posts: 113
Default

i never made any changes i kinda stopped with ym server after installing all the base scripts
Apart from adding a few doors to buildings
Thanks Again Arty
now to install the Spawn Editor of yours
LFFPicard is offline  
Old 12-15-2005, 03:56 AM   #1095 (permalink)
Lurker
 
Join Date: Nov 2005
Age: 22
Posts: 10
Default

--The type or namespace name 'XmlSpawner' could not be found--
Same thing with every included script file...
Garumond is offline  
Old 12-15-2005, 07:11 AM   #1096 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Garumond
--The type or namespace name 'XmlSpawner' could not be found--
Same thing with every included script file...
make sure that you have extracted all of the files from all of the required packages. You just missed a .zip
__________________
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
ArteGordon is offline  
Old 12-15-2005, 01:11 PM   #1097 (permalink)
Lurker
 
Join Date: Nov 2005
Age: 22
Posts: 10
Default

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?
Garumond is offline  
Old 12-15-2005, 01:13 PM   #1098 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Garumond
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?
could you post the exact error messages that you get. Just cut and paste them from the console window.

(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.
ArteGordon is offline  
Old 12-17-2005, 04:24 AM   #1099 (permalink)
Lurker
 
Join Date: Nov 2005
Age: 22
Posts: 10
Default

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
Garumond is offline  
Old 12-17-2005, 06:40 AM   #1100 (permalink)
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Garumond
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
These errors are the result of using the Russian edition of RunUO. They have apparently changed some of the standard distribution methods relating to lootpacks. I dont have their system installed so I dont know how to fix this, but one way to get this to compile is to just comment out the code for the LOOTPACK keyword in basexmlspawner.cs
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
ArteGordon is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5