-
Active Member
Originally Posted by
enigma32
I'm confused. You're talking about a class from
Memory project.
You've been converting to
MemoryModel project.
You paste (pseudo?) code with namespace
ApplicationModel.
If there is a problem in
Memory project I need more details. It should still work as before.
I will move AttributeReader to
MemoryModel so that you can do something like this (with modifications)
Code:
var descriptor = ctx.DataSegment.AttributeDescriptors[(int)AttributeId.Strength]; // info on data type, default value
AttributeValue value;
AttributeReader.Instance.TryGetAttributeValue(acd.FastAttribGroupID, AttributeId.Strength, -1, out value); // use default value if return = false
In
ApplicationModel you can do
Code:
var snapshot = new ApplicationSnapshot(ctx);
snapshot.Update();
var str = (double)snapshot.Game.Player.Read(Attributes.Strength); // cast to double since you wanted that
I'll add one that returns all, and I'll add a "universal" one that returns double and takes Id+Modifier as arguments.
I'm going to need a better name for the method.. ReadAttribute, GetAttribute, GetAttributeValue, GetValue? Any winner?
Thank you for your fast answears and solutions.
"Enigma.D3.ApplicationModel.AttributeHelper.GetAttributeValue" has been removed in one of the latest commits. It was not in Memory Project.
see commit: Refactor attribute system * Enigma32/Enigma.D3@bbbcb9f * GitHub
Aswell Enumrate Function was removed. it was also in the file "Attributes.cs" which has been deleted.
Enigma.D3.ApplicationModel.AttributeHelper.EnumerateAttributes . i have no idea how to get a replacement for the enumerate function now.
-
Active Member
Originally Posted by
enigma32
Now you have some more options
Code:
var snapshot = new ApplicationSnapshot(ctx);snapshot.Update();
var str = (double)snapshot.Game.Player.GetAttributeValue(Attributes.Strength); // cast to double since you wanted that
var str2 = snapshot.Game.Player.GetAttributeValue(AttributeId.Strength);
var attributes = snapshot.Game.Player.GetAttributes();
this doesnt help me. i dont use ApplicationModel yet in my Project. I want to convert first to MemoryModel and see what is missing. i still have some fcuntions i was not able to transfer to MemoryModel.
I need a general method to read and enumerate Attributes from ACD like it was possible before:
Refactor attribute system * Enigma32/Enigma.D3@bbbcb9f * GitHub
-
Legendary
Originally Posted by
d2k2
this doesnt help me. i dont use ApplicationModel yet in my Project. I want to convert first to MemoryModel and see what is missing. i still have some fcuntions i was not able to transfer to MemoryModel.
I need a general method to read and enumerate Attributes from ACD like it was possible before:
Refactor attribute system * Enigma32/Enigma.D3@bbbcb9f * GitHub
I've added these
Code:
var acd = ctx.DataSegment.ObjectManager.ACDManager.ActorCommonData.First(x => x.ActorType == ActorType.Player);
var str = AttributeReader.Instance.GetAttributeValue(acd.FastAttribGroupID, AttributeId.Strength);
var attributes = AttributeReader.Instance.GetAttributes(acd.FastAttribGroupID);
You'll need to add your own extension methods if you want to simplify the call.
-
Post Thanks / Like - 1 Thanks
d2k2 (1 members gave Thanks to enigma32 for this useful post)
-
Active Member
Originally Posted by
enigma32
You can now do the first part.
Code:
var map = ctx.DataSegment.ObjectManager.UIManager.PtrControlsMap.Dereference();
var control = map["name.of.control"]
i coded now my own helper tool for UXControl reading. it works with 32bit and 64bit. I hope the offsets will not change so often. But i hope you will implement the basic functions in MemoryModel in the future since i have no clue how to update offsets 
see: D3Helper.Public/T_EnigmaTools.cs at MemoryModel * d2k2-git/D3Helper.Public * GitHub
-
Contributor
Why I can not find any 64 bit base address and offset on your GitHub
Sorry, I don't understand C
I want to find the base address and offset, with other programming read for example battle.net Tag, Hero level, etc.
-
Legendary
Originally Posted by
d2k2
Will do. Any reason you need local Actor? What is missing in the ACD that Actor has?
Originally Posted by
SeaDragon
Why I can not find any 64 bit base address and offset on your GitHub
Sorry, I don't understand C
I want to find the base address and offset, with other programming read for example battle.net Tag, Hero level, etc.
Enigma.D3.Memory, the original project, is only for 32-bit. Enigma.D3.MemoryModel is for both 32-bit and 64-bit. You can find 64-bit "symbols" here Enigma.D3/SymbolTable.X64.cs at master * Enigma32/Enigma.D3 * GitHub and for some types where I believe changes are rare and/or where I don't auto generate them, defined directly in the getters as "this.PlatformRead(int 32-bit offset, int 64-bit offset)".
-
Contributor
Thank you for your reply, I will study it carefully
-
Contributor
I'm glad to see my site is right
But I'm not sure how to use these offsets
For example, read the battle.net tag
My current offset
141DDFCC0+20+140+B0+28
I only found 141DDFCC0 in the ScreenManager
What if I want to read the hero level?
This offset?
PlayerData.Level = 0xC224;
141DDFCC0+C224 Cannot do it
Sorry, my poor English
-
Legendary
Originally Posted by
SeaDragon
I'm glad to see my site is right
But I'm not sure how to use these offsets
For example, read the battle.net tag
My current offset
141DDFCC0+20+140+B0+28
I only found 141DDFCC0 in the ScreenManager
What if I want to read the hero level?
This offset?
PlayerData.Level = 0xC224;
141DDFCC0+C224 Cannot do it

