Hellgate Revival :: Forums

Hellgate: London (Single Player) => Reanimator => Topic started by: Xyloritus on Dec 04, 2015; 02:22 AM

Title: Need help replacing textures
Post by: Xyloritus on Dec 04, 2015; 02:22 AM
I'm planning on replacing hud textures and maybe entire UI. But I'm new to modding this game and I need some basic instructions. Already tried to cook test texture with Reanimator and put the files in Data but I can't see it in the game. What am I missing?
Title: Re: Need help replacing textures
Post by: Malachor on Dec 04, 2015; 03:22 AM
What is your test texture? That's probably more of a rhetorical question.
Anyway, I'll go through the basics from extracting a file to packaging it.

Extracting.
Open Reanimator(assuming the use of version 1135).
Click on View->File Explorer
A new window appears, labeled Hellgate File Explorer. The File Explorer tab should be selected.
Down the left side is a folder structure starting with data and it's child folders, and then data_common with it's.
Go down to uix, and click on the + to expand it.
There a couple of folders, but they're probably not necessary at this stage.
Check the boxes of all of the .dds files since they're the texture files (obvious comment is obvious).
Click on the button to the right labeled Extract to...
Select where you want the files to be selected, which will in your Reanimator folder. Keep folder structure intact. Ensure you have the files in data/uix/
Close Reanimator.

Open the file(s) in your image editing program, and edit to your hearts content.
Once you're happy, save them using the same format as the original (obviously).

Run Hellpack.exe.
Go into Reanimator/data/ you should see a folder named uix, and a .dat and a .idx file, both named the same.
Move them into your games data folder.
Start the game, look for your changes.

I think I've covered the main parts, any questions let me know.
I look forward to seeing what you create.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 04, 2015; 04:33 PM
I had this idea after coming back to play Hellgate after a long break. But since the last time I played I got used to modern huds that don't cover 20% of the screen  ;)

It works now :D

First step is removing hud masks. Then I'll start making new graphics. 
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_04_15_18_31_028.png)

Is it possible to move gui elements around? I could make it use the entire screen for 16:10 and 16:9 resolutions. And maybe I could prevent the ui from streching. I saw some xmls but they're encrypted and I'm not sure they have hud coordinates.
Title: Re: Need help replacing textures
Post by: Dank Rafft on Dec 04, 2015; 05:45 PM
Welcome Xyloritus,

just a question that has nothing to do with the topic: Do you use SweetFX or something alike? If so, would you share your preset?
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 04, 2015; 07:57 PM
Welcome Xyloritus,

just a question that has nothing to do with the topic: Do you use SweetFX or something alike? If so, would you share your preset?

Yes, I'm working on a preset for reshade framework. I will share it when it's finished because it will probably include a mask for my hud to exlude it from postprocessing.


Some progress:
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_04_18_52_28_225.png)

Energy shield bar prototype. Should I leave it yellow? Share your thoughts. Using material design icons to replace the old ones.
Title: Re: Need help replacing textures
Post by: Dank Rafft on Dec 04, 2015; 08:45 PM
Welcome Xyloritus,

just a question that has nothing to do with the topic: Do you use SweetFX or something alike? If so, would you share your preset?

Yes, I'm working on a preset for reshade framework. I will share it when it's finished because it will probably include a mask for my hud to exlude it from postprocessing.


Some progress:
(click to show/hide)

Energy shield bar prototype. Should I leave it yellow? Share your thoughts. Using material design icons to replace the old ones.
Great, I like it. :)
Title: Re: Need help replacing textures
Post by: Malachor on Dec 05, 2015; 04:16 AM
I had this idea after coming back to play Hellgate after a long break. But since the last time I played I got used to modern huds that don't cover 20% of the screen  ;)

It works now :D

First step is removing hud masks. Then I'll start making new graphics. 
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_04_15_18_31_028.png)

Is it possible to move gui elements around? I could make it use the entire screen for 16:10 and 16:9 resolutions. And maybe I could prevent the ui from streching. I saw some xmls but they're encrypted and I'm not sure they have hud coordinates.
Yes, you can move gui elements around, use the File Explorer in Reanimator to look in data/uix/xml. The xml files ending in _atlas.xml describe what elements(position and size) are in the .dds files a level up.

And please don't use spoiler tags in your images, it's too hard to scroll across the image, especially if it's zoomed in. As soon as I move my cursor down to the scrollbar, the picture's gone.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 07, 2015; 08:07 PM
Apparently Revival mod reverts my changes in inventory panel textures. How can I make my changes compatible with Revival mod?
Title: Re: Need help replacing textures
Post by: Malachor on Dec 08, 2015; 01:01 AM
It would help if you posted a bit more information about what you're doing.
Are you installing your changes before or after installing Revival?
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 08, 2015; 01:18 AM
Revival installed all the time. There's 7 ui textures in my mod now and all of them seem to replace the vanilla ones but wsinventory_atlas.dds is replaced only when I delete sp_hellgate_1337_1.5.0.*
I don't know how Revival changes the ui so I don't know how to work around this.


