Weapon skills (pugilism, Bludgeons etc)

Posted by Oblisgr on Sat 25 Jan 2020 07:05 PM — 4 posts, 16,424 views.

#0
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
#1
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?
Amended on Sun 26 Jan 2020 12:41 PM by Oblisgr
USA Global Moderator #2
( 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.
Amended on Sun 26 Jan 2020 06:28 PM by Fiendish
#3
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.