PlugY : statsinterface.txt tutorial

Discuss applications of D2Mod (v1.10), NefEx (v1.11+), and PlugY, and post suggestions for future plugins.

Moderators: Nefarius, Yohann, SVR

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

PlugY : statsinterface.txt tutorial

Post by Yohann » Sat Mar 26, 2005 10:56 pm

In PlugY 5, you can modify the displaying of the extra stats pages.
You can do that by modifying PlugY/statsinterface.txt.
This file are same structure than any other txt file of D2 execpt it is always recompiled and no bin file are saved.

You can also change the backgroud : simply change the EmptyPage.dc6 file. (For now it's the same backgroud for each page)

Information about each columns (in bold) in v5.03 :
*desc
not used.

enabled
If enabled=0 the line isn't used.

page
The page where the stat should be printed.
1 is the first extra page so the
There are no limit of page, the last page is just the greatest value you put in this field.


x
Relative horizontal position from left.
The border in 800x600 isn't counted

y
Relative vertical position from bottom.
The border in 800x600 isn't counted

color
The color index in D2. In unmodded game this value go from 0 to 20.
Greater value cause crash.
Some value :
0 = white
1 = red
2 = green
3 = blue
4 = gold (like unique item)
5 = dark gray
6 = black
7 = dark yellow
8 = orange
9 = yellow
10 = darkest green
11 = purple
12 = dark green
13 = white
14 = dark
15 = light gray
16 = gray (like etheral item)
17 = funny
18 = bright white
19 = crystal red
20 = funny


font
Define the font and size of the text.
Empty or 0 means keep the previous font and size.
At start it's the normal font which is selected.
In the default file, you can remove all 6 under the first.
Some font :
1 = normal font
6 = tiny font
You can test other values if you want :)

statID
The ID of the stat to display. This match the second columns (ID) of data/global/excel/ItemStatCost.txt in mpq file (= current line number - 2). In LOD 1.10 this value are between 0 and 358.
Use greater value only if the mod add new stats.

end
Always set to 0.


Warning me if I miss something or you have some suggestions for adding stuff in future versions (even if I have already a lot of idea !).
Last edited by Yohann on Sun Oct 09, 2005 12:51 am, edited 2 times in total.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

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: PlugY : statsinterface.txt tutorial

Post by Myhrginoc » Sun Mar 27, 2005 2:53 am

How about a color option that acts like the original resistance colors? Red if negative, grey (color 0) if normal, gold if at maxstat value?
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
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Sun Mar 27, 2005 4:36 pm

Isn't so easy to do what you want.
First maxstat value, I can't get it easily.
For example, for percent value the maxstat is 127 but it's stupid.
For the resistance display I want to print the real amount of bonus which can excess the resist cap, sometimes I see more than 400 resist fire !!
but I can add an option to use the color depends of the value red if negative, grey if 0 and white or blue if positive.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

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: PlugY : statsinterface.txt tutorial

Post by Myhrginoc » Sun Mar 27, 2005 5:44 pm

Actually I was thinking of the known caps, which I remember seeing a thread covering the bulk of the stats people worry about (e.g. resists, increased attack speed, blocking, cast speed). I agree, those caps are hardcoded and not easily found. But almost all of them are 75% without equipment modifications, so a simple red below 0 and gold from 75 up would be good. (Actually on resists, the value is gold at 75, but if you wear max resist boosting equipment and you have more than 75, it goes blue.) After all, this is an option I am recommending, and people who don't like it would use something else.

I might have been thinking of stats that have maxstats in ItemStatCost. I wrote an algorithm in the Code Editing Forum where RicFaith asked the question. Maybe your code could use that algorithm, and assume 75 if there is no maxstat in ItemStatCost. Or the option could have two parts, with the second part being a user-selectable maxstat value, and assume 75 if not defined.

It is true, you can get exceedingly high resists as you say. We have found the code that applies difficulty penalties and trims the value to the cap when it comes time to actually apply it. I suppose you are looking at character-stored stats, so you wouldn't account for those offsets and caps, which kind of screws my idea anyway. Unless you also read the difficultylevels fields to get the penalties.
Last edited by Myhrginoc on Sun Mar 27, 2005 5:48 pm, 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
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Sun Mar 27, 2005 6:00 pm

