Re: [Circle] [CODE] Changing the interpreter?

From: Jack Wilson (deejay@cu-online.com)
Date: 11/23/96


Fionn Colvin wrote:
>What I'd like to do is change the mim position bit in the command list
>to a list of legal positions. Something like this.
> POS_DEAD       a
> POS_MORTALLYW  b
...
> 
> Then in the command list id have something like this below. In this
> example if you were in POS_RIDING (i) or POS_STANDING (l) you could do
> the command kill. etc.
> 
>   { "kill"     , "il", do_kill     , 0, 0 },
...
> I think this would make adding new positions much easier.
>
>So can anyone see any major problems which will arise from doing this?

Well first of all, you have to update the socials DB to accomodate
this scheme.

Second, while I can see POS_CLIMBING as a valid position that precludes
any other type of position (standing, sleeping, etc), I don't think
it's sensible to include POS_RIDING in a positional scheme.  When I
implemented it, I just added a rider field to struct char_data - that
way you can sleep on horseback, for example.   

Now, if you don't put POS_RIDING in, that complicates things.  
So my question is, why not simply add a bitfield to your command table
that allows for checks against riding and other non-positional states?

{"kill",  POS_STANDING, do_kill, RIDING_ALLOWED, 0, 0},
...

That way, you don't change nearly as much.  While a character-based
schema would make for a more extensible *database* (the socials and
mobiles databases), you don't need such an approach to make your
interpreter more flexible.


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzHp4aoAAAEEANXSOayXVPnQYL09AxYtkHjcTC22+URW0eAYrJQuBq30xHQG
XOfA/AO36qD0ArPc1YjyX60bXTVgIQuyJzTzixNY7EtuAZ1qzYliZNdzse1mn87d
1EmpFbcnqyHd6HY6K20t7nQpDcgDvR3uPySqZ4tBYkdr44W4wOKr5Ck3PxUhAAUR
tCJKYWNrIFdpbHNvbiA8ZGVlamF5QGN1LW9ubGluZS5jb20+
=4AQ9
-----END PGP PUBLIC KEY BLOCK-----
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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