I DID IT! I added a new token!

This is the place to discuss all issues relating to the manipulation of graphics/animations, sounds, music and cinematics within Diablo 2.

Moderators: Nefarius, Necrolis

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 3:57 am

its not case sensitive as far as I know, as many folders are in uppercase letters wile the files are in lowercase. But you may be right, it may also work with any two symbols, as long as they dont do a check that it is alpha numeric that is.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Paul Siramy » Fri Feb 07, 2003 5:01 am

I just tough of 1 thing about case-sensitive letters :oops: : In any case, when retreiving a file from a mpq, there's no difference about lower and upper case, the Data\GLOBal\ExcEL\ObjeCTs.txt is the same file as data\global\excel\objects.txt

So, no need to check about upper/lower case after all (but I still wondering about special characters tough).

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: I DID IT! I added a new token!

Post by Myhrginoc » Fri Feb 07, 2003 5:12 am

I would bet they ignore case for file and directory names because Windows can do funny things there. The reason case can work for item and type codes is because Windows doesn't touch that information.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Fri Feb 07, 2003 7:36 pm

Hmmm strange ...

I've assigned a new token to the Town Rogue (RG->FG), make the animdata and cof tunement. All is fine (no crash) but even if I set the Animdata speed to a Veeery low value ( 16 or less ) my new token still played the anim VERY fast (look like it got parkinson !)
what can i've forgotten ?
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 7:51 pm

Something similar happened to me.
I was helping vendanna with those anim problems and found out that the CN token that isnt used anywhere has a hardcoded framecount value.

The reason why I believe this is very clear.
I renamed all the CN data to 0Q and didnt get a "frames per direction" crash, you may have ran into something similar.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Fri Feb 07, 2003 7:53 pm

well that's bad :(
I'll see if I can find these hardcoded values or get a new animations with the correct framecounts ...

BTW, it was the 23th token that I add :)

EDIT : Even if I keep the original framecount, the animatiosn still jiggers :(
Last edited by Joel on Fri Feb 07, 2003 8:10 pm, edited 1 time in total.
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 8:17 pm

try to switch the token and see if it still happens, maybe you really ran into another hardcoded one.


I think that these hardcoded tokens are actually unused stuff from the d2beta that no longer exists, except for some hardcoded frame count data.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Fri Feb 07, 2003 8:34 pm

OK found it :)

The RG token of the Town Rogue is checked in the common function that deals with framerate. Exactly here :

Code: Select all

6FDAF938    |. 74 10             JE SHORT D2Common.6FDAF94A
6FDAF93A    |. 8B55 0C           MOV EDX,DWORD PTR SS:[EBP+C]
6FDAF93D    |. 5F                POP EDI
6FDAF93E    |. 8956 58           MOV DWORD PTR DS:[ESI+58],EDX
6FDAF941    |. 5E                POP ESI
6FDAF942    |. 5D                POP EBP
6FDAF943    |. 5B                POP EBX
6FDAF944    |. 83C4 0C           ADD ESP,0C
6FDAF947    |. C2 0400           RETN 4
6FDAF94A    |> 6A 45             PUSH 45
6FDAF94C    |. 56                PUSH ESI
6FDAF94D    |. E8 EE84FFFF       CALL D2Common.#10519
6FDAF952    |. 83F8 0F           CMP EAX,0F
6FDAF955    |. 7D 07             JGE SHORT D2Common.6FDAF95E
6FDAF957    |. B8 0F000000       MOV EAX,0F
6FDAF95C    |. EB 0C             JMP SHORT D2Common.6FDAF96A
6FDAF95E    |> 3D AF000000       CMP EAX,0AF
6FDAF963    |. 7E 05             JLE SHORT D2Common.6FDAF96A
6FDAF965    |. B8 AF000000       MOV EAX,0AF
6FDAF96A    |> 8B4D 0C           MOV ECX,DWORD PTR SS:[EBP+C]
6FDAF96D    |. 0FAFC8            IMUL ECX,EAX
6FDAF970    |> B8 1F85EB51       MOV EAX,51EB851F
6FDAF975    |. F7E1              MUL ECX
6FDAF977    |. C1EA 05           SHR EDX,5
6FDAF97A    |> 8956 58           MOV DWORD PTR DS:[ESI+58],EDX
6FDAF97D    |> 5F                POP EDI
6FDAF97E    |. 5E                POP ESI
6FDAF97F    |. 5D                POP EBP
6FDAF980    |. 5B                POP EBX
6FDAF981    |. 83C4 0C           ADD ESP,0C
6FDAF984    \. C2 0400           RETN 4
At the end of this portion of code, EDX contaisn the framerate and it sets to 0x100 (256).

