-
Active Member
-
Post Thanks / Like - 3 Thanks
CrEEzz,
Ket,
HI5 (3 members gave Thanks to bastiflew for this useful post)
-
Member
I am having a bit of trouble getting to understand your framework completely.
Starting from your MapHack example code, I have created my own project. I noticed you:
- Iterate over every item in dump
- First find out what the local player is
- Iterate over all other items where actor ID != -1
- Add these to the minimap
So, is everything in the game considered an Actor? I noticed there is also an actor specifically for Gold. What's the difference between an Actor and a 'SNO' in your framework?
How does it work with buffs, or powers? Could you give me a short code example on where to get or how to iterate over the active powers a (local) player has with their (remaining) time?
-
Legendary
Originally Posted by
chillzilla
I am having a bit of trouble getting to understand your framework completely.
Starting from your MapHack example code, I have created my own project. I noticed you:
- Iterate over every item in dump
- First find out what the local player is
- Iterate over all other items where actor ID != -1
- Add these to the minimap
So, is everything in the game considered an Actor? I noticed there is also an actor specifically for Gold. What's the difference between an Actor and a 'SNO' in your framework?
How does it work with buffs, or powers? Could you give me a short code example on where to get or how to iterate over the active powers a (local) player has with their (remaining) time?
Stuff moving around on screen are Actors and they are all backed by ACDs (ActorCommonData). An ACD does not always have an Actor, f.e. inventory items. ActorSNO is the asset data describing how to render the Actor. SNOs are stored in the game files and loaded into memory as needed.
I hope someone else will post example of working with buffs. I do believe the subject has been touched already a few times, so search the thread.
-
Contributor
This should get you started
// Untested, might misspelled a method / variable
Code:
ActorCommonData Player = ActorCommonData.Local;
foreach (Buff Buff in Engine.Current.BuffManager.x1C_Buffs)
{
double EndTick = Player.TryGetAttribute(((AttributeId)((int)Enigma.D3.Enums.AttributeId.BuffIconEndTick0) + Buff.x004_Neg1),
Buff.x000_PowerSnoId);
// Buff.x004_Neg1 = Position in BuffIcon where the Power is stored, please note that it can change. E.g Convention of Elements
rotate and changes the position (2,4,6,8 etc)
double Cooldown = (EndTick - Engine.Current.ObjectManager.Storage.x118) / 60d;
}
Last edited by Dolphe; 10-09-2015 at 04:21 PM.
-
Post Thanks / Like - 2 Thanks
Ket,
HI5 (2 members gave Thanks to Dolphe for this useful post)
-
Member
Is there any way to get information about the menu buttons?
I am trying to figure out how to best handle logging out, and i can't use constant position since i kinda want my project to work with any screen resolution.
I was also looking for a way to list all characters on an account, kinda like THUD (but no display involved, only getting a list or something like that)
I don't expect solutions, but hints are appreciated
Last edited by Tannex; 10-14-2015 at 02:13 PM.
-
Member
Hi, anyone know how to get the damage numbers (those pop up on top of the monsters)?
-
Contributor
Originally Posted by
betenner
Hi, anyone know how to get the damage numbers (those pop up on top of the monsters)?
Check Player.FloatingNumbers
-
Post Thanks / Like - 2 Thanks
HI5,
betenner (2 members gave Thanks to Dolphe for this useful post)
-
Member
Originally Posted by
Dolphe
Check Player.FloatingNumbers
Thanks! Got it.
-
Member
Originally Posted by
Dolphe
Check Player.FloatingNumbers
And how can I get some effects (most of them are set effects or triggered passive effects which are not displayed in the buff slot), I can't get them from buffs.
i.e.
I want to know whether the 4-Item effect from Monkey King's Garb is active.
or
Whether the Flying Dragon's special effect (doubling attack speed effect) is active.
How should I do?
Last edited by betenner; 10-18-2015 at 02:03 AM.
-
Active Member
Try dumping all player attributes when effect You are interested in is active. It will probably be listed as BuffIconCountX with modifier being effect's SNOPower.
-
Post Thanks / Like - 1 Thanks
HI5 (1 members gave Thanks to CrEEzz for this useful post)
-
Member
Then how to dump all attributes?
-
Member
I tried to dump all attributes using playerAcd.EnumerateAttributes, then I got a lot of values, each of them contains an int key, an int value and a single value. What does the key and the values mean? How should I determine what they are stand for?
-
Active Member
Dump using this code:
Code:
var attribDescriptors = Engine.Current.AttributeDescriptors;
var q = acd.EnumerateAttributes().Select(a => new { Id = a.x04_Key & 0xFFF, Key = a.x04_Key, Mod = (a.x04_Key >> 12), Value = a.x08_Value, Descriptor = attribDescriptors.Single(d => d.x00_Id == (a.x04_Key & 0xFFF)) });
return string.Join(Environment.NewLine, q.Select(a => string.Join("\t",
a.Id.ToString().PadRight(5),
"0x" + a.Key.ToString("X8"),
(a.Mod == 0xFFFFF ? "-1" : a.Mod.ToString()).PadRight(5),
"0x" + a.Mod.ToString("X8").Substring(3),
a.Descriptor.x1C_Name,
a.Descriptor.x10_DataType == 1 ? a.Value.Int32 : a.Value.Single)));
Example result line:
1174 18 0x00012 Power_Damage_Percent_Bonus 0,13
in order You get:
attribute_id -> modifier -> modifier (hex) -> attribute -> value
Last edited by CrEEzz; 10-21-2015 at 01:52 AM.
-
Post Thanks / Like - 3 Thanks
HI5,
Ket,
betenner (3 members gave Thanks to CrEEzz for this useful post)
-
Member
Originally Posted by
CrEEzz
Dump using this code:
Code:
var attribDescriptors = Engine.Current.AttributeDescriptors;
var q = acd.EnumerateAttributes().Select(a => new { Id = a.x04_Key & 0xFFF, Mod = a.x04_Key >> 12, Value = a.x08_Value, Descriptor = attribDescriptors.Single(d => d.x00_Id == (a.x04_Key & 0xFFF)) }).Where(a => a.Descriptor.x10_DataType == 1 ? (a.Value.Int32 == filter_value_int) : (Math.Abs(a.Value.Single - filter_value_float) < float_tolerance));
string str = string.Join(Environment.NewLine, q.Select(a => string.Join("\t",
a.Id,
a.Mod == 0xFFFFF ? "-1" : a.Mod.ToString(),
"0x" + a.Mod.ToString("X8").Substring(3),
a.Descriptor.x1C_Name,
a.Descriptor.x10_DataType == 1 ? a.Value.Int32 : a.Value.Single)));
Example result line:
1174 18 0x00012 Power_Damage_Percent_Bonus 0,13
in order You get:
attribute_id -> modifier -> modifier (hex) -> attribute -> value
Thanks! I'll try that!
-
Member
Originally Posted by
CrEEzz
Dump using this code:
Code:
var attribDescriptors = Engine.Current.AttributeDescriptors;
var q = acd.EnumerateAttributes().Select(a => new { Id = a.x04_Key & 0xFFF, Mod = a.x04_Key >> 12, Value = a.x08_Value, Descriptor = attribDescriptors.Single(d => d.x00_Id == (a.x04_Key & 0xFFF)) }).Where(a => a.Descriptor.x10_DataType == 1 ? (a.Value.Int32 == filter_value_int) : (Math.Abs(a.Value.Single - filter_value_float) < float_tolerance));
string str = string.Join(Environment.NewLine, q.Select(a => string.Join("\t",
a.Id,
a.Mod == 0xFFFFF ? "-1" : a.Mod.ToString(),
"0x" + a.Mod.ToString("X8").Substring(3),
a.Descriptor.x1C_Name,
a.Descriptor.x10_DataType == 1 ? a.Value.Int32 : a.Value.Single)));
Example result line:
1174 18 0x00012 Power_Damage_Percent_Bonus 0,13
in order You get:
attribute_id -> modifier -> modifier (hex) -> attribute -> value
What's
filter_value_int
filter_value_float
float_tolerance
these?