Okay guys Im having issues and I've looked all over the forums for a solution and can't seem to find one. My issue is making the default weapontype to automatically be unarmed combat, so I can actually make monks useful in my MUD. The attacksystem is completely different then the normal MUD and uses attackspeed. When I go to compile I get:
/src/fight.c:1057: undefined reference to `gsn_unarmed'
So how would I define the reference? The line of code reads as:
*gsn_ptr = -1;
switch ( wield->value[4] )
{
default:
*gsn_ptr = gsn_unarmed;
break;
case WEP_MAGIC:
*gsn_ptr = gsn_magic;
break;
case WEP_LARGE_SWORD:
*gsn_ptr = gsn_large_swords;
break;
case WEP_LIGHT_SWORD:
*gsn_ptr = gsn_light_swords;
break;
case WEP_DAGGER:
*gsn_ptr = gsn_daggers;
break;
case WEP_AXE:
*gsn_ptr = gsn_axes;
break;
case WEP_HAMMER:
*gsn_ptr = gsn_hammers;
Ooops, It isn't. I wasn't paying attention to where I was at in the forum I just hit add topic.
It's originally a smaugfuss but a lot of the code has been stripped and redone for the attackspeed. It was done by a friend and I got the leftovers because I loved it so much. From what I can tell the only major differences are that there are more defined weapontypes and that when you design a weapon in-game it doesn't automatically get a damage type based on its weapon.
So... for the most part the file location for everything is still the basic smaugfuss setup.
Why do you ask? It is probably adjacent to the other definitions. Try using grep if you are using Linux or Cygwin, or a "find in files" feature in a Windows-based editor.
It still isn't working the way I want it to though. My monk isn't gaining any proficiency in unarmed. This may have something to do with the fact I may need a weapon with type unarmed... suggestions?
If the code was redone a lot, not sure what to say.
Try adding debug lines in the code. Something that prints out to the log channel and throw some of those into the learning function, etc. Find out where it stops.
Let's put it this way. From what I can tell from the code, is that it requires there to be a weapon in the hand of the player to determine a weapontype and thus an attackspeed for it. So my question would be how to tell the game that someone who wasn't wielding a weapon is using unarmed. I found the bit of code that needs to be fixed for unarmed to gain proficiency but not sure what to add in... here's the code: