PDA

View Full Version : read stuff in from files


Grundy
06-30-2006, 06:24 AM
instead of hard coding regen rates and stuff there should be a table of stuff thats read in from a file. like for each class and each race, it would make it easier for servers to give certain classes/races enhanced regeneration to to change the enhanced regeneration of trolls and iksars. and im not really sure how you do the damage tables, armor tables and hit points but i think they should all be read in from a file on the server too. if someone wants.... i dont know... rangers to tank better they could change their armor table in the file. and also porbably do the same thing with racial experience penalties/bonuses.

there could be a file that says something like

#race experience bonus
1^0
2^0
3^0
4^0
5^0
6^0
7^5
8^0
9^-5
10^0
11^0
12^0
26^0
128^-5
130^0
#class experience bonus
1^0
2^0
3^0
4^0
5^0
6^0
7^0
8^0
9^0
10^0
11^0
12^0
13^0
14^0
15^-5
16^0
that would mean race 7 (half elf) gets 5% experience bonus (because they suck)
race 9 and 128 (trolls and iksars) would have 5% experience penalty (because of their regen)
and class 15 (beastlords) would get 5% experience penalty because they're so imba

so a troll or iksar beastlord would get -10% experiece. could do the same thing for hp regeneration so you wouldnt have to recompile every time you want to make a change, just change a little text file or fields in a database

farce
06-30-2006, 06:54 AM
Grundy, this would be very easy to implement via the database. If you want to implement it, let me know and I'll help.

soulshot
07-01-2006, 06:20 AM
If you would please post this information! I would like to know your methods for using the database to can alter regen, mana regen, exp. Sounds like a tutorial =) Thanks!

Grundy
07-02-2006, 01:54 PM
its really easy, theoretically, just reading in values from a file instead of hard coding. i cant do it though, im having trouble getting the source. i have no program that can open .tar files and when i try to find a way to open them i just get sites telling me what linux commands extract the files. i found 1 program that can open and extract a tar file but it only got like 15 files out of it, for a total of about 700kb when the tar is somewhere around 1700kb and im pretty sure archiving stuff into a tar file doesnt increase file size 240% so i think its just not giving me all of the files.

and i dont think it should necessarily be a tutorial, i think it should just be part of eqemu, i mean you dont hardcode spells items and npcs so why not do the same for regen rates and experience bonuses and armor/damage tables and shit

unicorn97211
07-02-2006, 02:56 PM
I use WinRAR to open the compressed source available here.