Unit XP-bar color-setting with custom AMLA's
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Unit XP-bar color-setting with custom AMLA's
Hello,
I am using some custom AMLA's in my campaign, very similarly to how it's done UtBS.
It functions well, however, all max-level units still have blue XP-bar. This is the same in UtBS as I checked.
However, I would like to indicate that the units are already max level and will only do AMLA's by using the standard purple XP-bar. In the wiki it doesn't say anything about this, and setting strict_amla=yes doesn't help. The default AMLA code doesn't have any extra setting that would imply the colour of the XP-bar.
So what makes it purple, and how do I get it to stay purple?
Thanks,
WhiteWolf
I am using some custom AMLA's in my campaign, very similarly to how it's done UtBS.
a few examples:
However, I would like to indicate that the units are already max level and will only do AMLA's by using the standard purple XP-bar. In the wiki it doesn't say anything about this, and setting strict_amla=yes doesn't help. The default AMLA code doesn't have any extra setting that would imply the colour of the XP-bar.
So what makes it purple, and how do I get it to stay purple?
Thanks,
WhiteWolf
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: Unit XP-bar color-setting with custom AMLA's
I guess it depends on existence of advance_to in that unit.
Re: Unit XP-bar color-setting with custom AMLA's
As far as I know, it doesn't. For example, if you set advances_to=null, but omit {AMLA_DEFAULT} from a unit, the bar will be blue.
Also, judging from UtBS, Quenoth Youth has advances_to=null in its code, so it's definitely not that.
Also, judging from UtBS, Quenoth Youth has advances_to=null in its code, so it's definitely not that.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: Unit XP-bar color-setting with custom AMLA's
sorry for not being much helpful but im sure it's achievable somehow.. you just have to play around with variables REALLY a lot.. look [unit] tag and [unit_type] tags, all possible things to do with experience, amla and advancements..
my memory is crap, so i cant tell how, but im 99% certain i could do purple bars..
looking at some of my old code i found this:
i dont remember what exactly i was trying to achieve (could be the opposite of yours.. to remove purple bars from unit and give it blue one, i dont remember). So try to set
(I have no idea now why i used strict amla in MODIFICATIONS as my example shows.. browse some wiki help, maybe u find something uselful...)
there is a chance that you need to add modification to unit like so (just in your case strict_amla i assume would be YES):
or
but i can't tell if it's going to do anything for sure.. you have to try it..
best way is to use command line during local game, type there "debug" and then type "inspect" in command line as well (:debug :inspect), double dots open command line. In the inspection you can observe every unit array and see what variables you could modify (with [store_unit], [unstore_unit], or possibly [unit_type], [unit], depends on how you code your amlas etc), not all variables will be modifiable unfortunately.. but most will.
sorry for not telling you how exactly to solve your problem, because I do NOT know.. but just giving you some ideas if you despearate and nobody else able to solve your problem atm.
my memory is crap, so i cant tell how, but im 99% certain i could do purple bars..
looking at some of my old code i found this:
{VARIABLE new_unit_advancement[0].modifications.advance.strict_amla no}
i dont remember what exactly i was trying to achieve (could be the opposite of yours.. to remove purple bars from unit and give it blue one, i dont remember). So try to set
advance_to=null
(maybe nill), OR advances_to
... strict_amla - YES(I have no idea now why i used strict amla in MODIFICATIONS as my example shows.. browse some wiki help, maybe u find something uselful...)
there is a chance that you need to add modification to unit like so (just in your case strict_amla i assume would be YES):
Code: Select all
[modifications]
[advance]
id="ogre_leader_advancement"
description="Can advance into Ogre Leader"
strict_amla=no
always_display=true
require_amla=blabla
[/advance]
[/modifications]
Code: Select all
[modifications]
[advancement]
id="ogre_leader_advancement"
description="Can advance into Ogre Leader"
strict_amla=no
always_display=true
require_amla=blabla
[/advancement]
[/modifications]
best way is to use command line during local game, type there "debug" and then type "inspect" in command line as well (:debug :inspect), double dots open command line. In the inspection you can observe every unit array and see what variables you could modify (with [store_unit], [unstore_unit], or possibly [unit_type], [unit], depends on how you code your amlas etc), not all variables will be modifiable unfortunately.. but most will.
sorry for not telling you how exactly to solve your problem, because I do NOT know.. but just giving you some ideas if you despearate and nobody else able to solve your problem atm.
Re: Unit XP-bar color-setting with custom AMLA's
There is major_amla https://github.com/wesnoth/wesnoth/comm ... t-26715656. Not sure how it works, but if it does something useful, you could add it to wiki.
- Lord-Knightmare
- Discord Moderator
- Posts: 2361
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Unit XP-bar color-setting with custom AMLA's
I solved this problem two years ago. All you have to do is add
{AMLA_DEFAULT}
to your list of AMLA choices.
Spoiler:
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Unit XP-bar color-setting with custom AMLA's
That's fine, but that's precisely what I wish to avoid, because I am not increasing the max XP with these. The default is there, but it has require_amla on all the custom ones.Lord-Knightmare wrote: ↑January 20th, 2019, 1:13 pm I solved this problem two years ago. All you have to do is add{AMLA_DEFAULT}
to your list of AMLA choices.
enclave: I already tried most of those before posting
So, results: strict_amla and advances_to does nothing concerning this issue. major_amla does Apparently it defaults to yes, and if there is more than one [advancement] available with it, then the bar is blue. Setting them all to major_amla=no solves the issue and the bar is purple. I'll add this to the wiki then.
Thanks everyone
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
- Lord-Knightmare
- Discord Moderator
- Posts: 2361
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Unit XP-bar color-setting with custom AMLA's
If that's the case why not use just a customisedbecause I am not increasing the max XP with these
{AMLA_DEFAULT_UMC}
that does not cause an increase in maximum XP?If that is used, then the max_experience amount never increases pass the defined value in the
unit.cfg
file but just resets to zero after every upgrade.Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Unit XP-bar color-setting with custom AMLA's
your wiki entry is not 100% currect though, it defaults to 'no'. If it ppears to true in the code you pasted above, then it's likeley that you acceindly wrote major_amla=yes somehere before, for exampel in the {HEAL_EFFECTS} macro.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Unit XP-bar color-setting with custom AMLA's
I wasn't precise enough - I only want to enable the default AMLA specifically after a unit completed its custom AMLA's and not before. For story reasons as well.Lord-Knightmare wrote: ↑January 20th, 2019, 7:18 pmIf that's the case why not use just a customisedbecause I am not increasing the max XP with these{AMLA_DEFAULT_UMC}
that does not cause an increase in maximum XP?
If that is used, then the max_experience amount never increases pass the defined value in theunit.cfg
file but just resets to zero after every upgrade.
And indeed I did Corrected that, sorry.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny