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: Necrolis, Nefarius

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

Hand-picked

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

Post by Nefarius » Fri Feb 28, 2003 2:31 am

In the case of monsters I think they simply enabled everything from 00-ZZ, or do you know which ones have been enabled and which havent?, because I didnt run into anything yet that totally didnt work, only some tokens have been partially used in the past, as i found framecounts for tokens that dont exist in animdata, a few others like CN seam to be handled elsewhere for odd reasons.


EDIT: maybe some one should make this topic sticky, its already 5 pages long and I have the feeling it will still grow alot. :?:
Last edited by Nefarius on Fri Feb 28, 2003 2:33 am, edited 2 times in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Alkalund
Retired Admin
Throne
Posts: 7597
Joined: Sun May 26, 2002 5:54 pm
Location: Toronto, Ontario, Canada

Hand-picked

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

Post by Alkalund » Fri Feb 28, 2003 2:37 am

Agreed. Very well, sticky it is ;)

User avatar
DDDiablo
Forum Regular
Angel
Posts: 565
Joined: Wed Oct 23, 2002 1:50 am

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

Post by DDDiablo » Sat Mar 01, 2003 2:49 am

What in the world? I thought that all three(chars/objects/monsters/) use the same token sheet.

That's why it crashes if you double a token.

Oh well, guess I was wrong..... :( :(

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

Hand-picked

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

Post by Nefarius » Sat Mar 01, 2003 3:41 am

chars -> data\global\chars\%token
objects -> data\global\objects\%token
monsters -> data\global\monsters\%token

chars and monsters use the same anim index: animdata.d2, objects do not use a animindex and do only take their data from the COF files in their token folder, the total frame length for some modes is defined in objects.txt

chars use charscof.d2 as a cof cache
monsters use cmncof_a#.d2 as a cof cache for each act.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

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

Hand-picked

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

Post by Joel » Thu Mar 06, 2003 3:05 pm

Come back on the palshift ..

I've designed a new anim for my Hydra replacer, it looks like a blue wyrm.
What I want is to use palshift to make the three head of the hydra having 3 different color.

The token of my animation is ER, so if I create a ER/cof/palshift.dat file will it be taken in account ??
"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

Hand-picked

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

Post by Nefarius » Thu Mar 06, 2003 3:43 pm

yes it should, if it dosent create a dummy token and add a palshift to it, then change the "code" column to that dummy token.

As a note, for hydras colors you will need three dummy tokens, as I believe all of them use pal8 (used for skeleton summons IIRC in SK token) so the hydra is also a summon, so it probably uses palette #8.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

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

Post by mrelfire » Wed Mar 26, 2003 8:40 am

I have tryed to follow the idea,
and manage to do it for few token,
but for others like replacing the YE with for example a8, itdoesn't work, the game crash

Anybody has got a kind of list or idea with which one we should use (or avoid)

Or perhaps I did make a mistake, but not sure (checl animdata, all cof files,...)

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

Hand-picked

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

Post by Joel » Wed Mar 26, 2003 10:41 am

strange, I added more then 78 token ( including a8 ) ...
check your file again, a mistake comes quick here.
Last edited by Joel on Wed Mar 26, 2003 10:43 am, 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

Hand-picked

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

Post by Nefarius » Wed Mar 26, 2003 1:05 pm

some tokens exist even they dont physically exist as gfx, you should clear any existing data from the cmncof_a#.d2 files, as they may compromis everything your doing.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

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

Post by mrelfire » Sun Mar 30, 2003 10:18 am

As a practical exercise:
I used the token 46 from your mod, try to rename all 46, with A8 for
animdata, cof, and tr,
and try
and "voila"
the game crashed
so have you got any idea or suggestion for "dummies" like me ?
Last edited by mrelfire on Sun Mar 30, 2003 10:19 am, edited 1 time in total.

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

Hand-picked

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

Post by Nefarius » Sun Mar 30, 2003 10:40 am

take a look if you recompiled animdata.d2 correctly.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

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

Post by mrelfire » Sun Mar 30, 2003 12:42 pm

Ump, unforthunately it sems OK
I will look further,

do you plan to release other plugins like your 0q plugins,
or some standard monsters on non used codes ?

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

Hand-picked

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

Post by Nefarius » Sun Mar 30, 2003 12:45 pm

I do actually, I will remake a few things using new tokens, because I officially froze the work on XyRAX until 1.10 is out Im using this time for creating plugins and even more tutorials.


EDIT: I know what causes your problem, 46 IS NOT a new code, it already exists. 46 = Glowing Vile Childs.


EDIT2: We can have 1 direction A1/WL and stuff animations :)
I know what I did wrong before and im feeling really stupid now

The third byte in the COF files controls the number of directions, I totally overlooked this fact so my 1 direction animations were actually.

aka
it was
01 14 08

but should have been

01 14 01

silly mistake :P
Last edited by Nefarius on Mon Mar 31, 2003 2:08 pm, edited 6 times in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Malkor
Junior Member
Champion of the Light
Posts: 322
Joined: Sun Apr 06, 2003 8:34 pm
Location: The Fancy Hats Facility, Sector 42

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

Post by Malkor » Sun Apr 13, 2003 6:58 pm

Nefarius";p="82387" wrote:I do actually, I will remake a few things using new tokens, because I officially froze the work on XyRAX until 1.10 is out Im using this time for creating plugins and even more tutorials.


EDIT: I know what causes your problem, 46 IS NOT a new code, it already exists. 46 = Glowing Vile Childs.


EDIT2: We can have 1 direction A1/WL and stuff animations :)
I know what I did wrong before and im feeling really stupid now

