Re: [Freeciv-Dev] Unit editor
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Christopher M Weber wrote:
>
> We have been working on a unit editor.
Hi Chris,
I've actually done something similar to what you describe, allowing
customizable units etc without recompiling. I released a patch
("rulesets") quite a while ago, and have been planning to release
an updated version soon (actually, I'm mainly waiting for anon cvs
to come back so I can release a patch relative to updated cvs).
As you describe, there are problems with U_SETTLERS etc appearing
in the code. My approach has been to eliminate these by only
referring to unit flags, and a new field similar to flags
called "roles". My current patch has removed most of the
"hardwired" unit and tech enumerated types (but not quite
all, yet).
For improvements and wonders, the situation is more difficult
because each one has a fairly unique effect which is hardwired
into lots of calculations, and I think impractical to remove. [1]
What I've done is to add a "variant" field to buildings which
allows limited choice between different hardwired effects for
individual buildings.
Regards,
-- David
[1] Though maybe not, using an adaptation of "roles"...
hm, something to think about...
|
|