The trick is that the game seek the value of the 0x45 stat from itemstacost which is STAT_OTHERANIMRATE.
Just found where does the game set this value :(

EDIT : Othe rpoint the function D2Common.6FDAF94A seems to deal with some table value from monstats and return 0 in the case of hardcoded framerate... interesting !
Last edited by Joel on Fri Feb 07, 2003 8:36 pm, edited 1 time in total.
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 8:37 pm

I didnt play around with char anims yet, but isnt this the same way the char intown/outsideoftown anims frame rate is controlled?

edit: i know those are different anims for inside and outside.
Last edited by Nefarius on Fri Feb 07, 2003 8:38 pm, edited 1 time in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Fri Feb 07, 2003 8:55 pm

One thing i don't get : if the EDX value is set to 256 for this token WHY does my animation looks so speedy ?
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 9:14 pm

joel 256 is max speed, 1 would be minimum speed
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Fri Feb 07, 2003 9:22 pm

I will try to replace the SHl EDX,5 by SHL EDX,6 or 7 maybe it'll do it ?
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Paul Siramy » Fri Feb 07, 2003 10:48 pm

1) Rogue Town is an object, therefore try to change the values in objects.txt, column FrameDelta0 to FrameDelta7 (for the 8 possible mode in objmode.txt).

2) 256 is not the maximum, for instance the exploding cow in Tristran is assigned a 300 in objects.txt. I see higher values too.

Oh, btw, as far as I know the speed in FrameDeltaX in Objects.txt override the value in animdata.d2.

I'm not sure it'll work, if the RG is hardcoded somewhere, but it should work.

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Fri Feb 07, 2003 11:51 pm

there are two RG tokens, one in monstats.txt and one in objects.txt then, as object tokens have nothing to do with monster tokens.

Ill repost this example to show what I mean:

D1-D4 in objects.txt stands for various doors
D1-D4 in monstats.txt stands for the different cain graphics (act1-4)
Last edited by Nefarius on Fri Feb 07, 2003 11:52 pm, edited 1 time in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Sat Feb 08, 2003 9:34 am

There is no entry for the Rogue in the objects.txt file ...
I'll try to remove the test for hardcoded framerate and force the game to read animdata.d2 ...
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Paul Siramy » Sat Feb 08, 2003 6:29 pm

:oops: Forget my precedent intervention, indeed there aren't any RG token in objects.txt. I was thinking of my data\obj.txt of my editor, and not the data\global\excel\objects.txt.

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Sat Feb 08, 2003 6:42 pm

Welll problem fixed.
I made a 192 frames dcc with immobile town guard ...
If you check the original Rogue Town dcc, you'll see that she's not very mobile :)
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Sun Feb 09, 2003 12:57 am

If you want them to move, give them some monster AI, but leave align set to 1 (or 2 if you want friendly fire to be active). This is really fun, as you can set any monster to fight for you this way. (Or against you).

Its nice to see that the frame count for them isnt hardcoded, now I just wonder what the CN crash was about. I didnt get if after using another token code as mentioned before.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Sun Feb 09, 2003 10:01 am

no, the framerate IS somewhat hardcoded as the game check for special value to fix it.

My fix was to use something that look like the original animation.

For the wandering rogue, I already having Rogue and Iron Wolf crawling the blood moor to slay evil !
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Sun Feb 09, 2003 10:45 am

Over here its exactly opposit, they will slay you ;)
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Sun Feb 09, 2003 11:03 am

I only hope that the hardcoded animrate is linked to the LINE ...
ans thus that the rogue hireling is not affected ! Or my new pets will look strange ! ^_^
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Joel » Sun Feb 09, 2003 9:29 pm

Well something strange.
For all the Rogue lines (flavie/hireling/town etc ...), ONLY the tn and nu framerate ar fixed ...

Go figure ! All other modes run fine with no speed distorsion .... ^_'
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Sun Feb 09, 2003 11:17 pm

tn and nu are neutral for inside/outside of town. Yes, its really weird that only those are hardcoded :?:
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Paul Siramy » Tue Feb 11, 2003 5:31 am

[quote="Nefarius";p="64471"]objects have their own 00-ZZ tokens, same with monsters. a Good example is:

Objects
D1 - Door Left

Monsters
D1 - Act 1 Cain (town)[/quote]

I'm only thinking of that problem now, but in animdata.d2, what the D1NUHTH will be, the "act 1 cain" or "door left" ? Well I think in animdata.d2 we have the monster animation, while the objects will be in cmncof_aX.d2 (if even present, else in the regular cof). Just for a confirmation, am I assuming right ?


While I'm on it
DONT REUSE THE FALLEN/SHAMAN PALSHIFT CODE FA/FS: its hardcoded to their AI and will cause glitches
What do you mean, we can't give the FA token in monstats.txt to another monster ? i'm not aware of that Fallen palshift code AI feature.


And for Joel :
The trick is that the game seek the value of the 0x45 stat from itemstacost which is STAT_OTHERANIMRATE. Just found where does the game set this value
The Rogue is a monster, so whats the link with itemstatcost ?
Last edited by Paul Siramy on Tue Feb 11, 2003 5:46 am, edited 3 times in total.

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: I DID IT! I added a new token!

Post by Nefarius » Tue Feb 11, 2003 5:48 am

@Paul, Its something I ran into some time ago. The Fallen palshift (data\global\monsters\fa\cof\palshift.dat) seams to be hardcoded to the fallen token for some reasons (if you want to hear my assumption ill post it, but for now lets not get into the gory details) The reason for this assumption is simply, Go ahead and give a fallen a different AI and leave the FA token in the code column. You will see he ignores the old palshift and will use no palshift at all. (effecting all other fallen species as well) aka if you change fallen 2, then fallen 3 would look like fallen 2 and so on.
Last edited by Nefarius on Tue Feb 11, 2003 5:49 am, edited 1 time in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

Post Reply

Return to “Multimedia”