setting up a new oset

Posted by Joeyfogas on Sun 18 Mar 2018 01:54 AM — 3 posts, 13,175 views.

#0
Ok so first off this is on smaugfuss 1.9.2

I want to add a new oset for a new variable called strplus... this is part of a hybrid D20/JRPG system I am making.

strplus I want to be a temp bonus as long as the item is worn, and remove said bonus when it is removed.. much like how it already works for the other stats (strength, dexterity, etc)
when you type "oset <item> affect strength <number>"

I thought I might be able to copy and modify a section of the oset code to meet my needs, however upon trying to locate the oset for strength, I cannot seem to find how it is calling for those temp stats boosts.

I looked at the "affect" part and was trying to find the next argument call for strength, but am confused as to where to go...
#1
I’m not sure what you are trying to do this :)
If you set the oset xxx affected str 2 you already have a bonus (not permanent) that you can “wear/remove”.
If you want a bonus (to hit and dam) because of str there is also something in place…you have to go in const.c. There you can setup DAM/HIT bonus related to strength current level.
I don’t understand why you want another STRPlus bonus…however, if you really want that, you have to modify a lot of code.
If you want only a new effect you have to modify mud.h to add a APPLY_STRPLUS affections and const.c to change the enum constants and all the code related in every file related to this new affection.
If you want to manage this stat separately from perm_str and mod_str you have to modify also CHARA_DATA in mud.h so you can access and modify the variable through ch->strplus.
Then you have to modify the fread_char and save char in save.c (because you need to store these variables).
You have to modify also all the code that is related to this new strength plus variable (not only the do_oset function).
I suggest to use grep command to search the files and check where it is used.
grep “ch->mod_str” * from src folder.
#2
well as stated, it is for a JRPG / D20 hybrid system. player stats run higher than 25. When using the D20 system, things start to go really haywire when removing the stat limits, So I am keeping the D20 system for mobiles, and creating a whole new set of rules for the players.

The D20 system doesn't like a strength of 200