View Single Post
Old 05-12-2006, 06:12 PM   #2
cratylus
Banned
 
Join Date: Feb 2006
Posts: 153
cratylus is an unknown quantity at this point
It's totally doable. That's the neat thing about LPC.
Whatever it is, you can probably do it.

In this case, what you're looking at is called "lib coding".

In LPC, the properties of objects and players and monsters
are dictated by the files they inherit. Many of these files are
standard and commonly used. For example, players can
converse because they inherit /lib/talk.c, rooms have exits
because they inherit /lib/exits.c.

In this case, you'll be modifying a few related /lib files. Most
specifically (and obviously) you'll want to examine /lib/combat.c
to see how it works. This is the lib file that living things
inherit to mediate combat events, including weapon combat,
unarmed combat, spell rounds, etc.

There's no "easy" way to do it....you pretty much have to
understand what you're reading in that file before you
should mess with it. Make sure to backup often, and
remember that almost any basic coding question you have
will be answered by the Creator's Manual or the FAQs.

I know you're eager to get the combat stuff done right
away, but I'd like to make a suggestion. If you code a few
small areas first, it will help you get a feel for the code, and
will help you much better understand how combat.c
works.

There are no snippets for this, alas. LPC isn't really
conducive to snippeting, because individual muds tend
to make so many fundamental changes.

Anyway, if you have any questions, you can always ask on
the <ds> line, or you can log onto the sample Dead Souls
mud where I hang out, at rugose.com port 6666
I'll be happy to answer any questions I can.

-Crat
cratylus is offline   Reply With Quote