Follow-up Comment #3, bug #23298 (project wesnoth):

> re (1):
> That reloading is pretty much unavoidable. All core wml content is in
general dependent on macros, and even if it isn't each campaign has its own
campaign define symbol, and mp lives in its own macro space as well. I think
it would be very difficult and undesirable to change this.

The wesnothdir/data/core wml currently basically only depends on those unit
advancement macros, {EDITOR}, and some macros whose values can only be set at
programmstart, if it werent for them it would sureley be easier to cache those
part of the wml tree better and load them faster.

what was not mentioned in the first post is that the current [advancefrom] +
ifdef has other disadvatages:
3) [advancefrom] is unusable in mp since it will also add those units with the
era that adds this units isnt currently played.
4) It cannot remove advancements from units.

Currently there are only 2 ways a wml developer can to fix this
1) copy the whole unit type tree with basetypes, overwrite the advancements
and dont use the original unit types in your scenarios/era.
2) changing the advance_to dynamically with lua/wml

Both approaches have disadvantages, a problem that they both share is that the
help system can no longer show correct and clean information, in the first
case each unit will appear twice in the help while with (2) the help wont show
the new advncement options at all.

Thus i think we need a way to change units or at least units advancements on
[campaign] level, and not durng wml loading.

I am not convinced about the proposed syntax though. Mostly becasue currently
unit type ids can use characters that are not usable as attribute names in wml
tables.

> re [overwrite_unit_advancements]:
>
> I wonder if you couldn't just write some lua script that scans all the unit
types and makes substitutes for your campaign with the appropriate unit
advancements? It might be useful as a utility.
> If you like I think you could then go on to make a wml tag defined using the
lua utility.
>
> I think that would be what we the devs would do also most likely, rather
than implement it in C++.

Sry but i am unusre about what you mean here, sure it is possible to write a
lua (or and other language) script helps you creating .cfg files for copied
unit types. But i dont see how a wml tag could use such a code.


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?23298>

_______________________________________________
  Nachricht gesendet von/durch Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to