Adding Attack Types

  • Papaya Pete
  • Papaya Pete's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 2 weeks ago #2044 by Papaya Pete
Papaya Pete created the topic: Adding Attack Types
I've been searching around for a little while, and I haven't found anything yet that explains how to add a new attack type. For instance, I wanted to add "cleave" and "chop." I'm sifting through the code to see if I can figure out how to do it, but if anyone has any pointers, they'd be much appreciated. :)

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago - 5 years 2 weeks ago #2047 by Kewlb
Kewlb replied the topic: Adding Attack Types

Papaya Pete wrote: I've been searching around for a little while, and I haven't found anything yet that explains how to add a new attack type. For instance, I wanted to add "cleave" and "chop." I'm sifting through the code to see if I can figure out how to do it, but if anyone has any pointers, they'd be much appreciated. :)

spells.h
--------
weapon attack type section
#define TYPE_PUNCH		  313

#define TYPE_STAB		  314
+#define TYPE_MYNEWTYPE		  315
/** The total number of attack types */
-#define NUM_ATTACK_TYPES  15
+#define NUM_ATTACK_TYPES  16

fight.c
-------
add new types to the end of:
 struct attack_hit_type attack_hit_text[] =
Last Edit: 5 years 2 weeks ago by Kewlb.
The following user(s) said Thank You: Papaya Pete

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #2048 by Rumble
Rumble replied the topic: Adding Attack Types
I don't think a tutorial exists for this. Just search/grep for cleave and copy the code accordingly and post your results. We can help with any problems you run into.

Rumble
The Builder Academy
tbamud.com 9091

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #2049 by rudeboyrave
rudeboyrave replied the topic: Adding Attack Types
oh, by the way. the messages for the weapon attack types are located in lib/misc in the file "messages".

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

Please Log in or Create an account to join the conversation.

  • Papaya Pete
  • Papaya Pete's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 2 weeks ago #2052 by Papaya Pete
Papaya Pete replied the topic: Adding Attack Types
Ah... spells.h. I checked a lot of other files, yet didn't check that one thoroughly! Good grief.

It looks like that was the missing bit. Compiles cleanly; I'll keep you guys posted if there's anything that doesn't seem to work right.

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #2061 by Kewlb
Kewlb replied the topic: Adding Attack Types
What IDE are you using to develop? I am currently using Visual Studio 2012 and have been very impressed with the intellisense in it and ability to quickly find any bits of code and or replace things.

For example.. on this thing.. if you knew sting was an attack type you could just search for sting to get to the areas I pointed out. On your server you can also just grep for it, but that is case sensitive although there is an ignore case flag for grep.

Please Log in or Create an account to join the conversation.

  • Papaya Pete
  • Papaya Pete's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 2 weeks ago #2067 by Papaya Pete
Papaya Pete replied the topic: Adding Attack Types
I'm using Codeblocks to work on code, and then compile it under cygwin. I've been using the search command a lot, and I had gotten the text part ("slash", "slashes"). My mistake was not running a search through spells.h. :P

Please Log in or Create an account to join the conversation.

  • zusuk
  • zusuk's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
5 years 2 weeks ago #2078 by zusuk
zusuk replied the topic: Adding Attack Types
I'm using netbeans, we use SVN with our MUD and it has just a great simple interface with it. Also the visual diff comparison is extremely useful. And guess how much it costs... FREE!

Sublime-2 comes recommended by our friend Ripley, if you use it on a personal-level it is also free.

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

  • Papaya Pete
  • Papaya Pete's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 2 weeks ago #2081 by Papaya Pete
Papaya Pete replied the topic: Adding Attack Types
I was actually thinking of using Unix, though I need to get my box working again if I'm to do that. The problem is, I don't really know how to use Unix at all. Cygwin does pretty good, but I've had issues with something not working right (i.e. trying to put in Vatiken's crafting system in).

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #2089 by Fizban
Fizban replied the topic: Adding Attack Types
Some variety of linux is a plenty fine option, but I'd definitely suggest against actually using UNIX itself.

Please Log in or Create an account to join the conversation.

  • Papaya Pete
  • Papaya Pete's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 2 weeks ago #2094 by Papaya Pete
Papaya Pete replied the topic: Adding Attack Types
Ahhh Linux is what I actually meant. :P

Please Log in or Create an account to join the conversation.

Time to create page: 1.309 seconds