XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Jun 24, 2017 8:16 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: Nier Automata
PostPosted: Mon Apr 10, 2017 4:48 pm 
Offline
Moderator

Joined: Sun Mar 27, 2011 8:42 pm
Posts: 931
Has thanked: 10 times
Have thanks: 120 times
Slokky wrote:
SkacikPL wrote:
Do you have any contact with the author or some more information?
He might share if someone asks politely?

makcar
is autor of the russian mod XD



PS guys is there some config file in the game archives? We need fix the draw distance and the shadow resolution.



Do you have any way how to contact him ? On PM pls

_________________
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Mon Apr 10, 2017 8:47 pm 
Offline
advanced

Joined: Tue Oct 28, 2014 7:51 am
Posts: 53
Has thanked: 3 times
Have thanks: 4 times
Slokky wrote:
PS guys is there some config file in the game archives? We need fix the draw distance and the shadow resolution.

Doesn't seem to be the case, i also wouldn't bet on the engine to scale well. I mean all settings are pretty much rendering related, like AF, resolution or MSAA. Then there's post processing setting and that's that, nothing that would actually influence the engine itself like mesh/texture quality.

Since it's a primarily console game i assume that 80% of stuff is hardcoded and that's that.


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Mon Apr 10, 2017 9:37 pm 
Offline
beginner
User avatar

Joined: Wed Jul 22, 2015 10:08 pm
Posts: 23
Has thanked: 5 times
Have thanks: 3 times
michalss wrote:
Do you have any way how to contact him ? On PM pls


he says "Ok, that's a bargain! +src?" looks he can help us


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Fri Apr 21, 2017 9:00 am 
Offline
n00b
User avatar

Joined: Thu Jun 12, 2014 2:55 am
Posts: 15
Has thanked: 4 times
Have thanks: 21 times
hi, every one.
I have pretty much figured out the wmb format and made a Blender addon.
The importer will import meshes with the official rig. If dds files is put in the same folder, it will try to give a default material with textures assigned.

Usage:
1.run src/wmb_parser.py to generate an itermediate file for model. (*.gtb)
2.run src/splitdds.py to get the textures related to that model, put textures in the same directory with gtb file. Materials match textures by some hash or stringid, which is stored in a ".wta" file. ".wtp" file stores the actual texture data. run this script with wta and wtp files specified, and it will generate the textures needed.
3.if using blender, then put the "gtb_importer" folder into blender's addon folder. Enable that addon and you can import gtb files into blender. if you have dds files with gtb files in the same folder.then Blender will try to apply a default material for you, with textures assigned. However, to get the same visuals like the game, you have to setup your own pbr material.
4.if not using blender, then edit "src/wmb_parser.py", set DUMP_OBJ to True, and you'll get obj files instead.

known issues:
custom vertex normal is quite right.
joints and weights for some models are not correct.

PS:
gtb file is just a zlib compressed json file with fourcc "GTB\x00"
I use this custom format so that I don't have to write Blender importer for every single game.
Also, one can write importers for other DCC tools such as MAX and maya, without knowing details of wmb file.
So feel free to make importer for your favourite DCC tool.
check "src/wmb_parser.py" export_gtb for detail.


Attachments:


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



Last edited by delguoqing on Fri Apr 21, 2017 5:04 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Fri Apr 21, 2017 3:34 pm 
Offline
veteran
User avatar

Joined: Wed Nov 17, 2010 2:57 pm
Posts: 111
Location: Germany
Has thanked: 58 times
Have thanks: 22 times
Thank you very much!
Any word on how to get the wmb parser to work? Does it require a specific Python version?


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Fri Apr 21, 2017 4:13 pm 
Offline
n00b
User avatar

Joined: Thu Jun 12, 2014 2:55 am
Posts: 15
Has thanked: 4 times
Have thanks: 21 times
o0Crofty0o wrote:
Thank you very much!
Any word on how to get the wmb parser to work? Does it require a specific Python version?


I'm using python 2.7.8, and most likely it will work with 2.7.x.

Make sure you have python installed, then run the script with the wmb file path as argument.
for example:
python wmb_parser.py D:\data006\pl\pl000_dtt\pl000.wmb

A gtb file should be generated in the same directory as the wmb file. Then you can use Blender addon to import it.

Here's what it should look like in Blender.



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: Nier Automata
PostPosted: Fri Apr 21, 2017 4:33 pm 
Offline
veteran
User avatar

Joined: Wed Nov 17, 2010 2:57 pm
Posts: 111
Location: Germany
Has thanked: 58 times
Have thanks: 22 times
Thanks, that worked now =)


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 1:04 am 
Offline
ultra-n00b

Joined: Tue Apr 25, 2017 12:15 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
I am a novice
Sorry for my bad english
I try to extract the a2 model from pso2
But stopped at a step
"DeCompressed.bin" is a puzzle
I do not know how to extract
any ideas?
Image


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: Nier Automata
PostPosted: Tue Apr 25, 2017 3:11 am 
Offline
ultra-n00b

Joined: Mon Mar 20, 2017 11:45 am
Posts: 4
Has thanked: 0 time
Have thanks: 0 time
Thank you delguoqing for providing those scripts. However, I am having trouble installing the gtb_importer to blender. I followed your instructions but blender seems to be having trouble recognizing the addon. Any help would be appreciated. Also, not sure if I was doing this correctly but when i tried to use the wmb_parser.py, it had an error. It stated "ImportError: No module named numpy" Any idea what I did wrong? I am a newbie so I need all the help I can get. Thanks to all contributors of this thread.


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 8:57 am 
Offline
ultra-n00b

Joined: Wed Jun 20, 2012 2:41 am
Posts: 2
Has thanked: 1 time
Have thanks: 4 times
you need to install that module.

https://sourceforge.net/projects/numpy/ ... mPy/1.9.2/

this should be enough (was for me), and it's easy to install since it's just an exe, while the newest one is in some convoluted format. it is for me. get the 2.7 version. make sure it's the same bit version as your python.


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 9:06 am 
Offline
n00b

Joined: Thu Dec 23, 2010 9:49 am
Posts: 19
Has thanked: 4 times
Have thanks: 13 times
Here is a massive,massive, automated dump I made of a bunch of "StringBanks" I found at run-time complete with their string IDs and some little markups for if the stringbanks are empty

https://paste.ee/p/zt17P

Naturally, there are major, major spoilers in here.

String checksums(besides item IDs) are just regular CRC32's of the script-name after making all characters lowercase.

eg: "PAUSE_PICTUREBOOK_00" is a string's script name that is looked up in the string bank.

first it converts the string to the lowercase "pause_picturebook_00" and takes a crc32 of it(0x577D2592) using polynomial 0xEDB88320.
It then looks up "577D2592" within the appropriate string bank and does a binary search until it finds the associated string for the currently loaded language.

In this case it matches up with the string "View "<BOOK_NAME>"?"
At run-time "<BOOK_NAME>" is replaced with the appropriate value using sub_1406FFD60.

I'll make a more nicely formatted and categorized list later but feel free to use the dump meanwhile. Will probably wait for the DLC+Update next week before I do anything new.
If cpks/dats ever get re-packed then translating the game might end up being very easy if this is how localization works.

_________________
Aka Wunkolo


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 3:18 pm 
Offline
beginner
User avatar

Joined: Wed Jul 22, 2015 10:08 pm
Posts: 23
Has thanked: 5 times
Have thanks: 3 times
DEElekgolo wrote:
Here is a massive,massive, automated dump I made of a bunch of "StringBanks" I found at run-time complete with their string IDs and some little markups for if the stringbanks are empty

https://paste.ee/p/zt17P

Naturally, there are major, major spoilers in here.

String checksums(besides item IDs) are just regular CRC32's of the script-name after making all characters lowercase.

eg: "PAUSE_PICTUREBOOK_00" is a string's script name that is looked up in the string bank.

first it converts the string to the lowercase "pause_picturebook_00" and takes a crc32 of it(0x577D2592) using polynomial 0xEDB88320.
It then looks up "577D2592" within the appropriate string bank and does a binary search until it finds the associated string for the currently loaded language.

In this case it matches up with the string "View "<BOOK_NAME>"?"
At run-time "<BOOK_NAME>" is replaced with the appropriate value using sub_1406FFD60.

