I have removed this post
I have removed this post
Last edited by axlrose; 06-02-2014 at 10:16 AM. Reason: Disabled Smilies
Nice thanks :) I'll update that later. Not sure if you've seen, but https://subversion.assembla.com/svn/...y/LevelArea.cs also has some info on that struct. You're actually missing bytes at x24 since each pixel is 32-bit (at least used to be, but it's just grayscale).
I have removed this post
Last edited by axlrose; 06-02-2014 at 10:15 AM.
So I've been working on a basic map overlay and can't seem to figure something out. I can display mobs and other objects without any issue and now I am trying to display players names above them. But I can't seem to figure out how to get their character name!
This is what I have, just need to figure out where to get the names! https://i.imgur.com/cZViojZ.png
Also, it seems that reading UIControls is extremely slow at the moment. No idea why =/
Last edited by raler; 05-17-2014 at 09:19 PM.
Blargh.... accidental dbl post. Dammit.
Does anyone know of a way to determine if a particular ActorCommonData is a crafting material (and of what quality)?
Yes the things in Legacy are from 1.0.8 so some structures are totally changed, while others only had a few fields added or removed. OK so they use 1 byte now, that makes much more sense Thanks again!
Check "Output" in Visual Studio or attach something to listen on Debug.WriteLine, if reading is extremely slow there might be Win32 exceptions involved. You can get the name from playerData->xBEC8_HeroName (char[49]), not tested.
I recommend you dump all ACDs, import into Excel and try to find a pattern. CodeGenerationHelper.GetDump(ActorCommonDataHelper.Enumerate().ToList().Apply(a => a.TakeSnapshot()).ToArray()); or something like it (not tested).
Is there a way to use Engine.SnoGroups() to iterate over all scenes? I tried this with all Worlds and compared it to Enigma.D3.Helpers.WorldHelper.GetLocalWorld() and no success.
To do this I added
public class Container : Container<MemoryObject>
{
...
public S[] x11C_ItemsAs<S>() { return Dereference<S>(0x11C, x100_Capacity); }
}
Thanks...
Thanks. That's really handy.
No luck yet searching through Actor / ActorCommonData / AttributeHelper.EnumerateAttributes with that.
Perhaps it's hiding in one of these?
I'll keep looking.Code:x148_ListB_ItemRelated_Affixes_NodeSize12Bytes x15C_ListB_ItemRelated_AttributesOrSockets_NodeSize12Bytes x1D8_ListB_NodeSize52Bytes x1EC_ListB x200_ListB
Edit: Those seem to be empty lists (perhaps just for crafting materials).
Last edited by yondervaluabletuna; 05-18-2014 at 11:06 AM.
I have removed this post
Last edited by axlrose; 06-02-2014 at 10:15 AM.
I reintroduced a Scene getter in Storage (thanks to DarthTon's code and offsets):
public class Storage : MemoryObject
{
...
public Enigma.D3.Collections.Container<Enigma.D3.Legacy.Scene> x1BC_Scenes { get { return Dereference<Enigma.D3.Collections.Container<Enigma.D3.Legacy.Scene>>(0x1BC); } }
}
Last edited by axlrose; 06-02-2014 at 10:15 AM.
I had a look, couldn't really find anything. Item quality does exist in the SNO, maybe look at LootAlert to figure out how to access that info. Crafting material info could also be in the SNO, although a quick and dirty method would be to see if "Crafting" is contained in the slug (name).
I'll have a look at it later. I got quite confused last time, many structures within structures and multiple IDs for both scenes and worlds.
That might very well be the definition of SNO. The MPQs store data as SNOs and when they're loaded into D3 structs like Actor and ACD they take pieces here and there and mash them together into new structures.
Finally got around to playing with UIControls today and have this to contribute:
Code:Index: UIControl.cs =================================================================== --- UIControl.cs (revision 12) +++ UIControl.cs (working copy) @@ -261,7 +261,18 @@ public int _xA4C { get { return Field<int>(0xA4C); } } public int _xA50 { get { return Field<int>(0xA50); } } public int _xA54 { get { return Field<int>(0xA54); } } + public int _xA58_TextPtr { get { return Field<int>(0xA58); } } + public int _xA68_TextLen { get { return Field<int>(0xA68); } } + public string Text + { + get + { + int len = _xA68_TextLen; + return Dereference(0xA58, len); + } + } + public override string ToString() { return base.ToString() + " " + x030_Self.x008_Name;
For some reason I couldn't get attachments working... I've updated SVN, nothing major, except for adding a whole bunch of auto-generated files based on the type descriptors of the SNO structures. Might remove it in the future, or integrate into Enigma.D3 if I feel the definitions are correct.
I expect to be busy with other things the nearest time to come, but there you have something to play with
I've been occasionally experiencing an infinite loop when using AttributeHelper.GetAttributeValue while iterating over ActorCommonDataHelper.EnumerateItems.
Debug output looks like this:
Call stack:Code:ProcessMemory.Read(00000798): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll ProcessMemory.Read(00000794): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll ProcessMemory.Read(00000798): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll ProcessMemory.Read(00000794): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll ProcessMemory.Read(00000798): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll ProcessMemory.Read(00000794): Only part of a ReadProcessMemory or WriteProcessMemory request was completed A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in Enigma.D3.dll
and the relevant code in getGroundItems isCode:Enigma.D3.dll!Enigma.D3.Helpers.AttributeHelper.TryGetValue(Enigma.D3.Collections.Map<int,int> map, int key, out Enigma.D3.Memory.Pointer ptrValue) Line 88 C# Enigma.D3.dll!Enigma.D3.Helpers.AttributeHelper.GetAttributeValuePtr(Enigma.D3.ActorCommonData acd, Enigma.D3.Enums.AttributeId attribId, int modifier) Line 68 + 0x5c bytes C# Enigma.D3.dll!Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(Enigma.D3.ActorCommonData acd, Enigma.D3.Enums.AttributeId attribId, int modifier) Line 16 + 0xe bytes C# > Bounties.exe!Bounties.Program.getGroundItems(float range, int quality) Line 1353 + 0xf bytes C#
This happens while I'm not doing anything special in-game. Just walking around.Code:var acds = Enigma.D3.Helpers.ActorCommonDataHelper.EnumerateItems(); foreach (var a in acds) { var q = Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(a, Enigma.D3.Enums.AttributeId.ItemQualityLevel); // ... } // ...
Any ideas?