Txt File Limits

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.

Moderators: GuyAskingQuestion, Doombreed-x, Nefarius, talonrage

2
100%
 
Total votes: 2

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: Txt File Limits

Post by Nefarius » Mon Nov 05, 2007 3:21 pm

That depend how runes.txt is used. Haven't checked into runes.txt code. But, if it's handled in same way as gems.txt. This can't be the reason.
Runes.txt and gems.txt are not related in anyway. Runeword stats aren't related to rune/gem stats, they are saved on a special section for each item in the D2S [the same section is used for setitem stats, hence setitems cannot contain runewords] (while gem/rune base stats aren't saved at all and applied in realtime --- thus not bound to ISC). The item also stores the runeword index (from runes.txt) if a runeword is assigned to it, now the D2S is limited when it comes to storing indexes (and these limits are much lower then the limits possible in the txt files), For affixes for example (as discussed in this topic earlier), once the item gets compressed the superflous bits will be omitted. For affixes this is only a problem inasmuch as that they will lack special color and string indexes but for runewords they would transform into ITHs that get deleted the next time a game is joined.

It seams unlikely (even) for blizzard to impose this limit on runeword count if it wasen't for some format restriction.

---

Along the lines of limits, were is the info about MonStats2.txt being 1024 records at max comming from? I've dug through so much monster code without finding reference to this that I think it was only there during the v1.10 beta.
Last edited by Nefarius on Mon Nov 05, 2007 3:23 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
kingpin
Site Admin
Cherub
Posts: 10866
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: Txt File Limits

Post by kingpin » Mon Nov 05, 2007 6:36 pm

Runes.txt and gems.txt are not related in anyway. Runeword stats aren't related to rune/gem stats, they are saved on a special section for each item in the D2S [the same section is used for setitem stats, hence setitems cannot contain runewords] (while gem/rune base stats aren't saved at all and applied in realtime --- thus not bound to ISC). The item also stores the runeword index (from runes.txt) if a runeword is assigned to it, now the D2S is limited when it comes to storing indexes (and these limits are much lower then the limits possible in the txt files), For affixes for example (as discussed in this topic earlier), once the item gets compressed the superflous bits will be omitted. For affixes this is only a problem inasmuch as that they will lack special color and string indexes but for runewords they would transform into ITHs that get deleted the next time a game is joined.
Yeah, that was my concern if runes was handled in same way as gems (i.e stats not saved on item). In, that case D2S limit sounds resonable.

Along the lines of limits, were is the info about MonStats2.txt being 1024 records at max comming from? I've dug through so much monster code without finding reference to this that I think it was only there during the v1.10 beta.
My question is the same for Monstats.txt. Is it really limited to 1024 rows? Don't remember if I tried it or not. But, the limit sounds to me more like a user error as with broken chains, duplicated names. The file can then behave like there is a limit.

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: Txt File Limits

Post by Nefarius » Mon Nov 05, 2007 8:00 pm

To my knowledge there is no limit of 1024 records in monstats. I've had more at one point and others have also had more records in the file without problem.

This report is either based on a chain error or also to one aspect of the D2S, those monster organs store a hcIdx which probably is just a few bits wide. But this would never cause any other problems then a glitch on the item display (and some priceing mess --- the hcIdx is used when evaluating organ price).
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
librarian
Junior Member
Champion of the Light
Posts: 356
Joined: Wed Dec 07, 2005 7:47 pm
Contact:

Re: Txt File Limits

Post by librarian » Mon Nov 05, 2007 11:06 pm

Heiho,

I had some issues with IDs beyond 1024 when I tried to spawn them the hard way via ds1 edits. I asked Paul about it, but we couldn't spot anything wrong, based on his tutorial. Didn't dig deeper, since the issues evaporated when I moved the according monsters below 1024 in MonStats.
So, to be on the safe side, I've always used IDs below 1024 for monsters which need hard spots to appear since then.
so long ...
librarian

current status: (re-)tired
vanilla FAQtoids

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: Txt File Limits

Post by Nefarius » Tue Nov 20, 2007 5:32 am

I've tested this a second time to verify it, I added 1999 clones to monstats and can access the last one without problem spawn it normally, I also looked at the Ids passed thru funcs internally, they are all correct.

I also encountered what appeared to be a problem, having wrong ids spawned on the first run, but this was just a chain error because I had the same name twice in the file.

A note albeit that this could be since I'm using v1.11b, Blizz removed some other file restrictions from this version (like for LvlPrest.txt which had to be manually extended before using Afj's plugin)

I thought at first that this may be some sort of binfile related restriction with the Id->Idx func, but this isn't the case, the same linker func is also used for skills and missiles and those are far from limited to 1024.
Last edited by Nefarius on Tue Nov 20, 2007 5:46 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
kingpin
Site Admin
Cherub
Posts: 10866
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: Txt File Limits

Post by kingpin » Tue Nov 20, 2007 5:40 pm

There is a baseID restriction. You cannot link to many to same baseID. have forgot the exact number it was limited to.

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: Txt File Limits

