This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Item Units


On Mon, 2004-08-23 at 19:09, Eric McDonald wrote:
> Lincoln Peters wrote:
> 
> > I experimented with control-range in a game module involving
> > necromancers and undead armies.  The idea was that undead units would be
> > helpless if they were more than 16 cells away from the necromancer,
> > except for vampires and liches, which can function normally up to 24
> > cells away and can relay orders.
> > 
> > It seemed to work decently, but it was around the time that the
> > pathfinding code was radically re-engineered (and later radically
> > un-re-engineered), so I ran into a bunch of problems that may have been
> > totally unrelated to the control code and eventually lost interest in
> > it.  Maybe I should take another look at it.
> 
> Yes. I bet it will turn up some bugs. Depends on how well the 
> actor/agent (unit/unit2) separation has been honored and enforced in the 
> kernel action code.... Actors are units which have ACP's and are doing 
> the controlling, whereas agents are being controlled and using the 
> actor's ACP's. Or, at least, that is my understanding of the code.

The way it seemed to be working was that agents had their own ACP's, but
they stopped working if they moved too far away from the actor.  I
didn't notice anything about agents using an actor's ACP's, although
that wouldn't have made sense for this game.

One thing that surprised me was that if an agent went out of range, it
became not just impossible to make it act, it became impossible to
select it at all!  I don't know if this is how it's supposed to work.

> 
> Encumberment should be able to be modelled with the 'occupant-adds-acp' 
> table. I am thinking that I forgot to test it with negative values, but 
> did deliberately set it up allowing values between TABLO (-32768) and 
> TABHI (32767), and so it should be able to be used to model negative 
> effects on ACP as well as positive ones.

True, but I had hoped that I could prevent a knight from wearing two
suits of armor at all, thus avoiding this whole issue.  Although I might
want to set up a game to allow knights in light armor to move faster
than knights in heavy armor...

Maybe I've got another idea to experiment with in 'knights.g' (or
whatever I end up calling it once it's finished).

> 
> > 2. If I use generic capacity, I can ensure that a knight can wear one
> > and only one suit of armor, but I lose the ability to do anything
> > similar with other items (different kinds of shields, helmets, magic
> > rings...).  I would have to make various kinds of armor, shields, rings,
> > etc. fit in generic capacity; therefore a knight could wear one suit of
> > plate armor normally, and one on his finger in place of a ring of
> > protection (now *that's* a silly mental image).
> 
> Don't forget the 'occupant-max' table. You can set the total capacity 
> high, and then limit certain types using 'occupant-max'.

But can you limit groups of units, so that a knight can only wear one
suit of armor even if I define multiple kinds of armor?

> 
> One exercise you can do is:
> Sit down and draw a square, say a 5x5 square, representing the unit's 
> total capacity. Then, place, say, a 3x3 square inside the larger square, 
> and let it represent the "armor slot". Then, lay out other squares and 
> rectangles representing other contents the unit may have. You can, of 
> course, use rectangles for your container instead of squares.
> 
> After this, you have a crude visualization of your space consumption, 
> and can fill out the various tables accordingly.

That had not occurred to me.  However, I notice one possible exploit in
this solution:

Suppose that a knight's generic capacity is 24.  A suit of armor is size
13, a shield is size 6, and a helmet is size 5.  If a knight has no
armor, he can carry 4 shields instead!


Perhaps I could prevent this if unit capacity could be represented in
two or more dimensions, but it would still be awkward and prone to
error.

> 
> >>Yeah, no kidding. And I thought it was 10000 in order to win the magic 
> >>donut.
> > 
> > I guess I need to get back to work on knights.g!
> 
> I thought it was 'red-wizard.g' now. But, whatever it is called, I think 
> it did have promise last time I looked at it.

I've been re-naming it every time I decide to radically re-engineer it,
so that (hopefully) I can re-trace my steps if some weird bug crops up. 
The current incarnation is called 'knightmare.g'.

---
Lincoln Peters
<sampln@sbcglobal.net>

Keep your eyes wide open before marriage, half shut afterwards.
		-- Benjamin Franklin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]