Terrain - Removing village healing
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.
- Aucrin-Ix-Seis
- Posts: 12
- Joined: July 8th, 2023, 6:22 pm
Terrain - Removing village healing
Hello there.
I want to modify the current definition of some terrains inside my custom campaign, specifically the villages definition to remove their healing effects. But I don't know what would be the preferred approach: should I modify (in some way which I haven't clear) the core definition of the terrain? Or should I define a new terrain type altogether using the same images of the core villages?
Aucrin-Ix-Seis
I want to modify the current definition of some terrains inside my custom campaign, specifically the villages definition to remove their healing effects. But I don't know what would be the preferred approach: should I modify (in some way which I haven't clear) the core definition of the terrain? Or should I define a new terrain type altogether using the same images of the core villages?
Aucrin-Ix-Seis
- beetlenaut
- Developer
- Posts: 2827
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Terrain - Removing village healing
Village healing is set in the [terrain_type] tags. You can see them in
/data/core/terrain.cfg
. You will have to define your own [terrain_type] for each kind of village you need without the line that sets the healing.Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Aucrin-Ix-Seis
- Posts: 12
- Joined: July 8th, 2023, 6:22 pm
Re: Terrain - Removing village healing
Thanks a lot. It worked like a charm. I needed to add the last macro to ensure the terrain kept the appearance.
This is the result:
This is the result:
Code: Select all
[terrain_type]
symbol_image=village/human-city-tile
id=MfaW_City_Village
name= _"Village"
editor_name= _"Human City (no healing)"
string=^Zhc
aliasof=_bas, Vt
default_base=Rr
editor_group="wesnoth-MfaW"
[/terrain_type]
{NEW:VILLAGE_TOD *^Zhc village/human-city}
- Celtic_Minstrel
- Developer
- Posts: 2235
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Terrain - Removing village healing
That's not even a village anymore, since you removed not only
heals=8
but also gives_income=yes
. If that's what you wanted, then that's fine, it just didn't sound like it was.- Aucrin-Ix-Seis
- Posts: 12
- Joined: July 8th, 2023, 6:22 pm
Re: Terrain - Removing village healing
Yeah, to tell you the truth it's behaving exactly as I intended. I removed the income per village for each 'side' to prevent them to affect the gold values, but this is a better solution.Celtic_Minstrel wrote: ↑February 13th, 2024, 4:22 am That's not even a village anymore, since you removed not onlyheals=8
but alsogives_income=yes
. If that's what you wanted, then that's fine, it just didn't sound like it was.
I only have this weird error now:
Code: Select all
20240216 10:46:52 error config: Error while loading the map: Unknown tile in map: (Rr^Zhc) 'Rr^Zhc
- beetlenaut
- Developer
- Posts: 2827
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Terrain - Removing village healing
It's usually a bad idea to ignore errors that don't seem to affect the game. It might work on your system, but not somebody else's, or it may only work most of the time.
It sounds to me like you are loading the scenarios before you load the terrain_type definition. If that's the problem, you probably just need to change the order in _main.cfg.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Aucrin-Ix-Seis
- Posts: 12
- Joined: July 8th, 2023, 6:22 pm
Re: Terrain - Removing village healing
Done. No related errors now in the add-on. Thank you.beetlenaut wrote: ↑February 16th, 2024, 6:08 pm It sounds to me like you are loading the scenarios before you load the terrain_type definition. If that's the problem, you probably just need to change the order in _main.cfg.