D2TxtAnalyser : debug your Mod easily

This would be the forum for questions about how to work with mod making tools which can be a problem of its own.

Moderator: Paul Siramy

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
United States of America

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by SVR » Wed May 26, 2004 3:11 pm

You can use my properties.txt from Udie2 as a starting point Paul.
I have each stat split.
I had property links in 1.09 for the stats but 1.10 changed the way properties linked so that info is invalid now. (though it's still in the file ;-)

You will run into problems with changed & added stats/properties though.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Mon Jul 19, 2004 11:19 am

New version released (2.4).

It now test prop/param/min/max columns in all .txt, for at least basic errors (FoxBat should appreciate ;) ). I still have to implement SVR idea about states.txt ID for instance (a column that uses ID should take the appropiate .txt, and check if the IDs are truly exists).

As always, if you have other ideas / needs for that tool, ask there.
Last edited by Paul Siramy on Mon Jul 19, 2004 11:22 am, edited 1 time in total.

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Tue Jul 20, 2004 3:25 am

Oh man, this tool just keeps getting better and better. What's next?!? Can't wait :)


Does this error "matter"? I swear i've used negative modifiers listed in that way before without them malfunctioning in-game. HMmm, could be negative modifiers are handled specially by the game. I'll look into it and let you know ;)

* ERROR : Propertie (dmg-ac) : 'mod1min' (-25) should be <= than 'mod1max' (-40), row 47 (of Perforation)
* ERROR : Propertie (dmg-ac) : 'mod1min' (-10) should be <= than 'mod1max' (-20), row 48 (of Puncturing)




What about this one? -->

In Data\Global\Excel\Armor.txt :
* ERROR : Item 'code' (ci2) at row 117 (Tiara) has 'normcode' (ci1), expected (ci0)
* ERROR : Item 'code' (ci3) at row 118 (Diadem) has 'normcode' (ci1), expected (ci0)

I messed around with it, but can't seem to fix the error. Just wonder though if this error report simply reflects on how your program analyzes the txt files, or if in it's Vanilla form there's actually (for example) funky functionality when gambling for a circlet or something. I could i'll have to look into this one as well :p
Last edited by Sduibek on Tue Jul 20, 2004 3:43 am, edited 7 times in total.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Tue Jul 20, 2004 1:45 pm

[quote=Sduibek";p="184287"]Does this error "matter"? I swear i've used negative modifiers listed in that way before without them malfunctioning in-game. HMmm, could be negative modifiers are handled specially by the game. I'll look into it and let you know ;)

* ERROR : Propertie (dmg-ac) : 'mod1min' (-25) should be <= than 'mod1max' (-40), row 47 (of Perforation)
* ERROR : Propertie (dmg-ac) : 'mod1min' (-10) should be <= than 'mod1max' (-20), row 48 (of Puncturing)[/quote]
The fact is I don't know what the game does in that case. On the pure mathematical side, -25 is greater than -40, so -40 should have been put into the MIN field, while -25 in the MAX field. Now, it depends how the game handle this case. It MAY detect that the MAX field is lower than the MIN field and therefore maybe it swap the values, making it correctly use the range [-40; -25]. I don't know, and I'm waiting for feedbacks / tests on this.

[quote=Sduibek";p="184287"]What about this one? -->

In Data\Global\Excel\Armor.txt :
* ERROR : Item 'code' (ci2) at row 117 (Tiara) has 'normcode' (ci1), expected (ci0)
* ERROR : Item 'code' (ci3) at row 118 (Diadem) has 'normcode' (ci1), expected (ci0)

I messed around with it, but can't seem to fix the error. Just wonder though if this error report simply reflects on how your program analyzes the txt files, or if in it's Vanilla form there's actually (for example) funky functionality when gambling for a circlet or something. I could i'll have to look into this one as well :p[/quote]
"Circlet" is 'code' ci0, and has norm/uber/ultra codes set to ci0, ci2 and ci3. So Circlet is the normal variation of that item (ci0 beeing in normcode), and the exceptionel & elite versions are Tiara (ci2) and Diadem (ci3).

If all goes right, normallly Tiara & Diadem rows should have ci0/ci2/ci3 in norm/uber/ultra codes as well but ... Tiara (ci2) has ci1/ci2/ci3 in norm/uber/ultra codes, so here's the explantion for the "* ERROR : Item 'code' (ci2) at row 117 (Tiara) has 'normcode' (ci1), expected (ci0)" error detected.

I don't know exactly for what norm/exceptionel/elite links are important for, but I guess that it has something to do with Vendors in nightmare/hell difficulties, Cube Recipes, and maybe Gambling too. Incorect linkage may bring problems in these areas.

Btw, thanks to have found that "HratliMagicLvl" bug for me Sduibek ;)

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Tue Jul 20, 2004 10:29 pm

Funny thing is, when I change ci1 to ci0 it gives me an error as well :)

Like I said though, i'll look into both and let ya know what I find. Another thing on the To Do list.... ;)
Last edited by Sduibek on Tue Jul 20, 2004 10:30 pm, edited 1 time in total.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Wed Jul 21, 2004 12:22 am

[quote=Sduibek";p="184443"]Funny thing is, when I change ci1 to ci0 it gives me an error as well :)[/quote]
But on another items.

Look : there are 4 items (Circlet, Coronet, Tiara, Diadem), that are linked together incorrectly.

Circlet < Tiara < Diadem
Coronet < Tiara < Diadem

If you remove the Circlet (ci0) item completly from Armor.txt, that should solve this problem (but introduce new ones ;) )

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

Hand-picked

Post by Joel » Wed Jul 21, 2004 8:45 am

the -25 -40 issue is handled correctly by the game.
It detects if value are < 0 and swap the value and test for absolute vlue.

All my affix file use stuff like :

hp -1 -5 and works correctly
"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)
France

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Wed Jul 21, 2004 12:19 pm

Hmmm, and if only 1 value is negative ?

Min = -10, Max = 20, what becomes the range, [-10; 20] as expected ? What about Min = 20, Max = -10, and Min = -20, Max = 10 ?
Last edited by Paul Siramy on Wed Jul 21, 2004 12:21 pm, edited 1 time in total.

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Wed Jul 21, 2004 6:26 pm

[quote=Paul Siramy";p="184457"]If you remove the Circlet (ci0) item completly from Armor.txt, that should solve this problem (but introduce new ones ;) )[/quote]
Yep. :P

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Joel » Thu Jul 22, 2004 8:14 am

[quote=Paul Siramy";p="184542"]Hmmm, and if only 1 value is negative ?

Min = -10, Max = 20, what becomes the range, [-10; 20] as expected ? What about Min = 20, Max = -10, and Min = -20, Max = 10 ?[/quote]

I don't know. For those kind of intrval, I've been a smartass.
I made two affix one with -1 -10 and one with 0 20 ^^
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Eltear
Forum Regular
Angel
Posts: 656
Joined: Fri Feb 13, 2004 7:55 pm
Location: Sweden

Post by Eltear » Thu Jul 22, 2004 1:02 pm

Min = -10, Max = 20, what becomes the range, [-10; 20] as expected ? What about Min = 20, Max = -10,
Both those work as expected (no problems). I didn't bother to test the last one, since it should work the same as 'Min = 20, Max = -10'.

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Wed Jul 28, 2004 11:01 pm

Seems like you fixed it for Misc.txt only to break Armor.txt and Weapons.txt... now I get:

* 104 : HraltiMagicLvl not found

On both of those files. :) I think it means misc.txt was a special case...



Suggestion:

When listing the files in log_extracted_txt, there could easily be some confusion. For example, right now i'm staring at the line:

* 16 : fInit not found


But both Mhyrginoc's FieldDataTypes list and the 1.10 MonuMod.txt guide say that this column is not read by the game at all. Shouldn't you only include columns in log_extracted_txt that the game actually reads? It seems kind of fruitless to say, "Uh oh, column not found" when the column in question is simply a comment field.. or not read by the game.. or both :)



One other thing... if I set the first 3 circlets to ci0, ci1, and ci2, then set the Diadam (circlet #4) to ci3, ci3, ci3.. then your program gives no complaints. Would this configuration cause any gameplay problems that you can foresee? Hmmm.
Last edited by Sduibek on Fri Jul 30, 2004 3:15 pm, edited 7 times in total.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Fri Jul 30, 2004 7:14 pm

Sduibek";p="185931" wrote:Seems like you fixed it for Misc.txt only to break Armor.txt and Weapons.txt... now I get:

* 104 : HraltiMagicLvl not found

On both of those files. :) I think it means misc.txt was a special case...
Hmmm, from Myhrginoc's rtf doc, I see that "HraltiMagicLvl" is used in the 3 files (weapons, armor, and misc). Further more, in D2Common.dll you can find "HraltiMagicLvl" but there's no "HratliMagicLvl". But it's true than in Armor of the 1.10 patch, you can find "HratliMagicLvl". So my best guess is that in Armor.txt and Weapons.txt, since the header names is incorrect (different than in dll) the game don't use it (someone, any experience here ?), or that these columns are accessed not by header but by column index (ignoring the name, whatever it can be)

Suggestion:

When listing the files in log_extracted_txt, there could easily be some confusion. For example, right now i'm staring at the line:

* 16 : fInit not found


But both Mhyrginoc's FieldDataTypes list and the 1.10 MonuMod.txt guide say that this column is not read by the game at all. Shouldn't you only include columns in log_extracted_txt that the game actually reads? It seems kind of fruitless to say, "Uh oh, column not found" when the column in question is simply a comment field.. or not read by the game.. or both :)
My bad. I generated part of my source code using a program I made, and it was parsing the columns it found in the .txt. I'll remove that column.


One other thing... if I set the first 3 circlets to ci0, ci1, and ci2, then set the Diadam (circlet #4) to ci3, ci3, ci3.. then your program gives no complaints. Would this configuration cause any gameplay problems that you can foresee? Hmmm.
Hmmm, I don't see any problems, but I'm not a specialist in this area.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by kingpin » Fri Jul 30, 2004 7:42 pm

Hmmm, from Myhrginoc's rtf doc, I see that "HraltiMagicLvl" is used in the 3 files (weapons, armor, and misc). Further more, in D2Common.dll you can find "HraltiMagicLvl" but there's no "HratliMagicLvl". But it's true than in Armor of the 1.10 patch, you can find "HratliMagicLvl". So my best guess is that in Armor.txt and Weapons.txt, since the header names is incorrect (different than in dll) the game don't use it (someone, any experience here ?), or that these columns are accessed not by header but by column index (ignoring the name, whatever it can be)
You never read the column name, all tables is accessed index. There the next entry depends of the datatype for the column.

EDIT:
Forgott to mention that then the game compile the txt to bin it do read the column names. So, there is a chance that HratlyMagicLvl column isn't compiled. Need to check that to see if this is the case :P
Last edited by kingpin on Sat Jul 31, 2004 6:55 pm, edited 1 time in total.

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Sat Jul 31, 2004 6:08 pm

Hmm.. I may have to take back what I said about unneeded columns. I'll do some testing today to make sure, but so far it seems that removing even totally useless columns can mess up the game. (Everything runs too fast). Wierd. o_O

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: D2TxtAnalyser : debug your Mod easily

Post by Myhrginoc » Tue Aug 03, 2004 4:55 am

These are from the d2common stack build for v1.10 final item files:

00099494 HraltiMin
00099488 HraltiMax
00099478 HraltiMagicMin
00099468 HraltiMagicMax
00099458 HraltiMagicLvl

If the column header is different in any of the item files (weapons, armor, misc) then that field will not load for any record in the file.

And yes, as kingpin found out, when the game compiles txt to bin it does refer to the column headers (Fog.10208). It ignores any field whose column header is not in the stack build. It doesn't like not finding any field whose column is listed in the stack build, so removing columns can be dangerous.
Last edited by Myhrginoc on Tue Aug 03, 2004 4:58 am, edited 1 time in total.
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
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Tue Aug 03, 2004 4:41 pm

So, just for my general knowledge, this means than in Single Player, Hratli always use a MagicLevel of zero for his Weapons and Armors (typo with header names in weapons.txt & armor.txt), or something worst ?

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: D2TxtAnalyser : debug your Mod easily

Post by Myhrginoc » Fri Aug 06, 2004 4:37 am

That is correct. I checked armor.bin against armor.txt and the first four records are 255 in the txt but 00 in the bin. After that the field value in the txt changes, but the compiled data stays resolutely at 0.

To enable the field, just change the header from "HratliMagicLvl" to "HraltiMagicLvl" in both Weapons.txt and Armor.txt. And Paul's utility could check the field header, and then flag it or correct it, if he sets it up for that. (The other four Hratli fields are okay.)
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
Volf
Retired Admin
Dominion
Posts: 5396
Joined: Thu Jul 31, 2003 8:19 am
Finland

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Volf » Wed Sep 01, 2004 11:43 am

Just been rearrangeing my misc.txt to keep things more organised,, added a bunsh of categories and empty lines

Analyzer gives duplicated code error for this.. My suggestion is to make it ignore empty lines or lines with only a title in first column in misc.txt.. Dont know if thats possible to do thou.

Sduibek

Re: D2TxtAnalyser : debug your Mod easily

Post by Sduibek » Sat May 21, 2005 9:44 pm

[quote=Volf";p="190745"]Just been rearrangeing my misc.txt to keep things more organised,, added a bunsh of categories and empty lines

Analyzer gives duplicated code error for this.. My suggestion is to make it ignore empty lines or lines with only a title in first column in misc.txt.. Dont know if thats possible to do thou.[/quote]Isn't the first column read by the game? if so i wouldnt put comments in the first column, just add another column for your comments ;)

User avatar
Volf
Retired Admin
Dominion
Posts: 5396
Joined: Thu Jul 31, 2003 8:19 am
Finland

Hand-picked

Post by Volf » Sun May 22, 2005 3:09 pm

The comments in first column are there by default, i have just added enpty rows as markers to make the file easier to manage.

User avatar
Nemofish_5
Posts: 39
Joined: Mon Mar 14, 2005 10:08 am

Post by Nemofish_5 » Tue May 24, 2005 7:21 am

[quote=Volf";p="225622"]The comments in first column are there by default, i have just added enpty rows as markers to make the file easier to manage.[/quote]

just something to keep in mind when adding empty lines in misc.txt, armor.txt and weapons.txt: this WILL make the RUNEWORDS not to work. I don't know why, but i had the problem many times. Didn't find a solution tho.
The only one thing that i am sure of is that I DON'T KNOW! (Socrates)

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
United States of America

Hand-picked

Post by SVR » Tue May 24, 2005 2:46 pm

Nemo - the cause of that has been found.

The solution is to put xxx into the code columns in the blank lines.
That way D2 doesn't add a "blank" item into it's lookup lists causing empty rune columns to require this blank gem.

User avatar
Ulmo
Forum Regular
Angel
Posts: 860
Joined: Fri Jun 04, 2004 5:04 pm

Post by Ulmo » Tue Sep 13, 2005 7:40 am

There is a real need for testing mismatching brackets in calc areas. Currently you don't get a simple warning while some field are lost !
This means :

Code: Select all

Missiles :
	SrvCalc1
	CltCalc1
	{filtered}
	CHitCalc1
	DmgCalc1
	DmgSymPerCalc
	EDmgSymPerCalc

SkillDesc :
	ddam calc1
	ddam calc2
	p1dmmin
	p1dmmax
	p2dmmin
	p2dmmax
	p3dmmin
	p3dmmax
	desccalca1
	desccalcb1
	desccalca2
	desccalcb2
	desccalca3
	desccalcb3
	desccalca4
	desccalcb4
	desccalca5
	desccalcb5
	desccalca6
	desccalcb6
	dsc2calca1
	dsc2calcb1
	dsc2calca2
	dsc2calcb2
	dsc2calca3
	dsc2calcb3
	dsc2calca4
	dsc2calcb4
	dsc3calca1
	dsc3calcb1
	dsc3calca2
	dsc3calcb2
	dsc3calca3
	dsc3calcb3
	dsc3calca4
	dsc3calcb4
	dsc3calca5
	dsc3calcb5
	dsc3calca6
	dsc3calcb6
	dsc3calca7
	dsc3calcb7

Armor/Misc/Weapons :
	len
	calc1
	calc2
	calc3
	spelldesccalc

Skills :
	prgcalc1
	prgcalc2
	prgcalc3
	auralencalc
	aurarangecalc
	aurastatcalc1
	aurastatcalc2
	aurastatcalc3
	aurastatcalc4
	aurastatcalc5
	aurastatcalc6
	passivecalc1
	passivecalc2
	passivecalc3
	passivecalc4
	passivecalc5
	petmax
	sumsk1calc
	sumsk2calc
	sumsk3calc
	sumsk4calc
	sumsk5calc
	cltcalc1
	cltcalc2
	cltcalc3
	skpoints
	delay
	perdelay
	calc1
	calc2
	calc3
	calc4
	ToHitCalc
	DmgSymPerCalc
	EDmgSymPerCalc
	ELenSymPerCalc

I hope you still have time to do this.
Last edited by Ulmo on Tue Sep 13, 2005 7:43 am, edited 1 time in total.

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

Hand-picked

Re: D2TxtAnalyser : debug your Mod easily

Post by Paul Siramy » Tue Sep 13, 2005 8:03 am

Will a simple count of '(' and ')' characters in each formula field will be enough ? If yes, then it's really simple to do. It won't support the ternary "? :" operator tough.

Return to “Tools”