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!

[RunUO 2.0 RC1] Bestiary Generator.

arul

Sorceror
[RunUO 2.0 RC1] Bestiary Generator.

RunUO Bestiary Generator
written by arul, latest update: 27.5.07

Summary:
System that generates comprehensive set of web pages containing every single piece of information about mobiles with all theirs stats, skills and properties. Integrated and a lilttle bit enhanced example of this system can be found here.

Installation:
Extract the archive's contents into your RunUO root directory.
You may also need to add Ultima.dll to your ./data/Assemblies.cfg file.
Once your server successfully start, check your /Bestiary/ directory for index.html

Configuration:
There's a data.xml file located in the ./Bestiary/ directory where you can find a list of all mobiles to be indexed. Feel free to add/remove entries to fit your needs.

Known problems:
The major problem is that this system is only able to index types which constructor actually sets mobile's properties. If the properties are set in the base/another constructor or method, then it will not be recognized and the entry will more than likely be blank.

Last updates:
(21.12.2008)
- The forum post has been updated with the latest release!

(22.1.2008)
- Ultima.dll updated (bin.PeekChar() problem)!

(28.5.2007)
- Alari's background pack and enhanced data.xml included. Thanks!

(27.5.2007)
- Dispatch method rewritten, now each method has it's own handler.
- Added attribute to support different backgrounds for each mobile, example:
<mobile type="Server.Mobiles.Wisp" name="wisp" background="wtf.jpg" />
( as you may have already guessed, the Wisp image will be generated with the "wtf.jpg" as background ).
- Added support for using custom creature images. Just drop your custom image named after the type of the mobile (i.e. Wisp.jpg) to the /Bestiary/fixes/ directory. Also make sure to allow the custom fixes usage in the data.xml file.
<mobiles useFixes="true">
(by default it's set to false)

(27.5.2007)
- Updated Ultima.dll, fixed the map-diffs bug (thanks Alari)
- Missing type will no longer throw an exception during the reading of XML data file. Instead a warning is displayed.

I'm opened to all bug reports and suggestions, this is likely to be my last contribution to the RunUO community due to the lack of free time, so I hope you all will enjoy it.


Download:

If the forum archive doesn't work, you may download the system from here.
 

Attachments

  • Bestiary-release.rar
    1.6 MB · Views: 408
does this auto make the ones not all ready in the xml file?
or do we have to make the xml file ourselves to include all of our custom monsters?

but it looks like an excelent idea :)
i will be trying it out

what you may want to do for the ones that are based off of a different critter - instead of it hjust making blank one or maybe only the changes - also have it say at the top: "Please see the base creature of "what ever" "
not sure how hard it would be to add that in - but would look better and give them a base idea of where to go on it ;)
 

arul

Sorceror
Lord_Greywolf;686018 said:
does this auto make the ones not all ready in the xml file?
or do we have to make the xml file ourselves to include all of our custom monsters?
Yes, you have to insert your custom monsters to the xml file yourself.

Lord_Greywolf;686018 said:
what you may want to do for the ones that are based off of a different critter - instead of it hjust making blank one or maybe only the changes - also have it say at the top: "Please see the base creature of "what ever" "
not sure how hard it would be to add that in - but would look better and give them a base idea of where to go on it ;)
I'm working on that. It's expected to be to some extent supported in the next release.
 

corbingene01

Wanderer
Wow you musta been like reading the mind of a few of my admin. they were just asking me something on the lines of this not 2 days ago.

all i gotta say is VERY nice!!

ran into a small problem, sure i missed something.

