Re: Spell and Skill Parser

From: Jon Barrett (mixtli@SINFO.NET)
Date: 05/04/98

At 12:12 PM 5/3/98 -0400, you wrote:
>> I'm thinking about writing a more functional (e.g., easier to read and more
>> powerful) skill and spell parser based on command_interpreter with it's own
>> setup.  This is really vague, but it's after midnight.  I was wondering if
>> anybody had ideas to contribute for it which could be distributed as part
>> of the patch.
>i did this a while ago (made a combination spell/skill parser). i made it
>so that a command (do_skill) was called by all skill commands with the
>skill number as the subcommand, and cast call it with a sub command of 0.

  I too have played around with the notion.  I have all skills in the
command table call do_skill with the skill as the sub_command the same as
siv did.  That works great, but I have not combined the two as I was just
testing the idea.  That should be done though, for it is a lot of redundant

>i also set it up so that mobs could use skills and spells by passing an
>extra argument that would be used as the skill percentage for that mob.
>ie, 'kick $n 75' or 'cast 'fireball' $r 100' as a mob command in a
>mob progs fight script would allow a mobile to use them just as if they
>were a PC.

  I made my mobs able to do any skill/spell just like a player, no scripts
involve.  I gave the mob_specials struct a array dor skills just like
players and then made a mod_do_skill function call from mobile_activity.
The mob_do_skill makes a few simple checks like if the mob is fighting it
does a violent spell if not it spells up if it can.  Then it calls do_skill
or do_cast accordingly.  When you make a mob all you have to do is skillset
the percentage and the mob will randomly do that skill.  It saves in the
mob file too.  I just made a basic prototype last night and the percentages
need to be worked on, but it works rather well.  I also made a
DO_SKILL/DO_SPELL mob flag which they need to even call the mob_do_skill

>i think a combined parser is a good thing because it will cut down on
>redundant code, you can group similar skills/spells together (ie, kick
>goes with dam spells), and you can let NPCs become less distinguishable
>from PCs

I agree.  Its nice to give mobs multiple attacks, dual wield, fireball, etc
just like players.


Computers in the future may weigh no more than 1.5 tons."
      --Popular Mechanics, forecasting the relentless march of
        science, 1949

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST