1.11 same traits when reloading a save

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
uzy5o
Posts: 52
Joined: March 9th, 2008, 2:39 am

1.11 same traits when reloading a save

Post by uzy5o »

I'm playing a campaign on version 1.11.2 and I noticed that, when I load a save and recruit a unit, that unit's traits, and the traits of the next recruits, is always the same every time I load that save. It doesn't even matter what unit type I recruit. (Though the recruit list is all human units so they share the same traits)

Is this a bug or intended?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: 1.11 same traits when reloading a save

Post by Dugi »

Looks like intended, it prevents you from reloading until each unit gets perfect traits.

As far as I know, there are two random seeds in the game, one is used by WML (and obviously also by the trait generator), and the other one is used for hit/miss ratio.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: 1.11 same traits when reloading a save

Post by Anonymissimus »

Dugi wrote:As far as I know, there are two random seeds in the game, one is used by WML (and obviously also by the trait generator), and the other one is used for hit/miss ratio.
I very much noticed this change, which is pretty important from a campaign player's view, as well.
I doubt the hit/miss RNG is seeded; it gives different results on retries.
I also doubt the effect was intended, there seems to be no such commit effecting the issue. Rather it is a side effect of the scenario transition refactoring that took place (for instance). It looks as if the way it's now is what was always intended and the fact that one could exploit trait generation by reloading a save, so-called re-rolling, was rather a bug. Re-rolling is often not considered cheating as opposed to save-loading at other times, since it takes place at the very start of the scenario.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: 1.11 same traits when reloading a save

Post by Dugi »

I doubt the hit/miss RNG is seeded; it gives different results on retries.
I wanted to say that this second seed is not reloaded when loading a save file. It must be seeded because otherwise networked multiplayer wouldn't work. But that doesn't matter.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: 1.11 same traits when reloading a save

Post by Anonymissimus »

Dugi wrote:It must be seeded because otherwise networked multiplayer wouldn't work.
That argument doesn't hold. Not 100% sure, but I think that in networked multiplayer the combat calculation takes place on that client which belongs to the currently active side only. The result is then sent to the other clients. That's how the synchronization works; look at wesnoth.synchronize_choice, it's the same logic. It also means that we can't just have the much wanted "simultaneous allied player turns" feature.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: 1.11 same traits when reloading a save

Post by Dugi »

And how it is done during the AI's turn (I am not trying to argue, just interested)?
And thanks for telling me about a very nice way to cheat :twisted:.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: 1.11 same traits when reloading a save

Post by AI »

Think about multiple human players on one computer. AIs work the same, though if the player disconnects, any controlled AIs are moved to a new client fairly transparently. (I think they all run on the host, but I'm not sure about that)
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: 1.11 same traits when reloading a save

Post by Anonymissimus »

Dugi wrote:And how it is done during the AI's turn (I am not trying to argue, just interested)?
Ai code is executed only on the host client. Those ai sides which have been ai from the beginning on at least. So probably, once that a side which is ai gets its turn, the host calculates the stuff, which units to attack, combat results etc, and sends it to all other clients, which then get displayed the animations and results.
Dugi wrote:And thanks for telling me about a very nice way to cheat :twisted:.
What way to cheat ? Modifying your engine so that you hit more etc ? It is well known anyway. Personnally, I wouldn't even know where I had to look should I desire doing that.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: 1.11 same traits when reloading a save

Post by Dugi »

I did not want to cheat, just that all the cheaters I have seen so far have just edited some cfg files and then OoS errors happened, and this one would not create them (but there are other ways to do it anyway, like preventing the fog or shroud from appearing). But cheaters in MP are usually children with no idea how to change the source code and compile it then.
Post Reply