Page 1 of 1

[stat rating]Bug

Posted: Tue Dec 17, 2013 6:33 pm
by hangman04
i have a fan made SR addon that should have support for ch 5 and the 2 new classes: HARPSYN (warlock) and PSYRON (Champion). For some reason, for the new classes the add on doesn't add the modifiers from raw stats like str/int into composed ones like def / phys att etc. Basically if an item has 100 str and 1000 phys attack the stats table will only show 100 str and 1000 phys instead of 100 str and 1200 phys.

From what i saw the author modified statsDB with this :

Code: Select all

 
elseif (firstClass == C_HARPSYN) then
    db[SR.constants.DEX_TO_DPS.effect]    = 0;
    db[SR.constants.DEX_TO_PHYDEF.effect] = 0;
    db[SR.constants.DEX_TO_PHYATT.effect] = 0;
    db[SR.constants.DEX_TO_PHYACC.effect] = 0.15;
    db[SR.constants.DEX_TO_PHYDOD.effect] = 0.13;
    
    db[SR.constants.INT_TO_MAGATT.effect] = 2;
    db[SR.constants.INT_TO_MP.effect]     = 1;
    db[SR.constants.INT_TO_PHYATT.effect] = 0.5;
    
    db[SR.constants.PHYDEF_TO_MAGDEF.effect] = 0;
    
    db[SR.constants.STA_TO_HP5.effect]    = 0.05;
    db[SR.constants.STA_TO_LIFE.effect]   = 5.0;
    db[SR.constants.STA_TO_PHYDEF.effect] = 1.5;
    
    db[SR.constants.STR_TO_DPS.effect]    = 0;
    db[SR.constants.STR_TO_HP.effect]     = 0.2;
    db[SR.constants.STR_TO_PHYATT.effect] = 0.8;
    
    db[SR.constants.WIS_TO_MP.effect]     = 5;
    db[SR.constants.WIS_TO_MP5.effect]    = 0.1;
    db[SR.constants.WIS_TO_MAGDEF.effect] = 3;
    db[SR.constants.WIS_TO_PHYDEF.effect] = 0;
	
  elseif (firstClass == C_PSYRON) then
    db[SR.constants.DEX_TO_DPS.effect]    = 0;
    db[SR.constants.DEX_TO_PHYDEF.effect] = 0;
    db[SR.constants.DEX_TO_PHYATT.effect] = 0;
    db[SR.constants.DEX_TO_PHYACC.effect] = 0.15;
    db[SR.constants.DEX_TO_PHYDOD.effect] = 0.13;
    
    db[SR.constants.INT_TO_MAGATT.effect] = 2;
    db[SR.constants.INT_TO_MP.effect]     = 1; 
    db[SR.constants.INT_TO_PHYATT.effect] = 0;
    
    db[SR.constants.PHYDEF_TO_MAGDEF.effect] = 1;
    
    db[SR.constants.STA_TO_HP5.effect]    = 0.05;
    db[SR.constants.STA_TO_LIFE.effect]   = 5;
    db[SR.constants.STA_TO_PHYDEF.effect] = 2.3;
    
    db[SR.constants.STR_TO_DPS.effect]    = 0; 
    db[SR.constants.STR_TO_HP.effect]     = 0.5;
    db[SR.constants.STR_TO_PHYATT.effect] = 2;
    
    db[SR.constants.WIS_TO_MP.effect]     = 5;
    db[SR.constants.WIS_TO_MP5.effect]    = 0.1;
    db[SR.constants.WIS_TO_MAGDEF.effect] = 2.2;
    db[SR.constants.WIS_TO_PHYDEF.effect] = 0;


Any thoughts on this ? :/

Re: [stat rating]Bug

Posted: Tue Dec 17, 2013 7:19 pm
by lisa
If you do this in game

Code: Select all

/script SendSystemChat(C_MAGE)
it will print Mage
If you do this in game

Code: Select all

/script SendSystemChat(C_PSYRON)
it won't print anything, so the additional code won't work as intended.

For yourself just change the

Code: Select all

 elseif (firstClass == C_HARPSYN) then
to

Code: Select all

 elseif (firstClass == "Warlock") then
Assuming you use english client.

The C_ is a global in the game to get the local language for classes, which is why C_MAGE will work. Although they did add the new classes as PSYRON and HARPSYN in the globals they don't seem to actually work, just another failure of the developers of the game.

If you don't use english client log onto your warlock and champion and do.

Code: Select all

/script SendSystemChat(UnitClass("player"))
What ever it prints on screen is what you will need to use.

Re: [stat rating]Bug