You talk about resist or all stats ?
For resists, the main stats page have already all infos so isn't really useful.
Note, I know how get the max caps isn't a problem.
For others stats, it's more hard to manage it automatically without bug.
Adding a new columns for set the max value it's possible.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

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: PlugY : statsinterface.txt tutorial

Post by Myhrginoc » Sun Mar 27, 2005 6:17 pm

It is true, the four elemental resists are shown on the main page, in exactly that format. Magical resistance is not shown that way, however, and it gets tweaked in a lot of mods. Although the code doesn't apply difficulty penalties for magical resistance unmodded, it is an easy tweak to allow that to happen.

This is the caps thread I was thinking of before.
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
Ulmo
Forum Regular
Angel
Posts: 860
Joined: Fri Jun 04, 2004 5:04 pm

Post by Ulmo » Sun Mar 27, 2005 6:17 pm

Anim speeds are very dependant of character class and skill used, and weapon for IAS.

So IAS and fast cast seems very difficult compare with maximum.
But of course it can be a request : have a page with all values at which anim speed change, for all animations. Something like :
FC : 9/20/39/63/105/200 for common skills, correct values for lightning of course :D
IAS : xx/xx/xx/xx/..., changing with weapons/skills

Well, we are probably getting far of what Yohann thought about when he started ;)

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: PlugY : statsinterface.txt tutorial

Post by Myhrginoc » Sun Mar 27, 2005 6:22 pm

True enough, and another wrinkle is that such stats (e.g. IAS) are actually applied to diminishing returns formulas. That gets into the frames discussion I have seen at Amazon Basin, and I suppose it isn't realistic to think about tying all those loose ends into a simple stat display plugin.

Not that I object to a complicated stat display plugin! :turnevil: But I know this is all volunteer work. O:-)
Last edited by Myhrginoc on Sun Mar 27, 2005 6:27 pm, edited 2 times 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
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Sun Mar 27, 2005 6:36 pm

I have always planned to add the real speed, so the number of frame instead of percent.
But It need a lot of work to get all needed knowledge.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

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

Post by Ulmo » Sun Mar 27, 2005 6:58 pm

[quote=Yohann";p="217600"]But It need a lot of work to get all needed knowledge.[/quote]I can help you with pleasure on this subject. And in french ;)
Just in case of Myrdinn's course not being enough.

User avatar
Myrdinn
Posts: 49
Joined: Tue Dec 31, 2002 1:14 pm
Location: Limoges Fourches, FRANCE

Post by Myrdinn » Thu Apr 07, 2005 10:32 am

Hi Yohann,
D2Common.dll already computes all the information you need:) (Number of frame, animation speed ...)
You should take a look here
I made many discovery since this subject. If you need more
details, I could help you.

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 6:26 am

Hmm, one question:
In my mod I use groups of stats as it done in unmodded LOD for resistances (+X to all resistances). In my case it "Mana-Life Leeching". Though in statsinterface.txt there is two rows with statIDs 60 and 62, but in game I see one row "x% mana-life leeching". Though resistances displays differently. Why I see only one row?

Thanks in advance!

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Wed Apr 20, 2005 9:50 am

Have you add a new stat "mana-life leeching" or replace the 2 LoD stat by one ?
In the second case it sound logic you print only one line.

I think, the only case where a line isn't displayed is when the associated string are empty.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 9:59 am

