Jump to content

Why no compiler?


Sairon

Recommended Posts

Looking at the wiki & having a look at both UE explorer & UPK utils it would seem the UPK file format is more or less entirely reverse engineered for unreal engine 3, which leads me to the question why there's no compiler? I'm considering having a stab at making one but I'm kind of curios if I'm missing something.

Link to comment
Share on other sites

But you can't use UDK for scripting xcom right? Since the project isn't public instead it seems people decompile using UE explorer, work out new statement & translate it to hex, and then patch it. I'm hoping to be able to recompile the UE explorer decompiled code into a working UPK again, skipping the hex editing altogether.

Link to comment
Share on other sites

As I understand it, the major obstacle to compiling "Cooked" UPK files is that would require access to proprietary Firaxis library files, which are simply not available (we've asked). Also, IIRC there are some "license key" issues between the Firaxis and public UDK versions of the resulting "UPK" files. (This would be covered in the forum threads referenced in the wiki article below.) Without those, various "native function" references (essentially "black boxes") buried all over the place cannot be resolved.

 

Currently we can add new scripting via the UDK, by using "dummy stubs" or "simulated functions" for the native function references via the built-in "mutator" function. See "Add new scripting" in the "Modding with the UDK" wiki article.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Some scripting could also be done with kismet, I've made stubs for the classes I need for doing map patches. https://github.com/iiiLiQuiDiii/UDK

You can make your own kismet widgets which use xcom stubs. Or mutators which use them.

 

Also, Wastelandghost has made a hex-to-pseudocode translator (along many other tools, kudos to her), it transforms compiled UDK scripts in pseudo-code which you can alter and then use UPK utils to compile it back. It's not super user friendly, but it's VERY useful.

Edited by LiQuiD911
Link to comment
Share on other sites

Many xcom mods are not complete functions or classes, they're small patches to existing functions and classes to slightly or not-so-slightly change behavior. The most recent upkutils builds are basically a upk assembler since the addition of labels and automatic jump offset computation. Really all that's missing are some aliases for common opcode mnemonics and maybe macros for creating higher-level control structures like for or while loops or even struct member access. Since we can't (easily) introduce new names, variables, or members to the existing classes having a full compiler doesn't give us *too* much more IMHO than we already have with the assembler, although macros would be really nice for handling complex expressions involving lots of struct member accesses.

 

The source code for upkutils is up on github if you'd care to fork it and add some additional features.

 

More complex mods like a couple of mine have completely new packages and these can just use the UDK compiler with stub classes, like LiQuiD911 mentioned. All that's really missing there is the ability to automatically generate stubs from the upk instead of manually copying and pasting the function signatures from UE Explorer. Which would be nice to have, but I'm not really super interested in doing it myself because stub classes should disappear entirely with XCOM2 due to us getting full access to the real game scripts.

Link to comment
Share on other sites

I have the feeling that this will be even better than skyrim steam workshop, I just hope Firaxis will also share some XCOM EU model assets, or we'll have to rip the animations in some way. XCOM 1994 , 2012 and LW will be remade in the new engine , it's inevitable :) I'd love to see mass effect assets in xcom 2 mods but EA would sue instantly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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