Jump to content

Mod Distribution/Automation Program


Daemonjax

Recommended Posts

  • Replies 108
  • Created
  • Last Reply

Top Posters In This Topic

Ahh well, sorry guys... Beta isn't going to happen this weekend.

 

It's just not quite usable enough.

 

It's a solid Alpha, however, and another day or two it'll be good enough to call Beta.

 

See you then.

No worries... looking forward to it, but better to get things working properly than rush it out (right, big commercial game devs? :) ).

 

Thanks heaps for all your work on this!

Edited by banjo_oz
Link to comment
Share on other sites

I am currently looking at a simple way to modify a UPK directly via sed:

 

http://sourceforge.net/projects/gnuwin32/files/sed/

 

As a general view you could create a single text file with a special tag for the file name and then pairs of lines of HEX values, the first one with the original to search for and the following link with the one you want to replace. Then a simple script to process the file and call sed to make the replacements in the UPK file.

 

Not sure what path you are taking, maybe there is a simpler way.

Link to comment
Share on other sites

I am currently looking at a simple way to modify a UPK directly via sed:

 

http://sourceforge.net/projects/gnuwin32/files/sed/

 

As a general view you could create a single text file with a special tag for the file name and then pairs of lines of HEX values, the first one with the original to search for and the following link with the one you want to replace. Then a simple script to process the file and call sed to make the replacements in the UPK file.

 

Not sure what path you are taking, maybe there is a simpler way.

 

That sounds pretty risky to me; wouldn't there be a pretty high chance that your "original" hex string accidentally occurs more than once? Then you'd probably change the wrong one and who knows what would happen. Or, if you made your search string long enough to avoid finding it more than once, then it might become so long that it includes other nearby values that you also want to change, so depending which replacement is tried first, one of them won't find what it's looking for.

 

If the goal is to encode mods as change scripts rather than distributing complete replacements of UPK files, both for legal reasons and to allow multiple mods to make separate independent changes, then it seems more reliable to me (but of course harder) to solve the problem of decoding and then re-compiling the bytecode. Then you can apply your patches to the "source code" in text form, which will make it much easier to target exactly the right bit of logic, and then re-compile it.

Link to comment
Share on other sites

it seems more reliable to me (but of course harder) to solve the problem of decoding and then re-compiling the bytecode. Then you can apply your patches to the "source code" in text form, which will make it much easier to target exactly the right bit of logic, and then re-compile it.

 

How sweet that would be...

I don't see it happening anytime soon though. We would need Firaxis to give us the (de)compiler, wouldn't we ? Is it even possible to reverse engineer one ?

Link to comment
Share on other sites

it seems more reliable to me (but of course harder) to solve the problem of decoding and then re-compiling the bytecode. Then you can apply your patches to the "source code" in text form, which will make it much easier to target exactly the right bit of logic, and then re-compile it.

 

How sweet that would be...

I don't see it happening anytime soon though. We would need Firaxis to give us the (de)compiler, wouldn't we ? Is it even possible to reverse engineer one ?

I haven't messed with the UPK files myself yet, but I see people posting snippets of what looks like game logic, so I think it's possible to decode it to some extent using some existing tool(s). What I think is not yet possible is re-compiling that code and getting the game to accept it. But again, I don't know the details; Daemonjax or somebody else working on that stuff would know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...