The third byte in the COF files controls the number of directions, I totally overlooked this fact so my 1 direction animations were actually.

aka
it was
01 14 08

but should have been

01 14 01

silly mistake :P
My short d2 modding career has been filled with stupid mistakes... Like yesterday, testing my diablo clone, I was so {filtered} that nothing was changing in blood moor despite 6 tries, when I suddenly realize I had him spawning in cold plains! That deserved a smack.

I'd fiddle with adding new tokens if I could find that bloody pit fiend graphic lurking around...
Abandon hope, all ye who touch the lard bucket.

User avatar
Rattlecage
Forum Regular
Angel
Posts: 932
Joined: Sun Apr 13, 2003 8:46 pm
Location: The Frozen North
United States of America

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

Post by Rattlecage » Sun May 04, 2003 12:08 am

That reminds me of the time that I was trying to do the quill rat test to try out my items, but they weren't dropping. After a few days I realized that I was using Treasureclass.txt instead of Treasureclasses.txt :oops:
No beating heart I felt. I brought no sights to the silver lips; no warmth from the gold.

User avatar
I_Burner
Posts: 38
Joined: Tue Sep 09, 2003 4:19 am

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

Post by I_Burner » Tue Sep 09, 2003 4:52 am

I know it's been quite awhile since this thread was active, but I've got a bit to add here. I apologize if this is common knowledge, but I haven't seen it posted anywhere else, yet. Regardless, this probably should be included in this Sticky to make it easier for people to find.

After a little experimenting, I've found that it seems we CAN use non-alphanumeric characters for creating new tokens!

I started by using the Red Dragon plugin that replaces the BK token (from the Keep), and had initially changed the token to FU. After testing to make sure the plugin worked correctly with a new token, I again changed the token to !U, along with renaming all appropriate files and adding entries to animdata.d2. I loaded the game, and the new !U token worked perfectly. (I had deleted all reference to the FU token I had been using, so there is no question that !U was being used).

More testing should be done with other characters and combinations, but I'm willing to bet that any symbol that is valid for use in a filename should be useable.

The implication here, obviously, is that since Blizzard only used alphanumeric tokens in the original files, we can completely avoid conflicts with existing tokens. Furthermore, this should give us ALOT more possibilities in adding new monsters (especially in 1.10, since we can now expand monstats.txt!). Happy modding!

User avatar
Alkalund
Retired Admin
Throne
Posts: 7597
Joined: Sun May 26, 2002 5:54 pm
Location: Toronto, Ontario, Canada

Hand-picked

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

Post by Alkalund » Wed Sep 10, 2003 4:00 am

Thanks for the information I_Burner :)

I recently added to the Keep a copy of my master list with all original tokens names used in the game. You can use this list to easily find unused token codes (and there are plenty of them, even with only alphanumerical characters - about 500 left or so I think); but indeed, now we have even more possibilities :mrgreen:

User avatar
Modmaker
Junior Member
Champion of the Light
Posts: 260
Joined: Sun Aug 31, 2003 1:48 pm
Location: Montrose

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

Post by Modmaker » Tue Nov 25, 2003 11:28 pm

I want to make add new graphics for a monster, so i get anim_edit , add the cof names to the txt and then add it to thr data/global. is that it?

User avatar
Kato
Retired staff
Virtue
Posts: 4335
Joined: Mon Jun 03, 2002 4:36 pm
Location: Somewhere out there beyond the pale blue moon

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

Post by Kato » Tue Feb 24, 2004 6:29 pm

:oops: Sorry if I am in violation of TOS for ressurrecting an "old" topic but this note is stickied so I figured it's still fair game.

