Results -9 to 0 of 60

Threaded View

  1. #9
    Player
    lyndwyrm's Avatar
    Join Date
    Aug 2013
    Location
    Gridania
    Posts
    165
    Character
    Poponemu Totonemu
    World
    Malboro
    Main Class
    Conjurer Lv 70
    Quote Originally Posted by synesthetic View Post
    ... if the devs really don't have their own means to determine the stats' relative weights.
    I'm sure they could, I mean look:
    Code:
    public int getPlayerItemLevel(Player player)
    {
    	float AIL = 0;
    	String MainStat;
    	if(player.class == Class.healer())
    	{
    		MainStat = "Mind";
    		AIL = calculateItemLevel(player, MainStat);
    		AIL *= SomeNormalizationConstant;
    		/*The normalization constant would probably be picked such that the current numbers
     		 *wouldn't change much around some number*/
    	}
    	else if(player.class == Class.DPS())
    	{
    		if(player.class.job == Class.Job.MNK() || player.class.job == Class.Job.DRG())
    		{
    			MainStat = "Strength";  // more realistically this would just be an integer.
    			AIL = calculateItemLevel(player, MainStat);
    			AIL *= SomeNormalizationConstant;
    		}
    		else if (player.class.job == Class.Job.BRD() || player.class.job == Class.Job.NIN())
    		{
    			MainStat = "Dexterity";
    			AIL = calculateItemLevel(player, MainStat);
    			AIL *= SomeNormalizationConstant;
    		}
    		else if (player.class.job == Class.Job.BLM() || player.class.job == Class.Job.SMN())
    		{
    			MainStat = "Dexterity";
    			AIL = calculateItemLevel(player, MainStat);
    			AIL *= SomeNormalizationConstant;
    		}
    	}	
    	else if(player.class == Class.tank())
    	{
    		MainStat = "Vitality";
    		AIL = calculateItemLevel(player, MainStat);
    		AIL *= SomeOtherNormalizationConstant;
    		/*The normalization constant would probably be picked such that the current numbers 
    		 *wouldn't change much around some number, which would differ for tanks
    		 *since VIT numbers are a bit higher*/
    	}
    	
    	return AIL;
    }
    
    public int calculateItemLevel(Player player, String mainStat)
    {
    	int AIL = 0;
    	//Where player.gear[i] from 0 to 10 represents the 11 gear slots
    	for(int i = 0; i<11; i++)
    		AIL += player.gear[i].getAttribute(Mainstat);
    	AIL += player.weapon.getAttribute(Mainstat);
    	AIL *= (0.1 + player.weapon.WD()*.0032);
    	AIL += player.weapon.WD()*.4162;
    	return AIL;
    }


    And that took maybe half an hour(and I don't even code much), though I wouldn't joke that I know how their code is structured. This is roughly based on the damage formula from Valk, though I'm sure they have exact numbers they know.
    (0)
    Last edited by lyndwyrm; 05-01-2015 at 02:40 AM. Reason: added more