ShadowFlare's Realm
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl
ShadowFlare's Realm Forums >> Program Development >> Warcraft3 Replay Format: 1.15beta
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl?num=1082492806

Message started by Nagger on Apr 20th, 2004, 10:26pm

Title: Warcraft3 Replay Format: 1.15beta
Post by Nagger on Apr 20th, 2004, 10:26pm

The emptiness here is hardly bearable. :-/

I had a look into the 1.15beta replays. Nothing changed, but the obvious:

game version | version in replay | version of war3.exe |  release date
--------------+-------------------+---------------------+----------------
   1.14b     |     1.14.6040     |      1.0.14.5846    |   2004-01-10
   1.15(beta)|     1.15.6041     |      1.0.15.5900    |   2004-04-16


new numeric ItemID's (ability execution):

   AC 02 0D 00 - Cluster Rockets (Hero: Tinker)                       [11- ]
   B0 02 0D 00 - Robo-Goblin (Hero: Tinker ultimate)                  [10- ]
   B1 02 0D 00 - Revert to Tinker (Hero: Tinker)                      [10- ]
   B2 02 0D 00 - Pocket Factory (Hero: Tinker)                        [11- ]

new stringencoded ItemID's:
 units:
        Ntin   - Tinker                            
        Nrob   - Robo-Goblin                        
        nfac   - Pocket Factory                    
        ncgb   - Clockwork Goblin (Lvl1)            
        ncg1   - Clockwork Goblin (Lvl2)            
        ncg2   - Clockwork Goblin (Lvl3)            
 abilities:
        ANsy   - Pocket Factory (Lvl1) (Tinker)    
        ANs1   - Pocket Factory (Lvl2/3) (Tinker)  
        ANcs   - Cluster Rockets (Lvl1) (Tinker)
        ANc1   - Cluster Rockets (Lvl2/3) (Tinker)
        ANeg   - Engineering Upgrade (Tinker)
        ANrg   - Robo-Goblin (Tinker Ultimate, if Demolish Lvl0)
        ANg1   - Robo-Goblin (Tinker Ultimate, if Demolish Lvl1)
        ANg2   - Robo-Goblin (Tinker Ultimate, if Demolish Lvl2)
        ANg3   - Robo-Goblin (Tinker Ultimate, if Demolish Lvl3)


We will release a new w3g_format description if 1.15 is finally out.

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Soar on Apr 21st, 2004, 8:24pm

thx a lot!

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on Apr 22nd, 2004, 7:57am

Hey guys! So many time passed...

I Already had Implemented theses codes on my "based on Julas Version"...

I Just have a note for ya:

Dont track the codes, for Rockets and Pocket Factory without checking if there are ANY of the Respective codes for It, cause If a player gain 2 Lvls and train Pocket Factory/Rockets 2 Level at Once, the Code will be the same... So "ANc1" may not be the code for "Lvl2 Cluster Rockets", "ANcs" will appear 2 Times in a row...

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Nagger on Apr 23rd, 2004, 12:59am

new patch:
   1.14b     |     1.14.6040     |      1.0.14.5846    |   2004-01-10
   1.15(beta)|     1.15.6041     |      1.0.15.5900    |   2004-04-16
   1.401     |     1.401.6042    |      401.0.0.5911   |   2004-04-23


Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on May 6th, 2004, 10:04pm

Just a note:

Paste inside your parser file the code I Wrote below and catch the Chat Messages using this function, so you can get International Chars like Cedillas, Acutes, Graves, Inverted QuestionMarks, Chinese, etc...


Code:

// Char Conversion for Chat Messages
function utf8ToEntities($str)
{
   if (!is_string($str))
       return('');
   $i = 0;
   $output = '';
   while($i<strlen($str))
   {
       $char = $str{$i};
       if ((ord($char) & 0x80)==0)
//   0000 0000-0000 007F   0xxxxxxx
           {
               $output .= $char;
                $i++;
           }
       else
           {
               $num = 0;
               if ((ord($char) & 0xFC)==0xFC)
//   0400 0000-7FFF FFFF   1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
                   {
                       $num = (ord($str{$i+5}) & 0x3F) |
                             ((ord($str{$i+4}) & 0x3F) << 6 ) |
                             ((ord($str{$i+3}) & 0x3F) << 12) |
                             ((ord($str{$i+2}) & 0x3F) << 18) |
                             ((ord($str{$i+1}) & 0x3F) << 24) |
                             ((ord($str{$i+0}) & 0x01) << 30);
                       $i += 6;
                   }
               elseif ((ord($char) & 0xF8)==0xF8)
//   0020 0000-03FF FFFF   111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
                   {
                       $num = (ord($str{$i+4}) & 0x3F) |
                             ((ord($str{$i+3}) & 0x3F) << 6 ) |
                             ((ord($str{$i+2}) & 0x3F) << 12) |
                             ((ord($str{$i+1}) & 0x3F) << 18) |
                             ((ord($str{$i+0}) & 0x03) << 24);
                       $i += 5;
                   }
               elseif ((ord($char) & 0xF0)==0xF0)
//   0001 0000-001F FFFF   11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
                   {
                       $num = (ord($str{$i+3}) & 0x3F) |
                             ((ord($str{$i+2}) & 0x3F) << 6 ) |
                             ((ord($str{$i+1}) & 0x3F) << 12) |
                             ((ord($str{$i+0}) & 0x07) << 18);
                       $i += 4;
                   }
               elseif ((ord($char) & 0xE0)==0xE0)
//   0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
                   {
                       $num = (ord($str{$i+2}) & 0x3F) |
                             ((ord($str{$i+1}) & 0x3F) << 6 ) |
                             ((ord($str{$i+0}) & 0x0F) << 12);
                       $i += 3;
                   }
               elseif ((ord($char) & 0xC0)==0xC0)
//   0000 0080-0000 07FF   110xxxxx 10xxxxxx
                   {
                       $num = (ord($str{$i+1}) & 0x3F) |
                             ((ord($str{$i+0}) & 0x1F) << 6 );
                       $i += 2;
                   }
               else
// We should never came here until passed string is not UTF-8,
// but without this we're risk to fall in endless loop
                   {
                       $num = ord($char);
                       $i++;
                   };
               $output .= '&#'.$num.';';
           };
   };
   return($output);
}


