[Collection] The hardcoded stuff.

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

User avatar
Doombreed-x
Retired staff
Arch-Angel
Posts: 1304
Joined: Thu Jul 15, 2004 6:40 pm
Location: No more flag. :(

[Collection] The hardcoded stuff.

Post by Doombreed-x » Wed Apr 06, 2005 9:35 pm

This is a community project to get all the hardcoded stuff from all the files into 1 thread, so people can check it. I'll check back on this thread once in a while, and edit this post to include everyones additions. :) So if you know about hardcoded stuff, post it! Tell us what it is and exactly what part is harcoded, or give us more insight to a previous addition if you have it. I'll keep each thing under it's related file's heading as best I can. Also, please point out wrong info!
Generic equipement stuff:
  • Item Files incl ItemTypes, Weapons, Armor, Misc:
    WeaponDescs are hardcoded to specific itemtypes.
    swor = WeaponDescSword, jave = WeaponDescJavelin, etc.
    Blunt Undead Damage is badly hardcoded. - RicFaith
  • You can move and rearrange entreis in weapons, armor and misc.txt - RicFaith
  • Weapons can get block, but you need to add animations for it and may need to use a state like weapon block - Char
  • Autostacking in belt: Health/Mana/Rejuvpotions are hardcoded to allow stacking even if not same type. - Kingpin
  • Weapons.txt and Armor.txt can have more then 1024 entries, but equipment racks are hardcoded to only look for weapon/armor entries up to 1024, so code editing is needed - Myhrginoc, in the txt file limits thread (Here)
  • There is a list of item codes that need to exist, as the ancients are hardcoded to wear equipment with those codes.
  • The horadric cube uses a pspell function. Any other item given this pspell will also open up to the exact same cube space, you can't create new space with new cubes, without code editing. Also, the cube itself is the only item hardcoded to locate items inside itself when you drop an item on it, further cube items won't do this.
  • Ethereal is an item flag. It can be set to true, but it can't be unset without CE.
Skills.txt:
  • Teleport is hardcoded to read certain values from it's original line in skills.txt, even if you clone it.
  • the weapon masteries for barbs use hardcoded stats that update all the time, and only those mastery stats update like that.
  • the curses and auras used by monsters need to be on their original line, as the game uses hardcoded references with the cursed and aura enchanted properties.
  • Monsters can't summon! Hydra is an exception obviously, but generally monsters can't summon anything without assertions, so don't try. Blizzard had to make special code for hydra to work properly. Same deal with blade sentinel and traps, as they are essentially summons.
TreasureclassEX.txt
  • gold needs to be the first line
Levels.txt
  • the moo moo farm level is hardcoded to its line - volf
hireling.txt
  • the descriptions for the hireling subtypes are hardcoded and use hardcoded references to the .tbl files. some of the strings seem to be hardcoded to string.tbl.[strhirespecialX], others to expansionstring.tbl.[StrMercExXX] - Char
itemstatcost.txt
  • elemental damages:the display of "adds XX-XX fire damage" and the others are hardcoded to use certain .tbl entries. the entries are found in string.tbl.[StrMod(element)DamageRange]. - Char
  • all the passive_mastery_something stats seem to be badly hardcoded. they cannot accept negative values, and it seems like you cannot base op stats on them either for some reason i do not understand. there is probably quite a lot of hardcoded stuff in that file though, since the damagepercent line for example has to enhance the weapon damage, which is probably done by some hardcoded routine - Char
  • for +to fire..poison e.tc skills you need to use same entry in itemstat. It's hardcoded to look into this specific stat. - kingpin

itemtypes.txt
  • The h2h2 row and some (or all) lines before it have hardcoding, so don't remove them, and rearranging them may give errors. - Char
charstats:
  • first item gets bonus in startskill
    no starting items can be magic, set, rare, unique, automagicked, etc. - RicFaith
Levels:
  • Waypoints can be added as long as the list isn't full, and they can be moved around as much as you want, just remember to remove them from the ds1's. - Kingpin
Skilldesc:
  • lots of the desclines have hardcoded text or hardcoded calcs. Here is more skilldesc stuff - RicFaith
  • Certain skilldesc functions are hardcoded to read a table entry "like average firedamage over XXX seconds". - kingpin
States:
  • Freeze row is hardcoded to only work in the row its located in - kingpin
Sets:
  • The cow king set is hardcoded to only be findable in the secret (ha) cow level - Brother Laz
Sounds:
  • There are groupings for sounds which are hardcoded so you can't insert sounds. You can't rearrange them either. - RicFaith
  • sound effects that are played hardcoded like Akara's Ring sound is reading a hardcoded row. The effect it will have to rearrange the sounds will be that all hardcoded sounds will play wrong sound. - kingpin
  • Also, in this file there is a limited range from rowX to end that are hardcoded to play music on client. I have wrote a thread in CE forum how to change this in past. - kingpin

[edit] Tried to make the beginning of points easier to identify. Got a link to that skilldesc thread, I think it's the right one. Added some random info found in threads (mostly by kingpin, post it here too!!!)

[edit - Char] made the thing look better (i hope)

[edit] Sweet! Thanks. *takes notes*
Last edited by Volf on Fri Jan 18, 2013 12:53 am, edited 14 times in total.
Reason: Fixed broken color codes

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Thu Apr 07, 2005 12:00 am

hireling.txt: the descriptions for the hireling subtypes are hardcoded and use hardcoded references to the .tbl files. some of the strings seem to be hardcoded to string.tbl.[strhirespecialX], others to expansionstring.tbl.[StrMercExXX]

itemstatcost.txt, elemental damages:
the display of "adds XX-XX fire damage" and the others are hardcoded to use certain .tbl entries. the entries are found in string.tbl.[StrMod(element)DamageRange].

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Thu Apr 07, 2005 10:50 am

Item Files incl ItemTypes, Weapons, Armor, Misc:
WeaponDescs are hardcoded to specific itemtypes.
swor = WeaponDescSword
jave = WeaponDescJavelin
etc

Blunt Undead Damage is badly hardcoded.

Weapons can't get Block% - can't remember who said

charstats:
first item gets bonus in startskill
no starting items can be magic, set, rare, unique, automagicked, etc.

Levels:
Waypoints can't be moved or added

Skilldesc:
well actually a lot of skilldescs are hardcoded. take a look at the skilldesc thread. in the end i use only a few of them, and ignore the rest

User avatar
kingpin
Senior Admin
Cherub
Posts: 10889
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [Collection] The hardcoded stuff.

Post by kingpin » Thu Apr 07, 2005 11:23 am

Autostacking in belt:

Health/Mana/Rejuvpotions are hardcoded to allow stacking even if not same type.

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Re: [Collection] The hardcoded stuff.

Post by RicFaith » Thu Apr 07, 2005 12:25 pm

[quote=kingpin";p="219219"]Autostacking in belt:

Health/Mana/Rejuvpotions are hardcoded to allow stacking even if not same type.[/quote]

is it? I didn't know that. As in 'forced' stacking right? Because they don't stack themselves in automatically, you'd have to put it in yourself if you want a mix. Maybe I just misunderstood :P

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Thu Apr 07, 2005 12:59 pm

[quote=RicFaith";p="219218"]Weapons can't get Block% - can't remember who said[/quote]

not actually correct. the problem is that most characters do not have any blocking animation for weapons.... so the game will hang up if you try to give blocking to staves for example, unless you add blocking animations.
block does not automatically work on weapons, you have to use weaponblock as a passive i think, though i am not completely sure.

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: [Collection] The hardcoded stuff.

Post by Paul Siramy » Fri Apr 08, 2005 7:55 am

[quote=kingpin";p="219219"]Autostacking in belt:

Health/Mana/Rejuvpotions are hardcoded to allow stacking even if not same type.[/quote]
I supose you mean 'different quality' instead of 'not same type' ? So a minor healing potion can stack over a greater healing potion.

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

Hand-picked

Post by Joel » Fri Apr 08, 2005 1:14 pm

I don't what is hardcoded in skilldesc.txt ??? :?:
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Fri Apr 08, 2005 1:31 pm

most of the strings, the calcs. You can get around it by using other desclines, but lots of the other desclines have hardcoded text or hardcoded calcs.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10889
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [Collection] The hardcoded stuff.

Post by kingpin » Fri Apr 08, 2005 1:45 pm

Levels:
( *Waypoints can't be added (I've moved a waypoint before, so it's gotta be possible, maybe just not between acts? -Doombreed)- RicFaith )
Waypoints can be added if list not full.

Waypoints can be moved around as you want. Just remove the waypoint object from the ds1.

Skilldesc.txt

Certain skilldesc functions are hardcoded to read a table entry "like average firedamage over XXX seconds".

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Fri Apr 08, 2005 5:32 pm

another thing, itemtypes.txt: do not change the lines before the h2h2 row. this is the last hardcodedly referenced row, all the later lines can be changed as you like.

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Fri Apr 08, 2005 6:46 pm

ok a slight change of flavor. You CAN move all the lines in any of the item files around. Move them up move them down re-sort them as you wish. But do not delete any item lines that are previously there. Not even 1.

None of the item lines are hardcoded to their line. But somehow something else is.

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Fri Apr 08, 2005 7:06 pm

maybe they are hardcodedly referenced by the itemtype code....


EDIT: update on hirelings.txt

actually the desert merc strings are not hardcodedly referenced to expansionstring.tbl, but to patchstring.tbl:

PalMercExST1X
PalMercExST3X
PalMerxExST4X
Last edited by Char on Sat Apr 09, 2005 12:10 pm, edited 1 time in total.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10889
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [Collection] The hardcoded stuff.

Post by kingpin » Sat Apr 09, 2005 8:32 pm

actually the desert merc strings are not hardcodedly referenced to expansionstring.tbl, but to patchstring.tbl:

PalMercExST1X
PalMercExST3X
PalMerxExST4X
You are talking about NameFirst, NameLast or?

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Sun Apr 10, 2005 11:36 am

no, talking about the description (offensive, defensive, combat)


EDIT: more hardcoded stuff

itemstatcost.txt: all the passive_mastery_something stats seem to be badly hardcoded. they cannot accept negative values, and it seems like you cannot base op stats on them either for some reason i do not understand.
there is probably quite a lot of hardcoded stuff in that file though, since the damagepercent line for example has to enhance the weapon damage, which is probably done by some hardcoded routine ;).
Last edited by Char on Fri Apr 15, 2005 11:14 pm, edited 1 time in total.

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Tue Apr 26, 2005 12:04 pm

Hmm only stuff from the txt files? or would you like to compile a list of stuff that cannot be edited from txt files :P (sounds bigger huh?)

These sit on the fence. They ought to have worked but don't.

vendors :
After level 25, no vendors sell anything less than magic. Proven and can be fixed in CE, Myhrginoc and I found it over the weekend.

You'll never get the Ubercode item in hell. Bad coding, they forgot a JMP. If you're playing LoD, you can get Ultracode items, and HellUpgrade, in D2C, you can only get HellUpgrade. (there's supposed to be a chance to get Ubercode in both LoD and D2C, it just continues straight into the HelUpgrade item, so you end up with that)

---

perhaps you could make the list more colourful and easier to read. And if there are solutions, perhaps a link or a little blurb? Some things are fixable, and some still not yet. The order seems ok though :)

User avatar
Doombreed-x
Retired staff
Arch-Angel
Posts: 1304
Joined: Thu Jul 15, 2004 6:40 pm
Location: No more flag. :(

Re: [Collection] The hardcoded stuff.

Post by Doombreed-x » Tue Apr 26, 2005 9:17 pm

Hmmm well, anything from the code editing forum is obviously gonna be hard coded, but lets get it all just to be safe anyway. :)

Oh, and I'm not any good at making things look pretty, so perhaps a couple suggestions? Or a mod could do it, they seem to make things look good. :)

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Re: [Collection] The hardcoded stuff.

Post by Char » Wed Apr 27, 2005 9:48 am

[quote=Doombreed-x";p="221994"]Oh, and I'm not any good at making things look pretty, so perhaps a couple suggestions? Or a mod could do it, they seem to make things look good. :)[/quote]

i take that as a permisson to edit your thread ;). now you can look at it and how it is done, so you can do it yourself next time.

btw, i wonder if its really possible to move around the lines in itemstatcost.txt before the h2h2 line. i think i got errors when i did.
in any case, its no use in doing so, so why not leave them alone?

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Wed Apr 27, 2005 9:54 am

very nice Char :) i think you mean itemtypes though... and somehow I don't think I said you can move the itemtypes around. I said item files :P that means weapons, armor and misc. Not the itemtypes file, that one is well hardcoded. I can show you a link for editing it, but honestly it's much simpler to leave it.

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Wed Apr 27, 2005 10:06 am

yes i mean itemtypes :oops:. i do not WANT to edit it, its just that there is wrong information in the list above then, which is said to be from you ...

User avatar
Demon9ne
Dark Alliance Beta Test
Champion of the Light
Posts: 385
Joined: Mon Dec 20, 2004 6:01 am
Location: IL, USA
Contact:

Post by Demon9ne » Wed Apr 27, 2005 11:27 am

misc.txt & stringfiles:

The string "convertsto" (for transmogrifying items) is hardcoded.

Even if you change the string it still says "right click to make" under your item.

Edit: Unsure who discovered this.
Last edited by Demon9ne on Wed Apr 27, 2005 2:24 pm, edited 1 time in total.

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Post by RicFaith » Wed Apr 27, 2005 12:18 pm

Char";p="222052" wrote:yes i mean itemtypes :oops:. i do not WANT to edit it, its just that there is wrong information in the list above then, which is said to be from you ...
RicFaith" wrote:ok a slight change of flavor. You CAN move all the lines in any of the item files around. Move them up move them down re-sort them as you wish. But do not delete any item lines that are previously there. Not even 1.
heh please edit it then :) it's quoted wrong. I said Item Files, not ItemTypes.txt. I know itemtypes is hardcoded, went traipsing in there and the code before too when I was looking for the 50% undead dmg thing.

Sounds.txt
There are groupings for sounds which are hardcoded so you can't insert sounds. You can't rearrange them either.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10889
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [Collection] The hardcoded stuff.

Post by kingpin » Wed Apr 27, 2005 3:37 pm

Sounds.txt
There are groupings for sounds which are hardcoded so you can't insert sounds. You can't rearrange them either.
Right,

sound effects that are played hardcoded like Akara's Ring sound is reading a hardcoded row. The effect it will have to rearrange the sounds will be that all hardcoded sounds will play wrong sound.

Also, in this file there is a limited range from rowX to end that are hardcoded to play music on client. I have wrote a thread in CE forum how to change this in past.

User avatar
Char
Retired staff
Principality
Posts: 2498
Joined: Tue Mar 04, 2003 11:40 pm
Contact:

Post by Char » Wed Apr 27, 2005 3:50 pm

Demon9ne: did you edit the string in string.tbl, expansionstring.tbl or patchstring.tbl? it should somehow be possible to change it usually....
RicFaith: well, yeah... misunderstanding. so Doombred-X should update his post ;).

User avatar
Demon9ne
Dark Alliance Beta Test
Champion of the Light
Posts: 385
Joined: Mon Dec 20, 2004 6:01 am
Location: IL, USA
Contact:

Post by Demon9ne » Thu Apr 28, 2005 12:58 am

I hope I'm mistaken so I can change it, but check this out.

Post Reply

Return to “General Mod Making”