Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5324 closed defect (duplicate)

Replays after saving not start...

Reported by: Rado Penev Owned by:
Priority: Should Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by elexis)

Hi! When I'm saving the game (and log-off), after that go to play again, at the "replay" folder was created two replays: 1) for the game to saving moment 2) for the full game ( if saves are more of one the replays are the same count) Starting 1) everything is OK, the replay go on to the saving moment. But ..... when I start the full game replay it NOT start? Attachments are the files for the corresponding replays Before and After, command.txt/ metadata.json

refs https://wildfiregames.com/forum/index.php?/topic/25039-replays-after-saving-unreplayable/

Attachments (3)

BeforeAndAfterSanig.tar.gz (83.8 KB ) - added by Rado Penev 5 years ago.
AllCommands.tar.gz (420.8 KB ) - added by Rado Penev 5 years ago.
CCmpCinemaManager.patch (910 bytes ) - added by Rado Penev 5 years ago.

Download all attachments as: .zip

Change History (20)

by Rado Penev, 5 years ago

Attachment: BeforeAndAfterSanig.tar.gz added

comment:1 by Rado Penev, 5 years ago

Description: modified (diff)

comment:2 by elexis, 5 years ago

Milestone: Backlog
Resolution: duplicate
Status: newclosed

by Rado Penev, 5 years ago

Attachment: AllCommands.tar.gz added

comment:3 by Rado Penev, 5 years ago

Hi\\

Thank you for your reply sir\\

If I'm correctly understand, the "appending" of two commands.txt will solving the problem?

Let's define :

  • start-commands.txt - the turns before saving the game-session

*end-commands.txt - the turns after saving the game-session which is exactly unreplayable

 

Yes, agree ... the offset of turn numbers must be set in right order, something like new attachments AllCommands.tar.gz? I'm right? ... I am testing the new one commands.txt ... replay is go, but final is not the same like new game-session Best Regards

Version 2, edited 5 years ago by Rado Penev (previous) (next) (diff)

comment:4 by Rado Penev, 5 years ago

Resolution: duplicate
Status: closedreopened

comment:5 by elexis, 5 years ago

Notice the turns in the replay file end-commands.txt start with 0 instead of 46362. If the numbers were changed, I suppose you could concatenate them.

But if you want to hack it, you can use this patch, it will first load the savegame (unzipped savegame and filename passed via commandline) and the start the end-commands.txt. https://trac.wildfiregames.com/attachment/ticket/4279/visualreplay%2Bsavegame_v1.patch

It's still a duplicate of #4367.

comment:6 by Rado Penev, 5 years ago

I agree with you duplicate of #4367 and I will close the #5324

.... but where am I wrong?

The first, may be my mistake - lets explain what exactly is the issue here!?!

  • game: single player
  • save game and reopen after that and finish successfully

in the replay folder: 1) dir / commands.txt; metadata.json/ to the saving moment

2)dir/ commands.txt; metadata.json/ from the saving moment to the end

Replay 1) start and go OK... but 2) for the reasons described on #3963 is unreplayable!

OK .... I want to make 2) replayable

*According to #3963  and

Let's define :

  • start-commands.txt - from 1)

*end-commands.txt - from 2) which is exactly unreplayable

*remove "header" of 2) and get everything after/ "turn"s,"end"s,"cmd"s

*set the offset of turn numbers in 2) like continued of 1) ( from the (last number of 1))+1 .....to the end)

Finally start replay 2) ..... Replay not playing out as the real game finishing. To the saving moment everything is OK( no news here), but after that "scenario" happens not like the real game, definitely.... and final is tragedy!

Last edited 5 years ago by Rado Penev (previous) (diff)

comment:7 by elexis, 5 years ago

I suppose the first commands.txt contains commands after the savestate was creted.

The savegames are zip files, they contain a metadata.json that contains a timeElapsed number, which can be divided by the turn length (200 in singleplayer, 500 in MP) to compute the turnnumber of the savestate.

But it's really easier to compile the game with the above hack and replay the commands.txt directly without modification.

comment:8 by Rado Penev, 5 years ago

...thank you very much :)

comment:9 by Rado Penev, 5 years ago

Resolution: duplicate
Status: reopenedclosed

comment:10 by Rado Penev, 5 years ago

Hi,elexis!

Some source code updates in A.D. Alpha 23 “Ken Wood” about CCmpCinemaManager.cpp, make
https://trac.wildfiregames.com/attachment/ticket/4279/visualreplay%2Bsavegame_v1.patch

patching file CCmpCinemaManager.cpp
Hunk #1 FAILED at 111.
1 out of 1 hunk FAILED -- saving rejects to file CCmpCinemaManager.cpp.rej

unpatchable. The arguments in "virtual void Deserialize(.... & deserializer)". I see the patch is yours and maybe you want to take a look?
Best Regards!

p.s if I understand your logic correctly: CCmpCinemaManager.patch

It's still a duplicate of #4367 and will be closed, but tracker do not allow me send private messages :(

Last edited 5 years ago by Rado Penev (previous) (diff)

by Rado Penev, 5 years ago

Attachment: CCmpCinemaManager.patch added

comment:11 by Rado Penev, 5 years ago

Resolution: duplicate
Status: closedreopened

comment:12 by smiley, 5 years ago

I highly suspect the replay concatenation trick to not work in cases where an AI is invloved due to #3858. Which explains why it went oos previously. Just that there is no warning in cases like these.

in reply to:  10 comment:13 by Stan, 5 years ago

Resolution: duplicate
Status: reopenedclosed

Replying to Rado Penev:

It's still a duplicate of #4367 and will be closed, but tracker do not allow me send private messages :(

In this case ask questions in #4367 and not here :) There is really no point in reopening this ticket over an over.

comment:14 by Rado Penev, 5 years ago

sorry for the inconvenience...

comment:15 by Stan, 5 years ago

It's fine :)

in reply to:  10 comment:16 by elexis, 5 years ago

Replying to Rado Penev:

heeeelp

I suspect you can ignore the CinemaManager part.

Replying to smiley:

I highly suspect the replay concatenation trick to not work in cases where an AI is invloved due to #3858. Which explains why it went oos previously. Just that there is no warning in cases like these.

Indeed the AI computes new plans after deserialization. The patch in the commandline might work (same plan after deserialization?), maybe.

Singleplayer games / replays have no hash in the replay. Multiplayer games / replays are hashed, so you will get a notification if the replay state differs if you played an MP match.

comment:17 by elexis, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.