May 2002
- Random Resets John Robert Arras
On Mon, 29 Apr 2002 "Kwon Ekstrom" <justice@softhome.net> wrote:
> Lets say you only have 5 places for the kobolds to stand, 4 types
> of kobolds, 3 skill sets per kobold type, and perhaps 3 or 4
> different tasks for the kobolds (standing still, sleeping, peeing
> in the fire, I don't know... heh)
> That'd generate roughly 240 possible scenarios. Add another place
> for your kobolds to stand, and you've increased to 288 possible
> scenarios.
> I've done alot of thought on handling things similar to this
> (although not this exactly) with creating script and equipment
> templates for creatures. You could create alot of diversity
> simply by allowing multiple templates to be applied to a creature
> when it's loaded. That'd create alot of interesting diversity
> with a minimum of work for the builders.
This is something I've played with a lot, too. I've got two things
that that I've gotten a lot of mileage out of. I think I've
mentioned them before, but not in a really detailed manner.
The first thing is to be able to put resets on everything:
areas/rooms/objs/mobs. When things reset, they reset
recursively. So, a room loads a guard, and the guard loads a sack,
and some bread loads in the sack. When the reset is called on the
room, the guard gets created, then the sack gets created, then the
bread gets created, and the bread gets put into the sack, the sack
is given to the guard, and the guard gets put into the room.
Area resets are handled a little differently. If the start area in
the MUD is the thing being reset, it first picks a random area, then
a random room to reset the thing in. If it's another area, it picks
a random room to reset things in.
The rooms that can be selected are further checked against their
sector flags. I use sector flags for things like
water/forest/field/city instead of a single number type. If the
thing being reset has any of these flags on it (since all things can
have flags as well as resets), then only those rooms with common
flags can be picked as locations for the thing to reset. If the
thing being reset has no flags on it, then any room in the area
(that isn't a dangerous room such as lava or water or air) can be
the location of the reset. This lets me reset fish in water, and
squirrels in forests.
-=-=-=-=-=-=-=-=-
The second idea is what I call "randpops". Basically, these make it
possible to reset one out of a large number of choices, and it's
possible to put things into "tiers" so one reset can give out good
equipment to powerful creatures, and weak equipment to wimpy.
Randpop objects are things that store extra data on them: the vnum
where a block of things to be resets starts, the number of things in
a "tier" of those things, the number of tiers of things, and the
chance to pick from a better tier. The chance to pick from a better
tier can be either a random chance like 1/5 per tier, or it can be
based on the level of the thing being reset, so that more powerful
things can pick from better tiers of equipment.
Here's what randpops can do:
I have 10 cloth armor, 10 leather armor, 10 chain armor, 10 splint
armor, and 10 plate armor starting at item 700. I have a randpop
item that starts at object 700, has 10 items per tier and 5
tiers. When a creature has this randpop item reset on it, the tier
is chosen by checking if (random(1,150) < mob_level) If the check is
true, then the tier gets increased. What this means is that a level
150 creature will always repop plate armor, and a level 10 creature
has a (1/15)^4 chance of popping a piece of plate armor. It's easy
to give mobs "background equipment" just by putting a 5x reset of a
randpop armor item at 50-75 percent, so they get a few pieces of
armor. It doesn't check against loading two pairs of boots, but it
does pretty well for very little builder effort.
This is an example of how these two things work together:
Let's pretend that I'm really lazy and that I hate building. I want
to make lots of forests on my MUD and I don't want them to be
barren, but I also don't want to have to make 100 kinds of squirrels
and wolves for each area and then reset them to specific locations.
What I do is I set aside a block of vnums to make "forest mobs". I
might set aside 50 vnums for small creatures, 50 for medium, 50 for
large, and 50 for huge. I might not even fill up all 50 slots at the
start, since if the code tries to load a creature where no creature
exists at that vnum, it will just not load anything and move on.
I then create a randpop item that has a start_vnum equal to the vnum
of the first "small" creature. I set the number of elements in a
tier to 50, and I set the number of tiers to 4. I then set the
chance of picking something from a more advanced tier to 1/5.
I then go to my start area, and I put a reset of 2000 copies of the
forest mob randpop item at 50 percent.
When the start area resets, it checks how many creatures from vnum
(start_vnum) to vnum (start_vnum+50*4) exist in the world. If it's
less than 2000, say 2000-N, it attempts to load N new creatures.
It checks if the randpop item is a randpop item or not. If it's not,
it knows that it will reset the thing in question. If it is a
randpop item, it records that fact.
For each of the N tries,
It checks if the 50percent chance roll is made, and if not,
nothing gets reset.
If it's not a randpop item, the thing being reset is the original
thing. If it is a randpop item, the thing being reset has to be
found. The randpop item is checked and a mob is chosen from the
list. So, 4/5 of the time, a small creature will be picked, and
(4/5)(1/5) of the time a medium, (4/5)(1/5)^2 a large, and
(4/5)(1/5)^3 a huge will be picked. If it loops past huge, it goes
back to loading a small. Then, one of the creatures of the
appropriate size is picked (pick randomly from the 50
available). If this doesn't exist, since there may not be 50
things in that tier, do nothing this iteration.
If the creature exists, we now find a random area, and a random
room for that creature. If it has special sector flags on it, pick
only from those rooms with the appropriate sector flags
themselves. This part should probably be done more uniformly over
all rooms in all areas (such as by keeping track of the number of
forest rooms and water rooms overall), but right now it does the
random area followed by random_room search. If the area has no
rooms of the proper type, then nothing gets loaded this iteration.
If the room is found, then the creature gets loaded into that
room. And as before with the guard and the sack and the bread, if
it's a wandering elf, it may load random armors, and it may load a
sack that loads bread.
This is repeated this N times, and the net effect is that after
several resets, we reach the point where there are close to 2000
forest creatures in the world. If some of the forest creatures are
given a simple drive to find and eat other things, then we get a
nice little ecology set up. Over time, if players attack things near
their cities, then the mobs will appear to concentrate in unused
areas, simply because the random resets there never get killed.
John - Random Resets Kwon Ekstrom
- Random Resets John Robert Arras
- [MLP] The use of ecology models Rayzam
- Interesting things to do (was: Player Accounts on a Non-Commercial MUD) John Buehler
- Apple WWDC? amanda@alfar.com
- Apple WWDC? Nathan F. Yospe
- Apple WWDC? Amanda Walker
- Apple WWDC? Sasha Hart
- Apple WWDC? amanda@alfar.com
- Apple WWDC? Brian Hook
- Apple WWDC? John A. Bertoglio
- Apple WWDC? Daniel.Harman@barclayscapital.com
- Apple WWDC? Matt Mihaly
- Apple WWDC? shren
- Apple WWDC? Matt Mihaly
- Apple WWDC? John A. Bertoglio
- Apple WWDC? James Edward Gray II
- Apple WWDC? Brian Hook
- Encouraging groups without grouping Brian 'Psychochild' Green
- Introduction and My solution to Powergamers, Treadmills, and Content Devaluation. Ken Raisor
- The audience is the medium. For now. John Szeder
- The audience is the medium. For now. John Buehler
- The audience is the medium. For now. Damion Schubert
- The audience is the medium. For now. Ted L. Chen
- The audience is the medium. For now. Shane Gough
- The audience is the medium. For now. Michael Tresca
- The audience is the medium. For now. Ted L. Chen
- The audience is the medium. For now. Marian Griffith
- The audience is the medium. For now. Vincent Archer
- The audience is the medium. For now. Damion Schubert
- The audience is the medium. For now. David B. Held
- The audience is the medium. For now. Ted L. Chen
- The audience is the medium. For now. Marian Griffith
- The audience is the medium. For now. F. Randall Farmer
- The audience is the medium. For now. J C Lawrence
- The audience is the medium. For now. Frank Crowell
- Ownership of characters Jasper McChesney
- Explorers? (Was: Codename Blue & Facets - Nick Yee's new studies) Brian 'Psychochild' Green
- Befriending Critters (was: Random Resets) Arthaey
- Questions about server design Ben Chambers
- Questions about server design Michael Bayne
- Questions about server design Sean Middleditch
- Questions about server design Mike Shaver
- Questions about server design Kwon Ekstrom
- Questions about server design szii@sziisoft.com
- Questions about server design F. Randall Farmer
- Questions about server design James Edward Gray II
- Questions about server design Shane Gough
- Extensibility Ben Chambers
- Extensibility Ammon Lauritzen
- Extensibility Kwon Ekstrom
- Extensibility Ben Chambers
- Extensibility "Christopher {siege} " OBrien
- Extensibility Sean Middleditch
- Extensibility Sean Kelly
- Extensibility John Buehler
- Extensibility shren
- Extensibility John Buehler
- Extensibility szii@sziisoft.com
- Extensibility John Buehler
- Extensibility szii@sziisoft.com
- Extensibility Mike Shaver
- Question: Any published research on Sims type game personae? susan wu
- [MLP] Why care about levels? (was: The use of ecolo Richard Woolcock
- [MLP] Why care about levels? (was: The use of ecolo gy models) Jon Lambert
- Component Design (was: Extensibility) Scion Altera
- [BIZ] Selling Stock (formerly Blacksnow revisted ) Robert A. Rice, Jr.
- Games are Hot. Period Michael Tresca
- Games are Hot. Period Gladimir
- Games are Hot. Period Richard Aihoshi aka Jonric
- Games are Hot. Period Freeman, Jeff
- Games are Hot. Period Richard Aihoshi aka Jonric
- Games are Hot. Period Koster, Raph
- Games are Hot. Period Vincent Archer
- Games are Hot. Period Richard Aihoshi aka Jonric
- Games are Hot. Period Matt Mihaly
- fun Matt Mihaly
- [TECH] Shortest Path William Murdick
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Ted L. Chen
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction John Buehler
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Ted L. Chen
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Eli Stevens
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Jon Leonard
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Hans-Henrik Staerfeldt
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction Robert Zubek
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction ceo@grexengine.com
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Hans-Henrik Staerfeldt
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Ted L. Chen
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction Koster, Raph
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction lynx@lynx.purrsia.com
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Ted L. Chen
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Rudy Neeser
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Matt Mihaly
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction Daniel.Harman@barclayscapital.com
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction John Buehler
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Ted L. Chen
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction Mike Shaver
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction John Buehler
- [TECH] Voice in MO* - Phoneme Decomposition and Reconstruction amanda@alfar.com
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction Koster, Raph
- [TECH] Voice in MO* - Phoneme Decomposition and Rec onstruction Steve {Bloo} Daniels
- Combat with Style (was Player Accounts on a Non-Commercial MUD) lynx@lynx.purrsia.com
- Playskins Koster, Raph
- People were talking about resets.. Anderson, David
- People were talking about resets.. Sasha Hart
- People were talking about resets.. Anderson, David
- People were talking about resets.. John Buehler
- People were talking about resets.. Anderson, David
- People were talking about resets.. Arnau Rossell=?US-ASCII?Q?=F3?= Castell=?US-ASCII?Q?=F3?=
- People were talking about resets.. shren
- People were talking about resets.. Anderson, David
- People were talking about resets.. David B. Held
- People were talking about resets.. shren
- People were talking about resets.. Anderson, David
- People were talking about resets.. Michael Tresca
- People were talking about resets.. Fred Clift
- People were talking about resets.. Lars Duening
- People were talking about resets.. Michael Tresca
- People were talking about resets.. Rayzam
- People were talking about resets.. Matt Mihaly
- People were talking about resets.. Tand'a-ur
- People were talking about resets.. John Buehler
- People were talking about resets.. Leland Hulbert II
- People were talking about resets.. lynx@lynx.purrsia.com
- People were talking about resets.. Jason Murdick
- People were talking about resets.. Jeff Lindsey
- People were talking about resets.. Ben Chambers
- People were talking about resets.. Sasha Hart
- People were talking about resets.. David B. Held
- People were talking about resets.. Sasha Hart
- People were talking about resets.. Anderson, David
- People were talking about resets.. David B. Held
- People were talking about resets.. Acius
- People were talking about resets.. Marian Griffith
- Question about copyovers. Anderson, David
- Question about copyovers. Tand'a-ur
- Question about copyovers. Anderson, David
- Question about copyovers. Kwon Ekstrom
- Question about copyovers. Adam
- Question about copyovers. Oliver Jowett
- Question about copyovers. Kwon Ekstrom
- Question about copyovers. Lars Duening
- Question about copyovers. Jon Lambert
- Question about copyovers. fred@clift.org
- Question about copyovers. Zach Collins {Siege}
- Question about copyovers. Smith, David {Lynchburg}
- non-violent activities (was People were talking about resets..) Ammon Lauritzen
- References on personality and emotion models Robert Zubek
- Multimodal interface conference. Rayzam
- Hyperbolies R Us shren
- Hyperbolies R Us Matt Mihaly
- TECH: Systems Administration Issues Thomas Leavitt
- Questions about ... XML as data format Adam
- Questions about ... XML as data format Anderson, David
- Questions about ... XML as data format Kwon Ekstrom
- R&D Matt Mihaly
- Conversation logs? Robert Zubek
- Conversation logs? Rudy Fink
- Conversation logs? Vincent Archer
- Conversation logs? Shane Gough
- DGN: Elastic Advancement in MUDs? Jeff Lindsey
- DGN: Elastic Advancement in MUDs? David B. Held
- Building histories off civilizations automatically adam Martin
- ADMIN: Virii and mail forgeries J C Lawrence
- Hi from the Dragon Empire's CLM Peter Tyson
- Linux gaming ( was Apple WWDC? ) Kevin Mack
- [TECH] Preferred LPC replacement? Jeff Bachtel
- [TECH] Preferred LPC replacement? Damion Schubert
- Who `owns' conversation logs? Joshua Judson Rosen
- The Online Gaming Life for Me! Michael Tresca
- Boredom Ben Chambers
- Law of Diminishing Marginal Utility [was Boredom] Ron Gabbard
- Law of Diminishing Marginal Utility [was Boredom] Caliban Tiresias Darklock
- "MMOG" Bible Brian 'Psychochild' Green
- "MMOG" Bible David Kennerly
- TECH: Single process v.s. multi process? Philip Mak
- TECH: Single process v.s. multi process? Smith, David {Lynchburg}
- TECH: Single process v.s. multi process? Bruce Mitchener
- TECH: Single process v.s. multi process? Bruce Mitchener
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Clay
- In defense of "soloability" [was Law of Diminishing Marginal Utility] apollyon
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Caliban Tiresias Darklock
- In defense of "soloability" [was Law of Diminishi ng Marginal Utility] Koster, Raph
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Michael Tresca
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Paul Schwanz
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Martin C. Martin
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Dave Rickey
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Sanvean
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Matt Mihaly
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Michael Tresca
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Kwon Ekstrom
- In defense of "soloability" [was Law of Diminishing Marginal Utility] Ron Gabbard
- Game shows Peter Tyson
- What keeps people interested in social muds? Martin C. Martin
- What keeps people interested in social muds? Rudy Fink
- What keeps people interested in social muds? Martin C. Martin
- What keeps people interested in social muds? Joshua Judson Rosen
- What keeps people interested in social muds? Ron Gabbard
- What keeps people interested in social muds? Marc Bowden
- What keeps people interested in social muds? Joshua Judson Rosen
- What keeps people interested in social muds? lynx@lynx.purrsia.com
- What keeps people interested in social muds? Richard A. Bartle
- What keeps people interested in social muds? Martin C. Martin
- What keeps people interested in social muds? Richard A. Bartle
- New Beginings Drylar Levre
- New Beginings Acius
- New Beginings ceo@grexengine.com
- New Beginings Bruce Mitchener
- New Beginings David B. Held
- New Beginings Kwon Ekstrom
- New Beginings David B. Held
- New Beginings Kwon Ekstrom
- New Beginings Sean Kelly
- New Beginings Lars Duening
- New Beginings David B. Held
- New Beginings Lars Duening
- New Beginings Bruce Mitchener
- New Beginings David B. Held
- New Beginings Kwon Ekstrom
- New Beginings Paul Schwanz
- New Beginings Zach Collins {Siege}
- New Beginings Miroslav Silovic
- New Beginings David B. Held
- New Beginings Draymoor a Vin il'Rogina
- New Beginings David B. Held
- New Beginings Kwon Ekstrom
- New Beginings Bruce Mitchener
- [DGN] Creating a MUD Richard Krush
- [DGN] Creating a MUD Acius
- [DGN] Creating a MUD Caliban Tiresias Darklock
- [DGN] Creating a MUD Edward Glowacki
- [DGN] Creating a MUD Kwon Ekstrom
- [DGN] Creating a MUD Edward Glowacki
- [DGN] Creating a MUD Fred Clift
- [DGN] Creating a MUD David Bennett
- [DGN] Creating a MUD fred@clift.org
- [DGN] Creating a MUD Damion Schubert
- [DGN] Creating a MUD Taylor
- [DGN] Creating a MUD Matt Mihaly
- [DGN] Creating a MUD Daniel.Harman@barclayscapital.com
- On the creation of constructive/social behaviours in online games! Marc Demesel
- [DGN] MUD Books James Edward Gray II
- [DGN] MUD Books Scion Altera
- [DGN] MUD Books Jeremy Noetzelman
- [DGN] MUD Books Tand'a-ur
- Positive reinforcement for socializing [was In de fense of "soloability" ] Jeff Lindsey
- Character skill distribution and trade-offs Ron Gabbard
- Character skill distribution and trade-offs Daniel.Harman@barclayscapital.com
- Character skill distribution and trade-offs Vincent Archer
- Character skill distribution and trade-offs Daniel.Harman@barclayscapital.com
- Character skill distribution and trade-offs John Buehler
- Character skill distribution and trade-offs Sean Kelly
- Character skill distribution and trade-offs Ron Gabbard
- Space partitioning, R-Trees? Dread Quixadhal
- Space partitioning, R-Trees? Daniel.Harman@barclayscapital.com
- Space partitioning, R-Trees? Hans-Henrik Staerfeldt
- Space partitioning, R-Trees? Crosbie Fitch