Storm's Unique Object Generator

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Re: Storm's Unique Object Generator

Postby Leodagan » Sat Aug 24, 2013 8:56 am

Here is fixed Object File

A lot of Constructors flavor ;)

just use :
Code: Select all
GeneratedUniqueItem = new GeneratedUniqueItem(bool toa, eRealm realm, byte level, eObjectType type, eInventorySlot slot, eDamageType dmg);
You can put any number of these parameters (well every constructor is hard written I don't know how to write variable params procedures...)
Attachments
GeneratedUniqueItem.cs
(119.74 KiB) Downloaded 52 times
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Storm's Unique Object Generator

Postby Leodagan » Sat Aug 24, 2013 9:39 am

And Here is my basic loot generator based on Storm one

It tries to use the same rules (Toa chance in Toa, more loot chance on Named mobs, quality based on Con)

You can play with const to change loot chance...

Just add this class to your lootgenerator table and it should drop ;)

I will test it in the afternoon on my server, but it run without errors on my test DOL... (at least with /genunique command)

If you find bugs feel free to report them ;)
Attachments
UniqueItemLootGenerator.cs
(6.27 KiB) Downloaded 47 times
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Storm's Unique Object Generator

Postby Graveen » Sun Aug 25, 2013 7:43 am

/bow
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Storm's Unique Object Generator

Postby Leodagan » Sun Aug 25, 2013 7:53 am

By the way.

Loot Generator and Generated Object are tested for about 10 hours now, the Loot Generator is someway conservative on loot rate (it should be around 10%~25% depending on CON, but looks like it's a bit less... it may be a constraint with other loot table and max loot item, or just Util.Chance() not really good in Randomization...)

Generated Object are generated just once now, so there is no chance to Randomize a first item with Mid Realm and Mid + SKill, then Randomize it to Hib and keep some of Mid skills (could happen if first Random roll generated 4 or 5 skills, and the second roll only generated 2 or 3 skill and did not overwrite the first roll bonus slots 4 or 5)
If you need to throw a new Random roll, just create a new object ! (they aren't added to database on creation so you can roll any number you want !)

I don't know if it'll get "SVN"-ized, but if you want to put it in a branch or in GameServerScripts, I could maintain code with patch file...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Storm's Unique Object Generator

Postby Leodagan » Fri Aug 30, 2013 12:03 pm

I'm want to add this to SVN, any constraints to authoring ? (this is mostly not my work at all ...)

I'll add them to GS as this is livelike functionality ?
new LootGenerator class in gameutils ?
new UniqueItem class in gameobjects ? (even if it's a sublass of a dataobject, it doesn't have his own table... nor allowAdd by default...)
new CommandHandler to their own command handler class ?
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Storm's Unique Object Generator

Postby Graveen » Fri Aug 30, 2013 2:38 pm

I have to read your post to understand the differences with the actual one :p

I think the const trick is not tptally suitable in the core, this is generally ruled by serverproperties (general constants) or serverrules (server type specific).
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Storm's Unique Object Generator

Postby Leodagan » Fri Aug 30, 2013 2:52 pm

it's definitetly params that could go in serverproperties, but I didn't work on this part, so I don't know what is the state of the art around these records...

Most of class I'm writing have this kind of const, it's easy to update them to serverproperties as it's class member, I hoped the community could improve that later ;)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest