Modding the HUD -- a diary/discussion

Psyringe said:
Hello Rayanth,

I just found this thread and immediately bookmarked it. :) Great work you're doing here. This thread might be laying the groundworks for many future Civ4 UI modding projects - keep up the good work! :goodjob:

I could hope so =) When I started on this project, nobody had even *mentioned* changing the UI, and I love breaking new ground. While at first I had no actual interest in making a new UI (just wanted to prove it could be done, and how)... I have a great plan going for one now, which I'm making progress on.

For the record, I have received a few requests for information on making the background of a panel (default dark blue) an image instead of a solid color. To the best of my *current* knowledge, this is not possible due to the stretch mode of the panels (the image would be stretched, and would look very odd.) However there appear to be other possible modes for the panels that I have not yet figured out.
 
Gogf said:
Wow, that looks much better than I would have guessed.
The diplomacy screen is unfortunately clear, but all the other advisor screens are not changed - they still have a blue background, which is good.
 
MeteorPunch said:
The diplomacy screen is unfortunately clear, but all the other advisor screens are not changed - they still have a blue background, which is good.

You can change the diplomacy screens back to blue if you wish, just find them in the second file you edited, and change them back from _HudBG to _BG -- this should change their reference back to your original BG color, the blue.
 
just a quick note to say that my work may begin tapering off, here. I'll still be working on the UI mod I'm doing, and will eventually post it -- however as I've already said, I'm facing a photoshop hurdle now, and I'm back to full time at work, severely reducing the free time I have to work on this -- and hey, I gotta *play* civ4 some time, don't I?
 
MeteorPunch said:
Big thanks to Rayanth and Gogf. :goodjob:

I changed the last unit to 0 and it worked perfectly how I wanted. Ctrl+I takes things such as the minimap away, so that wasn't gonna work for me. Here's some pics of the game in action. Warning ~650-750KB each.

http://www.civfanatics.net/uploads10/MPclear_land.gif
http://www.civfanatics.net/uploads10/MPclear_city.gif

Can you zip up the folders you modded and upload them here? A lot of us would like to try out that clear-interface thing ourselves.
 
MSTK said:
Can you zip up the folders you modded and upload them here? A lot of us would like to try out that clear-interface thing ourselves.

Follow Gogf's tutorial, here (based on my work in this thread) But keep the following things in mind:

BACK UP YOUR ORIGINAL -- this can never be stressed enough, ESPECIALLY when moddign the HUD. You cannot do this in a mod pack, you MUST overwrite your original HUD. So back it up!

Following Gogf's tutorial to the letter will result in a tan interface.

To get clear, like Meteor's, follow Gogf's tutorial, with one minor change -- in the Code block in his tutorial, change the "217" to "0"

However, note that Meteor commented that the Diplomacy screen went clear, which he didn't want -- if you only want the in-game HUD clear, and NOT the diplomacy and advisor screens, follow Gogf's tutorial, with the addition noted above, but SKIP STEP 4.

Hope this helps =)

(it's much easier to make this change yourself, than post a file including the change, it's quite a simple one)
 
MSTK said:
How would I skip Step 4? Leave my game on day and night?

It appears that Gogf totally re-wrote the tutorial after I posted this -- Now I dunno what to say =)
 
Rayanth said:
It appears that Gogf totally re-wrote the tutorial after I posted this -- Now I dunno what to say =)

Woops! Forgot that you linked to my tutorial from this thread :lol:.

@MSTK:

Just don't edit the lines listed under "single player diplomacy panel" in this post. In your case, just change them back to "BG" from "HudBG" :).
 
Easier way to change all the HUD background colors (all I want to do at this point)

Add the line just like he says in Civ4Theme_Common.thm line 204
"GColor .HudBG =GColor(Red, Green, Blue, Alpha): GFC_Control_Color;"
(changing RGBA values to your liking of course)

Then do a search & Replace in all files in that directory (I used TextPad for example) and replace
"SF_CtrlTheme_Civ4_Control_Color_BG;"
with
"SF_CtrlTheme_Civ4_Control_Color_HudBG;"

All changed, including start menus, loading screens, and in game dialogs.