Sorry, my poor English
141DDFCC0 is as far as I support it. This leads to an object pointing to a bunch of BNet services, hero service being one of them. These tend to change often so I cba maintaining those offsets. PlayerData is something else, that's for when you're inside a game.
-
Active Member
Originally Posted by
enigma32
Will do. Any reason you need local Actor? What is missing in the ACD that Actor has?
Its not used. i just implemented it just in case because you gave me that code snippet. I don't even know what Actor is used for.
-
Active Member
How can i get the Current LevelArea SNOID with MemoryModel?
old code:
Code:
var levelArea = Enigma.D3.LevelArea.Instance.x044_SnoId;
-
Legendary
Originally Posted by
d2k2
How can i get the Current LevelArea SNOID with MemoryModel?
old code:
Code:
var levelArea = Enigma.D3.LevelArea.Instance.x044_SnoId;
One way would be getting local PlayerData, find the ACD, lookup the SSceneID to get a Scene, then use the LevelAreaSNO in there 
Or I should probably add this field to LevelArea.
EDIT: Added in Add LevelAreaSNO * Enigma32/Enigma.D3@793b214 * GitHub
Last edited by enigma32; 07-15-2017 at 01:46 AM.
-
Post Thanks / Like - 1 Thanks
d2k2 (1 members gave Thanks to enigma32 for this useful post)
-
Contributor
Sorry, I still don't understand. I still want to ask silly questions
How should I read the hero's plglevel?
141DDFCC0+?
Using CE
-
Legendary
Originally Posted by
SeaDragon
Sorry, I still don't understand. I still want to ask silly questions
How should I read the hero's plglevel?
141DDFCC0+?
Using CE
plglevel, you mean paragon?
[[[[0x141DDFCC0]+0x20]+0x140]+0xFC]
See Enigma.D3/Hero.cs at master * Enigma32/Enigma.D3 * GitHub for some other fields. Take the later number, e.g. 0xF4 for Paragon, and add 0x08 to it => 0xFC.
-
Post Thanks / Like - 1 Thanks
Meow Meow (1 members gave Thanks to enigma32 for this useful post)
-
Contributor
Originally Posted by
enigma32
Thank you very much
Very useful