Another thing I've noticed - there's a bug for some resolutions. My monitor is 1600x900 and ui elements are a bit stretched and misaligned. It's hard to mod the ui because of this. I've looked through the xmls and  found out there are some kind of scaling attributes in first lines of files, e.g. main_new_atlas.xml

<atlas>
<file>data\uix\main_new_atlas.png</file>
<widthbasis>1600</widthbasis>
<heightbasis>1200</heightbasis>
<ws_widthbasis>1920</ws_widthbasis>

tried to experiment with different values but can't see any logic in that yet. If anyone cracked it already I'd appreciate some help  ;D

WIP
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_07_17_42_49_960.png)

(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_07_03_04_32_067.png)
Title: Re: Need help replacing textures
Post by: bleedingapathy on Dec 08, 2015; 02:10 AM
I think I like what your doing with the ui than the original looks. best luck with your endevors
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 08, 2015; 02:26 AM
Thank you. Hellgate is one of my favourite games ever and this mod is my tribute.
Title: Re: Need help replacing textures
Post by: Dank Rafft on Dec 08, 2015; 01:35 PM
Revival installed all the time. There's 7 ui textures in my mod now and all of them seem to replace the vanilla ones but wsinventory_atlas.dds is replaced only when I delete sp_hellgate_1337_1.5.0.*
I don't know how Revival changes the ui so I don't know how to work around this.


Another thing I've noticed - there's a bug for some resolutions. My monitor is 1600x900 and ui elements are a bit stretched and misaligned. It's hard to mod the ui because of this. I've looked through the xmls and  found out there are some kind of scaling attributes in first lines of files, e.g. main_new_atlas.xml

<atlas>
<file>data\uix\main_new_atlas.png</file>
<widthbasis>1600</widthbasis>
<heightbasis>1200</heightbasis>
<ws_widthbasis>1920</ws_widthbasis>

tried to experiment with different values but can't see any logic in that yet. If anyone cracked it already I'd appreciate some help  ;D
I don't about directly putting your files in the game's folder but you could also apply your changes by putting them in a standalone mod file and install it afterwards you've installed Revival. For a base frame you could extract the Revival mod zip (or any other mod which works similar: Nagahaku, NagaOptionals, etc.). You basically need an install.xml and the folder structure beginning with data, data_common, etc., just like in Reanimator. You should check if there are any files in the Revival data structure that you use for your mod. If there are any use them (copy them) to apply your changes on them.

The basic install.xml should look like this:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<revival>
<modification id="sp_hellgate_1234_1.0">
<release>MyModName</release>
<version>1.0</version>
<author>Your Name</author>
<website></website>
<revert>false</revert><!--Automatically revert all modifications without warning. Not recommended for fan mods.-->
<dependencies>
<patch>sp_hellgate_1.10.180.3416_1.18074.70.4256</patch><!-- FSS SP 1.2 -->
</dependencies>
<description>For when you want a description of your mod.
</description>
<script type="optional"><!--Possible types are optional, recommended, hidden and disabled.-->
<title>Just a placeholder option</title>
<description>Here you can describe the placeholder option.</description>
</script>
</modification>
</revival>

Then repack the install.xml and the folder structure with your dds and xml files in a zip file which has the format "mymodname.mod.zip" and install it with the Revival launcher like you did with Revival. It overrides necessary files and the game uses your changes on #1 priority.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 08, 2015; 01:43 PM
Thanks very much, I'll do that.

Still looking for solution for unsupported resolutions ui stretching.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 08, 2015; 08:01 PM
I've analysed install.xml and I don't see any benefit of using it for my mod. It has extraction scripts for the updates and installation of optionals. Apart from that there's no magic in the installer, it simply extracts mod files to data folder. Correct me if I'm wrong. And Revival mod doesn't have any inventory textures so I'm still trying to figure out why it reverts my textures to default.

WIP
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_08_18_33_48_639.png)

(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_08_18_36_11_916.png)
Title: Re: Need help replacing textures
Post by: Dank Rafft on Dec 08, 2015; 09:11 PM
I've analysed install.xml and I don't see any benefit of using it for my mod. It has extraction scripts for the updates and installation of optionals. Apart from that there's no magic in the installer, it simply extracts mod files to data folder. Correct me if I'm wrong. And Revival mod doesn't have any inventory textures so I'm still trying to figure out why it reverts my textures to default.
The install.xml doesn't have anything to do with your issues and is completely irrelevant for you. As I said, you basically just need the one I posted before - to make your mod package work. The crucial part is what's inside the the data folders of the mod. There are all the mod files which might override your changes. The install.xml is just important when you want to specify some optional changes for your mod.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 09, 2015; 12:07 AM
Followed your instructions and installed my mod trough the launcher. Just as I thought it makes no difference and still inventory texture reverts to vanilla because of Revival mod. Options and hud textures are working though. My mod has only textures, no xmls yet. I have no idea why this is happening. Maybe it has something to do with extended stash? Or Revival somehow forces the game trough xml to use original file instead modded one?
Title: Re: Need help replacing textures
Post by: Malachor on Dec 09, 2015; 12:55 AM
Did you install Revival first? How are your ui files installed?
The game uses a time/date stamp priority, so it will use files with a later time/date over those with an earlier one.
You could use Hellpack.exe, then copy the created .dat/.idx(ensure they have a different name, just change the numbers) files into the game's data directory and load the mod that way for testing.

