User:Illviljan

From Path of Exile Wiki
Revision as of 01:05, 19 November 2015 by >Illviljan
Jump to navigation Jump to search
Collapsible Template

Text here


Matlab scripts

Copy scripts from the Edit/Source 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');

Plot Energy shield recharge

%% Plot Energy shield recharge close all, clear all, home

% Sources: % http://pathofexile.gamepedia.com/Energy_shield

%% Inputs r = 0:300; BaseStart = 2;

%% Calculations ESStartTime = BaseStart * 100./(100 + r);

%% Plot figure plot(r, ESStartTime) title('Start of Energy Shield Recharge') xlabel('#% faster start of Energy Shield Recharge') ylabel('Start time of Energy Shield Recharge [s]') grid on