[MUD-Dev] NPC grouping (LONG)
Hulbert
Hulbert
Mon Dec 18 09:20:48 CET 2000
<EdNote: "Repeat after me: I will not annoy my list moderator with
HTML email. I will read https://www.kanga.nu/lists/listinfo/mud-dev/
right now.">
First of all, I wish to apologize for taking so long to formulate this
reply. I am actually replying to someone's (and I apologize also for
not knowing who or when) comment about the grouping of some mob's;
specifically in Sierra's Realm (which, incidentally, is not Sierra's,
anymore, but Codemasters'.)
<EdNote: Poster asked me to insert the following>
Earlier I sent a post that referenced someone else's post that I
couldn't find. Well, I found the earlier post that started me
thinking. It was a Madrona Tree post on the Permadeth or Not?
thread on 12/12/00 if you would be nice enough to insert that I'd
appreciate it.
</EdNote>
Anyway. I have played Realm, recently, and the grouping concept there
has intrigued me, and gotten me thinking. It is slightly more
advanced than 'swarm' attacks, in that mobs that are in a group move
from room to room, as a group. I have not, however, ever noticed an
single mob join a group, or any grouped mob leave one. The groups
seem to form as single entities, full-formed. Admittedly, I am new to
Realm, and may not have seen it if this is not the case, but I believe
it is.
And so, I have been thinking about a way for groups to evolve
naturally within the MUD code, not full-formed, and not static, but
changing over time. This also touches on my post about picking a
codebase for complicated MOBs, for obvious reasons. (BTW, I'm pretty
close to deciding on LPC for my code, simply because my limited
experience is all in LPC.) Combine this with my recent re-reading of
a book on fuzzy-logic, and I have come up with this system. Comments
appreciated, begged for, etc.
TEAMS:
Teams are grouping of mobs in various manners. Membership by a mob in
a team consists of a record of the team leader, and a number
designating that mob's loyalty to that particular leader. 'Teams' do
not need to be literal teams in all cases. The functionality should
help define actions based on tribe, race, class, guild, party
affiliation, etc. All mob's start with the special teams of SELF, and
RACE.
Teams can be added or dropped from a mob profile at any time. Joining
a team involves offering to join (as a subordinate), being invited to
join(as a subordinate) or offering to allow someone else to join you(
with you as the leader.) Team leaders have the ability to set team
goals, and team members actions are based the team goals of all their
teams, and the associated loyalty value for each.
At each turn, the mob travels through it's team list, in decreasing
order of loyalty. Each loyalty number is tested as a probability, and
if it passes, the team goal is processed as an action. If the loyalty
condition fails, the next team in order is tested. If no other team
loyalty passes, the SELF goal action is preformed, even if it failed a
previous loyalty test. Any time a loyalty test succeeds, that teams
loyalty goes up, at the expense of other loyalties. The total of all
team loyalties should be a probabilistic 1.(I think some provision
should be made to allow different teams with the same goal action to
add their probabilities together, so as to be tested earlier in the
list.)
An example may be in order:
Cowmob is a cow. ;) Upon her first birth(spawn) she has a team of
SELF, value 1. Cowmobs being relatively unintelligent, she has no
RACE team, she doesn't know she's a cow. After wandering around her
field for awhile, she meets farmermob. Farmermob feeds her, which
makes her happy, and she gladly joins his team when he offers. She
now has team SELF(.5) and team FARMERMOB(.5). Farmermob likes to keep
his cows together, so his team goal is <go to the barn.> For the next
few turns, Cowmob wanders around, occasionally going toward the barn,
since that's what farmermob wants(about 1/4 of the time, plus whenever
her own wandering is coincidentally barn-ward.) On her way to the
barn, cowmob runs across bullmob. While farmermob satisfies her
hunger, bullmob is capable of giving her something else she needs, so
she offers to join his team, and he accepts. Cowmob now has team
BULLMOB(.5), FARMERMOB(.25), and SELF(.25). Not much self-esteem in
cowmob, but she gets by. Bullmob likes to keep his friends in sight,
so he sets his team goal to <follow bullmob> and lets it go at that.
Hopefully, farmermob will happen on the pair, befriend bullmob, and
convince the happy pair to wander off to the barn, together...
I did oversimplify a little...Cowmobs final team list won't be quite
so neat, since both her FARMERMOB and SELF team loyalties would have
been adjusted by her couple of turns wandering. But you get the idea.
Combining this system with a decent list of team goals should produce
some complex behavior. I figure on limiting the number of teams
available to a mob to 5 or so, depending on code efficiency, and am
trying to work out a system of communicating changes in team goals.
I'd love to work on a hierarchy of teams, as well, but I want to get
the basics down first.
Any comments or questions? In particular, I'd like any thoughts on
how hard this will be to code, and how much slow-down I'll have to
deal with when it's running. I am a code-newbie...
Thanks,
Lee
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list