FtexTool doesn't support that file. It's using a format only <1% of all texures have (non chunked, non compressed, no metadata in the ftexs files)
Here's the fixed dds:
https://my.mixtape.moe/iecrlo.zip
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archive
-
- n00b
- Posts: 10
- Joined: Tue Dec 13, 2016 4:59 am
- Has thanked: 1 time
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
You're a lifesaver, atvaark. Thanks!
Quick edit, is there any possibility you could get the other textures associated with it, linked here? They give the same error.
Quick edit, is there any possibility you could get the other textures associated with it, linked here? They give the same error.
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
They can also be unpacked by my patched tool.CreaseInTime wrote:You're a lifesaver, atvaark. Thanks!
Quick edit, is there any possibility you could get the other textures associated with it, linked here? They give the same error.
https://my.mixtape.moe/ntfndx.zip
I won't be releasing the patch because I can't test if it breaks converting other textures and this bug only appears with <1% of all textures I guess.
-
- advanced
- Posts: 75
- Joined: Sat Apr 09, 2016 5:36 pm
- Has thanked: 4 times
- Been thanked: 13 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
I would like to leave a note here about lua and C functions.
You can inspect any C function like this:
It will print out info like this:
However that function address is NOT the actual address of C function. I built an executable with embedded lua, where C function write is called via lua. Here are the addresses of functions in C and in Lua:
write is the function itlself, l_write is a wrapper for lua. Both addresses are static and never change, while address from lua always changes. Most likely this is an address in Lua machine.
Code attached to the post, was built on linux machine. You will need liblua5.1, lua5.1-dev and g++.
You can inspect any C function like this:
Code: Select all
local a = debug.getinfo(Fox.GetDebugLevel)
for key,value in pairs(a) do --pseudocode
print(key..value)
end
Code: Select all
nups : 0
what : C
func : function: 0x1b15100
lastlinedefined : -1
source : =[C]
currentline : -1
namewhat :
linedefined : -1
short_src : [C]
Code: Select all
func : function: 0x1b15100
write: 0x401716
l_write: 0x401742
Code attached to the post, was built on linux machine. You will need liblua5.1, lua5.1-dev and g++.
You do not have the required permissions to view the files attached to this post.
-
- advanced
- Posts: 75
- Joined: Sat Apr 09, 2016 5:36 pm
- Has thanked: 4 times
- Been thanked: 13 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
I have tried to load a DLL and failed.
Steps I took:
First, disable DEP to be able to load our dll. If you cannot disable DEP, you will run into errors like I did (and still do).
You will need to disable software and hardware DEP. Software DEP is disabled like this:
Hardware DEP is disabled by turning it off in BIOS, look for 'execution bit' or something like that. Some BIOSes (like mine) don't have that option, so you are probably out of luck - DEP will prevent dll from loading, mgsvtpp.exe will crash with BEX64/StackHash error. Reboot after turning them off.
Second, you need to get a 64 bit compilator - game uses 64-bit version of lua and doesn't like 32 bit dlls (this is just a guess, not 100% confirmed). I used gcc from http://winbuilds.org/. Download the installer, install everything, veryfy that it is working by typing 'gcc' in console. If it is not working - check your PATH or invoke it directly from the installation directory.
Third, write your dll. This is the hardest part, so I chose to get the source from the internet. Fourth, compile it.
Note: we are compiling it as a static library.
You can also try to build a shared library. To do so, get Lua 5.1.5 windows x64 build - https://sourceforge.net/projects/luabin ... p/download . Put lua5.1.dll along with test.cpp, compile:
Now we have a compiled DLL and ready to load it in the game. Put it along with mgsvtpp.exe to avoid path issues. If you have built shared library, copy lua5.1.dll there as well. You can put require code into init.lua or load it on button press - whatever you like.
or
And here are the problems:
If you have shared library, game loads your dll AND lua5.1.dll, which results in soft hang - game is running, but the screen is frozen, inputs are not working. I see 2 possible problems with is:
If you have a static library, game tries to load your dll, but DEP is preventing it to load, crashing with BEX64/StackHash errors. I was unable to disable hardware part of DEP - my BIOS is missing settings. I have also tried disabling antivirus, turning on compability settings, running as admin - same error. This bug needs to be reproduced on another machine, maybe the problem is in my pc. There is also a possibility that I don't fully understand the mechanism of loading shared/static libraries and static lib is worthless.
I have also tried to load the dll using Fox module methods by calling them one by one with 'test' as parameter. Unfortunately it didn't work and I haven't seen any low-level C modules in the game that had functions with ability to load stuff (aside from Script.LoadLibrary, which loads luas only).
Edit: I have also tried to build a proxy dll as described here: http://lua-users.org/wiki/LuaProxyDll. All 4 methods failed (or maybe it's just me). Hope that will help anyone trying to do the same.
Steps I took:
First, disable DEP to be able to load our dll. If you cannot disable DEP, you will run into errors like I did (and still do).
You will need to disable software and hardware DEP. Software DEP is disabled like this:
Code: Select all
bcdedit.exe /set {current} nx AlwaysOff
Second, you need to get a 64 bit compilator - game uses 64-bit version of lua and doesn't like 32 bit dlls (this is just a guess, not 100% confirmed). I used gcc from http://winbuilds.org/. Download the installer, install everything, veryfy that it is working by typing 'gcc' in console. If it is not working - check your PATH or invoke it directly from the installation directory.
Third, write your dll. This is the hardest part, so I chose to get the source from the internet. Fourth, compile it.
Code: Select all
gcc -O2 -c -o test.o test.cpp
gcc -O -static -o test.dll test.o
You can also try to build a shared library. To do so, get Lua 5.1.5 windows x64 build - https://sourceforge.net/projects/luabin ... p/download . Put lua5.1.dll along with test.cpp, compile:
Code: Select all
gcc -O2 -c -o test.o test.c
gcc -O -shared -o test.dll test.o -L . -llua5.1
Code: Select all
require('test')
test.add1(2)
Code: Select all
var add1 = package.loadlib('test','add1')
add1(2)
If you have shared library, game loads your dll AND lua5.1.dll, which results in soft hang - game is running, but the screen is frozen, inputs are not working. I see 2 possible problems with is:
- Internal lua engine conflicts with lua5.1.dll;
- dll is missing something.
If you have a static library, game tries to load your dll, but DEP is preventing it to load, crashing with BEX64/StackHash errors. I was unable to disable hardware part of DEP - my BIOS is missing settings. I have also tried disabling antivirus, turning on compability settings, running as admin - same error. This bug needs to be reproduced on another machine, maybe the problem is in my pc. There is also a possibility that I don't fully understand the mechanism of loading shared/static libraries and static lib is worthless.
I have also tried to load the dll using Fox module methods by calling them one by one with 'test' as parameter. Unfortunately it didn't work and I haven't seen any low-level C modules in the game that had functions with ability to load stuff (aside from Script.LoadLibrary, which loads luas only).
Edit: I have also tried to build a proxy dll as described here: http://lua-users.org/wiki/LuaProxyDll. All 4 methods failed (or maybe it's just me). Hope that will help anyone trying to do the same.
You do not have the required permissions to view the files attached to this post.
-
- ultra-n00b
- Posts: 2
- Joined: Sat Aug 26, 2017 9:19 pm
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
I have a question. Is it possible to locate the E3 2013 foliage textures and models stored on Phantom pain?
I am curios if they could be used to replace the existing foliage and trees use in Afghanistan's map. if they don't exist within Phantom Pain then maybe they could be re-created? it might be worth a shot.
I am curios if they could be used to replace the existing foliage and trees use in Afghanistan's map. if they don't exist within Phantom Pain then maybe they could be re-created? it might be worth a shot.
-
- ultra-n00b
- Posts: 1
- Joined: Thu Sep 14, 2017 1:10 pm
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Hi mate i'm from PES editing community and i'm asking you for help about ftex files similair to what you patched .atvaark wrote:They can also be unpacked by my patched tool.CreaseInTime wrote:You're a lifesaver, atvaark. Thanks!
Quick edit, is there any possibility you could get the other textures associated with it, linked here? They give the same error.
https://my.mixtape.moe/ntfndx.zip
I won't be releasing the patch because I can't test if it breaks converting other textures and this bug only appears with <1% of all textures I guess.
when convert .ftex to .dds with your tool it comes with black dds so i think your patched tool is the solution for this problem ..
-
- advanced
- Posts: 75
- Joined: Sat Apr 09, 2016 5:36 pm
- Has thanked: 4 times
- Been thanked: 13 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
I think you should make an issue here - https://github.com/Atvaark/FtexTool/issuesFirasZinou wrote: Hi mate i'm from PES editing community and i'm asking you for help about ftex files similair to what you patched .
when convert .ftex to .dds with your tool it comes with black dds so i think your patched tool is the solution for this problem ..
-
- ultra-n00b
- Posts: 1
- Joined: Mon Oct 02, 2017 7:39 pm
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Hi, im new to this forum but i was send here by Atvaark.
I was in the idea of making an asthetic mod for the mgo part of the game more precise for the weapons, since we all know is not very active with zero support from the developers and probably gonna get shut down next year with the coming of MG Survive, so i said "why the hell not?". The question is: if anyone has any idea where the colour for the weapons of mgo are located? i which lua file? or where? any help would be welcome.
I did find the colours for the gear that was very easy Assets>Mgo>Config>Gear, and there i could find the hashes that the game uses for the colours, for example com_c72 is golden and com_c18 is silver, i could even put camo pattern on gear that didn't had such colour available, so im guessing it can be done for the weapons i just gotta find where they are located.
I was in the idea of making an asthetic mod for the mgo part of the game more precise for the weapons, since we all know is not very active with zero support from the developers and probably gonna get shut down next year with the coming of MG Survive, so i said "why the hell not?". The question is: if anyone has any idea where the colour for the weapons of mgo are located? i which lua file? or where? any help would be welcome.
I did find the colours for the gear that was very easy Assets>Mgo>Config>Gear, and there i could find the hashes that the game uses for the colours, for example com_c72 is golden and com_c18 is silver, i could even put camo pattern on gear that didn't had such colour available, so im guessing it can be done for the weapons i just gotta find where they are located.
-
- advanced
- Posts: 75
- Joined: Sat Apr 09, 2016 5:36 pm
- Has thanked: 4 times
- Been thanked: 13 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Try updated dictionaty - https://github.com/TinManTex/mgsv-looku ... t?raw=true or https://github.com/TinManTex/mgsv-looku ... t?raw=trueThomas Anderson wrote:Hi, im new to this forum but i was send here by Atvaark.
I was in the idea of making an asthetic mod for the mgo part of the game more precise for the weapons, since we all know is not very active with zero support from the developers and probably gonna get shut down next year with the coming of MG Survive, so i said "why the hell not?". The question is: if anyone has any idea where the colour for the weapons of mgo are located? i which lua file? or where? any help would be welcome.
I did find the colours for the gear that was very easy Assets>Mgo>Config>Gear, and there i could find the hashes that the game uses for the colours, for example com_c72 is golden and com_c18 is silver, i could even put camo pattern on gear that didn't had such colour available, so im guessing it can be done for the weapons i just gotta find where they are located.
-
- advanced
- Posts: 68
- Joined: Thu Dec 24, 2015 7:45 am
- Has thanked: 10 times
- Been thanked: 10 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Forgot to post this here.
Fmdl Studio v2
Unity based fmdl importer and FBX exporter (and planned to be fmdl exporter).
Can currently:
-Read fmdl data and build the model in Unity.
-Apply diffuse textures to the model if the textures are in a folder with the model's name located in the Fmdl Studio v2 folder.
-Export rigged and (diffuse) textured models from Unity to the FBX format. (The FBX by default will look for textures in a folder with the fmdl's name at the same location the fbx is located.)
To do list:
-Implement a better system for handling textures. Edit: Done!
-Apply textures other than diffuse to the model. Edit: Partially done. Normal maps are supported as well now.
-Apply more than the first UV set to models with multiple UV sets. Edit: Done!
-Do something with the numerical material parameters.
-Write Unity data back to the fmdl format.
https://github.com/BobDoleOwndU/FMDL-Studio-v2
Requires Unity 2017.2+.
Fmdl Studio v2
Unity based fmdl importer and FBX exporter (and planned to be fmdl exporter).
Can currently:
-Read fmdl data and build the model in Unity.
-Apply diffuse textures to the model if the textures are in a folder with the model's name located in the Fmdl Studio v2 folder.
-Export rigged and (diffuse) textured models from Unity to the FBX format. (The FBX by default will look for textures in a folder with the fmdl's name at the same location the fbx is located.)
To do list:
-Implement a better system for handling textures. Edit: Done!
-Apply textures other than diffuse to the model. Edit: Partially done. Normal maps are supported as well now.
-Apply more than the first UV set to models with multiple UV sets. Edit: Done!
-Do something with the numerical material parameters.
-Write Unity data back to the fmdl format.
https://github.com/BobDoleOwndU/FMDL-Studio-v2
Requires Unity 2017.2+.
Last edited by BobDoleOwndU on Tue Nov 28, 2017 12:14 am, edited 1 time in total.
- lionheartuk
- double-veteran
- Posts: 749
- Joined: Tue May 16, 2006 10:55 pm
- Location: Everywhere
- Has thanked: 34 times
- Been thanked: 42 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
That sounds awesome!BobDoleOwndU wrote:Forgot to post this here.
Fmdl Studio v2
Unity based fmdl importer and FBX exporter (and planned to be fmdl exporter).
Can currently:
-Read fmdl data and build the model in Unity.
-Apply diffuse textures to the model if the textures are in a folder with the model's name located in the Fmdl Studio v2 folder.
-Export rigged and (diffuse) textured models from Unity to the FBX format. (The FBX by default will look for textures in a folder with the fmdl's name at the same location the fbx is located.)
To do list:
-Implement a better system for handling textures.
-Apply textures other than diffuse to the model.
-Apply more than the first UV set to models with multiple UV sets.
-Do something with the numerical material parameters.
-Write Unity data back to the fmdl format.
https://github.com/BobDoleOwndU/FMDL-Studio-v2
Requires Unity 2017.2+.
Will it be supporting terrain in the near future?
-
- advanced
- Posts: 68
- Joined: Thu Dec 24, 2015 7:45 am
- Has thanked: 10 times
- Been thanked: 10 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Another project, FoxKit, is working on getting terrain/map importing working. It utilizes Fmdl Studio v2 for its model stuff.lionheartuk wrote:That sounds awesome!
Will it be supporting terrain in the near future?
You can follow FoxKit here: https://github.com/youarebritish/FoxKit.
-
- n00b
- Posts: 13
- Joined: Thu Oct 29, 2015 9:23 pm
- Been thanked: 7 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
To add to that, terrain has a completely different format from the other models, so it's outside the scope of Fmdl Studio. Terrain support's still a while off but it's definitely feasible.
-
- n00b
- Posts: 13
- Joined: Thu Oct 29, 2015 9:23 pm
- Been thanked: 7 times
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
I've gotten most of the .obr format figured out. Here's a template:
Object Brush (obr) files are used in Cyprus and Mother Base to place grass, bushes, and other misc semi-procedural debris. There's a corresponding _objBrush.fox2 which sets up data such as what fmdl to place. I believe v2 and v3 are components of a location, rotation, or scale but am not sure just yet. I also believe v5a is some kind of index, but I'm not sure into what yet.
Code: Select all
//------------------------------------------------
//--- 010 Editor v7.0.2 Binary Template
//
// File: obr.bt
// Authors: youarebritish
// Version: 0.1
//------------------------------------------------
struct Header
{
ushort u1; // Always 3?
ushort u2; // Always 32?
uint fileSize;
uint ObjectBrush <hidden=true>; // Hash for "ObjectBrush"
uint ObjectBrushOffset; // Points to the text "ObjectBrush"
FSkip(6*4);
uint u3; // Always 1?
uint numBlocksHOffset;
uint offset1; // Near the bottom if there are objects
FSkip(4*4);
uint u4;
FSkip(8);
FSkip(16);
struct HeaderMetadata
{
ushort u1;
ushort u2;
uint variableNameHash <hidden=true>;
uint u3; // Always 76?
uint value;
};
HeaderMetadata blockSizeWmetadata;
HeaderMetadata blockSizeHmetadata;
HeaderMetadata numBlocksWmetadata;
HeaderMetadata numBlocksHmetadata;
HeaderMetadata numObjectsmetadata;
} header;
FSkip (80);
struct Object
{
float yTranslation;
float v2;
float v3;
ushort v4a;
ushort v4b; // Some kind of offset?
ushort v5a;
ushort v5b; // Some kind of offset?
uint id;
} objects[header.numObjectsmetadata.value];