Villages in elevated terrain (Bluff/Gulch in 1.17.25)

The place to post your WML questions and answers.

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.
Post Reply
User avatar
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by Xardas666 »

Hi. I want to add to my add-on a terrain type which is a village on bluff/gulch. I can try copying and experimenting with original bluff/gulch terrain-graphics code but since I don't understand how terrain-graphics.cfg works - my attempts will probably end in ugly code. I have successfully done (copied) my own terrain code which is a village on bluff/gulch but it have broken original buff/gulch. Sorry for my bad English, I have a question:

Is it possible to create an overlay terrain which is a copy of existing terrain and modify it?

Something like this?

Code: Select all

[terrain_type]
    symbol_image=elevation/village_on_a_bluff
    id=village_on_a_bluff
    editor_name= _ "Village on Bluff"
    string=^QhhV
    aliasof=_bas, Qhh
    heals=8
    gives_income=true
    editor_group=wesgothic7_terrain_pack
[/terrain_type]
And then just add this?

Code: Select all

{OVERLAY_RANDOM        *^QhhV       villages/village}
Maybe there is some macro I can copy into terrain-graphics.cfg that is copying appearance of existing terrain?
User avatar
doofus-01
Art Director
Posts: 4117
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by doofus-01 »

Xardas666 wrote: February 7th, 2024, 8:12 pm Is it possible to create an overlay terrain which is a copy of existing terrain and modify it?
Probably the best thing is to use the bluff/gulch forest as a model, for example the ^^Qhhf. Your [terrain_type] seems mostly OK, but it would be better make the aliasof=_bas, Vt (like how the wooded bluffs use "Ft")

You can ignore most of the associated rules in terrain-graphics.cfg if you stick with the "*^QhhV" pattern and don't want it to change depending on the neighboring hexes. You'd just adapt the lines near row 222 (without the A" typo, that should be fixed in mainline)

Code: Select all

{NEW:FOREST             ("A*^Qhhf,A*^Qhuf")       {SMALL_FOREST_FILTER}  forest/deciduous-winter-snow}
{NEW:FOREST             ("*^Qhhf,*^Qhuf")        {SMALL_FOREST_FILTER}  forest/deciduous-winter}
to something similar to what you have

Code: Select all

{NEW:VILLAGE             A*^QhhV                                                      village/drake-snow5}  # this line only needed if you want snow variation
{NEW:VILLAGE             *^Qhhv                                                     village/drake5}
(This is untested, but I should be around for the next 24hrs or so, if you run into trouble)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Re: Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by Xardas666 »

I tried your code but it's not working for me. I have a bit off-topic question: How I change village graphics at night?

Edit: Your code is placing villages without any elevation.

I think I can run event at night which is replacing all villages with another village terrain type but I think it's a bit overkill. Is it possible to make animation which is only played at night? If the only solution is replacing one village terrain type with another then where is best place to place this event? Is it possible to write events in [time]?
wg7_farmers_khorinis_house3.png
wg7_farmers_khorinis_house3.png (11.81 KiB) Viewed 203 times
wg7_farmers_khorinis_house3_light.png
wg7_farmers_khorinis_house3_light.png (12.08 KiB) Viewed 203 times
I want to have this village with light at night and without light at day.
User avatar
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Re: Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by Xardas666 »

I was wrong. Your code is working. Thanks. :)

I did mistake by copying/cloning terrain_type id of another existing terrain.
User avatar
doofus-01
Art Director
Posts: 4117
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by doofus-01 »

No worries.
Xardas666 wrote: February 10th, 2024, 9:43 pm Is it possible to make animation which is only played at night?
Many mainline villages do this, check out orc villages *^Vo for example

Code: Select all

{NEW:VILLAGE_TOD         *^Vo                                                      village/orc}
(TOD means Time Of Day - the exact rules are near row 4168 in core/terrain-graphics/new-macros.cfg)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Re: Villages in elevated terrain (Bluff/Gulch in 1.17.25)

Post by Xardas666 »

It's working great. Thank you. :)
Post Reply