XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Apr 29, 2017 8:43 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Mon Jul 18, 2016 5:50 pm 
Offline
advanced

Joined: Wed Jul 21, 2010 10:11 pm
Posts: 61
Has thanked: 6 times
Have thanks: 2 times














You can make the ads go away by registering

Greetings.

As some of you may know, Dragon's Dogma PC port is a very solid port of the console version, but there were a few cuts made to it much to the dismay of some people.
Those cuts include the intro song and two item sets that were present in the console version.
The intro song had already been restored through modding by a different person, but a friend of mine has been working on restoring those two cut item sets, namely the Berserk armors and weapons that are present in console versions but not on PC.

He made a decent progress with researching the files, finding item tables and even some initial testing with converting the models of those items to the PC version's format but he is unable to actually add the items themselves to the game (even though most of their data including stats, icons and description still being there!).

As such we'd like to request help of anyone who may have any ideas regarding how to get those things actually enabled. Chances are these are locked somewhere in the exe, but my friend ain't good with assembly so that is out of his league.

Here's an infographic he made regarding what has to be done:
Image


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Tue Jul 19, 2016 10:20 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 579
Has thanked: 64 times
Have thanks: 123 times
Old-school mods! Whoop.

How have you verified the files are never loaded? They may be in memory in multiple places - can you modify existing items?

Also does this game have its own scripting language? Any logic in data anywhere?

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Wed Jul 20, 2016 2:51 pm 
Offline
ultra-n00b

Joined: Tue Nov 17, 2015 8:30 am
Posts: 4
Has thanked: 2 times
Have thanks: 0 time
WRS wrote:
Old-school mods! Whoop.

How have you verified the files are never loaded? They may be in memory in multiple places - can you modify existing items?

Also does this game have its own scripting language? Any logic in data anywhere?


File with item info is in memory, since it contains information about all weapons and items.
When I change, for example, weight of an item in that file, after re-loading it gets changed in game.
Said file also contains right info about cut items, such as type of item and weight, but neither game, nor cheatengine script don't check that info and game outputs a placeholder info instead (cheatengine doesn't update info and shows up previous value instead, and not a placeholder). Game retrieves item description and item name with no problems.
I believe cheatengine uses same information as a game, to decide whether or not it should check item weight and class, but I don't know neither ASM, nor how cheatengine scripts work, so I can't find it.
Item resources, such as model are not loaded in memory, they get loaded on demand.

FluffyQuack, who made an unpacker for MT Framework games, said that game scripts usually have XFS format, but I couldn't find them, or anything that looks like scripts.

I doubt game stores info about which items to "disable" in .exe, but I don't even know from which file game can get it, so looking in game memory for a file sounds like a good idea. At least to me.


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Wed Jul 20, 2016 4:22 pm 
Offline
Moderator

Joined: Mon Jul 05, 2010 8:55 pm
Posts: 575
Has thanked: 18 times
Have thanks: 206 times
This is the same engine used for Resident Evil 5. I more familiar with the older MTFramework engine but still, most of the concepts in terms of in-game guis are the same.

It could be that there's a file defining properties for which thumbnails of each items are shown in the menus. Each entry should have their own unique name which corresponds to a pre-defined string within the executable. Perhaps jumping to the region which loads these strings will lead to clues as to how they've been disabled in the menus. Alternatively, it's possible there's an array of item ids stored in the memory which would need to be altered.

I hope it helps.
Cheers.

_________________
Click the thanks button if I helped!


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Wed Jul 20, 2016 8:37 pm 
Offline
beginner
User avatar

Joined: Sat Sep 27, 2014 9:19 am
Posts: 34
Location: 127.0.0.1
Has thanked: 0 time
Have thanks: 13 times
Just peeked at the game for a minute. In terms of where the item list is loaded, here is a direct pointer:
[[[ddda.exe+14F6434]+110]+60]

This will point to the itemList.itl after the game loads it. If you want to look at how the game loads it, you can find that in:
Code:
int __usercall sub_45CEF0@<eax>(int a1@<esi>)


The overall jist is:
Code:
  v11 = (*(int (__stdcall **)(int *, const char *, signed int))(*(_DWORD *)dword_18CCA00 + 48))(
          &dword_19A4554,
          "etc\\item\\itemList",
          1);
  v12 = dword_18CCA00;
  *(_DWORD *)(a1 + 0x110) = v11;


a1 here is:
Code:
sub_45CEF0(dword_18F6434);
// dword_18F6434 is a1
// use dda.exe + 14F6434


You can unpack the games main exe with my Steamless project here:
https://gitlab.com/atom0s/Steamless

This will let you fully analyze the game executable without the protection in place.

Overall it looks like the file is just loaded directly, so the limitations could be a bitmask preventing the items from working properly or a block in another function that limits the item ids range or something. I've never played the game so I'm not sure how things work in terms of the item system and such to know what to look for directly. But maybe this bit of info can help.


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Wed Jul 20, 2016 9:11 pm 
Offline
beginner
User avatar

Joined: Sat Sep 27, 2014 9:19 am
Posts: 34
Location: 127.0.0.1
Has thanked: 0 time
Have thanks: 13 times
Little more info on the itemList file. The first 16 bytes are a header.
+0 = File signature type.
+4 = ???
+8 = Entry count.

Currently, the entry count is 0x076D. You can determine the entry size via:
((FileSize - HeaderSize) / EntryCount)

So the entry size is 128 bytes per entry at the moment.


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Mon Jul 25, 2016 12:44 am 
Offline
ultra-n00b

Joined: Tue Nov 17, 2015 8:30 am
Posts: 4
Has thanked: 2 times
Have thanks: 0 time
atom0s wrote:
Just peeked at the game for a minute. In terms of where the item list is loaded, here is a direct pointer:
[[[ddda.exe+14F6434]+110]+60]

