|
|
|
|
|
April 7th, 2009, 03:47 AM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Case of the Dying Mages (and God)
Quote:
Originally Posted by chrispedersen
I don't know how the game state is maintained. Is that the fatherland file?
|
The game states are the fatherland file, yes. And it's the absolute instance that decides what is, and what isn't. The trn files that are being sent to the players are only snapshots from it.
Quote:
Originally Posted by chrispedersen
If list of all units is distributed to all users, it is subject to attack - and corruption.
|
Isn't. Compare file sizes for the fatherland and the nation's trn files. A player only gets sent as much information as he is required to know.
Also, since there were cheating attempts before, JK is using the data from the fatherland file where possible, instead of blindly accepting user input from the .2h files.
Quote:
Originally Posted by chrispedersen
Some of the results I've seen from this bug cannot be the result of just a different number seed.
|
The seeds are the same. The starting seed for each battle is being saved and reused upon replay. JK even does checksums for each turn of battle to check if there is an inconsistency. If there isn't, then in the log files for the replay you'll find the message
Code:
This battle looks just like I have forseen
for each turn. If there is an inconsistency, then you won't see those anymore, but instead, you'll see (in my case)
Code:
***** Warning: Battle inconsistency (turn 1)
for each turn.
|
April 7th, 2009, 04:08 AM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Case of the Dying Mages (and God)
Now, I have a good hunch where the battle replay inconsistencies might be coming from. I have logged the replay from the game that I posted on the page before. It's very short, only 7 turns, and not too crowded, which is good. I removed all the graphic display logging information from the log of the battle replay, and diffed the files against each other. The relevant sections from the log files are attached to this post. The diff can be inspected in a highlighted format at http://paste.pocoo.org/show/111416/ (removed lines from the original battle generation are in red, new lines from the battle replay are in green)
The battle rapidly develops very differently, as can be seen from the amounting changes between the log files. What stands out as one of the first real changes is
Code:
- est. choices 24
+ est. choices 26
which, as I interpret it, shows the available spells that a mage may cast, and evaluates their usefulness. In the battle replay, there are two more choices. A little later you see the same:
Code:
- est. choices 40
+ est. choices 42
The evaluation of spells from then on differs a little, because, it seems, there are more spells available. And this evaluation may be using the RNG, so that it then corrupts the battle replays because it uses more random numbers, thus giving different random numbers for target and hit and damage determination.
What I'm getting at, I think the problem is that during hosting, the game may be using the old spellbooks. And during replay, the game may be using the new spellbooks with the spells that have been researched during the last turn. I can't proof it, but that's what seems the most likely to me.
Another possibility is that the battle background is different. The "OptimizeWorld" lines differ even before anything regarding the spells pops up in the diff. May be worth looking into, too.
|
The Following 4 Users Say Thank You to lch For This Useful Post:
|
|
April 7th, 2009, 04:47 AM
|
|
Sergeant
|
|
Join Date: Dec 2006
Location: Australia
Posts: 202
Thanks: 98
Thanked 1 Time in 1 Post
|
|
Re: Case of the Dying Mages (and God)
Yeah that would make sense about the Research levels being different and thus changing the random numbers generated. Seems like a good place to start anyway. Good work lch.
|
April 7th, 2009, 08:26 AM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Case of the Dying Mages (and God)
P.S.: Even more of a hint that there's some kind of overflow regarding the spell books in the log diff:
Code:
+spellscore, end score -9999 (boost 86 scorat 0)
+Eval: end score 0 (fat 0)
+comp_castspell: eval end result 0
+spellscore, score 0 (boost 81 scorat 0)
+Eval: score 0 (fat 0)
+comp_castspell: eval result 0
The game evaluates the spell named "end", which is no real spell at all, but just a marker in the data to indicate the end of the spells, and even the "spell" after that, which just consist of empty, zeroed out data.
So even if this is not the culprit, there's definitely something fishy here.
|
The Following 2 Users Say Thank You to lch For This Useful Post:
|
|
April 7th, 2009, 08:58 AM
|
Captain
|
|
Join Date: Jan 2008
Posts: 913
Thanks: 21
Thanked 53 Times in 33 Posts
|
|
Re: Case of the Dying Mages (and God)
Great debugging work lch
|
April 7th, 2009, 09:19 AM
|
General
|
|
Join Date: Oct 2007
Location: Poland
Posts: 3,414
Thanks: 26
Thanked 73 Times in 49 Posts
|
|
Re: Case of the Dying Mages (and God)
lch:
It was all on PAtala's side, right? Well, it must be, as Pangaean SC had only H1, so not much to evaluate there.
I don't think that even server log of battle result that you showed in first post is good. Even if it used Elixir of Life before routing, there is just about 30-40 damage dealt after that. And he'd have 118HP. So he should be still alive. And yeah, he got 2 deaths in that battle, according to HoF.
|
April 7th, 2009, 10:33 AM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Case of the Dying Mages (and God)
Zeldor, if the battle was evaluated correctly is secondary, if the Elixir of Life has been correctly applied is of minor interest. The biggest concern is, can the battle vcr restored and viewed like it has happened before. This is of a LOT of interest to people. It's no trouble that they have lost, but they want to be able to see how it happened.
|
April 7th, 2009, 10:43 AM
|
|
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
Re: Case of the Dying Mages (and God)
And if this seeming battle replay bug is fixed, it will be MUCH easier to report any other bugs that might have happened during the battle, since you can see what's going on.
|
April 7th, 2009, 10:45 AM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Case of the Dying Mages (and God)
P.P.S.: I hang my head in shame. I remembered that we've been using mods, namely CBM, and I rechecked, the mod that I was using for the replay differed from the one that I used on the server, although they've both been named CBM 1.41:
server md5sum: e0393301aa565bc98ad5eff476778a37
client md5sum: 79d3146137c36d8b5ddc4016941690a1
I suppose that Zeldor has been using the same outdated mod like I did. When I watch the battle with the right mod, then I can see correctly that the battle is a little different, with the water elementals gaining more ground early on and a maggot infestation on the Ettin Mandragora which makes it use its Elixir of Life and still kills it in the end, with a huge poison bar before routing. This might have been a wrong alarm, I'm sorry.
Still, if there are battle replays that are wrong, then I recommend checking the server logs that have been generated during hosting (every server admin should make sure to generate full logs and keep them!) with those that are being generated when viewing the replay, like I did here. That's the best way to find out what's wrong. Are there any other known battle replay inconsistencies?
|
The Following User Says Thank You to lch For This Useful Post:
|
|
April 7th, 2009, 01:10 PM
|
|
Second Lieutenant
|
|
Join Date: Jan 2009
Location: Ellicott City, MD
Posts: 401
Thanks: 15
Thanked 18 Times in 13 Posts
|
|
Re: Case of the Dying Mages (and God)
Shouldn't the spells recently researched be used by the map then, as research is ahead of the battle phase?
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|