Jump to content

Any updates on whether in-game models are replaceable?


Wraithdrof

Recommended Posts

Pretty much any Hex Editor would work, but HxD is easy enough to use (GUI interface) and you can expect to find people with experience with it here if needed. It's what was used to illustrate the documentation of that portion of the "Hex Editing UPK Files" wiki article, and it's free.

 

The primary thing that trips people up is to forget to set the "datatype" field in the search option (hex or string, unicode, etc.). It shows a split screen with hex on the left and the printable ASCII on the right. (Non-printable ASCII values appear as periods ("."), which is why searching for hex works better most of the time.) Changes to either side are immediately reflected on the other. Has an "undo" function as well. See the download site blog for other help.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Sorry, I don't mean how to use it - how does it actually look into the UPK files and edit the data?

 

I'm guessing you've never used a hex editor before. That, or you have no idea how they work. Hex editors edit the actual bytes which compose the file. Hex strings are virtually unreadable. We use UE explorer to find what the original hex was, then we change it in a hex editor. What we are trying to do now is find what location in the code the hex is located.

Link to comment
Share on other sites

Sorry, I don't mean how to use it - how does it actually look into the UPK files and edit the data?

A compiled program consists of hex code. (The hex code itself depends upon the platform architecture (Intel, AMD, Mac/Linux, etc.) the code is compiled for.) This applies to both the EXE and the "uncompressed" but "cooked" UPK files. A Hex Editor can directly read and manipulate that hex code, but has no preconceived idea as to it's purpose. It's just going to show you every byte as it finds it. YOU have to provide that "framework" of how it is organized. Which is why you need to have an idea from the previously referenced UPK Data Format document and what the UE Explorer program shows you.

 

Finding the location of the desired hex code is the "art" of hex editing. It depends upon determining a unique sequence of hex code that you can search on. Unfortunately this is seldom as simple as looking for a plaintext string. Usually it requires knowing the UnrealScript code you need (i.e. from UE Explorer or source code) and the hex code representation of that UnrealScript (which is either in the "Hex Values XCOM Modding" wiki article or other articles in that file's "References" section). The "Hex editing the UPK" wiki article walks you through the basic process, but in this instance you still have to figure out what UnrealScript code you need to look for. That is going to require trial and error, and lots of patience.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

And I'm guessing UPKs have their own code style for models too, as well as just their scripts.

 

Is there any method to the madness that Unreal uses to package a UPK? If we get the same version of UE that XCOM was made in, would we be able to figure out the HEX codes by:

  • Extracting a model from an XCOM UPK
  • Putting the model in a functional project within UE
  • Compiling the project into a UPK
  • Getting the much-easier-to-find HEX values that holds all the vertices in the new UPK
  • and using them in a ctrl+f search on the original UPK to locate the equivalent model's HEX values

The issue is that there WILL be a limit to the amount of things that we can change within the UPK, because all it is really is an optimized and compressed version of all the source files. And the compression in this case is likely only going to be one-way, as the engine and computer can fill in the gaps. Changing a value for a variable could be a very different beast to changing an actual mesh.

Link to comment
Share on other sites

The umodel program, made by the same person as ue explorer, can view the models in a upk. So it clearly knows how to locate and visualize the vertex data. I believe at least part of the library that is used under ue explorer has been open sourced, but I'm not sure if that includes the part that can analyze a model or not.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...