How to edit and successfully compile DeusExUI class?

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
User avatar
DevAnj
UNATCO
Posts: 106
Joined: Sun Aug 02, 2015 2:16 am

How to edit and successfully compile DeusExUI class?

Post by DevAnj »

I want to edit the UI in Deus Ex, but everytime I try to run ucc make on a decompiled UI class, it doesn't find the images at all, even though they're stored in the Images folder of the decompiled class. I tried putting them into new folders within the Image folder once I saw what the uc file was pointing to, but still no luck. How to do this?
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: How to edit and successfully compile DeusExUI class?

Post by Cybernetic pig »

Compile them into a new package.
User avatar
DevAnj
UNATCO
Posts: 106
Joined: Sun Aug 02, 2015 2:16 am

Re: How to edit and successfully compile DeusExUI class?

Post by DevAnj »

And if I make them a new package, how am I going to see the changes I made to the UI in game?

Also how to recompile DeusEx.u? I made my changes and it compiles fine until a point where it asks me to overwrite a DeusExClasses.h file. If I choose yes, it gives an error and shuts down, and if I choose no, it gives a broken DeusEx.u file that makes the game not load and function properly.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: How to edit and successfully compile DeusExUI class?

Post by Hanfling »

Exporting headers will fail when it doesn't have the <pkg>\Inc dir, so you need to create that before, however whether you export headers or not has no impact on the package file created.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
DevAnj
UNATCO
Posts: 106
Joined: Sun Aug 02, 2015 2:16 am

Re: How to edit and successfully compile DeusExUI class?

Post by DevAnj »

Ok I think I will elaborate on what I want to do with the UI, and what error I get with recompiling DeusEx.u .

I want to change a few parts of the UI, while retaining the rest from the game. I want to test this by extracting the UI package, changing the textures I want to change, and recompiling. However, once I have extracted the UI package, recompiling the package always makes the UCC program not detect the images in it, regardless of whether I changed any images or not. I've tried this on a fresh install, by the way.

Also thing with the DeusEx.u is that I want to change some things in the Credits screen. When I extract, change what I want in Notepad, and recompile, it works fine until it asks for the headers to be rewritten. Saying yes makes it crash, saying no gives me a DeusEx.u that will let me play the game, but with a non functional main menu, several textures and objects not loading, and a generally bad experience.

How to fix these problems?
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: How to edit and successfully compile DeusExUI class?

Post by Hanfling »

I would recommend to not change base packages themself, but make another package with replacement classes in. You could start with an own rootwindow class, etc..

For the header file problem. Lets say if you want to be able to export headers for package FooBar, you would create a DeusEx\FooBar\Inc directory, so it can write the files there. And you should not add or remove variables on natives packages if you really edit the base packages themself (which might explain the problems). However if some parts of code won't work, you should post the changes here, so we can have a look at them. Also you could try first with just rebuilding the package without changes. Also worth to mention is that the defaultproperties inside the exported classes are not necessarily what the original source file had set. Despite that you only get inside defproperties what is different compared to the parent class, you also get a lot of stuff which is inside your ini and int files (You could however avoid this to some degree with using stub int and largely stripped down ini files). One example of what gets really odd is the EditorEngine.EditPackages which was never inside the source defproperties and causes crashes later when you actually rebuild them with EditPackages later.

If you have textures, lets say in an utx file (lets say FooUI.utx) and the game can't find them, you will likely need to add some #exec obj load FILE=FooUI in one of the classes of your package.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
DevAnj
UNATCO
Posts: 106
Joined: Sun Aug 02, 2015 2:16 am

Re: How to edit and successfully compile DeusExUI class?

Post by DevAnj »

Hanfling wrote: Also you could try first with just rebuilding the package without changes.
I did try this for both packages, and both don't compile well. First one outright fails to find textures, because it expects the textures to be arranged under different folders like "Textures/UI/xxx.pcx" whereas the WOTgreal exporter just dumps all the images under the folder Images. Making actual folders had better results, as in I got a file that lets me play the game, but with the text and a bunch of stuff missing.

The second one compiles fine until it asks for the headers to be updated like I said, and choosing no gives a file that works but makes the game not load textures and not have menus behave properly.

I guess the best thing to do is to make custom packages extending the original packages indeed, but how to make the game load my packages?
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: How to edit and successfully compile DeusExUI class?

Post by Cybernetic pig »

DevAnj wrote:And if I make them a new package, how am I going to see the changes I made to the UI in game?
By referencing them from DeusEx.u.
Also how to recompile DeusEx.u? I made my changes and it compiles fine until a point where it asks me to overwrite a DeusExClasses.h file. If I choose yes, it gives an error and shuts down, and if I choose no, it gives a broken DeusEx.u file that makes the game not load and function properly.
Make sure that no DeusEx.u is found by the compiler via EditPackages. If you for example have

EditPackages=/GMDX/System
EditPackages=/HDTP/System