[quote=Yohann";p="221239"]Have you add a new stat "mana-life leeching" or replace the 2 LoD stat by one ?
In the second case it sound logic you print only one line.[/quote]
No. I only group lifedrainmindam and manadrainmindam stats as it done in unmodded LOD for resistances.
From my itemstatcost.txt:

Code: Select all

Stat	ID	Send Other	Signed	Send Bits	Send Param Bits	UpdateAnimRate	Saved	CSvSigned	CSvBits	CSvParam	fCallback	fMin	MinAccr	Encode	Add	Multiply	Divide	ValShift	1.09-Save Bits	1.09-Save Add	Save Bits	Save Add	Save Param Bits	keepzero	op	op param	op base	op stat1	op stat2	op stat3	direct	maxstat	itemspecific	damagerelated	itemevent1	itemeventfunc1	itemevent2	itemeventfunc2	descpriority	descfunc	descval	descstrpos	descstrneg	descstr2	dgrp	dgrpfunc	dgrpval	dgrpstrpos	dgrpstrneg	dgrpstr2	stuff	*eol
lifedrainmindam	60		1	16											1044	341	1024		7	0	8	0												1					88	2	1	ModStr2z	ModStr2z		3	19	1	leeching	leeching			0
lifedrainmaxdam	61		1	16													1024																	1																		0
manadrainmindam	62		1	16											1179	341	1024		7	0	8	0												1					89	2	1	ModStr2y	ModStr2y		3	19	1	leeching	leeching			0
From statsinterface.txt:

Code: Select all

*desc	enabled	page	x	y	color	font	statID	end
lifedrainmindam	1	1	25	370		6	60	0
manadrainmindam	1	1	25	355		6	62	0
?

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Wed Apr 20, 2005 10:22 am

I think "ModStr2y" have no more entries in string tables.
Can you verify the string associated at this entry?
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 10:32 am

[quote=Yohann";p="221245"]I think "ModStr2y" have no more entries in string tables.[/quote]
Why???
ModStr2z: life stolen per hit
ModStr2y: mana stolen per hit
(in string.tbl)

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Wed Apr 20, 2005 10:36 am

in string tables you use of course.
The one where you have "life and mana stolen per hit"
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 10:50 am

Understood. No. "ModStr2y" key (as well as "ModStr2z") have only one entry in tbl files. Group modifier display via dgrpstrpos and dgrpstrneg fields: "leeching" - %d%% Mana-Life Leeching.
?

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Wed Apr 20, 2005 10:59 am

I understand now.
D2 don't display the second field if the value for both field are the same.
If the value are always equals in your mod, then remove the second line in statsinterface.txt.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 11:20 am

If the value are always equals in your mod, then remove the second line in statsinterface.txt.
No. Values not always equal. If values equals, then this group method displays "+X% Mana-Life Leeching". If values not equals, then this method displays two rows: "X mana stolen per hit" and "Y life stolen per hit". This is done as for resistances in unmodded LOD, and I see PlugY displays resistances correctly. So I don't understand why my stats group is another case. :(
Or You mean that if those values will be different, than PlugY WILL display two different rows?

EDIT:
Or You mean that if those values will be different, than PlugY WILL display two different rows?
Oh, now I see that is true. Thank You for help, Yohann!
Last edited by TrueMage on Wed Apr 20, 2005 11:24 am, edited 1 time in total.

User avatar
Yohann
Hosted Forum Moderator
Arch-Angel
Posts: 1286
Joined: Tue Sep 23, 2003 10:10 pm

Hand-picked

Post by Yohann » Wed Apr 20, 2005 11:30 am

For resistance, I have a special case to display it.
If don't do that, I have the same problem than you.
I will see if I can do a better solution to include you case.
PlugY v10.00 : Download - Forum
Fix TXT Opened Files With MS Excel : v1.11 - v1.10
DualPlayer
: v1.11 - v1.10 - v1.09

User avatar
TrueMage
Hosted Forum Moderator
Principality
Posts: 2072
Joined: Thu Jun 24, 2004 7:58 am
Location: Elemental Conflux
Russia

Re: PlugY : statsinterface.txt tutorial

Post by TrueMage » Wed Apr 20, 2005 11:45 am

Great Thanks for support, Yohann! :)

User avatar
TekRock
Forum Regular
Angel
Posts: 561
Joined: Fri Jun 02, 2006 2:06 am
Location: Oregon

Re: PlugY : statsinterface.txt tutorial

Post by TekRock » Fri Jun 23, 2006 9:21 am

where can i find simpler instructions for instalation? i tried to install to my KoT game. but it didnt work i guess...

User avatar
DemonicAngel
Forum Legend
Principality
Posts: 2425
Joined: Mon Nov 27, 2006 2:06 am

Re: PlugY : statsinterface.txt tutorial

Post by DemonicAngel » Tue Jan 09, 2007 12:09 am

[quote=Yohann";p="217482"]In PlugY 5,[/quote]


does this plugin only work in PlugY 5 or does it work in plugY v7.01b as well?
Last edited by DemonicAngel on Tue Jan 09, 2007 12:10 am, edited 1 time in total.

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: PlugY : statsinterface.txt tutorial

Post by Myhrginoc » Tue Jan 09, 2007 2:38 am

You did ask substantially the same question in another thread, please don't do that.
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

Return to “PlugY|NefEx|D2Mod”