User:Illviljan: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>Illviljan
No edit summary
>Illviljan
No edit summary
Line 1: Line 1:
<onlyinclude>{{#invoke:item|item
{| class="wikitable mw-collapsible mw-collapsed"
| Name                = Iron Ring test
! Matlab scripts
| PageName            = Iron Ring
|-
| Image                = Iron Ring.png
|  
| Size                = 1x1
Copy scripts from the Edit page.
| Rarity              = Rare
| Type                = Accessory
| Subtype              = Ring
| ImplicitMods        = Adds 1&ndash;4 Physical Damage to Attacks
| RandomMods          = {{c|mod|+25 to maximum Life}}<br> {{c|mod|...}}<br>{{c|mod|...}}<br> {{c|mod|+46% to Fire Resistance}}<br> {{c|mod|+48% to Cold Resistance}}<br> {{c|mod|+34% to Chaos Resistance}}<br>
}}</onlyinclude>
<br>


{{il|Iron Ring}}
{| class="wikitable mw-collapsible mw-collapsed"
! Experience Penalty
|-
|


{{itembox
%% Experience Penalty
|frame=magic
% The player also suffers a penalty to XP if the player is too far above
|name=Conjuror's Copper Kris
% or below the monster's level.
|stats=
home, clear all, close all
*
%% Input
** Dagger
PlayerLevel    = 1:100;
** Quality: {{c|mod|+7%}}
MonsterLevel    = 1:85;
** Physical Damage: {{c|mod|10-39}}
 
** Critical Strike Chance: {{c|value|7.1%}}
%% Calculations
** Attacks per Second: {{c|value|1.20}}
% Create a repeated matrix:
*
mPlayerLevel = repmat(PlayerLevel, length(MonsterLevel), 1);
** Requires Level {{c|value|24}}, {{c|value|28}} Dex, {{c|value|60}} Int
mMonsterLevel = repmat(MonsterLevel, length(PlayerLevel), 1)';
*
 
** {{c|mod|80% increased Global Critical Strike Chance}}
% Minimum amount of experience penalty:
*
minEXPMulti = 0.01;
** {{c|mod|12% increased Spell Damage}}
 
*
% There's a safe zone between player level and monster level where no
** {{c|mod|+12 to Maximum Mana}}
% experience penalty is applied:
}}
SafeZone = floor(3 + mPlayerLevel/16);
 
% Any additional level difference in excess of this safe range is the
% effective level difference:
EffectiveDifference = max(abs(mPlayerLevel - mMonsterLevel) - SafeZone, 0);
% If the effective difference is negative that implies the player is inside
% the safe zone. Therefore only values =>0 are relevant.
 
% If the player level is outside the safe zone a multiplier on monsters
% experience takes effect, reducing the amount by:  
XPMultiplier = max(((mPlayerLevel + 5) ./ ...
    (mPlayerLevel + 5 + EffectiveDifference.^2.5)).^1.5, minEXPMulti);
 
%% Contour plot
figure
[C,h] = contourf(mPlayerLevel,mMonsterLevel,XPMultiplier);
ticks = 5;
set(gca,'XTick',0:ticks:PlayerLevel(end));
set(gca,'YTick',0:ticks:MonsterLevel(end));
h = colorbar;
h.Limits = [0.01 1];
grid minor
shading interp
title('Experience Penalty')
xlabel('Player Level')
ylabel('Monster Level')
% zlabel('Experience efficiency')
ylabel(h,'Experience Efficiency');
%% Party play
% Parties with different character levels will gain different amount of
% experience according to:
PercentualShare = (PlayerLevel + 10).^2.71 ./ sum((PlayerLevel + 10).^2.71,2);
 
|}
 
{| class="wikitable mw-collapsible mw-collapsed"
! Chance to hit and avoid attacks
|-
|  
 
 
%% Chance to hit and avoid attacks.
close all, clear all, home
set(0,'DefaultFigureWindowStyle', 'docked');
 
% Sources:
% http://pathofexile.gamepedia.com/Evasion
% http://pathofexile.gamepedia.com/Accuracy
 
%% Input
step = 100;
evasionRating = linspace(0, 50000, step);
attackerAccuracy = linspace(0, 4000, step);
chanceToDodge = 0;
 
%% Calculations
% Create a Mesh grid to be able to do contour plots:
[evasionRatingMesh, attackerAccuracyMesh] = meshgrid(evasionRating, attackerAccuracy);
 
% Chance to hit is a function if accuracy and evasion rating:
chanceToHit = min(max( attackerAccuracyMesh ./ (attackerAccuracyMesh + (evasionRatingMesh/4).^0.8), 0.05) , 0.95);
 
% Chance to avoid hits
chanceToAvoidHit = 1 - chanceToHit*(1-chanceToDodge);
%% Contour plot
 
% Chance to avoid hit contour plot
figure
[C,h] = contourf(evasionRatingMesh,attackerAccuracyMesh,chanceToAvoidHit*100);
clabel(C,h,'labelspacing',200)
% clabel(C,h,'manual')
colormap(cool)
h = colorbar;
h.Limits = [5 95];
grid minor
shading interp
title('Chance to avoid enemy attacks')
xlabel('Defender''s Evasion Rating')
ylabel('Attacker''s Accuracy Rating')
ylabel(h,'Chance to avoid hit [%]');
 
% Chance to hit contour plot
figure
[C,h] = contourf(attackerAccuracyMesh,evasionRatingMesh, chanceToHit*100);
clabel(C,h,'labelspacing',700)
colormap(cool)
h = colorbar;
h.Limits = [5 95];
grid minor
shading interp
title('Chance to hit enemy')
xlabel('Attacker''s Accuracy Rating')
ylabel('Defender''s Evasion Rating')
% zlabel('Experience efficiency')
ylabel(h,'Chance to hit [%]');
 
 
|}
 
{| class="wikitable mw-collapsible mw-collapsed"
! Armour Reduction
|-
|  
 
 
%% Armour Reduction
close all, clear all, home
 
% Sources:
% http://pathofexile.gamepedia.com/Armour
%% Input
step = 100;
Armour = linspace(0, 50000, step);
Damage = linspace(0, 10000, step);
%% Calculations
% Create a Mesh grid to be able to do contour plots:
[ArmourMesh, DamageMesh] = meshgrid(Armour, Damage);
 
Damage_Reduction_FactorMesh = ArmourMesh ./ (ArmourMesh + 10 * DamageMesh);
%% Contour plot
figure
[C,h] = contour(ArmourMesh,Damage_Reduction_FactorMesh*100,DamageMesh, ...
    [100:200:600, 1000:500:2000, 3000:1000:6000, 8000:2000:10000]);
clabel(C,h, 'labelspacing',700);
clabel(C,h,'manual')
colormap(copper)
h = colorbar;
% h.Limits = [0.01 1];
grid minor
shading interp
ylim([0 90])
title('Damage Reduction')
xlabel('Armour Rating')
ylabel('Damage Reduction Factor [%]')
ylabel(h,'Raw Damage');
 
 
|}
 
|}

