Zone Bonuses

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Zone Bonuses

Postby stephenxpimentel » Tue Dec 15, 2009 6:17 pm

my newest project is Zone Bonuses, i'm wondering if they should be based on Region though, instead of map tile.

Heres the research i've done on it so far.

http://camelotherald.com/section.php?id=42

thats mythics Zone Bonuses.

now, i see that ALL RvR zones get double xp, double coin (which btw i can't find the code to add a % increase to coin drop), and then in select zones they give a bonus 25% rps.

My only problem with doing it zone-by-zone is that theres alot of zones, and they are all getting the same bonuses, except for the NF zones. or am i reading this incorrectly?

DF gets Bonus 25% rps, 50% bps on all servers.
ALL CLASSIC ZONES get bonus 50% xp, 200% coin drop (mordred its 300% xp)
RVR ZONES get 200% xp 200% coin (mordred this is SI+ zones)
- Forest Sauvage, Snowdonia, Uppland, Yggdra Forest, Cruachan Gorge, Mount Collory : +25% RPS


ATM i have all the code completed (if it is based on RegionID and not ZoneID) Except for coin Drop (the code is there, just not sure where to place it, my find feature on my C# doesnt work!!!!!! so i cant find where ServerProperties.Properties.MONEY_RATE is called.)


my current code for it takes the already introduced rates, gets the RPs/Bps/Xp for kill, then adds to it via % of that if in a zone w/ bonuses. and is DB based of course :D

Any Suggestions would be great :D
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Zone Bonuses

Postby Graveen » Tue Dec 15, 2009 6:25 pm

yay, why not ?
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Zone Bonuses

Postby stephenxpimentel » Tue Dec 15, 2009 8:01 pm

i'm going to release this in a second, i'm making the command to add bonuses to the DB via /zonebonus(/zone works) add <rp bonus> <bp bonus> <xp bonus> <coin bonus>

i'm just wondering if i should make it so that if the zone already has bonuses, it should change the values ?

BTW this updates in-game, no restart needed to change the bonuses :)
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Zone Bonuses

Postby stephenxpimentel » Thu Dec 17, 2009 3:15 pm

kk here it is! :D

it works perfect imo, nothing in DB then no bonus, etc. none in ur zone no bonus, i haven't made a command yet to add the bonuses in-game, but it does update in-game if changed in DB!
Attachments
ZoneBonuses.patch
(10.47 KiB) Downloaded 15 times
Last edited by stephenxpimentel on Thu Dec 17, 2009 4:24 pm, edited 1 time in total.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Zone Bonuses

Postby Tolakram » Thu Dec 17, 2009 3:26 pm

Your patch includes startuplocations. ;)

Why call it zone bonuses if it's using regions? I realize live calls it zone bonuses, but this might be confusing.

expTotal = (long)(expTotal * ServerProperties.Properties.XP_RATE) + (Convert.ToInt64(((expTotal * ServerProperties.Properties.XP_RATE) * regionBonusXps) / 100));


edit:

not sure this is correct but too busy at work to run through the numbers. If a mob is worth 2000 XP and server is 2X and zone bonus is 100% (double xp) will the outcome if 8000 be correct?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Zone Bonuses

Postby stephenxpimentel » Thu Dec 17, 2009 4:19 pm

yes :D

is correct ;)

tested, made an npc to give specified RPs, BPs, XP, /whisper 1200, thats how many it gives un-modified, then u click the modified and it gives 1800 rps, with a bonus of 50%, 1200 / 2 = 600, 1200 + 600 = 1800. :D works nicely, and yes i realized that Zone Bonuses MIGHT get confusing going by Region, but the way i looked at it was to do it my zoneID would first of all, take forever, lets think about it.

Alb Classic alone has... Camelot, Camelot Hills, Campacorentin Forest, Salisbury Plains, Black Mountains North/South, all of the dungeons, i know thats not all i've missed alot and tbh i cba to figure them all out, So maybe it should be "Region Bonuses", but thats a minor change, i just wanted it to match live's name for it :D
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Zone Bonuses

Postby Decatur » Thu Dec 17, 2009 4:20 pm

One may override the other (kind of like having two classes with the same ID), or they would be 8000.
Solitarysoule
New DF i50 Server Coming Soon: https://darknessreturning.boards.net/
Decatur
DOL Enthusiast
 
Posts: 217
Joined: Sat Dec 12, 2009 11:06 pm

Re: Zone Bonuses

Postby stephenxpimentel » Thu Dec 17, 2009 4:28 pm

One may override the other (kind of like having two classes with the same ID), or they would be 8000.
this is how it works


XP * xp_rate = baseXP

then it takes baseXP and does this...

baseXP + (baseXP * regionBonus / 100);

so lets say its 50% bonus in ur region, u use 2x xp, and ur getting 100 xp

a = 100*2 = 200
b = 200/2 = 100

You get - a + b xp so 300 :D

EDIT: Patch File above is Fixed.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 0 guests