PDA

View Full Version : Ui mod?


heron
08-21-2010, 10:53 PM
I've downloaded the SDK kit and started reading the docs and looking over the examples.

My question is;

Can the ui be modded in?

Thanks!

joku
08-21-2010, 11:40 PM
Absolutely it can. There's a folder called "UI" (conveniently enough) that's full of all the files you would need to modify the UI. If you were looking specifically for the HUD, check out "game.mnu" and "player.mnu" in the UI folder.

heron
08-21-2010, 11:41 PM
Absolutely it can. There's a folder called "UI" (conveniently enough) that's full of all the files you would need to modify the UI. If you were looking specifically for the HUD, check out "game.mnu" and "player.mnu" in the UI folder.

Thanks! I will look into it.

*edit*

In one of the textures sdk document, it mentioned a command to uncompress ctx to tgas but where is this executable file?
Any help is appreciated.

*edit 2*

Oh never mind, you bring up the console inside the game then type buildTgas.

*edit 3*

Made 2 new tga files then zipped it as mod_border.zip
Placed inside Assets folder

Dir structure were as followed;

Textures > UI > columns03.tga
Textures > UI > rows03.tga

Game failed to show the new graphics?!
Help?!

Zengrath
08-22-2010, 10:56 AM
Hi Heron, i recognize you from Play Fate game :O. Welcome.

Sorry i can't help you with your problem, no experience yet in modding myself. But seeing those cool mods you did with fate, like to see what you can come up with here! :).

heron
08-22-2010, 01:54 PM
Hi Heron, i recognize you from Play Fate game :O. Welcome.

Sorry i can't help you with your problem, no experience yet in modding myself. But seeing those cool mods you did with fate, like to see what you can come up with here! :).

Howdy!
Thanks for the warm welcome.
Yep, I am trying to run some simple test at the moment.
Test the water out ;)
This game has so much potential and mods similar to fate.
A fan of the genre, haha.

heron
08-22-2010, 10:13 PM
Help?! lol

Shadow
08-23-2010, 11:24 AM
Welcome to the forums heron. Sorry I'm slower on the weekends.

You seem to be on the right track in general. You don't want to put the tga files in the zip though, you want the ctx files. The game should automatically build a ctx for each new tga when you run the game. A ctx file is just a compressed texture with all of the mipmaps generated.

You also want to make sure you don't have any loose files getting in the way, since it will load loose files before it loads files from zips.

heron
08-23-2010, 02:23 PM
Welcome to the forums heron. Sorry I'm slower on the weekends.

You seem to be on the right track in general. You don't want to put the tga files in the zip though, you want the ctx files. The game should automatically build a ctx for each new tga when you run the game. A ctx file is just a compressed texture with all of the mipmaps generated.

You also want to make sure you don't have any loose files getting in the way, since it will load loose files before it loads files from zips.

Hello Shadow!
First, I want to say this is one fun game!
Thanks for welcoming me into the forum.

Okay, on to modding business!

I tried placing the tgas into the Assets folder unzipped.
Like so;

Textures > UI > columns03.tga
Textures > UI > rows03.tga

Failed to update!

I tried creating a folder called mod_borders

Inside;

Textures > UI > columns03.tga
Textures > UI > rows03.tga

Failed to update!

So do I need a separate program to convert the tgas to ctx?
Is there a cache folder I need to purge?
What are loose files?
This is so confusing ...

Any help is appreciated.

- Heron

Shadow
08-23-2010, 03:06 PM
You want the first one.

By loose files I mean normal files that aren't inside of a zip file.

This is where Windows is probably being annoying. Normally the ctx would be created automatically by the game and saved in the same location as the tga, however if you have the game installed in Program Files, Windows is probably saving it in something like
C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse

When the game is starting up, any tga files it finds it makes sure there is a newer version of the ctx of the same name (unless autoBuildTextures is off). If there isn't one or it is older, it will create a new ctx file.

heron
08-23-2010, 03:28 PM
You want the first one.

By loose files I mean normal files that aren't inside of a zip file.

This is where Windows is probably being annoying. Normally the ctx would be created automatically by the game and saved in the same location as the tga, however if you have the game installed in Program Files, Windows is probably saving it in something like
C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse

When the game is starting up, any tga files it finds it makes sure there is a newer version of the ctx of the same name (unless autoBuildTextures is off). If there isn't one or it is older, it will create a new ctx file.


Thank you! I will give it a whirl and install it on another drive.

*edit*

Okay, installing out of the program files path worked! woot!
Here's a simple test, gold borders with a green button!

http://img576.imageshack.us/img576/9017/dcurse.jpg