Post by Nefarius » Tue Nov 20, 2007 6:28 pm

I know its 16 (or 32 one of the two), but this should be expandedable quite easily. The game stores the chain # and position in chain # seperate from the baseId itself (these two extra code-generated columns are what the restriction is on), but this chain data is only used in a handful of functions like D2Common.10374 (which gets the Id closest to the dungeon level).

The checks for BaseId are read from the BaseId field directly, and this will work even when the chain is broken (this is why v1.11x work despite the broken chains).

EDIT: Looking at the v1.11b chain building function, the chains are now only imposed a logical limit (256 chains, 256 indexes per chain). Due to the chain# and the chain Index both being stored in a byte. This means all 65536 possible units without chain error if it's done properly, and with monstats being limit to 32768 entries due to signed/unsigned inconsistency this shouldn't pose any problem (in v1.11b, in v1.10 the chains are more restricted for no particular reason).
Last edited by Nefarius on Thu Nov 29, 2007 9:45 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
Borgin
Forum Regular
Angel
Posts: 900
Joined: Fri Dec 05, 2003 5:25 am
Location: Wisconsin
Contact:

Post by Borgin » Wed Feb 13, 2008 5:37 pm

I may be missing something, but the front page of this still says that levels.txt is limited to 133 rows... but 1.11b uses 136.

Has this limited been increased in 1.11b? Please say yes, and please say to 256.

I can't find anything else on the subject anywhere in the thread, either. Hmm.

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

Post by Nefarius » Wed Feb 13, 2008 5:44 pm

Borgin";p="376545" wrote:I may be missing something, but the front page of this still says that levels.txt is limited to 133 rows... but 1.11b uses 136.

Has this limited been increased in 1.11b? Please say yes, and please say to 256.

I can't find anything else on the subject anywhere in the thread, either. Hmm.
The limit in v1.11b is what blizzard has set it to (136), they just changed the #define in one of their headers (otherwise I wouldn't have had to make the v1.11b extended levels plugin ;))
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Super_jew
Posts: 28
Joined: Sat Sep 22, 2007 9:31 am

Re: Txt File Limits

Post by Super_jew » Thu Nov 19, 2009 7:25 pm

Why did you build a plugin if you could have just changed the dll define from 136 to 256

sorry for bringing up such an old subject just looking and found this useful

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: Txt File Limits

Post by Nefarius » Thu Nov 19, 2009 10:47 pm

http://en.wikipedia.org/wiki/C_preprocessor

Are you aware what a #define is?
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
GeorgiaBoy
Junior Member
Champion of the Light
Posts: 316
Joined: Sat Aug 25, 2007 3:24 am

Re: Txt File Limits

Post by GeorgiaBoy » Thu Oct 14, 2010 2:24 am

Volf" wrote:
I_only_pressed_Esc";p="237081" wrote:How about LvlTypes.txt as apparently it produces a random error in the new map if using more lines.

I haven't encountered this as yet. :)

Thats not due to a file limit, the random error is coz new lvltypes do not have automap entries. I cant remember if adding entries for them solves the problem, never had to since there is still so much room in my lvltypes.txt
I added two lines to lvltypes.txt (without adding to automap) and have not encountered any errors yet. Has anybody found a limit to lvltypes.txt?

Thanks,

GB

User avatar
Trevor
Forum Legend
Principality
Posts: 2063
Joined: Sat Aug 05, 2006 11:03 pm
Location: Alberta Canada
Contact:

Hand-picked

Re: Txt File Limits

Post by Trevor » Mon Nov 29, 2010 8:57 pm

Levels.txt caps out at 255. You can add map ids > 255 but you cant link them using Vis tiles.
AfterMath Overview: http://www.aftermathcentral.com

Following the path of least resistance is what makes rivers and men crooked.
- Author Unknown

Mod Completion: Always under Construction
D2SE Compatible Only

Playing AfterMath v3.0.1 ~ 1020 MB
Released March 31, 2017

User avatar
Rattlecage
Forum Regular
Angel
Posts: 931
Joined: Sun Apr 13, 2003 8:46 pm
Location: The Frozen North
Contact:

Re: Txt File Limits

Post by Rattlecage » Mon Nov 29, 2010 9:44 pm

I believe there's an edited .dll you can download in the plugins section that will allow you to link to levels with ids greater than 255. There is also a D2Mod plugin that does the same.
No beating heart I felt. I brought no sights to the silver lips; no warmth from the gold.

User avatar
Trevor
Forum Legend
Principality
Posts: 2063
Joined: Sat Aug 05, 2006 11:03 pm
Location: Alberta Canada
Contact:

Hand-picked

Re: Txt File Limits

Post by Trevor » Tue Nov 30, 2010 12:01 am

I used that Dll for the d2mod system. It fails if you go beyond 255.
AfterMath Overview: http://www.aftermathcentral.com

Following the path of least resistance is what makes rivers and men crooked.
- Author Unknown

Mod Completion: Always under Construction
D2SE Compatible Only

Playing AfterMath v3.0.1 ~ 1020 MB
Released March 31, 2017

