zones.xml and zone bonuses

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

zones.xml and zone bonuses

Postby stephenxpimentel » Sat Jul 17, 2010 11:52 pm

Heya, i decided to finish zone bonuses, but i want to do it right this time, so i wanted to ask about Zones.xml. This file loads all the zones on startup, now i was wondering if it would be a good thing to convert this to an SQL db, and add the zone bonuses into this table. I'm not sure if converting it to SQL will have any benefit at all, but i think it would be proper for Zone Bonuses to match up to each zone, and the best way to do this would be in a table, instead of xml.

let me know ur thoughts on this, i have the zones.cs made with all columns that zones.xml contains, aswell as Experience, Realmpoints, Bountypoints, and Coin bonus columns.

My Db wrote:zones_id - ZoneID - RegionID - Name - OffsetY - OffsetX - Width - Height - Experience - Realmpoints - Bountypoints - Coin
339250f9-564f-4e17-9858-209a5eaae200 0 1 Camelot Hills 483328 548864 65536 65536 0 0 0 0


Live-Like DB for Zones!
zones.rar
(17.44 KiB) Downloaded 29 times
Last edited by stephenxpimentel on Fri Jul 23, 2010 3:37 pm, edited 1 time in total.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby Graveen » Sun Jul 18, 2010 12:28 pm

by zone, you mean classic/si/nf/df /toa/cats ? then including the management in serverrules is appropriate.

if this is smaller, i think an area is more appropriate. Basically,you 'd like to enhance the whole world with a bonus, and tweak some small zone bonuses, right ?
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: zones.xml and zone bonuses

Postby stephenxpimentel » Sun Jul 18, 2010 4:50 pm

i mean each ZONE - for example Camelot Hills is a zone. Basically when your standing somewhere, what shows up when u do /map is part of that zone.

http://www.tekener.de/cgi-bin/maps?realm=albion&lang=en

each clickable square represents a different "zone" in daoc. This only shows alb classic and SI, but i think it will tell u what i mean.

so the reason i'm asking about zones.xml, is why not have all zone related data stored in a DB, i can only see positives in doing it.


[EDIT] i'm trying to implement this: http://www.camelotherald.com/section.php?id=42
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby stephenxpimentel » Sun Jul 18, 2010 6:43 pm

just wanted to update on this -

so far i have the zones loading correctly from DB, with also checks in place to read from the xml when the SQL is missing entries.

Working on actual bonuses now.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby rdsandersjr » Mon Jul 19, 2010 1:57 am

Nice contributions man!
Thanks,
RDSandersJR
User avatar
rdsandersjr
Support Team
 
Posts: 1089
Joined: Fri Aug 01, 2008 3:01 pm
Location: Cincinnati, Ohio

Re: zones.xml and zone bonuses

Postby stephenxpimentel » Tue Jul 20, 2010 3:03 am

- [update] -

i have the SQL 100% complete, with all zone bonuses matching to the herald (http://www.camelotherald.com/section.php?id=42). Working now on the bonus codes.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby stephenxpimentel » Tue Jul 20, 2010 9:18 pm

should the server property for zone bonuses be enabled by default?
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby Tolakram » Tue Jul 20, 2010 9:21 pm

Disabled by default please.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: zones.xml and zone bonuses

Postby stephenxpimentel » Tue Jul 20, 2010 9:25 pm

ok :) will do. just finishing up support, then gunna do some testing, and should be ready for commit. Would u guys want me to post a patch here so u can view all the changes first, or should i just toss it into the SVN?
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby Graveen » Tue Jul 20, 2010 9:32 pm

nice ! yup patch please for a little review :)
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: zones.xml and zone bonuses

Postby Tolakram » Tue Jul 20, 2010 9:52 pm

Also, regardless of decisions, please hold off on any commit until tomorrow afternoon as Storm restarts tomorrow morning and I would rather wait a patch cycle for this.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: zones.xml and zone bonuses

Postby rdsandersjr » Tue Jul 20, 2010 10:30 pm

Hope this isn't to late, but could you possibly add an option for "realm" for example, RP/BP bonus for an under populated realm in lets say the frontiers? We would need it by realm to support under population so the others do not get it.
Thanks,
RDSandersJR
User avatar
rdsandersjr
Support Team
 
Posts: 1089
Joined: Fri Aug 01, 2008 3:01 pm
Location: Cincinnati, Ohio

Re: zones.xml and zone bonuses

Postby stephenxpimentel » Wed Jul 21, 2010 3:14 am

rdsandersjr wrote:Hope this isn't to late, but could you possibly add an option for "realm" for example, RP/BP bonus for an under populated realm in lets say the frontiers? We would need it by realm to support under population so the others do not get it.


yes that will be fine, i can throw it in there. will give a server-property for "Underpopulated_Realm_Bonus" and u can just throw %s in.

[EDIT] i found the money method.
Anyone know the GamePlayer method to give money?
Last edited by stephenxpimentel on Wed Jul 21, 2010 5:24 am, edited 1 time in total.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: zones.xml and zone bonuses

Postby rdsandersjr » Wed Jul 21, 2010 3:20 am

Nice! Thanks man
Thanks,
RDSandersJR
User avatar
rdsandersjr
Support Team
 
Posts: 1089
Joined: Fri Aug 01, 2008 3:01 pm
Location: Cincinnati, Ohio

Re: zones.xml and zone bonuses

Postby viper1805 » Wed Jul 21, 2010 5:57 am

stephenxpimentel wrote:Anyone know the GamePlayer method to give money?


Code: Select all
player.AddMoney(long money)

or
Code: Select all
player.AddMoney(long money, string messageFormat)

or
Code: Select all
player.AddMoney(momoney, string messageFormat, eChatType ct, eChatLoc cl)


or just

Code: Select all
player.MoneyValue += amount


is that what you are looking for?
I will not solve your problems for you ... I will just give you a way to find a solution :mrgreen:
User avatar
viper1805
Website Team
 
Posts: 607
Joined: Sat Oct 18, 2008 10:20 pm
Location: NRW, Germany


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest