Welcome, Guest. Please Login
Back to main page
  News:
Welcome to the ShadowFlare's Realm Forums.  New registrations are by request only.  To be considered for a new forum account, send an e-mail with the user name and display name you want and the reason you want to register.
  Home SFRealm HelpSearchLogin  
 
Pages: 1
Send Topic Print
w3g format further description (Read 6570 times)
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

w3g format further description
May 02nd, 2005, 3:55pm
 
Since Nagger is busy and doesn't have time to analyze what Soar and I discovered, I encourage other w3g tools developers to help in further decoding of this format.

I've made a list of things that were discovered since last w3g docs release (except for new heroes, ItemIDs etc. because those are very easy to discover):

Select subgroup
- 0x19 is still select subgroup (but much more complicated), 0x1A is sth like prepare for subgroup selection (thx to Soar, he mentioned this somewhere in this forum but got no response; I'm terribly sorry Soar that I've looked up into this issue after several months)
- I've worked out a new algorithm of detecting Select subgroup actions made by player and not generated automatically (pressing TAB key). I've observed that 0x1A+0x19 actions occur almost always after 0x16 and 0x18 (select and use group key) and those must be inserted automatically. Since player has to select something before he can switch between subgroups, *almost every (I think over 90%) 0x1A+0x19 action combo that is placed after 0X16 or 0x18 is inserted automatically*. So I think we should count 0x1A+0x19 actions that follow other 0x1A+0x19 actions.
There are no auto-generated 0x19 actions when a unit/summoned unit dies! At least in replays from 1.14b and above.

