Revision Changes

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: Revision Changes

Postby wtfux on Wed May 14, 2008 8:42 pm

the code on google svn is the only one with Purples system? I just uploaded it to google. Dunno if someone copied it.

By the way. I think this could interest someone (thx again, Purple):
PurpleYouko wrote:there are 3 new tables

item_drops
this one lists all of the drops you will will get in the game from regular monsters. Ghosts are handled separately

the fields in the database
each entry in the database represents a specific item which can be dropped in several ways.

ref = primary key. auto increment numerical value that we don't use in the server at all. Useful to keep track of how many fields and stuff for database queries
id = item number of the item in this drop
type = the item type
min_level = used for "level drops". min_level and max_level form the bounds of a set of monsters which could potentially drop this item. Set min_level to 1 and max_level to 10 and this item will drop from ALL monsters that fall into that level range.
max_level = see min_level for explanation
prob = the probability of this item being selected. A random number from 1 to 1000 is generated and if that number is lower than the 'prob' value then the item is passed onto the next step of the selection process. more on that later.
a value of 1000 here is the equivalent of a 100% chance of the item being 'short listed'
map = this item will be dropped by ALL mobs in the specified map
mob = this item will be dropped by this specific mob
alt = this is a list of alternate items to which the basic drop can be converted. Example: the base item is soldier armor. The alt list will contain the 'id' of all possible versions of soldier armor such as Dark Soldier armor, Grand Soldier armor or whatever is available
description = a text value that you can put in to make it easier to see what you have in your drop. not used by the server.

list_config
This is simply a database version of your worldserver.conf file. It is far from complete as yet. i have been using it to hold new configurable values as i add them. Way easier than adding them to the messy conf text files. Also allows for potential permanent modification in game from GM commands

the values related to drops code are as follows
'bluechance' = the % chance of an item being selected from the 'alt' list rather than the base item. this could result in a player getting a basic 'Soldier Armor' converted to a 'Demon Soldier Armor' for example.
'slotchance' = the % chance of an item having a slot. Set to zero to make it impossible
'statchance' = the % chance of an item getting extra stats. It it gets them then it will be set to require appraisal
'refinechance' = the % chance of the item being refined already.

'rarerefine' refers to the probability of a successful refine of this item. If it is a rare item (blue or purple name) it will have it's basic refine chance increased by this amount

list_skillbooks
This is basically a drops list specifically for ghosts.
It was designed this way so that ghosts could be made to drop skillbooks and a few other items. Currently the list also contains some lower grade gems too. You can really add anything you like here and the ghosts will drop it

the fields are very similar to the main item_drops table.
'id' and 'itemtype' are the type and item number of the item
'name' is the name of the item (for reference)
'charlevel' is a reference to the level a char needs to be in order to use a skill. not used by the server.
'min' and 'max' are the level range of ghosts that can drop the item
'prob' is the probability value from 1 to 1000 (0.1% to 100%)

What happens in the drops code?
when a monster dies, the entire drops list is parsed for any item that could possibly be dropped by this monster.
Is the monster in the designated level range of the drop?
Does the current map match the 'map' value of the drop?
does the montype match the 'mob' value of the drop?

If any of these conditions are true (note they can all be true in some cases) then we figure out if the drop will be included in the 'short list' by making a random number (1 to 1000) and comparing it to the 'prob' value of the drop.
If it is lower then the drop is successful and is added to the 'short list'

What is the 'short list'
this is a dynamic array in which any item that passes any of the first set of tests, is placed

Once the entire drops list has been parsed and the 'short list' populated we need to choose an item from this list.
If the list is empty then nothing drops.
If the list contains at least one item then an item from the list is randomly selected (equal chance of any item in it) and this item is returned as the drop.

the specific chance of any monster dropping anything is controlled by it's 'item' and 'money' values in the CNPC structure
  1.  
  2.         newnpc->money = STB_NPC.rows[i][19];
  3.         newnpc->item = STB_NPC.rows[i][20];

these values were already there but never used. :)
This means that each monster has a different chance of generating an item or zuly drop so it really removes the 'droprate' function from the conf files entirely

I think that is about it. let me know if there are any parts you would like me to explain further.
Also feel free to post this message on the forums for general view if you think it would be helpful.
No.sig
wtfux
Pomic
Pomic
 
Posts: 130
Joined: Sun Apr 13, 2008 2:35 pm

Re: Revision Changes

Postby pepu on Wed May 14, 2008 8:44 pm

Drakia...in this rev i can´t find the "define" in sockets.h, did u upload IFO spawns ?
pepu
ospRose dev team
ospRose dev team
 
Posts: 283
Joined: Mon Feb 04, 2008 10:12 pm
Location: ESPAÑA(Aranjuez)

Re: Revision Changes

Postby Drakia on Wed May 14, 2008 8:54 pm

Yeah, for some reason that define got deleted, just re-add it. Right now I'm adding PY's drop system, the define will be back once I upload this.
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: Revision Changes

Postby wtfux on Wed May 14, 2008 8:55 pm

Y are u adding PY's drop system when there is already a rev with it?
No.sig
wtfux
Pomic
Pomic
 
Posts: 130
Joined: Sun Apr 13, 2008 2:35 pm

Re: Revision Changes

Postby Drakia on Wed May 14, 2008 8:56 pm

Because this is going up on the OpenSVN, not the Google SVN. Currently OpenSVN is the latest, and used by the devs.
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: Revision Changes

Postby pepu on Wed May 14, 2008 8:57 pm

Drakia wrote:Yeah, for some reason that define got deleted, just re-add it. Right now I'm adding PY's drop system, the define will be back once I upload this.

thanks ^^
pepu
ospRose dev team
ospRose dev team
 
Posts: 283
Joined: Mon Feb 04, 2008 10:12 pm
Location: ESPAÑA(Aranjuez)

Re: Revision Changes

Postby wtfux on Wed May 14, 2008 8:57 pm

I thought PY included all changes so far. (The latest @ google is by PY)
No.sig
wtfux
Pomic
Pomic
 
Posts: 130
Joined: Sun Apr 13, 2008 2:35 pm

Re: Revision Changes

Postby Drakia on Wed May 14, 2008 9:02 pm

[Rev 29] Added PY's drop system, merged SQL files.
Ok, OpenSVN is updated with PY's drop code. The devs haven't decided to switch over to the Google SVN yet, we're still using the OpenSVN one, it has all the current fixes applied to it.
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: Revision Changes

Postby Drakia on Wed May 14, 2008 9:06 pm

Pepu, why did you just delete the quest folder...?
[Rev 30] Fixing Worldserver/quest/
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: Revision Changes

Postby PurpleYouko on Wed May 14, 2008 9:13 pm

damn this is getting messy :(
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

PreviousNext

Return to Support - OspRose Emulator

Who is online

Users browsing this forum: No registered users and 6 guests