The <heightbasis> stuff is probably what the developers used as their starting resolutions for creating the ui. 1600 by 1200 for non widescreen, 1920 by 1200 for widescreen.
So I imagine you're going to have a bit of trouble trying to use a nonscaled ui, since yours is lower.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 09, 2015; 01:10 AM
I think I found the problem. Why is widescreen texture commented out in Revival?

    <!-- js --<ws_texture>WSinventory_atlas</ws_texture>-->


Regarding ui scaling: I know there's always scaling if resolution is lower than xml. The problem is that game scales ui for 16:9 resolutions same as for 16:10. So everyone who has 16:9 monitor gets some stretching and ui elements are a bit misaligned. I want to find a way to fix scaling for 16:9 without breaking ui coordinates.

edit:

GOOD NEWS (for 16:9 monitor owners)

I've managed to fix the ui scaling bug. The game is showing ui properly now :)

proof:
(https://dl.dropboxusercontent.com/u/4563652/hellgate_sp_dx10_x64_2015_12_09_02_11_45_238.png)
Title: Re: Need help replacing textures
Post by: Malachor on Dec 09, 2015; 06:56 AM
I think I found the problem. Why is widescreen texture commented out in Revival?

    <!-- js --<ws_texture>WSinventory_atlas</ws_texture>-->

Because we're using the multiplayer version of the file, which has that and some of these comments
        <!-- js --<ws_x>198</ws_x>-->
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 09, 2015; 02:32 PM
It loads non ws version of inv texture for some reason. Now I have all problems sorted out, back to retexturing. You can expect a beta version of my mod soon. Cheers!
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 09, 2015; 06:22 PM
Update:
After fixing scaling and aligning ui in the middle of the screen radial menu is still on the right because I had to move everything left by changing line 9 to    <x>83</x>      in main_screen.xml.
if anyone has more experience in editing ui xmls in Hellgate I really would appreciate some help. If someone has a better idea how to do this pm me.
Title: Re: Need help replacing textures
Post by: Malachor on Dec 10, 2015; 03:44 AM
... I had to move everything left by changing line 9 to    <x>83</x>      in main_screen.xml....
This would move everything right because
    <x>0</x>
    <y>0</y>
is the top left corner of the screen.

EDIT: I think you'll need to revert that change, and adjust each sub-element individually.
Since you've used line 9 to move everything right, those elements that are aligned with that can't be moved left. Or you can try using a negative value for the radial menu's <x></x>, which it doesn't normally have but you can insert it, say on line 4365, moving everything afterwards down a line.
Title: Re: Need help replacing textures
Post by: Xyloritus on Dec 11, 2015; 01:06 AM
... I had to move everything left by changing line 9 to    <x>83</x>      in main_screen.xml....
This would move everything right because
    <x>0</x>
    <y>0</y>
is the top left corner of the screen.

Sorry I meant right but wrote left  ;)

I've tried many different ways but no success. There's too many elements and not just in one file. I wasn't able to find all elements of the radial menu. Then I've reverted <x>83</x> back to zero and tried moving stuff separately but it's really hard to find and align elements.  Maybe I'll try once again from a fresh file but now I'm back to texturing.

If anyone  would like to experiment with scaling just change this line in any xml:   <ws_widthbasis>2080</ws_widthbasis>
instead of 1920
The game scales as 16:10 so the nearest resolution is 1440x900 so I added 166 pixels to compensate scaling for 1600x900. Don't know how will that work with 1920x1080 though.
Title: Re: Need help replacing textures
Post by: michel741 on Dec 31, 2015; 04:26 PM
What pack in Hellgate Global contains icons for items? I can't found them with Reanimator, otherwise they generate ingame directly from models...
Title: Re: Need help replacing textures
Post by: Dank Rafft on Dec 31, 2015; 10:22 PM
What pack in Hellgate Global contains icons for items? I can't found them with Reanimator, otherwise they generate ingame directly from models...
AFAIK there are no specific icons. The game creates the "icons" from the item textures.
Title: Re: Need help replacing textures
Post by: Xyloritus on Feb 05, 2016; 08:17 PM
Item ui icons are in fact small 3D models.
Title: Re: Need help replacing textures
Post by: Sumerisle on Mar 30, 2016; 12:08 PM
shit, I followed Malachor explains many time!! many !many! but failed. if anybody has success and applied changes on game,Please upload files
Title: Re: Need help replacing textures
Post by: Malachor on Mar 30, 2016; 01:09 PM
What changes were you trying to make?