Revision as of 18:23, 17 November 2015

Matlab scripts

Copy scripts from the Edit page.

Experience Penalty

%% Experience Penalty % The player also suffers a penalty to XP if the player is too far above % or below the monster's level. home, clear all, close all %% Input PlayerLevel = 1:100; MonsterLevel = 1:85;

%% Calculations % Create a repeated matrix: mPlayerLevel = repmat(PlayerLevel, length(MonsterLevel), 1); mMonsterLevel = repmat(MonsterLevel, length(PlayerLevel), 1)';

% Minimum amount of experience penalty: minEXPMulti = 0.01;

% There's a safe zone between player level and monster level where no % experience penalty is applied: SafeZone = floor(3 + mPlayerLevel/16);

% Any additional level difference in excess of this safe range is the % effective level difference: EffectiveDifference = max(abs(mPlayerLevel - mMonsterLevel) - SafeZone, 0); % If the effective difference is negative that implies the player is inside % the safe zone. Therefore only values =>0 are relevant.

% If the player level is outside the safe zone a multiplier on monsters % experience takes effect, reducing the amount by: XPMultiplier = max(((mPlayerLevel + 5) ./ ...

   (mPlayerLevel + 5 + EffectiveDifference.^2.5)).^1.5, minEXPMulti);

%% Contour plot figure [C,h] = contourf(mPlayerLevel,mMonsterLevel,XPMultiplier); ticks = 5; set(gca,'XTick',0:ticks:PlayerLevel(end)); set(gca,'YTick',0:ticks:MonsterLevel(end)); h = colorbar; h.Limits = [0.01 1]; grid minor shading interp title('Experience Penalty') xlabel('Player Level') ylabel('Monster Level') % zlabel('Experience efficiency') ylabel(h,'Experience Efficiency'); %% Party play % Parties with different character levels will gain different amount of % experience according to: PercentualShare = (PlayerLevel + 10).^2.71 ./ sum((PlayerLevel + 10).^2.71,2);

