Author | Message | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
class stats,calculate stats and formulas.ini test/release
| Alright so if Im correct I managed to to set up class stats,calculate stats to formulas.ini. Im not 100% on how all the functions tie in together, but I think I got it. Compiled in a rev 189,but very easily transferable to the newer revs.. In Character.cpp in Character::Character(std::string name, World *world) find std::tr1::unordered_map<std::string, util::variant> row = res.front(); add this under it this->classupdated = false; find the void Character::CalculateStats() function and replace it with this link go to the void Character::Logout() function find this->online = false; and add these below it this->classupdated = false; Done in character.cpp,go eodata.cpp find the void ECF::Read(std::string filename) function and replace it with thislink Done in eodata.cpp go to Character.hpp and add these where they fit bool classupdated; and void ClassStats(); Done in character.hpp go to eodata.hpp and find the struct ECF_Data : public Shared and replace it with this link Doneineodata.hpp go to Welcome.cpp in casePACKET_REQUEST: findthis->player->character->CalculateStats(); and add these right above it this->player->character->ClassStats(); I think thats it besides how to use the base stats when ever you you change class you gotta call this->player->character->ClassStats(); this->player->character->classupdated = false; to remove the prior classes stats, once the new class is selected this->player->character->ClassStats(); this->player->character->classupdated = true; Any feedback is good, I hope this is release material and not a test.. I know its damn close, so if you notice somthing that is not correct, or can be improved Id love to fix it.
|
Re: class stats,calculate stats and formulas.ini test/release
| Useful. The only reason EOSERV still uses its old calculations is because there's no way for a player to actually get a class without a quest system. It seems a bit pointlessly complex with that extra function and member variable, though. Vodka's implementation uses 6 new member variables to store the adjusted stats of the user.
|
Re: class stats,calculate stats and formulas.ini test/release
| So does that mean vodka is pointlessly complex? Nice release as always insom. --- Love you too.
|
Re: class stats,calculate stats and formulas.ini test/release
| newguy posted: (10th Jan 2012, 04:45 am) Nay, since it's much easier to just set those 6 temporary variables instead of trying to adjust the actual stored stats of the user every time their class changes. One mistake, desynchronization, or even changing the stats of a class a player is using could lead to someone getting an advantage to their stats.
|
Re: class stats,calculate stats and formulas.ini test/release
| Makes since. So is it like classstr clasint ect added in to the calculatestats function?
|
Re: class stats,calculate stats and formulas.ini test/release
| I will add these class stat calculations to EOSERV pretty soon with an option to enable them. The ECF loading code you posted seems to have swapped the base/type variables. Base should be the base class ID (High Priest -> Priest), and type the "type" of class (melee/rogue/magic/archer/peasant) which determines how base stats (str/int/wis etc.) affect secondary stats (damage, evade, accuracy etc.)
|
Re: class stats,calculate stats and formulas.ini test/release
| Awsome I look forward to that and thanks Ill swap those back and repost that part. Edit: Fixed the links!
|
Re: class stats,calculate stats and formulas.ini test/release
| Ya, Vodka just did something like this>str + item->str + clas->str = this->adjstr. It was far more simple to just add up the total stat during CalculateStats() than to do +/- to each case you would have with a change. This also avoided the "Get Naked At Skill Master" method Vult-r used on EO main... Vult apparently altered the raw stats as well. It was just a much more simple method and very easy to implement the stat reset at skill master. Less maths.
|
Re: class stats,calculate stats and formulas.ini test/release
| Amazing, nice code you got there as usual!.
|
Re: class stats,calculate stats and formulas.ini test/release
| I know im not an insane coder the only codes I can do are small amounts of python and an even smaller amount of c++ and im insanely good with html but why is eoserv code so complex and it goes in circles. Now I know that seose was a closed source but it was code nontheless and there just
happened to be 5 million programs to make editing that code easy as pie. Why is eoserv not coded to be simple like seose and why are there no programs to make it easier for people? --- Endless Society Web : EndlessSociety.co.cc Forums : EndlessSociety-Forums.co.cc *Coming in April* |