Code:
RunUO - [www.runuo.com] Version 2.0, Build 2698.38333
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Engines/Bestiary/MobileEntry.cs:
    CS0246: Line 14: The type or namespace name 'Ultima' could not be found (are
 you missing a using directive or an assembly reference?)
    CS0246: Line 35: The type or namespace name 'StringList' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 50: The type or namespace name 'Hue' could not be found (are yo
u missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

Alari

Wanderer
I'm getting an error with this. I have the Bestiary directory in RunUO's root directory, with the data.xml inside. I edited it to remove all the creatures I don't think I have, but that didn't seem to help (or I missed one..)
This is with the server in -debug mode:
Code:
Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Server.Bestiary.Bestiary.ReadXMLList() in e:\Games\RunUO\RunUO-2.0-SVN\Scripts\_Custom\Packages\Bestiary\Bestiary.cs:line 100
   at Server.Bestiary.Bestiary.Initialize() in e:\Games\RunUO\RunUO-2.0-SVN\Scripts\_Custom\Packages\Bestiary\Bestiary.cs:line 106
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Server.ScriptCompiler.Compile(Boolean debug, Boolean cache) in C:\Documents and Settings\BSKI\My Documents\Visual Studio 2005\Projects\RunUO\RunUO\Server\ScriptCompiler.cs:line 602
   at Server.Core.Main(String[] args) in C:\Documents and Settings\BSKI\My Documents\Visual Studio 2005\Projects\RunUO\RunUO\Server\Main.cs:line 420
This exception is fatal, press return to exit


Edit: Nevermind, problem seemed to be with my older version of Ultima.dll. Everything is working now.

Does your Ultima.dll have the fix for the 10-year-old typo in the map names?
 

wulf monat

Sorceror
No index.html file generated

seems it didnt make an index.html file like it says it should,
also how would players be able to view this ingame?
 

arul

Sorceror
corbingene01;686048 said:
ran into a small problem, sure i missed something.
Take a look at the installation step 2.

Alari;686094 said:
Does your Ultima.dll have the fix for the 10-year-old typo in the map names?
Now it does, thanks for pointing that out.

wulf monat;686158 said:
seems it didnt make an index.html file like it says it should,
also how would players be able to view this ingame?
Look into your ./RunUO/Bestiary/ directory for the index.html.
There's no way to view the bestiary ingame, the ingame browser is way too crippled to display tables and images.
 

wulf monat

Sorceror
the folder that was extracted says release for the first folder not Bestiary
and in my runuo directory it goes like:
C:\LinksLand\runuo2.0\release
then theres folders for Bestiary and scripts, with the files layer bottom, layer top, and watermark..... all in that release folder.

Edit: I just notcied when i extracted a different script it did same thing made a folder first called release, lol ill have it fixed now, wow that was lame!

Edit: What i meant by a way to view in game was;
Like is their a command for players to use or stone to dbl click to send them to the webpage?
 
there is a different script released called "web stone" or "vote stone" - they open up your browser to the page put in there - so easy to change to point to where you would have this one hosted at
 
i have tried installing this a couple of time now
got it to where there is no "skips" or other errors, until this one
it makes the pics with no problem

and then it errors out with this:
(all above this is standard loading stuff with the server - all good)

Code:
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.NullReferenceException: Object reference not
set to an instance of an object.
   at Server.Bestiary.MobileEntry..ctor(Type type)
   at Server.Bestiary.Bestiary.Generate()
   at Server.Bestiary.Bestiary.Initialize()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] argum
ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle
 typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume
nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn
er)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at Server.ScriptCompiler.Compile(Boolean debug, Boolean cache)
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

some help on what to do to fix orlook for would be appreceated

i am running svn 147
 

Alari

Wanderer
arul;686172 said:
Now it does, thanks for pointing that out.

Hawtness. ^.^ My bestiary works great. ( http://server.the-retelling.org:8080/bestiary ) though I was wrong about it being due to the Ultima.dll, it was the data.xml having typos or other problems. (I cleared it and started on a custom one almost immediately, not talking about yours.)

Something that would be relatively easy to add would be a setting to the XML file which would let you choose the terrain to display it in, to provide a bit of variety. (ex: <mobile type="Server.Mobiles.BlackBear" name="black bear" locale="forest" /> ) I'm going to take a shot at fiddling around with this, I'll send you anything I come up with. ^.^

Another neat change would be to have a custom pic for specific mobiles, maybe if there's a file named "mobile.jpg.useme" it would just copy that basic pic and apply the overlays to it, as I noticed some mobiles (about half of the 'lava' ones mainly) don't show up colored correctly, while some like horse show up as entirely the wrong mobile (comes up as an ettin, due to the way body is assigned in the script) - also ones based on the human body don't look correct either, and while it may be a ton of work to get the script to dress and arm them appropriately, it wouldn't hardly be any trouble at all to take an in-game pic of the ones that the script can't handle easily, and have Bestiary use that image instead.

I had a fair number of problems getting the xml list made, as any typo would make it bomb out with "cannot be null"... Ex: DeathWatchBeetle is how the file is named, but the mobile is DeathwatchBeetle. (I started my XML file over from scratch because of the difficulty I was having, and it was still an 'OMG' lot of work) Better error handling would be great. =)


If this seems like a lot of whining and bitching, it's not, please don't take this the wrong way. =) I love this script.

And for anyone who is having trouble getting this to start, if you're getting a 'value can't be null' error, try the attached data.xml. (For RunUO 2.0 SVN)
 

Attachments

  • data.zip
    4 KB · Views: 118

Alari

Wanderer
Lord_Greywolf;686211 said:
(all above this is standard loading stuff with the server - all good)
some help on what to do to fix orlook for would be appreceated

i am running svn 147

I remember seeing an error like that while adding mobiles to my data.xml... Make sure the following are NOT in your data.xml (comment them out or delete them) or use my data.xml from the post above.

Revenant (not constructable)
VorpalBunny (timer may cause problems)
Ronin (doesn't seem to work)
 
those three are probaly there, i will try removing them

as for the debug - it never gets the chance to crash - that is on start up with that report, and in debug mode

but i will try doing it with out those 3 in there and see what happens ;)
 

Alari

Wanderer
arul;686225 said:
Great ideas, Alari. Check the first post please.

Wow, you are really fast. :confused:; Thank you again!

Another idea is a 'description' tag, for a text description to include on the critter's page.


Lord_Greywolf: Try arul's update. =)


Edit: How did you manage to get background shots at 428x311 without getting yourself in them? :confused:;
 

Alari

Wanderer
I'm getting a weird glitch with all my custom backgrounds. There's sort of a 'tear' in the upper right. The source type of the background doesn't seem to matter. (jpg or png at least) That white scratch you can see easily in this one isn't in any of the original backgrounds.
 

Attachments

  • PoisonElemental.jpg
    PoisonElemental.jpg
    18.8 KB · Views: 258
Top