(I've seen no bad side effects so far - so if ya do this and find some, POST!)
 
dfi666 said:
Easier way to change all the HUD background colors (all I want to do at this point)

Add the line just like he says in Civ4Theme_Common.thm line 204
"GColor .HudBG =GColor(Red, Green, Blue, Alpha): GFC_Control_Color;"
(changing RGBA values to your liking of course)

Then do a search & Replace in all files in that directory (I used TextPad for example) and replace
"SF_CtrlTheme_Civ4_Control_Color_BG;"
with
"SF_CtrlTheme_Civ4_Control_Color_HudBG;"

All changed, including start menus, loading screens, and in game dialogs.

(I've seen no bad side effects so far - so if ya do this and find some, POST!)


There's an easier way than that if you want to change ALL backgrounds, just skip the whole .HudBG thing and change the colors of .BG -- the search-and-replace is rather pointless if you want to change all colors, just change the original source of the color =)

The REASON for the .HudBG color addition was to change ONLY the in-game screens. My original purpose was to change only the in-game screens and not the start menu, loading screens, etc. Since the in-game screens reference the same background color as the start menu, I was forced to replace in-game screen references with the new HudBG reference.

Again, if you want to change ALL screens, ignore the entirety of the .HudBG addition and change the RGBA values of the original line 204 itself - the .BG definition.
 
I have received confirmation that my hypothesis about making HUD's dynamically loadable by mod is more or less accurate -- in other words, It is NOT possible to change the HUD without overwriting the core, original HUD files.

I have subsequently submitted a request for a future-version change to this approach, if at all possible.
 
In reference to my previous post, I am currently working on a potential method of getting around this -- however it's possible it may not come to fruition, we shall see. (It involves the game's startup sequence, and more advanced knowledge of GFC's inner workings)
 
I decided to bypass Firaxis for once and directly ask Scaleform about documentation for the GUI system.

Here is my email:

Hello,

I write to you on behalf of the end-users of Firaxis Games' Civilization 4
for the PC, which utilizes GFC for its User Interface. As you are probably
aware, Civilization 4 was developed from the ground up to be customizable
and modifiable by the end-users, in virtually every way possible.

One of these ways, to a limited extent, is access to the files that make up
the game's GUI, which, as noted earlier, uses Scaleform GFC. While a group
of end-users has been working diligently in understanding the markup
language used to define the User Interface, there are many parts that
continue to elude us, and it is does not appear that there is any
readily-available doucmentation.

It is for this reason that I have come to inquire about the availability of
the GFC documentation for end-users. Does such documentation exist? Is it
freely available for distribtion? If end-user documentation does not yet
exist, is it possible to obtain access to the documentation on your website
without purchase of a license? The Register New User form for access to that
portionof your website appears to indicate that a license may be required
for such access, is this correct?

I thank you for your time, and for your role in helping to make Civilization
4 a wonderful success! I look forward to your reply.

And their reply:

We share your enthusiasm for modifying the Civilization IV user interface and look forward to seeing a wide range of new custom styles.

Scaleform is working on an exciting new visual tool, the Scaleform GFC Theme Editor, which will make it easy to visually develop new UI themes. We are in discussion with Firaxis regarding the distribution of the visual tool and will alert the Civ IV mod community as soon as it is available.

Unfortunately, we do not plan to release documentation of the theme system until after the visual tool is complete.

Sincerely,

The Scaleform Team

So basically, Modding the HUD right now is difficult at best, and possibly unwise due to the fact that it overrides the core HUD.

However, the good news is that they're working on an end-user tool that will help us do our own Themes for Civ4, and that they're working with Firaxis on it to make sure it'll work with Civ4 (is how I'm reading this) and that the Civ4 modding community can look forward to seeing it.

Looks like if we sit on our hands long enough, our work will be made much easier =)

In the meantime, I am focusing more on the Order of Operations in which the GUI is loaded, and the relative python files. I've already found ways to add mod-specific Movie intros into the game load-sequence (before menus), as well as remove the existing ones...
 
Civ IV UI Mod Tip:
You can attach custom GFC styles to UI elements in the Civ IV python script using the SetStyle(control_name, style_name) function. This will allow you to customize specific controls, a feature you will definitely enjoy!
 
scaleform said:
Civ IV UI Mod Tip:
You can attach custom GFC styles to UI elements in the Civ IV python script using the SetStyle(control_name, style_name) function. This will allow you to customize specific controls, a feature you will definitely enjoy!

Iiiiiinteresteing, I'll give this a shot, thanks Scaleform!
 
Top Bottom