[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Weapon skills (pugilism, Bludgeons etc)

Weapon skills (pugilism, Bludgeons etc)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Oblisgr   (123 posts)  [Biography] bio
Date Sat 25 Jan 2020 07:05 PM (UTC)
Message
Do these skill have any affect on the cheracter?
I checks skills.dat and it give spell_null code.
I checked for spell_null and i dfound nothing interesting?
I m asking because i want to make my weapon skills.
Thanks
[Go to top] top

Posted by Oblisgr   (123 posts)  [Biography] bio
Date Reply #1 on Sun 26 Jan 2020 12:32 PM (UTC)

Amended on Sun 26 Jan 2020 12:41 PM (UTC) by Oblisgr

Message
I found out that the weapons skill have to do with the damage item (stab,slice etc).

i found these lines in fight.c but i i cant understand
this type of lines.

*gsn_ptr = gsn_pugilism;

if add a skill named: two-handed axe how i add it there?
Need to make changes to an other file too?
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #2 on Sun 26 Jan 2020 06:21 PM (UTC)

Amended on Sun 26 Jan 2020 06:28 PM (UTC) by Fiendish

Message
( using https://smaugmuds.afkmods.com/files/smaugfuss-193-500/ )

Quote:
i cant understand this type of lines.

*gsn_ptr = gsn_pugilism;


That line in weapon_prof_bonus_check in fight.c means that if you are over level 5 and your weapon does DAM_HIT, DAM_SUCTION, DAM_BITE, or DAM_BLAST damage, then you will get a weapon skill proficiency bonus from your pugilism skill. And then elsewhere in the one_hit function, it will also cause you to improve that skill from success or failure (prof_gsn after the call to weapon_prof_bonus_check).

Quote:
if add a skill named: two-handed axe how i add it there?

It looks like the code is based on damage types and each damage type can only use one proficiency skill. So inside those `case` statements in weapon_prof_bonus_check you'd have to choose which damage type to assign the new proficiency to and add something like
*gsn_ptr = gsn_two_handed_axe;
break;
and then if any of the preceding case statements don't have anything in them you'd have to reorder or set them appropriately unless you want them to also be two-handed axe damage types.

Let's say for example that you want to add your new skill to DAM_BITE (just an example) but you still want DAM_HIT and DAM_SUCTION to be pugilism types.
Then you'd want to reorder them like this

         case DAM_BITE:
            *gsn_ptr = gsn_two_handed_axe;
            break;
         case DAM_HIT:
         case DAM_SUCTION:
         case DAM_BLAST:
            *gsn_ptr = gsn_pugilism;
            break;


If you want to make your own new damage type for two handed axes, like for instance DAM_CLEAVE, then you'd have to define that in mud.h and assign it as the damage type for various two-handed axe weapons in your game and then optionally check it for resistances in the damage function in fight.c where it says "Check damage types for RIS"

Quote:
Need to make changes to an other file too?

You'll need to define gsn_two_handed_axe where the other gsn proficiency skill variables are defined in mud.h and db.c. I would look for where gsn_pugilism is done in those files and just mimic that.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Oblisgr   (123 posts)  [Biography] bio
Date Reply #3 on Sun 26 Jan 2020 07:09 PM (UTC)
Message
thanks i have did that, before you reply.
I made my own weapon proficiencies and registered them in mud.h and db.c.

I use them a little but i didnt see them to increase, maybe because my test char to be level 5?

I will test that.
[Go to top] 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.


9,882 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]