User avatar
Necrolis
Site Admin
Throne
Posts: 8900
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Txt File Limits

Post by Necrolis » Tue Nov 30, 2010 5:03 am

Levels caps out at well beyond 255, its other stuff that breaks, basically you need to fix up the code for anything that stores a level id
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
GeorgiaBoy
Junior Member
Champion of the Light
Posts: 316
Joined: Sat Aug 25, 2007 3:24 am

Re: Txt File Limits

Post by GeorgiaBoy » Thu Dec 02, 2010 4:46 am

Necrolis" wrote:Levels caps out at well beyond 255, its other stuff that breaks, basically you need to fix up the code for anything that stores a level id
That explains a lot. Sounds like a formidable task...

GB

User avatar
Necrolis
Site Admin
Throne
Posts: 8900
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Txt File Limits

Post by Necrolis » Thu Dec 02, 2010 12:17 pm

GeorgiaBoy" wrote:
Necrolis" wrote:Levels caps out at well beyond 255, its other stuff that breaks, basically you need to fix up the code for anything that stores a level id
That explains a lot. Sounds like a formidable task...

GB
Nefarius had it done for 1.11b, I ported it over to 1.10, using some of his code. its not really too much, just portals(the space is there), telepads, and some map things
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
GeorgiaBoy
Junior Member
Champion of the Light
Posts: 316
Joined: Sat Aug 25, 2007 3:24 am

Re: Txt File Limits

Post by GeorgiaBoy » Thu Dec 02, 2010 4:19 pm

So 1024 working levels is not out of ther realm of possibility? Wow. dav92 is working on softcoding the random outdoor areas...quite the combination if it becomes a reality!

Thanks,

GB

User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1101
Joined: Fri Oct 08, 2010 10:55 am
France

Re: Txt File Limits

Post by Xaphan » Fri Dec 03, 2010 4:11 pm

Necrolis" wrote:
GeorgiaBoy" wrote:
Necrolis" wrote:Levels caps out at well beyond 255, its other stuff that breaks, basically you need to fix up the code for anything that stores a level id
That explains a lot. Sounds like a formidable task...

GB
Nefarius had it done for 1.11b, I ported it over to 1.10, using some of his code. its not really too much, just portals(the space is there), telepads, and some map things
Is there a tutorial or something explaining how to do this ?

Well, most of us dosen't need 1024 levels but for the ones like me who are doing a whole new map, without using previous levels, it can help for more room in levels.txt :)
Ability to go up to 500 levels would already be enough !

User avatar
Necrolis
Site Admin
Throne
Posts: 8900
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Txt File Limits

Post by Necrolis » Fri Dec 03, 2010 4:16 pm

Xaphan" wrote:Is there a tutorial or something explaining how to do this ?

Well, most of us dosen't need 1024 levels but for the ones like me who are doing a whole new map, without using previous levels, it can help for more room in levels.txt :)
Ability to go up to 500 levels would already be enough !
there isn't, mainly due to the code it changes, it would be up to Nefarius anyways.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
ZOMB
Posts: 47
Joined: Fri Feb 04, 2011 8:45 am
Contact:

Re: Txt File Limits

Post by ZOMB » Sat Aug 17, 2013 7:51 pm

ItemStatCost.txt - only 512 rows? Please tell me it can be extended somehow :(

I've been doing my own softcoded quest and I didn't realise that there is a limit of this file... I really need it...

Can it be extended somehow?

Thanks for any replies and advices ;)
Fan, player and modmaker of game Diablo 2
Diablo 2: Is Alive Mod (Open Beta)

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

Hand-picked

Re: Txt File Limits

Post by kingpin » Sun Aug 18, 2013 7:31 am

ZOMB" wrote:ItemStatCost.txt - only 512 rows? Please tell me it can be extended somehow :(

I've been doing my own softcoded quest and I didn't realise that there is a limit of this file... I really need it...

Can it be extended somehow?

Thanks for any replies and advices ;)
It requires code editing to extend and isn't a small task. If you go code editing it would probably be better idea code your own quest system then extend the itemstatcost file.

User avatar
ZOMB
Posts: 47
Joined: Fri Feb 04, 2011 8:45 am
Contact:

Re: Txt File Limits

Post by ZOMB » Sun Aug 18, 2013 9:29 am

Oh, thanks... though I hoped for better answer.
The thing is, that I'm trying to make my mod as simple as possible - everything softcoded way.
I'm sure I'll figure it out somehow.

Just a one more little question: Can I use the unused rows in original itemstatcost.txt? Are these rows ready for usage?

Thank you
Fan, player and modmaker of game Diablo 2
Diablo 2: Is Alive Mod (Open Beta)

Aught
Junior Member
Champion of the Light
Posts: 441
Joined: Mon Nov 21, 2011 6:12 pm
Location: Russia
Contact:
Russia

Re: Txt File Limits

Post by Aught » Sun Aug 18, 2013 11:56 am

you can use them, especially for saved stats ;)

Post Reply

Return to “General Mod Making”