Change unit price for one side
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.
Change unit price for one side
I wonder if that is possible in WML
I want that side X can recruit unitY for a gold instead of the nornmal price of b gold
is this possible anyway ? any ideas ?
I want that side X can recruit unitY for a gold instead of the nornmal price of b gold
is this possible anyway ? any ideas ?
Unfortunately, it's not. Unit cost is not manipulable... this is one feature that would be really useful, though.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Done in Under the Burning Suns campaign. You can take its WML as example.zookeeper wrote:Nope, not possible. You'd need to create a custom version of the unit and give it a different cost.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
It's only "done" in UTBS by duplicating the entire WML of each unit for each price desired. It's a horrible way to do it and shouldn't be replicated unless absolutely necessary.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Looking at the .cfg files it doesn't look that bad:turin wrote:It's only "done" in UTBS by duplicating the entire WML of each unit for each price desired. It's a horrible way to do it and shouldn't be replicated unless absolutely necessary.
Desert_Archer.cfg wrote: #define DESERT_ARCHER NUM COST HIDEORNOT
...
id=Desert Archer{NUM}
hide_help={HIDEORNOT}
...
cost={COST}
...
[/unit]
#enddef
{DESERT_ARCHER "" 17 false}
{DESERT_ARCHER 2 18 true}
{DESERT_ARCHER 3 19 true}
{DESERT_ARCHER 4 20 true}
{DESERT_ARCHER 5 21 true}
{DESERT_ARCHER 6 22 true}
{DESERT_ARCHER 7 23 true}
{DESERT_ARCHER 8 24 true}
{DESERT_ARCHER 9 25 true}
{DESERT_ARCHER 10 26 true}
{DESERT_ARCHER 11 27 true}
For an AI side, that would be an adequate solution. It's only the human player that will complain about the discrepancy of displayed price and special discount.
Try some Multiplayer Scenarios / Campaigns
...not to mention the inability to recruit the unit if you have enough gold for the actual lowered cost but not for the original.Rhuvaen wrote:For an AI side, that would be an adequate solution. It's only the human player that will complain about the discrepancy of displayed price and special discount.