-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move skillratio to skill_db.conf #3258
Comments
I liked your proposal. Simple formulas (that do not require a special formula) simply vary the % by the skill level. It wouldn't be possible to include formulas with attributes, right? In this case we would use CustomSkillRatio for more elaborate calculations. (BaseRatio and RatioPerLevel is also excellent*) |
Thanks for the feedback. About attributes (I believe you meant stats like STR/AGI/etc), you are right, it would need the use of custom formula. Since we are not doing formula evaluation in db, I think moving stats as having their own fields would bring too much clutter to the skill db, and usually they are not very straightforward in formulas. Some gives % to ratios, some needs like 10 points for 1% and so on. Doing that via db seems like too much. We would need to make too many names and conditionals that would make it hard to maintain. In the other hand, one could make a custom ratio formula that uses skill data somehow for that. For example, a custom ratio that does Edit: link to charms example - guilherme-gm@265fe57#diff-759fea9dcd40522e86217dd352aadd687488dff49c67aa880610d4aeaaeb89c0R955 |
oh yes, the idea already includes being able to create personalized formulas (using str, agi, among other conditions), so it's great. well... ease of manipulating the skillratio with improved organization and customization support. |
I also think is a nice idea and a first step towards having a one skill-one function structure. It also helps removing skill related stuff from battle.c. The second alternative for the conf structure seems a bit alien. The first one goes better with what we already have, even if it's a little bit more verbose. On another note, skill.c is already 25k lines long. Maybe it's better to add another file for this purpose? Something like skillratio.c, as it would also host quite a few custom functions. Maybe we should also split skill_db.conf into separate files. |
Yeah, I like your points. Totally agree with new files too. I am not sure about how we could split skill_db.conf, the cleaner way seems to be by category like jobs/npc/homun/etc. but there are gaps in the middle, which may make it harder to find gaps where skill ids are empty. For example, after DC_SERVICEFORYOU, there are 3 NPC skills, followed by 3 marriage skills, 1 item skill, and back to a few NPC skills. If we wanted to keep the ID order, we would need 4 files here (Npc1, Marriage1, Item1, Npc2). Another option would be to split by ID range, but in this case we would have every file with a mix of types of skills Yet another option would be to simply group by NPC / Jobs / Marriage / etc, but in this case we would have something like that: (All ids are made up) And it would be harder to, for example, tell that there is a gap between 110 and 150. One could still go to source and check the enum, though (which seem easier than reading the db anyway) |
I may have spoken too fast about splitting skill_db.conf. Seems like, contrary to source files, configuration files that share the same settings/properties, have no problem being too large. It's plain text after all. It does break the blame tool of github though, that's the only disadvantage I see. |
I do like the idea of splitting if we have a good approach xD although it works in a single file, too big text files is still hard to deal with |
I remember that they once posted something similar on the Hercules forum but it had other settings besides the skillratio, I think it would be very interesting if this were applied and not just limited to the skillratio. It would greatly avoid using the compiler to make changes to skills Here is the link, the person who wrote about it was Beret https://board.herc.ws/topic/15716-new-fields-in-skill-db/?tab=comments#comment-86650 |
I lke this and agree. But I would rather take one step at time than do everything at once |
I think this issue may be considered as a small part of #73 , but I thought it would be better to make it as a separate issue so we can tackle this issue isolated from the rest.
I am up for working on this. I just want to grab some feedback on the approach before I go ahead.
Is your feature request related to a problem? Please describe.
Today we have this huge
battle_calc_skillratio
function with 2 levels on switches for pretty much every skill in the game. Currently it takes around 1500 lines with formulas for each skill and some fall throughs.To add to the complexity, it has a mix of sometimes adding to the received paramter "skillratio" and other times replacing the value. And well,
skillratio
is always 100 when this function gets called.In my opinion, this huge function block with formulas + the
skillratio
parameter makes things quite confusing. For example, there we many times when changing a skill where I had to wonder whether 100% was forgotten in the formula, or whether I have to reduce 100% when comparing to the description, etc.Describe the solution you'd like
My proposal is to rework this part so:
skill_db.conf
;skillratio = 100
parameterThis would remove those hardcoded values and should make tweaking basic skill settings easier and pluggable. In the other hand,
skill_db.conf
will grow a few thousand lines.A very high-level draft of what it would look like may be found here: guilherme-gm@265fe57
Scrolling through this function, I can see a few things that jumps to the eyes:
skillratio = skill_lv * 10 + 30;
)RE_LVL_DMOD
after the formula)SkillData
fields. Those are the skills:My initial proposal is the following additions to
skill_db.conf
:And inspired on gepard-me suggestion in #73, we would have a function that populates a db of SkillID -> SkillRatio function for the skills that needs a formula.
Going back to the cases I mentioned above, we would have:
SkillRatio
valuesSkillDataN
fields to help too, or some sort of new field if we want to make it generic)SkillRatio
+ setBaseLevelModifier
We may expect to get a good amount of new, small functions, but I think this is fine(?)
For people with customization
For people with many customizations, this should not have huge impact, they could migrate their changes by simply making a "get all" function with their current switch/cases and make their skills a "CustomRatio" skill. Some manual work, but not a huge effort, I think.
It would look like that:
in the db setup:
and adding this to every customized skill:
Describe alternatives you've considered
I have also considered tweaking a bit
SkillRatio
from the example above so instead of Lv1..Lv10 you could specify a "step". Since many formulas are like "start at 100, add 10 for each skill level". So we would have something like:Additional context
I think there are other aspects of skills that could follow similar approach, but I think it is better to take it slow so we can actually do it.
As I mentioned in the start, I can work on this change, but I want to get some feedback on the idea before I start coding it.
The text was updated successfully, but these errors were encountered: