1.15.17 custom terrain query

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
Spannerbag
Posts: 505
Joined: December 18th, 2016, 6:14 pm
Location: Yes

1.15.17 custom terrain query

Post by Spannerbag »

Hi (again),
Recently migrated my half-done UMC from v14 to v15 (mainly 'cos by the time the damn thing's finished we'll be on v22.87).

Aaaanyway, what I had worked pretty well on v14.
Since then I have made significant code changes (partly to align with v15, e.g. Wose Shamans now in core, special notes and so forth) as well as removing bloat.
However I have not touched the custom terrain code which works (in editor and game) but generates log config errors?
(V14 does not do this.)

Here are a couple of clipped screen grabs from v15 just to show that they do work...
Editor:
sol-editor.png
sol-editor.png (59.22 KiB) Viewed 407 times
In-game:
sol-game.png
sol-game.png (48.22 KiB) Viewed 407 times
Whenever custom terrain appears in a map there is a log entry of the form:
error config: Error while loading the map: Unknown tile in map: (Sm^Soys) 'Sm^Soys'

Here are the relevant terrain definitions:

terrain-graphics.cfg

Code: Select all

{OVERLAY_RANDOM *^Soys saltmarsh/sol}
terrain-type.cfg

Code: Select all

[terrain_type]
  symbol_image=saltmarsh/sol
  id=soloverlay
  editor_name= _ "Saltmarsh Overlay"
  name= _ "Saltwater"
  string=^Soys
  aliasof=_bas
  editor_group=lsb
[/terrain_type]
The images are located in the UMC images/terrain/saltmarsh folder and are:
sol.png, sol2.png, sol3.png, sol4.png, sol5.png, sol6.png, sol7.png, sol8.png, sol9.png, sol10.png and sol11.png.

I've not tested this exhaustively but suspect that every custom terrain causes a log entry (thus far in my testing all custom terrain gets a mention).

I'm asking this because I have a much more gnarly issue involving recruitment (that again worked in 1.14) and I want to be sure this isn't somehow causing it.
I'm close to running out of ideas but have not asked for help (yet) as there are one or two things left to try.

One other thing: after player clicks the "End Scenario" button and the new scenario is loading, sometimes (but not always) the music stutters.
However IIRC I am running v15 on the lowest supported platform; a clapped-out but clean Windows 7 PC (6GB RAM) so it may just be that?

If someone familiar with terrain could have a look at the above and clarify whether or not I've mucked up the custom terrain that would be a great help!

If you need more info. (e.g. entire terrain definitions or a zip of the terrain images) please let me know.

Cheers!
--Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Spannerbag
Posts: 505
Joined: December 18th, 2016, 6:14 pm
Location: Yes

1.15.17 custom terrain query - log entries [edited]

Post by Spannerbag »

Update to previous post.

Started campaign from scratch and played until custom terrain appeared, repeatedly loading and viewing the log file.
Did a terrain description which was correct. Continued to turn 2 (terrain appears during [event] name=start).
Then re-loaded turn 1.
Log file never changed from start of campaign.
It is reproduced here in full:

Code: Select all

Battle for Wesnoth v1.15.17 x86_64
Started on Tue Sep 28 14:50:07 2021

Automatically found a possible data directory at C:\Program Files\Battle for Wesnoth 1.15.17

Data directory:               C:\Program Files\Battle for Wesnoth 1.15.17
User configuration directory: C:\Users\USER\Documents\My Games\Wesnoth1.15
User data directory:          C:\Users\USER\Documents\My Games\Wesnoth1.15
Cache directory:              C:\Users\USER\Documents\My Games\Wesnoth1.15\cache

Setting mode to 1366x768
20210928 14:50:09 warning config: add-on 'LSB' has no _info.cfg; cannot read version info
Checking lua scripts... ok
Besides a couple of music-only folders (which are used by this campaign and work) there are no other add-ons present.


Exited the game completely (to desktop), then re-loaded turn 1.
Now the log file read:

Code: Select all

Battle for Wesnoth v1.15.17 x86_64
Started on Tue Sep 28 14:57:52 2021

Automatically found a possible data directory at C:\Program Files\Battle for Wesnoth 1.15.17

Data directory:               C:\Program Files\Battle for Wesnoth 1.15.17
User configuration directory: C:\Users\USER\Documents\My Games\Wesnoth1.15
User data directory:          C:\Users\USER\Documents\My Games\Wesnoth1.15
Cache directory:              C:\Users\USER\Documents\My Games\Wesnoth1.15\cache

Setting mode to 1366x768
20210928 14:57:54 warning config: add-on 'LSB' has no _info.cfg; cannot read version info
Checking lua scripts... ok
20210928 14:57:57 error config: Error while loading the map: Unknown tile in map: (Ds^Vrty) 'Ds^Vrty'
20210928 14:57:59 error config: Error while loading the map: Unknown tile in map: (Ds^Vrty) 'Ds^Vrty'
[Edit:]
Replay works fine.

Now I loaded the turn 1 file and saved it uncompressed and discovered that map data is saved in (at least) two places.

Map data in [snapshot] contains custom terrain
Map data in [replay_start] does not, but the replay nevertheless plays correctly, so I guess everything is correct.

[/Edit:]

I have not finished scoping out this behaviour yet and sadly won't have time to do much more for a day or so :(
However if anyone has any suggestions as to wtf is going on or needs more details please get back to me (PM preferred for next day or so).

Cheers!
--Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.15.17 custom terrain query

Post by doofus-01 »

I remember seeing that error all the time when loading a save-game with non-core terrain in the map (the little map preview would also be blank). Either that's been fixed or my memory is faulty, or both, as a quick test now doesn't cause the error. But replays still seem to cause it. You don't need to load it, just highlight it, so there is a preview attempted.
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
Spannerbag
Posts: 505
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: 1.15.17 custom terrain query [second issue resolved]

Post by Spannerbag »

doofus-01 wrote: September 29th, 2021, 2:14 am I remember seeing that error all the time when loading a save-game with non-core terrain in the map (the little map preview would also be blank). Either that's been fixed or my memory is faulty, or both, as a quick test now doesn't cause the error. But replays still seem to cause it. You don't need to load it, just highlight it, so there is a preview attempted.
Yep, seeing that in the load saved game menu. Looks like the same or very similar issue IMHO.
HttT displays a mini-map, none of my stuff does (all have custom terrain except the prologue which does not linger or autosave - I'll change this and see if the mini map works there).
Thanks for the heads-up. What is the best way to raise this as a possible issue?

More weirdness from the log files (they just keep giving!), first is a new ai/ca message, second is an issue still at the information gathering stage.
I'm pasting them in below just so all the various issues are in one place - and in case they are inter-related.

First issue:
warning ai/ca/move_to_targets: unexpected outcome of move
Multiple entries, always seems to appear after the original Error while loading the map: Unknown tile in map: (Ds^Vrty) 'Ds^Vrty' error.
The latter appears once or more but these are all listed prior to any of the ca/move messages.
I don't think this correlates with ai or player units moving onto custom terrain, but I could be wrong here, not exhaustively tested this yet...
In this scenario the player controls woses so ai units are frequently ambushed however I don't think that is the cause as such ambushes occur many times prior to the first ca/move message appearing in the log and besides there aren't enough for every single ambush event?
I have searched for that error message but have not found anything useful/relevant.

Second issue:
Fixed, my bad :oops:

Had a quick look and got lucky; was re-using code without initialising a variable (to zero). Set that and it worked fine. Sorry to have bothered you.

Cheers!
--Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
Post Reply