I'll make a more nicely formatted and categorized list later but feel free to use the dump meanwhile. Will probably wait for the DLC+Update next week before I do anything new.
If cpks/dats ever get re-packed then translating the game might end up being very easy if this is how localization works.

man in the first page i put a .rar with a .dat/.cpk repack tool. it works, i test here.
We just need the tool to translate the mruby scripts now...

Open the .bat in my rar and update the CD command
Image


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 4:23 pm 
Offline
n00b

Joined: Thu Dec 23, 2010 9:49 am
Posts: 19
Has thanked: 4 times
Have thanks: 13 times
marcussacana wrote:
man in the first page i put a .rar with a .dat/.cpk repack tool. it works, i test here.
We just need the tool to translate the mruby scripts now...

Open the .bat in my rar and update the CD command
Image

There is no current .cpk repacker for the more current format I didn't think(that cpk repacker is from like 2008, the dat tool is for metal gear rising). Have yet to see anyone publish info on the string-tables and more people keeping to themselves.


Anyways the mruby scripts in particular use the same crc32s and string-identifiers as before to identify pretty much all the bindings among other things. Some lose structures from my notes. I think you're better off finding the (several) string tables within the cpk/dat files and you can pretty much translate the entire game by repacking that. There are several of them for items and skills and dialog and one named "core". They get put into a sorted array based on their crc32 as well and is how they are mostly identified in the mruby binaries.

Some dumps from my notes.
Code:
struct RubyBinding
{
   std::uint32_t CommandCRC;

// function offsets, argument data, etc
   std::uint32_t Unknown4;
   std::uint64_t UnknownOffset8;
   std::uint64_t UnknownOffset10;
   std::uint64_t UnknownOffset18;
   std::uint64_t UnknownOffset20;
};

struct StringBankRef
{
   void* Unknown0;
   std::uint64_t Unknown8;
   std::uint64_t Unknown10;
   char16_t* RawTextStream;
   std::uint64_t Unknown20;
   std::uint64_t Unknown28;
   std::uint64_t Unknown30;
   std::uint64_t Unknown38;
   std::uint64_t Unknown40;
   void* TableEntryOffset;
};

struct StringGroup
{
   void* StringTablePtr;
   std::uint32_t Unknown8;
   std::uint32_t UnknownC;
   std::uint32_t StringCount;
};

struct StringEntry
{
   std::uint64_t StringChecksum; // CRC32
   char16_t* StringName;
   std::uint64_t RawTextStreamOffset; // offset within StringBankRef::RawTextStream
   std::uint64_t StringSize;
   char16_t* ScriptName;
}


Some of the memory pools it allocates. Note that in about a week much of these runtime offsets are going to be useless.

Code:

struct HeapReference
{
   HeapReference* Previous;
   void* HeapLocation
   HeapReference* Next;
}

