"upkeep=free" problem
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.
"upkeep=free" problem
Hi, I'm developing my first campaign and I would like to set some of my units to zero upkeep cost. I don't want to use {TRAIT_LOYAL}, because it will cost me one slot of unit's attributes.
So instead of that I tried "upkeep=free". It works fine until the unit levels up. Then it starts pay his/her upkeep.
Any tips, please?
So instead of that I tried "upkeep=free". It works fine until the unit levels up. Then it starts pay his/her upkeep.
Any tips, please?
Re: "upkeep=free" problem
The
upkeep
key is generally not for the coder to mess with, as far as I know. Other background mechanisms access it, that's why it resets. Instead, you could use an object set a unit to loyal "silently" (without the visible trait).Code: Select all
[unit]
# unit values
[modifications]
[object]
id=loyalty
[effect]
apply_to=loyal
[/effect]
[/object]
[/modifications]
[/unit]
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: "upkeep=free" problem
Yes what white wolf said does work, but I'm curious why is it a problem for you if it costs one of the units "attributes"? There is no limit on how many attributes a unit can have.
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: "upkeep=free" problem
WhiteWolf: Thank you, sir! This is exactly what I was looking for.
gfgtdf: I know. It's just cosmetic thing for me. I don't like unit's description, where there are more than two attributes, because then the game displays three dots ("...") - due to the long text.
gfgtdf: I know. It's just cosmetic thing for me. I don't like unit's description, where there are more than two attributes, because then the game displays three dots ("...") - due to the long text.
Last edited by serclino on October 11th, 2019, 5:38 pm, edited 2 times in total.
Re: "upkeep=free" problem
One more question, guys: Can I set up base_income to 0?
Re: "upkeep=free" problem
I'm not sure what you mean. base_income is a key inside game_config.cfg (described here), not in scenarios. If you want to set a side's income to 0, use
[side] income=-2
instead. (since base income is +2, and side income is added to 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: "upkeep=free" problem
Yes, this is what I wanted. Thanks again!
Re: "upkeep=free" problem
You're right about the sidebar, but having the extra trait (what you call "attributes" is actually called "traits" in English) is important in the recall dialog. In the recall dialog, you can type
loyal
in the textbox to filter for units that have the loyal
trait. The filter doesn't look in objects, only in the unit name, type name, level and traits, so if you give units the object and the overlay only, it'll be harder to recall them.Re: "upkeep=free" problem
josteph: Thx, good to know.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: "upkeep=free" problem
Doesn't
base_income=
also work in the scenario tag? As I understand it, the MP creation screen directly injects keys like this into the scenario based on the settings you choose, so it should work? (Though it's always possible the key is different than it would be in the game config file.)Re: "upkeep=free" problem
Well, it is not mentioned in the scenario wiki, and I never tried to use such key there, so I honestly don't know. I could test it some time if I don't forget.Celtic_Minstrel wrote: ↑October 3rd, 2019, 4:20 am Doesn'tbase_income=
also work in the scenario tag?
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
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: "upkeep=free" problem
It's not documented in the schema either, so I could be wrong... maybe the MP creation screen just injects the income key into every side.
Re: "upkeep=free" problem
I tried it today on 1.14.5,
base_income
does nothing inside [scenario], so the MP screen probably works differently. Could it be a room for improvement then, that the [scenario] tag should accept base_income?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: "upkeep=free" problem
wesnoth.game_config says base_income: integer (read/write). That does not work then?
That changes base_income. If you say what your goal is, doing that might be possible with WML too.
That changes base_income. If you say what your goal is, doing that might be possible with WML too.
Re: "upkeep=free" problem
It doesn't seem to be recognized inside [scenario].
I don't have goals here, and we strayed way off the original topic, I was just merely wondering if having the option to set base_income in [scenario] could be more convenient than having to set income for each side one by one, if for example, someone wants all sides to have +8 income
I don't have goals here, and we strayed way off the original topic, I was just merely wondering if having the option to set base_income in [scenario] could be more convenient than having to set income for each side one by one, if for example, someone wants all sides to have +8 income
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