Now things I've found out revcently trying to count how many units are trained within a single 0x10 action (e.g. when 2 barracks are selected). There's a problem I can't solve - when a player groups e.g a Crypt and 2 Slaughter Houses under one hotkey and uses select subgroup I can't count how many Slaughter Houses are in the subgroup (so I can't e.g. count how many Aboms he made). I know only the total number of buildings in selection which is, in this case, 3 (1 Crypt + 2 SH), but that tells me nothing about the number of units being trained.
Exemplary replay: http://toya.net.pl/~julas/rep.w3g
(Terror binds 1 crypt and 2 slaughter houses under a single key (key4) and I'm unable to count how many Obsidian Statues he made).

OK,  here's what I've found accidentaly anyway:

ObjectIDs
- ObjectID1 is probably random, the same ObjectID1 can be a Peon or a Warden in two different games
- ObjectID2 seems to be time-dependent but it's not the unit creation time
- Main Hall ObjectID2-ObjectID1 = 0, 3 or 6
- First 5 workers ObjectID2-ObjectID1 = 3, 6 or 12
- ObjectID2 and ObjectID2-ObjectID1 values are more or less equal to half of the time when the unit/building was trained
- ObjectIDs remain the same after building upgrades

unknownA and unknownB
- unknownA and unknownB in 0x10 are not 0xFFFFFFFF for actions with numerical ItemIDs (like using items by heroes). It seems those are ObjectIDs then (ObjectIDs of an item?) and objectID1 == objectID2 == FF FF FF FF for no object just like in 0x12. Probably unknowns in 0x11, 0x12 and 0x13 are similiar

If you know anything about those issues (especially counting number of items within a subgroup), I would really appreciate your help.
Back to top
 
 
WWW 64994211   IP Logged
Blue
Grunt
**
Offline

Think first.

Posts: 54
Berlin, Germany
Gender: male
Re: w3g format further description
Reply #1 - May 2nd, 2005, 11:00pm
 
Hi Julas - we are still alife ... Shocked

The subgroup select changes are already in the updated file format we uploaded to CVS some days ago (i just did not annouce it here right away - sorry).

We will have a look into your other comments ...
Back to top
 
 
  IP Logged
Blue
Grunt
**
Offline

Think first.

Posts: 54
Berlin, Germany
Gender: male
Re: w3g format further description
Reply #2 - May 2nd, 2005, 11:06pm
 
[quote author=Julas.wtfwrongpass  link=1115042134/0#0 date=1115045734]
Now things I've found out revcently trying to count how many units are trained within a single 0x10 action (e.g. when 2 barracks are selected). There's a problem I can't solve - when a player groups e.g a Crypt and 2 Slaughter Houses under one hotkey and uses select subgroup I can't count how many Slaughter Houses are in the subgroup (so I can't e.g. count how many Aboms he made). I know only the total number of buildings in selection which is, in this case, 3 (1 Crypt + 2 SH), but that tells me nothing about the number of units being trained. [/quote]
I think this will be very difficult to determine, since imho it only depends on the current resources a player has if two selected production buildings will both start producing a unit or only one of them will do so.
E.g. you have selected two AoW's and press the hotkey for training an archer it might produce 2 archers, 1 archer or even no archer (maybe the last action is not saved into the replay - i am not sure right now) depending on the amount of resources you have.
Back to top
 
 
  IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #3 - May 2nd, 2005, 11:19pm
 
That would be another problem, but lets just assume that player has enough resources. Do we know how to count buildings in a subgroup?
Oh, the last action wouldn't be saved according to what you wrote in docs Wink
Back to top
 
 
WWW 64994211   IP Logged
Nagger
Grunt
**
Offline



Posts: 50

Re: w3g format further description
Reply #4 - May 3rd, 2005, 12:35am
 
(Here are my thoughts about the objectIDs. nearly all following info are extracted from the depth of my mind, so do not take it too seriously. Undecided )


With the subgroup-select action we have a chance to associate ObjectIDs with UnitIDs. Smiley
But its only for the first unit in the selection/subgroup. Sad

We could parse the whole replay and storing these associations. It would be interesting how many known ObjectIDs you can collect (in percent).

[See edit-note: this paragraph is invalid, blizzard changed things]
In addition you can store the last unit selection and analyse the real TAB-key-actions. All 'overjumped' objectids are of the same kind of unit.
example:
select-action: ObjectIDs  1233, 1276, 1343, 1245 (the objectids are ordered by unit type, as seen in warcraft)
auto-subgroup-select: 1233 = fiend
...
real-subgroup-select: 1343 = ghoul
-> so ObjectID 1276 is also a fiend. Or the unit died meanwhile, but then this ObjectID should never occure in the replay again.
-> you can also get some info from the objectid order of the 'select' action, as they are also order by strenght/value (heros first, peons last). If 1233 is a fiend all the following objects are equal or lower. But i never made a list of the exact order of the units in selection.


The ObjectIDs of the starting units are everytime the same on the same map. All static map-elements (doodaps, creeps, trees, critters) have lower IDs.
(i am not really sure about that)

With that and all the known ObjectIDs it should also be possible to analyse the 'rightclick'-actions a little bit closer. (move command, attacking a unit, picking up an item, attacking a creep/critter/tree, setting a rallypoint,...)

With the known ObjectIDs we should also get more details about the using (not buying) of items from the hero-inventory.


[EDIT]
uuh, after a look in some replays (and comparing to older ones) i realized that blizzard changed the 'select-action': the units are not anymore ordered by strength but by objectID1. and as stated by julas objectID1 is now nearly random Sad


Back to top
 
« Last Edit: May 3rd, 2005, 1:54am by Nagger »  
  IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #5 - May 3rd, 2005, 1:10pm
 
Just a little thought: Has anybody tried contacting Blizzard to get some info about the format? Maybe they would cooperate as we make such a great tools for their games Wink
Back to top
 
 
WWW 64994211   IP Logged
Blue
Grunt
**
Offline

Think first.

Posts: 54
Berlin, Germany
Gender: male
Re: w3g format further description
Reply #6 - May 3rd, 2005, 1:45pm
 
[quote author=Julas.wtfwrongpass  link=1115042134/0#5 date=1115122223]Just a little thought: Has anybody tried contacting Blizzard to get some info about the format? Maybe they would cooperate as we make such a great tools for their games Wink [/quote]
No - we have not.
But from my experience with the BNETD project i can tell that blizzard is not necessaryly interested in our "great tools". They are a company after all.

The format description is very sensitive regarding hacking and cheating anyway. Imagine you know the checksum algorithm - then you could change replays and thus Blizzard (and the community) would lose a great evidence (any kiddie could "proof" with his fake replay that he won versus his opponent ...").

Right now we are tolerated and we better should not try to bring Blizzards attention to this project ...
Back to top
 
 
  IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #7 - May 3rd, 2005, 1:57pm
 
I think you can't compare BNETD to replay software. BNETD was competitive to official servers and allowed people who haven't bought the game to play online.
Replay software, as long as we don't know checksums algorithm, is harmless for Blizzard.

We would of course state that we don't want to know anything about checksums from them.
Back to top
 
 
WWW 64994211   IP Logged
Blue
Grunt
**
Offline

Think first.

Posts: 54
Berlin, Germany
Gender: male
Re: w3g format further description
Reply #8 - May 3rd, 2005, 10:47pm
 
True - replay format is not the same like BNETD. But BNETD was no real threat either - at least with StarCraft and WarCraft i really doubt Blizzard makes any money with the Battle.net (or did you see any sponsor adds lately that were not Blizzard related). The weak point of BNETD was the CD-key checking. It was effectively not present and thus one could play with any CD key on a Bnetd server.
BUT: the BNETD developers tried to contact Blizzard on this problem - tried to find a solution (and there are possible solutions). But Blizzard did not care - they simply wanted BNETD shut down. And they succeeded by pure power of money - not arguments. To my knowledge the BNETD case is still not finished in court.

My personal belief is that Blizzard saw BNETD as a possible thread for their WoW plans - at least this would make sense since with an WoW version of BNETD you could play WoW without monthly fee ...

Anyway - i zone out. Back to your question. I have no real objections if you wanna try to contact Blizzard on this regard. Go ahead and try it. But I am quite pessimistic regarding the success of this request. Undecided
Back to top
 
 
  IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #9 - May 6th, 2005, 2:09pm
 
OK, guys I want you to do one thing for me - check if I count subgroup select actions correctly in post 1.14 replays. I think the way I'm doing it is OK, but want to know your opinions before releasing the new version of the parser.
The new code is here: http://toya.net.pl/~julas/w3g-julas-2.2beta.zip (please do not distribute it)
Back to top
 
 
WWW 64994211   IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #10 - May 13th, 2005, 10:04pm
 
I've discovered some time ago that StartSpotCount from 4.10 [GameStartRecord] is always 0xCC for tournament replays form battle.net website.

BTW I can't wait no longer, I'll release the new version with many fixes + my own select subgroup handling on days. If you find my algorithm faulty I'll change it in the next version.
Back to top
 
 
WWW 64994211   IP Logged
Soar
Grunt
**
Offline

Soar Chin

Posts: 89

Gender: male
Re: w3g format further description
Reply #11 - May 14th, 2005, 5:57am
 
[quote author=Julas.wtfwrongpass  link=1115042134/0#7 date=1115125033]I think you can't compare BNETD to replay software. BNETD was competitive to official servers and allowed people who haven't bought the game to play online.
Replay software, as long as we don't know checksums algorithm, is harmless for Blizzard.

We would of course state that we don't want to know anything about checksums from them. [/quote]

Although you modified the replay, you cannot cheat yet.
Because the random seed is fixed with actions, if you add/remove/change an action, the random seed will also be changed, and then the procession of game is different from original ones.
So we can only modify chat words, game name and so on, which won't affect the hack checking(In my test, you cannot even modify count of players, it will also affect the random seed --- I've repacked some modified replays successfully)
Back to top
 
 

Soar Chin
WWW   IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #12 - May 14th, 2005, 10:59am
 
But it will allow any noob to place his nick instead of e.g. Grubby's nick in a top replay, Soar :/ And that's not too good. In my opinion your discovery will only lead to major changes in replay format in the next patch when Blizzard notices it.
Back to top
 
 
WWW 64994211   IP Logged
Julas.wtfwrongpass
Grunt
**
Offline



Posts: 84

Re: w3g format further description
Reply #13 - May 14th, 2005, 5:47pm
 
Nagger, Blue, one more issue with 0x20 - Player chat message.

There'e:
0x03+N for messages to specific player N (with N = slotnumber)

but N isn't a slotnumber, it's a slotnumber-1, e.g. for the player with id 1 N is 0, for the player with id 2 N is 1, etc.
Back to top
 
 
WWW 64994211   IP Logged
Nagger
Grunt
**
Offline



Posts: 50

Re: w3g format further description
Reply #14 - May 14th, 2005, 8:56pm
 
[quote author=Julas.wtfwrongpass  link=1115042134/0#10 date=1116018273]I've discovered some time ago that StartSpotCount from 4.10 [GameStartRecord] is always 0xCC for tournament replays form battle.net website. [/quote]
It's already in. see section 6.1.

Quote:
but N isn't a slotnumber, it's a slotnumber-1, e.g. for the player with id 1 N is 0, for the player with id 2 N is 1, etc.

slotnumber is not playerid!  

see notes on chat-block:
 o The slot number corresponds to the record number as per section 4.11
   starting with zero (first record = slot 0).


slotnumber is the index in slotrecords (0 to 11)
playerid is between 1 to 12.

normally: playerid = slotnumber+1.
but only if there are no closed slots and no computer players above the player slot!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print