[quote=“CIB, post:12, topic:9773”][quote=“DeNarr, post:11, topic:9773”][quote=“CIB, post:6, topic:9773”]https://github.com/CleverRaven/Cataclysm-DDA/pull/12621/files
Once this lands you should be able to use get_skill_level(“melee”) to get the skill level. You could e.g. use set_str_bonus to modify the strength stat.[/quote]
Hmm, do you know if it is possible to create a variable with LUA that will last between reloads? Because setting a bonus is only temporary, and since the callback function only occurs once a day (at midnight), instead of on every turn, the bonus would just go away the very next turn. This can be fixed by setting the max value instead, but I would want a way to store what the user’s original starting stats were.[/quote]
Yes, you can use player.set_var(“varname”, value). It would probably be pretty easy to add a per-turn callback, too, if you need that.[/quote]
player.set_var doesn’t appear to be an actual function. There’s an item.set_var…
Eh, the idea of having your stats grow at the start of the next day works for me. Also, it avoids the issue where bonuses to str aren’t working properly, since I’d be changing the base value. For now I just have my mod marked to not change the starting stats. Honestly, if I knew how, I would just lock the starting stats during character creation, as the mod isn’t really intended for people to raise their starting stats manually. I figured if I couldn’t do that though, I’d at least make it recognize the stats.