Author | Message | Time |
---|---|---|
BaDDBLooD | I think i found Act inside the statstring. When i use Asc() on act, i come up with 158 for Act 5 Hell, and 128 for act 1 norm. Is this right? If it is right, can you explain why it's 158 and 128? Thanks! | November 9, 2004, 1:57 AM |
drivehappy | 128 = 10000000B 158 = 10011110B If your information is correct, I would assume act II would be 10010000B = 144. | November 9, 2004, 7:13 AM |
Arta | Assuming no one can clarify, someone should ascertain what that value is for each act. Were does this value occur in the statstring? | November 9, 2004, 7:26 AM |
Skywing | The proper way is: unsigned Acts = (RealD2Stats[27] & 0x3E) >> 1; | November 9, 2004, 7:36 PM |
UserLoser. | [quote author=BaDDBLooD link=topic=9481.msg88095#msg88095 date=1100035003] Where you Find difficulty, and >> 4 Bits. I Believe that byte is act. However, i am probly wrong. [/quote] It's actually the number of completed acts. So you should know that on expansion each difficulty has five acts, while classic has four. | November 9, 2004, 9:43 PM |
BrainScan | well, here is what I have found so far in the Diablo II statstring: (working on the assumption that everything is one byte fields) (I might be missing a couple bytes at the begining here) BYTE: Head Armor Code BYTE: Chest Armor Code BYTE: Lower Body Armor Code (Legs) BYTE: Right Arm Armor Code (from the character's perspective) BYTE: Left Arm Armor Code BYTE: Right Hand Item Code BYTE: Unknown BYTE: Left Hand Item Code BYTE: Right Shoulder Pad (Boolean value I believe - Is the shoulder pad there or not...) BYTE: Left Shoulder Pad BYTE: Unknown BYTE: Class BYTE: Head Color Code BYTE: Chest Color Code BYTE: Lower Body Color Code BYTE: Right Arm Color Code BYTE: Left Arm Color Code BYTE: Right Hand Item Color Code BYTE: Unknown BYTE: Left Hand Item Color Code BYTE: Right Shoulder Color Code BYTE: Left Shoulder Color Code BYTE: Unknown BYTE: Level BYTE: Flags 1 ( 0x04 - Hardcore, 0x08 - Dead, 0x20 - Expansion) BYTE: Flags 2 ( Kinda weird here For Classic: 0x08 Beaten Normal, 0x10 beaten nightmare, 0x18 OR? 0x20 beaten Hell For Expansion: 0x10 beaten normal, 0x18 beaten nightmare, 0x20 beaten hell ) BYTE: Unknown <<< This where you are talking about?? BYTE: Unknown BYTE: Ladder character (Boolean I think) BYTE: Unknown BYTE: Unknown BYTE: 0x00 (Null-Terminator) Just what I found by poking arround. I can't completely garentee the acuracy of it but it's a start. I can try to dig up my notes on some of the specifics if anyone is interested. -BrainScan | November 12, 2004, 1:57 AM |
UserLoser. | Happen to have the codes for each color and type of item? I had a majority of them, but I lost everything recently.. | November 12, 2004, 2:49 AM |
Skywing | [quote author=BaDDBLooD link=topic=9481.msg88559#msg88559 date=1100229529] [quote author=Skywing link=topic=9481.msg88083#msg88083 date=1100028970] The proper way is: unsigned Acts = (RealD2Stats[27] & 0x3E) >> 1; [/quote] Skywing, would you explain how you figured that out? [/quote]By looking at a lot of statstrings with known title combinations and searching for patterns. | November 12, 2004, 3:25 AM |
Skywing | Assuming RealD2Stats is a char* pointing to the first byte past the comma immediately following the character name, mask off all bits in the 28th byte except 0x3E and bitshift the result to the right by one bit position. | November 12, 2004, 4:04 AM |
BaDDBLooD | [quote author=Skywing link=topic=9481.msg88571#msg88571 date=1100232282] Assuming RealD2Stats is a char* pointing to the first byte past the comma immediately following the character name, mask off all bits in the 28th byte except 0x3E and bitshift the result to the right by one bit position. [/quote] Thanks a bunch skywing, imma go read up on bitwise operators now. Hopefully after i do some research your response will click in my brain =) | November 12, 2004, 4:12 AM |
Kp | [quote author=BaDDBLooD link=topic=9481.msg88573#msg88573 date=1100233136]Can you give me a Example of the RealD2Stats Char*, in binary or hexadecimal so i can see how this works?[/quote] Sure. 01101111000000001111111111111000 (binary - taken from a common value in one of the temporary buffers) | November 12, 2004, 4:27 AM |
Minux | [quote author=Skywing link=topic=9481.msg88083#msg88083 date=1100028970] The proper way is: unsigned Acts = (RealD2Stats[27] & 0x3E) >> 1; [/quote] I thought I remembered the 28th byte being the difficulties you've completed. Which would help you determine the prefix for the character's name. [code] Difficulty = (Statstring[27] & 0x18) >> 3; [/code] [quote] 0000: 3D FF FF FF FF 35 FF FF FF FF FF 02 E2 FF FF FF =˙˙˙˙5˙˙˙˙˙â˙˙˙ 0010: FF B3 FF FF FF FF FF 50 A8 9A FF FF FF FF FF ˙ł˙˙˙˙˙P¨š˙˙˙˙˙. [/quote] This is the statstring I got and when I use Skywing's little code I get "Act: 13". Perhaps I screwed something up...... :( | November 14, 2004, 8:26 PM |
Skywing | That statstring is too short. strlen(RealD2Stats) should be 33. | November 14, 2004, 8:37 PM |
Minux | [quote author=Skywing link=topic=9481.msg88854#msg88854 date=1100464661] That statstring is too short. strlen(RealD2Stats) should be 33. [/quote] Made the adjustment, no change in result. [quote] 0000: 84 80 FF 01 01 01 01 2C FF 51 02 02 FF 07 FF FF „€˙,˙Q˙˙˙ 0010: FF FF FF FF FF FF FF FF FF 59 A8 9E FF FF FF FF ˙˙˙˙˙˙˙˙˙Y¨ž˙˙˙˙ 0020: FF ˙............... [/quote] Again using [code] Act = (Statstring[28] & 0x3E) >> 1; [/code] Resulted in Act: 15 :( | November 14, 2004, 9:55 PM |
Skywing | Yes, and that's the number of acts that your character has completed. Based on how many acts there are per difficulty setting (4 for classic, 5 for expansion), you can find out how many difficulty levels the character has completed. | November 14, 2004, 9:59 PM |
Minux | [quote author=Skywing link=topic=9481.msg88862#msg88862 date=1100469570] Yes, and that's the number of acts that your character has completed. Based on how many acts there are per difficulty setting (4 for classic, 5 for expansion), you can find out how many difficulty levels the character has completed. [/quote] Thanks for clearing that up, it finally makes sense!! Edit: Is the difficulty method I am using accurate? Or am I just wasting my time with it? | November 14, 2004, 10:11 PM |