Then the compiler will not like that it finds those DeusEx.u's when it attempts to compile the one into DeusEx\System.
DevAnj wrote:but how to make the game load my packages?
Place the package in DeusEx\System and the game will find it if it is referenced in DeusEx.u. For the editor to load it, you need to add a line to EditPackages in DeusEx.ini or just load the package from the editor interface.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: How to edit and successfully compile DeusExUI class?

Post by Hanfling »

Ah right the DeusExUI and other have a bunch of fonts in. Thats great fun to deal with.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: How to edit and successfully compile DeusExUI class?

Post by bjorn98009_91 »

The problem here is really that you exported the import script in DeusExUI from within the editor/via WOTgreal and that you don't have the image files in the correct places so the script fails to rebuild them.

Check out this file: https://code.google.com/p/deus-ex-enhan ... z&can=2&q=

It contains the script and the graphics where they should be so the package can rebuilt without issues, then it's just a matter or replacing with your own graphics. That being said, messing with the original files is not recommended and it's really better to go with the rootwindow approach. Make a new rootwindow class that extends the default DeusExRootWindow one, then override some functions to get control over what hud class is being used, and swap it to your own hud class so you can get your own menus in.
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: How to edit and successfully compile DeusExUI class?

Post by Hanfling »

Just checked it. The fonts are not correct. Not sure if they would show up ingame fucked up. Might be more of an issue for non english versions.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
Bird
NSF
Posts: 86
Joined: Sat Sep 19, 2009 3:24 pm
Location: between your synaptic gap

Re: How to edit and successfully compile DeusExUI class?

Post by Bird »

I. Install Deus Ex version 1.112fm
II. Download Deus Ex SDK: http://www.moddb.com/games/deus-ex/down ... dk-v1112fm
III. Install Deus Ex SDK

Here comes the fun part! Newbies, keep on reading. OP, go to step 3.

1) Grab your favourite text editor, open DeusEx.ini

Under

Code: Select all

[Editor.EditorEngine]
paste the following (preferably before
[DeusEx.DeusExGameInfo]):

Code: Select all

EditPackages=Core
EditPackages=Engine
EditPackages=Editor
EditPackages=Fire
EditPackages=IpDrv
EditPackages=UWindow
EditPackages=UBrowser
EditPackages=Extension
EditPackages=DeusExUI
EditPackages=ConSys
EditPackages=DeusExConversations
EditPackages=DeusExSounds
EditPackages=DeusExItems
EditPackages=DeusExDeco
EditPackages=DeusExCharacters
EditPackages=MPCharacters
EditPackages=DeusExText
EditPackages=IpServer
EditPackages=DeusEx
Save and Close DeusEx.ini

2) Fire up a Command Prompt, enter l33t mode:

Code: Select all

color 2
cd C:\DeusEx\System\
ucc batchexport deusexui.u Texture pcx C:\DeusEX\DeusExUI\Texture\
ucc batchexport deusexui.u Class uc C:\DeusEX\DeusExUI\Class\
After this batchexport-magic you will see an organised chaos in C:\DeusEX\DeusExUI\

To make sure everything is in order parse AllUI.uc and every pcx file's name
according to its #exec lines to avoid errors during re-compiling, like:

Code: Select all

#exec TEXTURE IMPORT FILE="Textures\Images\Image12_Vndnbrg_Sub_1.pcx"
NAME="Image12_Vandenberg_Sub_1"	GROUP="UserInterface"	MIPS=Off
Rename Image12_Vandenberg_Sub_1.pcx to Image12_Vndnbrg_Sub_1.pcx Keep doing
this with every corresponding file until you get utterly bored and depressed.

3) To skip this time-consuming and soul-destroying task aforementioned,
download this file, extract and copy it to C:\DeusEx\ respectively.

4) See the results for yourself, delete C:\DeusEx\System\DeusExUI.u
5) Run

Code: Select all

ucc make
IV. Have fun modding Deus Ex!

Would you like to know how to make ingame fonts look even bigger, prettier yet
messier without hacking PCX files via TrueTypeFontFactory and with the shaping
touch of HandelGotDLig? Ask away and I am going to write an other tutorial for
that.

PS: DeusExUI.7z is an archive containing a vanilla version of files.
ecs
Thug
Posts: 29
Joined: Fri Oct 13, 2023 6:24 am

Re: How to edit and successfully compile DeusExUI class?

Post by ecs »

Discover the latest Trousers Design at ECS. Our collection features the best styles and colors to suit any occasion. Shop now and enjoy our great offers on women's trousers.
houseofflowers
Thug
Posts: 27
Joined: Fri Oct 13, 2023 7:54 am

Re: How to edit and successfully compile DeusExUI class?

Post by houseofflowers »

Discover our anniversary flowers to celebrate your day with love and togetherness. Our unique blooms are a lovely way to mark another joyful year. To express your love on this particular day, choose these amazing flowers.
Borjan
Thug
Posts: 24
Joined: Fri Oct 13, 2023 10:48 am

Re: How to edit and successfully compile DeusExUI class?

Post by Borjan »

Borjan presents the best collection of formal shoes for men online in Pakistan. Explore the variety of men's formal shoes online at Borjan. Grab your favorite shoes online at affordable prices today.
Post Reply