Posted: Wed Dec 18, 2013 3:59 pm
by hangman04
Thank you Lisa, made the changes and seems to work properly. this is how i changed the code:

Code: Select all

  elseif (firstClass == C_HARPSYN)  or (firstClass == "Warlock") then
    db[SR.constants.DEX_TO_DPS.effect]    = 0;
    db[SR.constants.DEX_TO_PHYDEF.effect] = 0;
    db[SR.constants.DEX_TO_PHYATT.effect] = 0;
	  db[SR.constants.DEX_TO_PHYACC.effect] = 0.15;
	  db[SR.constants.DEX_TO_PHYDOD.effect] = 0.13;
    
    db[SR.constants.INT_TO_MAGATT.effect] = 2;
    db[SR.constants.INT_TO_MP.effect]     = 1;
    db[SR.constants.INT_TO_PHYATT.effect] = 0.5;
    
    db[SR.constants.PHYDEF_TO_MAGDEF.effect] = 0;
    
    db[SR.constants.STA_TO_HP5.effect]    = 0.05;
    db[SR.constants.STA_TO_LIFE.effect]   = 5.0;
    db[SR.constants.STA_TO_PHYDEF.effect] = 1.5;
    
    db[SR.constants.STR_TO_DPS.effect]    = 0;
    db[SR.constants.STR_TO_HP.effect]     = 0.2;
    db[SR.constants.STR_TO_PHYATT.effect] = 3/4;-- or 0.8 ?
    
    db[SR.constants.WIS_TO_MP.effect]     = 5;
    db[SR.constants.WIS_TO_MP5.effect]    = 0.1;
    db[SR.constants.WIS_TO_MAGDEF.effect] = 3;
    db[SR.constants.WIS_TO_PHYDEF.effect] = 0;
	
  elseif (firstClass == C_PSYRON) or (firstClass == "Champion") then
    db[SR.constants.DEX_TO_DPS.effect]    = 0;
    db[SR.constants.DEX_TO_PHYDEF.effect] = 0;
    db[SR.constants.DEX_TO_PHYATT.effect] = 0;
    db[SR.constants.DEX_TO_PHYACC.effect] = 0.15;
    db[SR.constants.DEX_TO_PHYDOD.effect] = 0.13;
    
    db[SR.constants.INT_TO_MAGATT.effect] = 2;
    db[SR.constants.INT_TO_MP.effect]     = 1; 
    db[SR.constants.INT_TO_PHYATT.effect] = 0;
    
    db[SR.constants.PHYDEF_TO_MAGDEF.effect] = 1;
    
    db[SR.constants.STA_TO_HP5.effect]    = 0.05;
    db[SR.constants.STA_TO_LIFE.effect]   = 5;
    db[SR.constants.STA_TO_PHYDEF.effect] = 2.3;
    
    db[SR.constants.STR_TO_DPS.effect]    = 0; 
    db[SR.constants.STR_TO_HP.effect]     = 0.5;
    db[SR.constants.STR_TO_PHYATT.effect] = 2;
    
    db[SR.constants.WIS_TO_MP.effect]     = 5;
    db[SR.constants.WIS_TO_MP5.effect]    = 0.1;
    db[SR.constants.WIS_TO_MAGDEF.effect] = 2.2;
    db[SR.constants.WIS_TO_PHYDEF.effect] = 0;

Re: [stat rating]Bug

Posted: Wed Dec 18, 2013 10:44 pm
by rock5
How about using

Code: Select all

TEXT("SYS_CLASSNAME_HARPSYN")
and

Code: Select all

TEXT("SYS_CLASSNAME_PSYRON")

Re: [stat rating]Bug

Posted: Wed Dec 18, 2013 11:48 pm
by lisa
rock5 wrote:How about using

Code: Select all

TEXT("SYS_CLASSNAME_HARPSYN")
and

Code: Select all

TEXT("SYS_CLASSNAME_PSYRON")
Tested and both should work for any language, the addon developer should probably look at using that code instead of the current code for warlock and champion, the other classes should work fine as is.

Re: [stat rating]Bug

Posted: Thu Dec 19, 2013 2:20 am
by hangman04
Yes, Noguai also proposed the same thing on the forum. I'll make that change also and ty for the tip. I'm not a developer and my understanding of LUA coding language is very limited to none. I just wanted to make it work with my class. The add on has other problems and probably it may need a lot of clean up to be fully functional.
From what i see it has problems hooking up items and sometimes after i scroll after some items it enters in a loop going through different equip items and splashing tooltip windows, till i hover on a skill or smth else.