:arrow: I'm still modding with 1.09 and have added new monster tokens. The graphics work fine. The problem is: there's no sound. Question: is there any way in 1.09 to add sound effects for new monster tokens?
"Do not be too proud of this technological terror you've constructed." - D.Vader
Zy-El: Trial by Fire Mod Forum: http://phrozenkeep.it-point.com/forum/v ... m.php?f=53
Zy-El website: http://www3.telus.net/zyel/index.html Zy-El wiki: http://zyel.wikispaces.com/

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

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

Post by kingpin » Tue Feb 24, 2004 6:41 pm

I know atleast you can't add new sounds, just replace old ones. I have even forgott how adding sounds to monsters worked in 1.09x. But, adding a sounds to new token monster would work in the same way as you change a sound on existing monster.

User avatar
Kato
Retired staff
Virtue
Posts: 4335
Joined: Mon Jun 03, 2002 4:36 pm
Location: Somewhere out there beyond the pale blue moon

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

Post by Kato » Fri Feb 27, 2004 8:08 pm

;) I have to add new sounds using the new tokens - I cannot just replace existing sounds. It appears to me that in 1.09, the sound file references are hard-coded to the specific token.

:arrow: For instance, FS (Fallen Shaman) has specifically defined sound files. When I create a new token, let's say 1K, I do a token substitution in the montype.txt file. I replace the FS token with 1K. However, there are no sound files associated with 1K, only FS. So what happens in the game is that my new graphics look great and work, however, there's no monster sounds for attack, gethit, walk, neutral, etc. Therefore, I can only conclude that the sound files are hardcoded in 1.09.

:arrow: Changing the FS sound files won't do it either since that would only change the sounds for the Fallen Shaman and not the IK token monster I just created.
"Do not be too proud of this technological terror you've constructed." - D.Vader
Zy-El: Trial by Fire Mod Forum: http://phrozenkeep.it-point.com/forum/v ... m.php?f=53
Zy-El website: http://www3.telus.net/zyel/index.html Zy-El wiki: http://zyel.wikispaces.com/

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

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

Post by kingpin » Fri Feb 27, 2004 11:53 pm

If you don't find any solution on this, I can look into my old 1.09x files and see what I have done. Since, of what I remember I got sounds with my new tokens.

User avatar
Kato
Retired staff
Virtue
Posts: 4335
Joined: Mon Jun 03, 2002 4:36 pm
Location: Somewhere out there beyond the pale blue moon

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

Post by Kato » Sat Feb 28, 2004 12:13 am

:roll: There would have to be a hard-coded table somewhere that maps the tokens to the sound handle. For example, the FS (Fallen Shaman) token in the monstats.txt file must be somehow mapped to the handle name ESOUND_fALLENSHAMAN_ATTACK_1. The sounds.txt file then maps this handle to the actual .wav file that makes the sound.

:arrow: It's easy to change the existing sounds by simply swapping .wav files. But how does one create new handles and then map the new handles to the new tokens. There must be another .MPQ or .DLL that stores that information. I'll have to see what there is. Thanks. ;)
"Do not be too proud of this technological terror you've constructed." - D.Vader
Zy-El: Trial by Fire Mod Forum: http://phrozenkeep.it-point.com/forum/v ... m.php?f=53
Zy-El website: http://www3.telus.net/zyel/index.html Zy-El wiki: http://zyel.wikispaces.com/

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12100
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U
United States of America

Hand-picked

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

Post by Myhrginoc » Sat Feb 28, 2004 6:42 am

We have found a number of cases in 1.10 where the sound files are hardcoded by index number. In fact, the "handle" field is not loaded at all in either 1.09 or 1.10, nor is the index field. But the index number is used to get the indicated record through a call in d2client.dll. This is a sample for playing act3\orbaction.wav when you smash the Compelling Orb in Travincal, from v1.09d:

Code: Select all

6FB4F281  |.  B9 4F120000                MOV ECX,124F
6FB4F286  |.  E8 F55C0000                CALL D2Client.6FB54F80
What I would look for is a DLL table, probably in d2client.dll, with either tokens or (row-1) numbers from Monstats paired with corresponding indexes from Sounds.txt. If you don't mind a lot of false hits, try putting a breakpoint on the first line of D2Client.6FB54F80 and see what is in ECX when it hits. Then trace back to find the calling code and perhaps you will see a (base+offset) table reference that loads ECX.
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

kyky1417
Posts: 7
Joined: Mon Apr 23, 2018 7:13 am

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

Post by kyky1417 » Wed Apr 25, 2018 5:00 am

hello nefarius can you help me nice to create a new monster for diablo 2?
I want to make a mod for him

Return to “Multimedia”