Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ setting up a new oset
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Joeyfogas
(41 posts) Bio
|
| Date
| Sun 18 Mar 2018 01:54 AM (UTC) |
| Message
| 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... | | Top |
|
| Posted by
| Kursh
(10 posts) Bio
|
| Date
| Reply #1 on Mon 19 Mar 2018 02:29 PM (UTC) |
| Message
| 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. | | Top |
|
| Posted by
| Joeyfogas
(41 posts) Bio
|
| Date
| Reply #2 on Mon 19 Mar 2018 09:51 PM (UTC) |
| Message
| 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 | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,242 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top