If you read anything from the mpq files, you need to patch them first.
If you read anything from the mpq files, you need to patch them first.
How do you "patch" mpq files ?
You can do it manually with MPQ Editor or programmatically with crystalmpq
Azgul, there's something that I don't understand, let's take a sample :
- in d3-update-base-21876.MPQ there's a scene file called x1_fortress_EW_02_B.scn (tag IsPatch to True)
- if I use CrystalMPQ to extract this file, I have a FileNotFoundException
- if I use MPQEditor, the file is properly extracted
How can I get this file properly extracted with CrystalMPQ ?
Thanks
You're doing it wrong, the d3-update-base-XXXX & d3-update-enUS-XXXX are patches. You should patch those onto the files in Data_D3\PC\MPQs (these are the base MPQs) depending on which data you need.
With MPQ Editor you'd have to press File -> Open MPQ(s) -> Custom Open MPQ.
So say you want to read all MPQs to apply the patches you should select all MPQs in Data_D3\PC\MPQs and then you will be met with the following dialogue: https://mediacru.sh/T60yxN5HKCRg
Then you have to right click under 'Patches' to add the MPQ patch files.
For examples of using crystalmpq I would look at mooege: https://github.com/DarkLotus/mooege/...ege/Common/MPQ
Thanks for hints. After a while i managed to patch localized strings using MPQEditor. Here is complete list if anyone is interested xD Localized item names - Pastebin.com
@azgul : thanks a lot, my extraction was wrong since the beggining !
Some scenes was weird sometime, it makes sense now![]()
Thanks a lot for all the input from everyone!
I am trying to sell automatically and have a problem determining the size an ACD is occupying in the player inventory. In other words, how can I find out if a specific ACD takes 1x1 slots (e.g. a ring) or 1x2 slots (e.g. a weapon)?
@Enigma: here a small patch for ProcessMemoryReader.cs
_process = process;
_minValidAddress = 0x00010000;
- _maxValidAddress = process.IsLargeAddressAware() ? 0x7FFEFFFF : 0xBFFF0000;
+ _maxValidAddress = process.IsLargeAddressAware() ? 0xBFFF0000 : 0x7FFEFFFF;
_pointerSize = process.Is64BitProcess() ? 8 : 4;
}
Last edited by axlrose; 10-08-2014 at 11:43 AM.
Here is my code for selling (it doesn't matter how big item is):
I guess you can determine size based on item type.Code:int items_sold = 0; try { IEnumerable<Enigma.D3.ActorCommonData> acds = Enigma.D3.Helpers.ActorCommonDataHelper.Enumerate(); foreach (Enigma.D3.ActorCommonData acd in acds) { if (acd.x114_ItemLocation == ItemLocation.PlayerBackpack) { if (!CanSellOrSalvage(acd)) continue; int[] pos = new int[] { 535 + acd.x118_ItemSlotX * 28 + AutoIt.Random(-2, 2), 354 + acd.x11C_ItemSlotY * 27 + AutoIt.Random(-2, 2) }; AutoIt.MouseMove(pos[0], pos[1], 10); AutoIt.Sleep(ITEM_HOVER_TIME + AutoIt.Random(0, 150)); AutoIt.MouseClick("right", pos[0], pos[1]); ++items_sold; } } } catch (Exception) { }
How to read blood shards? I can't find this anywhere, only there seems to be DoubleBloodShards attribute which is about the bonus from bounty at some difficulty?
Code:for (int i = 0; i < Enigma.D3.PlayerData.Local.xD36C_VendorTokenCount; ++i) { if (Enigma.D3.PlayerData.Local.xCB6C_VendorTokens[i].x00_GameBalanceId == -1691237125) return Enigma.D3.PlayerData.Local.xCB6C_VendorTokens[i].x04_Value; }
Thank you CrEEzz, that is very obscure I would have never figured it out.![]()
Does anyone have code snippet to convert between world and screen coordinates? I can't get it to work properly because the camera has weird angle I don't know how to calculate it.