Questions;
Can the items (icons) inside the inventory be re-arrange via some sort of database file inside the asset folder or it that hard-coded?

Thanks!

henryke
08-23-2010, 10:06 PM
awesome!!! can't wait for the UI mod!!!

(impatient face:)

heron
08-23-2010, 10:10 PM
New Mini map (square)

http://img841.imageshack.us/img841/5310/dcminimap.jpg

henryke
08-23-2010, 10:31 PM
i wonder... any chance to include a new font with the UI mod (a more readable/bold one - torchlight..khmm...), that would be heaven! (I like Din's default "gentium" fonts, but on the long run they are bleeding your eyes:) especially when you compare equipment

keep up the good work Heron!

heron
08-23-2010, 10:54 PM
i wonder... any chance to include a new font with the UI mod (a more readable/bold one - torchlight..khmm...), that would be heaven! (I like Din's default "gentium" fonts, but on the long run they are bleeding your eyes:) especially when you compare equipment

keep up the good work Heron!

Thanks!
There's one file in the sdk called fontgen.exe

*update*

Format:
fontgen name <FontName> size <Size>

Ex.
fontgen name Gentium size 10

This example will create 2 files:
Gentium10.fnt
Gentium10.tga


For some reason it generates 2 files that are named correctly but when I open the tga file, the graphic type are in arial?! lol

henryke
08-23-2010, 11:18 PM
i think you just need to "compile" any ttf font (with the commands you just wrote above), rename the compiled fnt+tga to "gentium" from its original name, and then put the tga+fnt files into the .../fonts folder in assets

i guess...

once i did try it, and changed the din's fonts to arial, and it worked, but it was'nt to mod-friendly, as it was an overwrite - then i lost patience (im not a big modder:)

but it's doable, im sure

heron
08-23-2010, 11:23 PM
i think you just need to "compile" any ttf font (with the commands you just wrote above), rename the compiled fnt+tga to "gentium" from its original name, and then put the tga+fnt files into the .../fonts folder in assets

i guess...

once i did try it, and changed the din's fonts to arial, and it worked, but it was'nt to mod-friendly, as it was an overwrite - then i lost patience (im not a big modder:)

but it's doable, im sure

Getting the fontgen to spit out an arial is easy, it's the default typeface, even if you didn't follow through with the dos commands.

Now, telling it to spit out a different typeface is the problem.
Maybe shadow can chime in and give us a clue ;)

heron
08-24-2010, 02:11 AM
Here we go, a cleaner UI.
Mostly adding alpha maps into the unneeded clutter.

+ removed the frames around the item label
+ removed the main stone ui
+ added 2 new Quest Available and Quest Achieved icons
+ changed the minimap from round to square
+ made the chat box more transparent



http://img826.imageshack.us/img826/5384/dcui.jpg

Install:
Must unzip the Texture folder into the Asset folder. (loose files)

Caal
08-24-2010, 08:11 AM
I've tried the UI mod and am interested in going back to the original UI. How do you uninstall your mod? The UI changes remain even after deleting the texture folder.

The UI changes remain even after a full uninstall and reinstall of DC.

Shadow
08-24-2010, 10:21 AM
Can the items (icons) inside the inventory be re-arrange via some sort of database file inside the asset folder or it that hard-coded?

If you mean the actual inventory layout, it's defined in equipment.mnu. You should be able to rearrange it however you want.

I believe your font problem is that you probably don't have Gentium on your computer any where, so it is using Arial as the default. Try it with a font you have installed.

BTW, you don't want to put tga files in the actual mod, you just want the ctx files (see the next part for why).

I've tried the UI mod and am interested in going back to the original UI. How do you uninstall your mod? The UI changes remain even after deleting the texture folder.

The UI changes remain even after a full uninstall and reinstall of DC.

That's because there are tgas in the mod and the game auto generated some ctx files which Windows probably dropped into somewhere like C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse\Assets
Delete those ctx files and you should be back to normal.

Caal
08-24-2010, 01:42 PM
Delete those ctx files and you should be back to normal.

Shadow, thank you.

I also now understand the point of the compiled files. I substituted the ctx files for the tga files in the original mod, and now have the same mod, except now it can be easily installed, uninstalled and reconfigured. Thanks again.

heron
08-24-2010, 02:49 PM
If you mean the actual inventory layout, it's defined in equipment.mnu. You should be able to rearrange it however you want.

Awesome, I will try to do something creative with that file.

I believe your font problem is that you probably don't have Gentium on your computer any where, so it is using Arial as the default. Try it with a font you have installed.


Correct, I do not have that true type font but only system font folder.
I opened my windows/fonts/ and select a file, example; abaddon.ttf

I copy the fontgen.exe file and paste it into the root of my c drive.
Then I ran a command shell ;

fontgen name abaddon size 10

The program generated 2 files (tga and fnt)
I opened the tga file with my paint program and to my surprise it's in arial.
Tried a few other truetype fonts online as well, nothing.

However, the sizes and naming worked but not the typeface of the new font.

henryke
08-24-2010, 02:59 PM
Here we go, a cleaner UI.
Mostly adding alpha maps into the unneeded clutter.




AWESOME!!!! downloaded, using it, loving it!

thanks

heron
08-24-2010, 03:14 PM
AWESOME!!!! downloaded, using it, loving it!

thanks

Thanks! Have you tried getting the new font typeface into the game yet?

henryke
08-24-2010, 03:46 PM
no luck with the fonts yet:(

i did convert arial (for testing) with the tool, made a quick mod to change "item name"

FontSmallDefault Gentium12
FontDefault Gentium16
FontLargeDefault Gentium20
FontVeryLargeDefault Gentium24
FontCriticalHit Gentium24
FontXP Gentium20
FontItem Arial10

but wherever I put the font files (arial10.tga, and arial10.fnt), assets/textures/fonts, or even into the assets.zip directly, game always crash with error:

"critical error, arial10.fnt not found" - which is strange, as the files are there, in the correct place: assets/textures/fonts.

so not a clue what I did wrong

Shadow
08-24-2010, 07:23 PM
I'll look at the font tool.

You want to put the fnt files in Assets/Fonts. The tga/ctx files go in Assets/Textures/Fonts.

henryke
08-24-2010, 07:50 PM
thanks Shadow, probably that was the problem (I put both of'em in ../textures/fonts) i'll try it as soon as i can

***edit***

thanks Shadow, that did it: need to put the tga/fnt in diff. directories, and it works, cool!

*** edit 2 ***

however:) the modded fonts always looks "blurry", or too way smoothed, (compared to the default gentium)... antialiased, how to say... they are not sharp. (the effect not depends on font and size, i did try with about 10 fonts, in sizes 10/12/14 - the new fonts are always "blurry")
My guess is the engine maybe stretching the TGAs or something? (the TGA itself is sharp, but ingame, its blurred)

heron
08-24-2010, 09:50 PM
thanks Shadow, probably that was the problem (I put both of'em in ../textures/fonts) i'll try it as soon as i can

***edit***

thanks Shadow, that did it: need to put the tga/fnt in diff. directories, and it works, cool!

*** edit 2 ***

however:) the modded fonts always looks "blurry", or too way smoothed, (compared to the default gentium)... antialiased, how to say... they are not sharp. (the effect not depends on font and size, i did try with about 10 fonts, in sizes 10/12/14 - the new fonts are always "blurry")
My guess is the engine maybe stretching the TGAs or something? (the TGA itself is sharp, but ingame, its blurred)

I think the engine select the point size based on screen resolution.
So if you play the game in 800x600 it draws the smallest font and if you play in 1600x1200 it draws the biggest. What we want to tell the engine is to draw the smallest font in the biggest screen resolution.

Shadow
08-25-2010, 10:09 AM
What happens is that the text always draws at the same screen size which is controlled by the size of the original font specified in the UI. Then the game tries to pick the font that fits and will need to be stretched the least.

Shadow
08-25-2010, 02:23 PM
I just tested the font tool with the following commands:

fontgen name Gentium size 20
fontgen name Arial size 20
fontgen name Calibri size 20
fontgen name "Courier New" size 20

and all 4 of them seem to really be different fonts, not just Arial.

If you do the last 3 of the commands above, do they work?

heron
08-25-2010, 03:48 PM
I just tested the font tool with the following commands:

fontgen name Gentium size 20
fontgen name Arial size 20
fontgen name Calibri size 20
fontgen name "Courier New" size 20

and all 4 of them seem to really be different fonts, not just Arial.

If you do the last 3 of the commands above, do they work?

It was the quotations!

This worked for me;

fontgen name "Courier New" size 20

Times New Roman
Knight's Quest
Diablo

http://img810.imageshack.us/img810/4758/clipboard02q.jpg http://img820.imageshack.us/img820/2142/clipboard01lr.jpg http://img841.imageshack.us/img841/9779/clipboard03h.jpg



* To solve the blurry edges, turn off Anti-Aliasing!

Awesome job Shadow! :)

heron
08-25-2010, 10:17 PM
Here' s something I just mocked up.
Might try it out.

http://img687.imageshack.us/img687/4467/clipboard05bns.jpg

Here's a mod to make the item label more transparent.

http://img831.imageshack.us/img831/9799/clipboard05y.jpg

You need to unzip it as loose files.

BillyPop
08-27-2010, 02:04 PM
Hi,

I 've tried the UI Mod and want to uninstall it but i don't have any directory like C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse\Assets

I'm using Windows 7 64bits.

Thanks if someone can help :)

