What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

attributes (excluding from gear)?

Nepthys

Community Developer
Joined
Oct 13, 2014
Messages
89
Reaction score
1
heyas :)

looking to change the GemLeveller plugin, to only level a gem if my attributes are high enough from base & passives, without including bonus attributes from equip gear
Intention is so it doesn't level up gems based on my gear, meaning I can't change the gear without other +attributes, or being unable to use the gem

can't find any way to access the attributes from passives though, just the total amount (character base + passives + items)

is there an easy way? or as an example, will I have to
1. get the total strength of my character
2. check all equip items for +strength affiixes, total them up
3. minus the item strength from my total strength
4. compare this new value against the next level strength requirements for the gem


thanks!
 
I've added in processing passive skills to the API.

Here's code you'll be able to run in the next Beta version, which shows an example of processing passive skills to get stats using the new API.
Code:
var totalStr = 0;
foreach(var passive in LokiPoe.Me.Passives)
{
	var sb = new StringBuilder();
	sb.AppendFormat("{0} [", passive.Name);
	foreach(var kvp in passive.Stats)
	{
		sb.AppendFormat("{0}: {1} |",kvp.Key.Id, kvp.Value);
		var st = (StatTypeGGG)Enum.Parse(typeof(StatTypeGGG), kvp.Key.ApiId);
		if(st == StatTypeGGG.BaseStrength)
			totalStr += kvp.Value;
	}
	sb.AppendFormat("]");
	Log.InfoFormat("{0}", sb.ToString());
}
Log.InfoFormat("totalStr: {0}", totalStr);
An example output would be:
Code:
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Mortal Conviction [mortal_conviction_mana_reservation_+%_final: -60 |]
Life [maximum_life_+%: 6 |]
Strength [base_strength: 10 |]
Life Regeneration [life_regeneration_rate_per_minute_%: 36 |]
Berserking [attack_speed_+%: 12 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Lightning Resistance [base_lightning_damage_resistance_%: 12 |]
Hard Knocks [base_intelligence: 30 |]
Sentinel [evasion_and_physical_damage_reduction_rating_+%: 24 |base_resist_all_elements_%: 10 |]
Life Regeneration [life_regeneration_rate_per_minute_%: 36 |]
Strength [base_strength: 10 |]
Life and Armour [maximum_life_+%: 5 |physical_damage_reduction_rating_+%: 6 |]
Strength [base_strength: 10 |]
Warrior's Blood [life_regeneration_rate_per_minute_%: 90 |base_strength: 20 |]
Fire Resistance [base_fire_damage_resistance_%: 12 |]
Cold Resistance [base_cold_damage_resistance_%: 12 |]
Attack Speed [attack_speed_+%: 3 |]
Strength [base_strength: 10 |]
Attack Speed [attack_speed_+%: 3 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Resolute Technique [global_always_hit: 1 |global_cannot_crit: 1 |]
Expertise [base_dexterity: 30 |]
Fire Resistance [base_fire_damage_resistance_%: 18 |]
Quickness [base_dexterity: 30 |]
Lightning Resistance [base_lightning_damage_resistance_%: 18 |]
Cold Resistance [base_cold_damage_resistance_%: 18 |]
Strength [base_strength: 10 |]
Unwavering Stance [keystone_unwavering_stance: 1 |]
Life Regeneration [life_regeneration_rate_per_minute_%: 36 |]
Flask Life [flask_life_to_recover_+%: 15 |]
Strength [base_strength: 10 |]
Fire Resistance [base_fire_damage_resistance_%: 12 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Life [maximum_life_+%: 6 |]
Ancestral Knowledge [base_intelligence: 30 |]
Strength [base_strength: 10 |]
Life and Armour [base_maximum_life: 16 |physical_damage_reduction_rating_+%: 16 |]
Strength [base_strength: 10 |]
Strength [base_strength: 10 |]
Blood Magic [keystone_blood_magic: 1 |]
Life [maximum_life_+%: 6 |]
Heart of the Warrior [base_strength: 10 |base_maximum_life: 30 |]
Diamond Skin [base_resist_all_elements_%: 15 |]
totalStr: 230
Base attributes are not accessible, but you can easily code that into your plugin by referring to Character_Classes to get the starting values, and just check your class type (LokiPoe.Me.Class).

Passive information is only loaded by the client once you are in game, so as long as you're using the passive information of the current character, you'll be fine. If you wanted to just dump all passives though, you'd have to had logged in with a character first. This applies to the new Scripts\DumpPassive.cs included as well.
 
Back
Top