Custom terrain type in multiplayer

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Custom terrain type in multiplayer

Post by Choicerer »

Ever since I introduced a custom terrain type in my mod, people who try to play it online without having the map in their database or having an outdated version get booted, getting the "illegal tile in map" error. My question is - can this be avoided in any way or does it really force everyone who wants to play the map online to download it/update via the add-ons server. The terrain type is an invisible overlay that distinguishes certain terrains from others while not modifying them in any way. Sadly, there is no such overlay in vanilla Wesnoth.
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Custom terrain type in multiplayer

Post by tekelili »

If you have custom terrains, all users have to download them to play, not way to avoid it. One possible work-around if you just want use an overlay to mark terrain for WML stuff:

1- Use any mainline overlay you dont use in any other place

2- Store terrain with that overlay in a variable(in event name=prestart I guess)

3- Eliminate that overlay with a [terrain] tag

4- Fire your WML stuff on those hexes with a location filter that uses find_in= your_terrain_stored_variable
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Custom terrain type in multiplayer

Post by Choicerer »

I see, thanks for the response. Interesting workaround, although wouldn't work in my case, as I'm actually transforming terrain with one terrain type which I divide in some cases into two categories (but it's still the same terrain, so then filtering for either category is impossible.)

I guess I'll have to remove the custom terrain then, as it prevents the maps from spreading. :(
Post Reply