heron
08-27-2010, 02:59 PM
Hi,

I 've tried the UI Mod and want to uninstall it but i don't have any directory like C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse\Assets

I'm using Windows 7 64bits.

Thanks if someone can help :)

check the my documents folder?

Caal
08-27-2010, 03:00 PM
I have Win XP, but found the files in C:\Documents and Settings\All Users\Application Data\DinsCurse\Assets, and in a couple of folders beneath that.

You can also do a search of your c drive and look for the files ending in .ctx, if you can't find the folder any other way. Delete those and you will be back to normal.

heron
08-27-2010, 03:03 PM
Also note that you need to replace the original tga file so the game can regenerate the ctx back to it's installed state. This was confusing at first but I figured it out, lol.

Sorry if the mod didn't quite pleased everyone, I'm still learning to mod the game. Maybe with time, I can produce somewhat more appealling mod to the masses.

That being said, Mr.Shadow

I've noticed even after replacing all the fonts in sizes of 10 that the game render them out blurry on different screen resolutions.
Is there really any way to reduce or scale the font's down to a small size? I like to play the game in 1920x1600 :)
Thanks for your continuing support for modding the game.


- Heron

Roswitha
08-27-2010, 04:49 PM
Hi,

I 've tried the UI Mod and want to uninstall it but i don't have any directory like C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse\Assets