This will point to the itemList.itl after the game loads it. If you want to look at how the game loads it, you can find that in:
Code:
int __usercall sub_45CEF0@<eax>(int a1@<esi>)


You can unpack the games main exe with my Steamless project here:
https://gitlab.com/atom0s/Steamless

This will let you fully analyze the game executable without the protection in place.

Overall it looks like the file is just loaded directly, so the limitations could be a bitmask preventing the items from working properly or a block in another function that limits the item ids range or something. I've never played the game so I'm not sure how things work in terms of the item system and such to know what to look for directly. But maybe this bit of info can help.


Thank you for that program, but after almost a week of searching I couldn't find anything that could prevent game from looking into that part of a memory. Looks like I'm very bad at assembler.

Here's a code from that Cheat Engine script, can anybody, please, tell me what prevents it from checking that part of memory? I hope that will bring me closer to adding items back.
http://pastebin.com/NPBg42zU


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Mon Aug 01, 2016 11:10 pm 
Offline
advanced

Joined: Wed Jul 21, 2010 10:11 pm
Posts: 61
Has thanked: 6 times
Have thanks: 2 times
Bumping for interest.

We really need a hand with this, so if anyone has ideas please do help us.


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Mon Aug 01, 2016 11:59 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 579
Has thanked: 64 times
Have thanks: 123 times
Panzah wrote:
Bumping for interest.

We really need a hand with this, so if anyone has ideas please do help us.


can you upload itemList.itl? i don't have the game either but want to take a look at the format anyway.

also (silly question), but what ids are you assigning new items? on the nexusmod page, the item list has a suspicious "used" value of 1902 which could easily be the max/count/total size of an enum table in the exe.

edit this is the item id list linked on the mod page - http://pastebin.com/E7x4B2u9

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Tue Aug 02, 2016 12:19 am 
Offline
ultra-n00b

Joined: Tue Nov 17, 2015 8:30 am
Posts: 4
Has thanked: 2 times
Have thanks: 0 time
WRS wrote:
can you upload itemList.itl? i don't have the game either but want to take a look at the format anyway.

also (silly question), but what ids are you assigning new items? on the nexusmod page, the item list has a suspicious "used" value of 1902 which could easily be the max/count/total size of an enum table in the exe.

edit this is the item id list linked on the mod page - http://pastebin.com/E7x4B2u9


Uploaded file from all platforms (PC, Xbox360 and PS3), but it's a simple format with a list of all items and parameters assigned to it.
I don't see anything that separates 'unused' items from usable in it, only stuff like weight and type of item.

I didn't change file ID, game allows me to spawn these weapons and armor in inventory by their old IDs.
For example, 549 Thousandlimbs and 550 White Hawk's Talon.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Tue Aug 02, 2016 12:23 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 579
Has thanked: 64 times
Have thanks: 123 times
just having a look at the save format which seems to serialize inventory items like this:

Code:
<class type="sItemManager::cITEM_PARAM_DATA">
<s16 name="data.mNum" value="0"/>
<s16 name="data.mItemNo" value="-1"/>
<u32 name="data.mFlag" value="0"/>
<u16 name="data.mChgNum" value="0"/>
<u16 name="data.mDay1" value="0"/>
<u16 name="data.mDay2" value="0"/>
<u16 name="data.mDay3" value="0"/>
<s8 name="data.mMutationPool" value="0"/>
<s8 name="data.mOwnerId" value="0"/>
<u32 name="data.mKey" value="0"/>
</class>


will see what i make of your file



edit

hmm "itemList x360.itl" isn't useful at all!

where is the weight?
"Crossed Cinquedea" itemid 312 has a value of 0.18, but fir "Thousandlimbs" itemid 549 this value is 0.51 :?


edit 2

no luck with trying to locate the stats. currently trying to pair swords (here: http://dragonsdogma.wikia.com/wiki/Swords) with their ids (here: http://pastebin.com/E7x4B2u9).

not much luck. got this so far:

Code:
BigEndian();

struct{
  uint32 Magic <format=hex>;
  uint32 Unknown;
  uint32 EntryCount;
  uint32 Unused;
}Header;

local uint EntrySize = (FileSize()-sizeof(Header))/Header.EntryCount;

//LittleEndian();

union{
  ubyte raw[EntrySize];

  struct{
    uint32 Unknown[16];
    int32 Un2;
    float Un3_f;
    int32 Un4;
    int32 Un5;
    int32 ItemID;
// 549 Thousandlimbs
// 312 Crossed Cinquedea
// 707   Devil's Nail XX
// 451 Almace 0.81
// 531 Cursed Bite
// 532 Cursed Light
    float Un7_f;
  }Item;

}Data[Header.EntryCount] <optimize=false>;


_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: [Help Wanted] Dragon's Dogma PC Item Restoration
PostPosted: Tue Aug 02, 2016 1:11 am 
Offline
ultra-n00b

Joined: Tue Nov 17, 2015 8:30 am
Posts: 4
Has thanked: 2 times
Have thanks: 0 time
WRS wrote:
i can't find the "Crossed Cinquedea" itemid 312 in "itemList x360.itl". where is the weight for example? the closest value is 0.18, but for "Thousandlimbs" itemid 549 this value is 0.51 :?

312 in HEX is 138, multiply in by 8 and you'll get 9C0, file starts with id hex value 7, so add 7 to 9C0 and search for 09C7, it'll appear at 9C4C.
(I may be wrong, but position in file appears to be same as position in PC file, so maybe it's a right way of searching for ID in xbox file)

Weight is at 9BD4, with float value 40351EB8 = 2.83.

Pardon me, when I made pic in first post, I thought weight appears after ID value, but it's actually before it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group