My Best regards,
LeoLeal

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Nagger on May 7th, 2004, 11:01am

I thought browsers can handle UTF8 by there own?  ???

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on May 8th, 2004, 12:44am

Browsers can handle UTF-8 with no problem... but for other charsets pages/browsers (my Brazillian one - ISO-8859-1), those extended chars are shown different as they should... so Entities are better for International purposes!  :P

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Julas.wtfwrongpass on May 12th, 2004, 12:32am

Woohoo my previous account doesn't work and I can't create an account with login "Julas"... Welcome back anyway :D


LeoLeal wrote:
Dont track the codes, for Rockets and Pocket Factory without checking if there are ANY of the Respective codes for It, cause If a player gain 2 Lvls and train Pocket Factory/Rockets 2 Level at Once, the Code will be the same... So "ANc1" may not be the code for "Lvl2 Cluster Rockets", "ANcs" will appear 2 Times in a row...

Can you make it more clear? Maybe some example or something...

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on May 12th, 2004, 9:13pm

If a Level 1 GoblinTinker with Lvl1 Cluster Rockets gains 2 Levels without training a skill (becoming Lvl-3 with 2 Available skills to choose), you can research Lvl-2 Cluster Rockets before any other skill...

So your Skill training sequece will be:
Cluster Rockets, Cluster Rockets and Engineering

Translating this to the Code, the sequence will be:
ANcs, ANcs and ANeg

But if you are training Engineering before the Lvl-2 Cluster Rockets, the Code sequence is:
ANcs, ANeg and ANc1

Am I Clear now? ;)

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Julas.wtfwrongpass on May 12th, 2004, 9:55pm


LeoLeal wrote:
Am I Clear now? ;)

Yep ;) But I'm still wondering why there are 3 different IDs for those abilities...

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on May 13th, 2004, 5:40am

Me too... specially because Any os those IDs can appear in differente positions (codes vary from level)... lemme example this:

Look at the Sequences:

- Cluster Rockets
- Cluster Rockets
- Engeneering Upgrades
- Cluster Rockets
The Level-1 Cluster Rockets will be ANcs
The Level-2 Cluster Rockets will be ANcs
The Level-3 Cluster Rockets will be ANc1

- Cluster Rockets
- Engeneering Upgrades
- Cluster Rockets
- Engeneering Upgrades
- Cluster Rockets
The Level-1 Cluster Rockets will be ANcs
The Level-2 Cluster Rockets will be ANc1
The Level-3 Cluster Rockets will be ANc2

Conclusion: Lvl-3 Cluster Rockets can be ANcs, ANc1 or ANc2 depending on the Training sequence... this is Very Strange, since the behaviour of the Ability doesn't change from level to level Only Strength and Stun Time)... so there is no need to make Extra IDs for the same Ability...  :-/

I don't know if Demolish Passive Ability has something to do with It, but... maybe...

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by Julas.wtfwrongpass on May 13th, 2004, 2:33pm

I know! Effects of all those abilities which have multiple IDs rely on Engineering Upgrade. So they actually made different ability types for those abilities for each Engineering Upgrade level ;D
So there are probably also ANc2 and ANs2 IDs which Nagger hasn't discovered but that were discovered by one of the users of my script (thx Dylan Smith). Those are for lvl3 Engineering Upgrade. I think it makes sense now.

Title: Re: Warcraft3 Replay Format: 1.15beta
Post by LeoLeal on May 13th, 2004, 5:09pm

OMG! This is It!!! LOL!

Anyways, my check for the Abilities are still OK(Phew)... no change needed.

GJ, Dylan Smith (Wherever U are  ;D)

Thks, Julas

... Living and learning...

ShadowFlare's Realm » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.