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: Building


>Has anyone actually built something like the "shop" described in section
>2.25.3 of the design manual?  I would like to have a unit that builds
>other units of the player's choice, instantly, limited by a material, but
>only on explicit demand and in the amounts requested.  I'm getting a
>variety of bizarre behaviour depending on what settings I use, but the two
>main problems seem to be that the shop doesn't actually build units until
>the next turn after they're requested, and when it does, it builds as many
>of that type as the material allows, draining the material supply
>completely.  It also looks like sometimes twice the intended material
>price is charged.  Is there an example of a file out there where this
>behaviour is used and works?

This shop example is not implemented anywhere, and material-to-create is
not used in any current game. Lincoln Peters experimented with it in his
space-civ game and Eric in Bellum, but neither game uses it right now. So
you would have to test if this table works as Stan once intended it to. It
may well be that it does not. Features that are not used in any game are
not easy to support since nobody reports when they cease to function.

The only example of material-limited building in existing games are the
acp-independent units. These units will continue to create and build new
units as long as they have the required material. They can build several
units each turn, if provided with enough material, and they will prompt you
for what to build (and where) each time, unless you have given it a run
length, i.e. a number of units to build automatically.

>Issues I'd like to know about include:
>
>* does the "shop" need ACP?  does it need to have acp-independent turned on?

This was written long before I added acp-independent units, so the specific
example uses acps. Whether or not this would work with acp-independent
units is another question.

>* can I allow it to build in nonadjacent hexes by turning up the
>  build-range and undocumented create-range values?

Sure. In that case the game will ask you where to create the new unit.

>* should I be setting the "creation" values or the "build" values, or both?

Both. Unless you want one type of unit to create units and another to
complete the build.

>* can I make this work with take-from-treasury?

Yes.

>* how do I get it to only build one unit instead of "as many as possible"?

Are you using a run-length greater than 1? If not, you may have found a
bug. As Eric mentioned, there was a problems recently with runaway creation
due to changes in the treasury code, but it only affected acp-independent
units, and has now been fixed. And I don't think what you are describing is
the same thing.

>* how do I get it to build them immediately instead of waiting for next turn?

If you are using a normal, acp-limited unit, and it is currently out of
acps, you will have to wait for the acps to replenish at the start of the
next turn. There is no way around that. If you want the unit to be able to
create and build many units each turn you should simply give it more acps
each turn.

If you are using an acp-independent unit that is out of materials, it could
in principle resume building if you give it more materials. However, for
that to work, the buildingdone flag would also have to be reset, and that
happens only at the start of the next turn. Materials being replenished in
mid-turn was not something I had in mind when I wrote the code. It would be
easy to add code that resets the flag after material transfer, however.

Hans



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