> > I've worked out a system for formula based experience, but I am ashamedly > > not very good at stuff such as logarithms. I want an experience system in > > which it takes maybe 2000 more experience than the last level took. i.e., > > if you needed 4000 last level to level up, you need 6000 this level to > > level up. I'm sure it's not too difficult, but I am having a hell of a time > > Simple mathmatics.... (2000*level) or 2000*(level+1) as the case may be yeah, but i'm sure that's not what you want...that means that every level will be as easy as the last...you probably want something like: lev - exp 1 - 2000 2 - 4000 3 - 8000 4 - 14000 5 - 22000 "exp = pow(2, level) * 1000" will give you something close to the above table, but it would probably be better to make your exp_to_level a combination of equations and tables..a table will allow for easier customization, and is faster than redoing calcs every time someone types score.. what i did was make tables for exp, class mods, etc..and combined them into an equation..here's my function: int exp_to_level(struct char_data *ch) { float exp; extern struct int_app_type int_app[]; extern struct wis_app_type wis_app[]; extern int exp_needed[]; extern float class_exp_mod[]; if (IS_NPC(ch) || (GET_LEVEL(ch) >= LVL_IMMORT)) { log_info("SYSERR: NPC or Immortal getting to exp_to_level!"); return 1; } exp = (float) exp_needed[(int) GET_LEVEL(ch)]; exp *= (float) class_exp_mod[(int) GET_CLASS(ch)]; exp *= (float) int_app[GET_INT(ch)].int_exp_mod; exp *= (float) wis_app[GET_WIS(ch)].wis_exp_mod; return ((int) exp); } siv +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST