Page 1 of 2

[Collection] The hardcoded stuff.

Posted: Wed Apr 06, 2005 9:35 pm
by Doombreed-x
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*

Posted: Thu Apr 07, 2005 12:00 am
by Char
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].

Posted: Thu Apr 07, 2005 10:50 am
by RicFaith
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

Re: [Collection] The hardcoded stuff.

Posted: Thu Apr 07, 2005 11:23 am
by kingpin
Autostacking in belt:

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

Re: [Collection] The hardcoded stuff.

Posted: Thu Apr 07, 2005 12:25 pm
by RicFaith
[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

Posted: Thu Apr 07, 2005 12:59 pm
by Char
[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.

Re: [Collection] The hardcoded stuff.

Posted: Fri Apr 08, 2005 7:55 am
by Paul Siramy
[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.

Posted: Fri Apr 08, 2005 1:14 pm
by Joel
I don't what is hardcoded in skilldesc.txt ??? :?:

Posted: Fri Apr 08, 2005 1:31 pm
by RicFaith
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.

Re: [Collection] The hardcoded stuff.

Posted: Fri Apr 08, 2005 1:45 pm
by kingpin
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".

Posted: Fri Apr 08, 2005 5:32 pm
by Char
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.

Posted: Fri Apr 08, 2005 6:46 pm
by RicFaith
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.

Posted: Fri Apr 08, 2005 7:06 pm
by Char
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

Re: [Collection] The hardcoded stuff.

Posted: Sat Apr 09, 2005 8:32 pm
by kingpin
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?

Posted: Sun Apr 10, 2005 11:36 am
by Char
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 ;).

Posted: Tue Apr 26, 2005 12:04 pm
by RicFaith
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 :)

Re: [Collection] The hardcoded stuff.

Posted: Tue Apr 26, 2005 9:17 pm
by Doombreed-x
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. :)

Re: [Collection] The hardcoded stuff.

Posted: Wed Apr 27, 2005 9:48 am
by Char
[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?

Posted: Wed Apr 27, 2005 9:54 am
by RicFaith
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.

Posted: Wed Apr 27, 2005 10:06 am
by Char
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 ...

Posted: Wed Apr 27, 2005 11:27 am
by Demon9ne
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.

Posted: Wed Apr 27, 2005 12:18 pm
by RicFaith
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.

Re: [Collection] The hardcoded stuff.

Posted: Wed Apr 27, 2005 3:37 pm
by kingpin
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.

Posted: Wed Apr 27, 2005 3:50 pm
by Char
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 ;).

Posted: Thu Apr 28, 2005 12:58 am
by Demon9ne
I hope I'm mistaken so I can change it, but check this out.