Question about random terrain tiles between two copies of the game.

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
BajMic
Posts: 44
Joined: January 24th, 2023, 1:22 am

Question about random terrain tiles between two copies of the game.

Post by BajMic »

This may be an unusual question.

When I am creating a map in the editor, it seems to preemptively determine which graphic tile will land on each hex for each terrain type.

So, for instance, if I put log cabins on the map, some are with fence, some are with three windows, etc., depending on which hex do I place them.

When I load the map, it always has the same graphics.

My question is:
If someone uploads my scenario and plays it on their copy of Wesnoth, do they see the same graphic tiles as I did or do they shuffle and they see a different map?
gnombat
Posts: 710
Joined: June 10th, 2010, 8:49 pm

Re: Question about random terrain tiles between two copies of the game.

Post by gnombat »

I'm not sure what the answer to your question is, but I think it's probably best to assume that the tiles will not necessarily be rendered in exactly the same way. Even if it might appear to work, there's no guarantee that it will work in all circumstances. For example, the rendering might change in the next version.

If it's really important that terrain be rendered in exactly the same way, it's probably best to use a custom terrain or an overlay.

See also this discussion - it is not exactly the same as your question, but I think it shows that terrain rendering is not really predictable and it may change for surprising reasons.
User avatar
Celtic_Minstrel
Developer
Posts: 2241
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Question about random terrain tiles between two copies of the game.

Post by Celtic_Minstrel »

I believe it uses the coordinates of the tile to decide which variant will be shown. If I'm right on that, then the answer to your question would be yes.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply