"no gold + no move" bug

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

"no gold + no move" bug

Post by SlowThinker »

I guess everybody knows the bug when a player disconnects and his side loses his gold and movement.
Firstly two ways how to manage this problem:

Solution 1:
tiboloid wrote: :eng: repairing reloaded games corrupted replays HOWTO:
1. save the game
2. open another Wesnoth client and load saved game as a replay (check the "Show replay" checkbox at the bottom of the Load Game dialog box)
3. check the "Skip animation" check box at the top of the screen
4. run the replay by clicking on "continuous replay"
5. when you reach the turn of the side before the disconnected guy, click on "pause at the end of turn"
6. save the game and reload.
Solution 2:
This is my way how to solve this problem:
  • Remember correct gold of all players
  • Let all players end their turns, so that movement is returned.
  • Then save, and edit snapshot.side.gold to correct values
an example what shall be edited

Code: Select all

[side]
	action_bonus_count="36"
	allow_player="yes"
	colour="1"
	controller="human"
	countdown_time="0"
	current_player="SlowThinker"
	disallow_observers="no"
	flag=""
	flag_icon=""
	fog="yes"
	gold="2" ## edit this line   <----------------------
	gold_add="no"
	hidden="no"
	id=""
	income="24"
	name="SlowThinker"
	no_leader="yes"
	objectives=
	...
[/side]
You can simply search for this string:
countdown_time=
a note for Conquest Minus players:
Of course this way is not perfect, as one turn passes and units heal.

--------------------------------------------------------------
Now the question:
Do you know how to edit the save directly (without ending turns of all players lioke in Solution 2), and to return the moves to the side?
Last edited by SlowThinker on January 23rd, 2014, 11:29 pm, edited 5 times in total.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
StandYourGround
Posts: 256
Joined: May 13th, 2009, 2:16 am
Location: On a blue ball spinning through space at incomprehensible speed

Re: "no gold + no move" bug

Post by StandYourGround »

Of course, the more elegant solution would be to fix the bug in Wesnoth and submit a patch...
I will now resume lurking silently.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

This is a very old bug, so I don't expect any fix.
(but I don't have 1.9, maybe it is corrected there?)
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Dunno
Posts: 773
Joined: January 17th, 2010, 4:06 pm
Location: Behind you

Re: "no gold + no move" bug

Post by Dunno »

Btw, I'm wondering, when does the bug occur? Is it on random basis? Because I remember times when player got disconnected but everything was alright.
Oh, I'm sorry, did I break your concentration?
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

I guess the chance the bug happens is 10%.

It usually happens if the side that disconnected played its turn.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Lich_Lord
Posts: 105
Joined: December 23rd, 2009, 5:22 am

Re: "no gold + no move" bug

Post by Lich_Lord »

My understanding is that the bug occurs if the player disconnects right before their turn begins, right before they get their gold and MP.

I've seen people who've gotten the bug but still had full movement on some units because they didn't move the previous turn.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

Lich_Lord wrote:My understanding is that the bug occurs if the player disconnects right before their turn begins, right before they get their gold and MP.

I've seen people who've gotten the bug but still had full movement on some units because they didn't move the previous turn.
I guess the bug arises this way:
It happens during the initialisation phase of the side's turn: The disconnection causes only part of the initialization information is sent from the client to the server. Wesnoth doesn't check whether the initialization is complete and applies the incomplete information.
Last edited by SlowThinker on January 15th, 2012, 8:11 am, edited 1 time in total.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: "no gold + no move" bug

Post by Anonymissimus »

And note that this very same bug
IS FIXED IN 1.10-rc1/1.9.14. Thumbs up for Soliton.
One more reason to leave 1.8 aside *now*.
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
Dunno
Posts: 773
Joined: January 17th, 2010, 4:06 pm
Location: Behind you

Re: "no gold + no move" bug

Post by Dunno »

wooooooooo :D
Oh, I'm sorry, did I break your concentration?
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

I don't usually spam but ...

8) thumbs up!
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

the bug is still present in 1.10
(no idea about 1.11)

I think no player needs to disconnect in order to reproduce the bug:
if a player saves when another player is ready to start his turn and faces a window "it is now xxx's turn", then the other player gets no move and no gold in the reloaded game.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: "no gold + no move" bug

Post by Anonymissimus »

SlowThinker wrote:the bug is still present in 1.10
(no idea about 1.11)

I think no player needs to disconnect in order to reproduce the bug:
if a player saves when another player is ready to start his turn and faces a window "it is now xxx's turn", then the other player gets no move and no gold in the reloaded game.
This appears to be a different bug with similar symptoms, and should not have been posted in this thread, as the way to reproduce is clearly different (and straight forward, fortunately).
Anyway post that at gna please.
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
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

bug when paused
SlowThinker wrote:if a player saves when another player is ready to start his turn and faces a window "it is now xxx's turn", then the other player gets no move and no gold in the reloaded game.
It is not correct. I did run a test and only a player that have paused the game is affected:

gna: saving+reloading may cause a side's turn is not initialized
Last edited by SlowThinker on January 1st, 2014, 4:34 pm, edited 1 time in total.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: "no gold + no move" bug

Post by SlowThinker »

bug when disconnected
Anonymissimus wrote:This appears to be a different bug with similar symptoms, and should not have been posted in this thread, as the way to reproduce is clearly different (and straight forward, fortunately).
Anyway post that at gna please.
The original bug (the one that is caused by a disconnection and not by a pause) seems to be present too in Wesnoth 1.10.7:

I played with meledestus who disconnected just before the end of my turn (he said he didn't have any dialog open). I ended my turn and got the warning that he disconnected, and saved in the beginning of his turn. After I reloaded he had no gold, although he lost no movement.
The save:
Conquest-_meledestus_side8_lost_gold_but_no_move.gz
(333.05 KiB) Downloaded 218 times
Post Reply