cyber 0 Posted May 5 Share Posted May 5 I want to make reading skill books harder. how can I do that ? Link to comment Share on other sites More sharing options...
b6d4a82c15 105 Posted May 5 Share Posted May 5 (edited) Take a look at this function from char_skill.cpp bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb) It's called by the server whenever you read a standard skill book (VNUM 50300). Regarding your question: success chance is often retrieved from value0 column belonging to a given skillbook but this isn't always the case so you can use "Find all references" on LearnSkillByBook func to see how it's called. In case of a standard skill book it seems like there's no bProb argument provided so it's hardcoded to 65%, search for this bit int need_bookcount = GetSkillLevel(dwSkillVnum) - 20; and you'll see int percent = 65; if (FindAffect(AFFECT_SKILL_BOOK_BONUS)) { percent = 0; RemoveAffect(AFFECT_SKILL_BOOK_BONUS); } if (number(1, 100) > percent) { (...) But like I said before sometimes this function is also sometimes called with the second argument (bProb) provided and this is our success chance. It's often modified by special items and whatnot. Grand master skills obviously have a separate routine (LearnGrandMasterSkill) dedicated to chance calculation. Edited May 5 by b6d4a82c15 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now