Name|Offset|Size|Group
-|-|-|-
"GRAPHIC WORK" | 0x1418DC668 | 0x3200000 | 0x1418DC578 (System)
"GLOBAL" | 0x1418DC698 | 0x5500000 | 0x1418DC578 (System)
"SOUND" | 0x1418DC6F8 | 0x1700000 | 0x1418DC578 (System)
"EFFECT_GLOBAL" | 0x1418DC728 | 0xC00000 | 0x1418DC578 (System)
"UI" | 0x1418DC788 | 0xC00000 | 0x1418DC578 (System)
"UIFont" | 0x1418DC7B8 | 0x100000 | 0x1418DC578 (System)
"MODEL RESOURCE" | 0x1418DC7E8 | 0x200000 | 0x1418DC578 (System)
"ONLINE" | 0x1418DC818 | 0x100000 | 0x1418DC578 (System)
"GRAPHIC BUFFER" | 0x1418DC848 | 0xFF00000 | 0x1418DC5A8 (Buffer)
"EFF+UI BUFFER" | 0x1418DC8A8 | 0x2980000 | 0x1418DC5A8 (Buffer)
"GRAPHIC GPURW BUFFER" | 0x1418DC878 | 0xCD00000 | 0x1418DC5D8 (Unknown)
"CORE FILE" | 0x1418DC8D8 | 0x6400000 | 0x1418DC608 (File)
"PL FILE" | 0x1418DC908 | 0x3E40000 | 0x1418DC608 (File)
"CELE FILE" | 0x1418DC938 | 0x40000 | 0x1418DC608 (File)
"EM+BG FILE" | 0x1418DC968 | 0x4400000 | 0x1418DC608 (File)
"RESIDENTS FILE" | 0x1418DCA28 | 0x1500000 | 0x1418DC608 (File)
"HIGH MAP FILE" | 0x1418DC998 | 0x9A00000 | 0x1418DC608 (File)
"LOW MAP FILE" | 0x1418DC9C8 | 0x2900000 | 0x1418DC608 (File)
"MAP SHARE FILE" | 0x1418DC9F8 | 0x80000 | 0x1418DC608 (File)
"UI FILE" | 0x1418DCA58 | 0x800000 | 0x1418DC608 (File)
"UIFont FILE" | 0x1418DCA88 | 0x500000 | 0x1418DC608 (File)
"UI MINIMAP FILE" | 0x1418DCAB8 | 0x40000 | 0x1418DC608 (File)
"SHADER FILE" | 0x1418DCAE8 | 0x480000 | 0x1418DC608 (File)
"EFF SHADER FILE" | 0x1418DCB18 | 0x400000 | 0x1418DC608 (File)
"HACKING FILE" | 0x1418DCB48 | 0x800000 | 0x1418DC608 (File)
"BOOK FILE" | 0x1418DCB78 | 0x180000 | 0x1418DC608 (File)
"MOVIE FILE" | 0x1418DCBA8 | 0x3FC0000 | 0x1418DC608 (File)
"GRAPHIC VRAM" | 0x1418DCBD8 | 0x20000 | 0x1418DC638 (Vram)
"CORE VRAM" | 0x1418DCC08 | 0xA00000 | 0x1418DC638 (Vram)
"PL VRAM" | 0x1418DCC38 | 0x7800000 | 0x1418DC638 (Vram)
"CELE VRAM" | 0x1418DCC68 | 0x1600000 | 0x1418DC638 (Vram)
"EM+BG VRAM" | 0x1418DCC98 | 0x37880000 | 0x1418DC638 (Vram)
"RESIDENTS VRAM" | 0x1418DCD58 | 0x8800000 | 0x1418DC638 (Vram)
"HIGH MAP VRAM" | 0x1418DCCC8 | 0x2BC00000 | 0x1418DC638 (Vram)
"LOW MAP VRAM" | 0x1418DCCF8 | 0xC700000 | 0x1418DC638 (Vram)
"MAP SHARE VRAM" | 0x1418DCD28 | 0xB900000 | 0x1418DC638 (Vram)
"EFFECT VRAM" | 0x1418DCD88 | 0xB400000 | 0x1418DC638 (Vram)
"UI VRAM" | 0x1418DCDB8 | 0x1800000 | 0x1418DC638 (Vram)
"UIFont VRAM" | 0x1418DCDE8 | 0x12000000 | 0x1418DC638 (Vram)
"UI MINIMAP VRAM" | 0x1418DCE18 | 0x380000 | 0x1418DC638 (Vram)
"HACKING VRAM" | 0x1418DCE48 | 0x200000 | 0x1418DC638 (Vram)
"BOOK VRAM" | 0x1418DCE78 | 0x3080000 | 0x1418DC638 (Vram)
"MOVIE VRAM" | 0x1418DCEA8 | 0x1E00000 | 0x1418DC638 (Vram)



Also those russians that are translating the game are probably going to be somewhat at ground-zero again once the dlc+update comes out next week and any research-breaking changes happen.

_________________
Aka Wunkolo


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 8:22 pm 
Offline
beginner
User avatar

Joined: Wed Jul 22, 2015 10:08 pm
Posts: 23
Has thanked: 5 times
Have thanks: 3 times
Hmm, i repack without problem here to edit the cutscene subtitle
Image


Top
 Profile  
 
 Post subject: Re: Nier Automata
PostPosted: Tue Apr 25, 2017 9:01 pm 
Offline
beginner
User avatar

Joined: Wed Jul 22, 2015 10:08 pm
Posts: 23
Has thanked: 5 times
Have thanks: 3 times
about the suppose of a method to edit, can talk more?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot], Nug and 13 guests


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