I'm using Windows 7 64bits.

Thanks if someone can help :)

Maybe the first one?

Vista/Win7 - C:\Users\YOUR USER NAME\AppData\Local\DinsCurse\User
XP - C:\Documents and Settings\YOUR USER NAME\Local Settings\Application Data\DinsCurse\User
Mac - /Users/YOUR USER NAME/Library/Application Support/DinsCurse/User

Shadow
08-27-2010, 06:41 PM
I 've tried the UI Mod and want to uninstall it but i don't have any directory like C:\Users\YOUR USER NAME\AppData\Local\VirtualStore\Program Files\DinsCurse\Assets

I'm using Windows 7 64bits.

It might be dumping the ctx files into C:\ProgramData\DinsCurse\Assets If so, just delete them and you will be back to normal.

BillyPop
08-28-2010, 02:16 AM
Thanks for your help, I've finally found this Assets directory under Shadow's path.

@heron : your mod is fine, but what is annoying is that I don't see the skills cooldown animation when I'm using it (especially with Priest's heal skills) :o

heron
08-28-2010, 01:04 PM
Thanks for your help, I've finally found this Assets directory under Shadow's path.

@heron : your mod is fine, but what is annoying is that I don't see the skills cooldown animation when I'm using it (especially with Priest's heal skills) :o

Thanks for the encouragement, let me know if you need anything changed to the ui that will make the game more enjoyable.

- Heron

BillyPop
09-01-2010, 03:15 AM
Having the UI scaled for widescreen resolution would be great ! As you can see on the attached screenshot, the minimap, the vertical icons, the chatroom and player mana/health don't fit a 1440x900 resolution ;)

Shadow
09-01-2010, 09:23 AM
Having the UI scaled for widescreen resolution would be great ! As you can see on the attached screenshot, the minimap, the vertical icons, the chatroom and player mana/health don't fit a 1440x900 resolution ;)

That's not something that is going to be changed in a mod. The choice right now is to have them centered like that or on the edges but stretched.

Shadow
09-01-2010, 10:37 AM
I've noticed even after replacing all the fonts in sizes of 10 that the game render them out blurry on different screen resolutions.
Is there really any way to reduce or scale the font's down to a small size? I like to play the game in 1920x1600 :)

Doesn't that make the fonts all draw smaller?

heron
09-01-2010, 02:09 PM
Doesn't that make the fonts all draw smaller?
Nope, it just blurs out.
Either that or I am doing something wrong.

Shadow
09-15-2010, 10:54 AM
Nope, it just blurs out.
Either that or I am doing something wrong.

Ok, I see what is going on. It does draw them smaller, but it no longer has access to higher resolution versions so they are too blurry.

I think you will have to do something like this:
FontSmallDefault Gentium9
FontDefault Gentium12
FontLargeDefault Gentium15
FontVeryLargeDefault Gentium18
FontVeryLargeDefault2 Gentium24
FontVeryLargeDefault3 Gentium30
FontVeryLargeDefault4 Gentium36