Chance to hit and avoid attacks


%% Chance to hit and avoid attacks. close all, clear all, home set(0,'DefaultFigureWindowStyle', 'docked');

% Sources: % http://pathofexile.gamepedia.com/Evasion % http://pathofexile.gamepedia.com/Accuracy

%% Input step = 100; evasionRating = linspace(0, 50000, step); attackerAccuracy = linspace(0, 4000, step); chanceToDodge = 0;

%% Calculations % Create a Mesh grid to be able to do contour plots: [evasionRatingMesh, attackerAccuracyMesh] = meshgrid(evasionRating, attackerAccuracy);

% Chance to hit is a function if accuracy and evasion rating: chanceToHit = min(max( attackerAccuracyMesh ./ (attackerAccuracyMesh + (evasionRatingMesh/4).^0.8), 0.05) , 0.95);

% Chance to avoid hits chanceToAvoidHit = 1 - chanceToHit*(1-chanceToDodge); %% Contour plot

% Chance to avoid hit contour plot figure [C,h] = contourf(evasionRatingMesh,attackerAccuracyMesh,chanceToAvoidHit*100); clabel(C,h,'labelspacing',200) % clabel(C,h,'manual') colormap(cool) h = colorbar; h.Limits = [5 95]; grid minor shading interp title('Chance to avoid enemy attacks') xlabel('Defenders Evasion Rating') ylabel('Attackers Accuracy Rating') ylabel(h,'Chance to avoid hit [%]');

% Chance to hit contour plot figure [C,h] = contourf(attackerAccuracyMesh,evasionRatingMesh, chanceToHit*100); clabel(C,h,'labelspacing',700) colormap(cool) h = colorbar; h.Limits = [5 95]; grid minor shading interp title('Chance to hit enemy') xlabel('Attackers Accuracy Rating') ylabel('Defenders Evasion Rating') % zlabel('Experience efficiency') ylabel(h,'Chance to hit [%]');


Armour Reduction


%% Armour Reduction close all, clear all, home

% Sources: % http://pathofexile.gamepedia.com/Armour %% Input step = 100; Armour = linspace(0, 50000, step); Damage = linspace(0, 10000, step); %% Calculations % Create a Mesh grid to be able to do contour plots: [ArmourMesh, DamageMesh] = meshgrid(Armour, Damage);

Damage_Reduction_FactorMesh = ArmourMesh ./ (ArmourMesh + 10 * DamageMesh); %% Contour plot figure [C,h] = contour(ArmourMesh,Damage_Reduction_FactorMesh*100,DamageMesh, ...

   [100:200:600, 1000:500:2000, 3000:1000:6000, 8000:2000:10000]);

clabel(C,h, 'labelspacing',700); clabel(C,h,'manual') colormap(copper) h = colorbar; % h.Limits = [0.01 1]; grid minor shading interp ylim([0 90]) title('Damage Reduction') xlabel('Armour Rating') ylabel('Damage Reduction Factor [%]') ylabel(h,'Raw Damage');