Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Mod Approval Process - Editing Civ4Theme_Common.thm

The file Civ4Theme_Common.thm (located in Civ4\Resource\Themes\Civ4) is approved for manual editing
in the following sections: "with .Size", "with .Color", and "with .Font".
Only simple value edits are allowed; no changes to the structure of the code.


The Color section has lots of potential. In general, each GColor value is made up of four numbers that range from 0 to 255. The first three are red, green, and blue in that order (higher numbers being brighter.) The fourth value is called alpha or opacity; lower numbers mean more transparency. Here's a few examples.

Code:
with .Color //All default color types are set for dynamic color change.
  {  
    .TextShadow_Default = GColor(  0,  0,  0,255);
    .TextShadow_Select = GColor(  0,  0,  0,255);
    .TextShadow_Inactive = GColor(  0,  0,  0,255);
    .TextShadow_InactiveSelect = GColor(  0,  0,  0,255);
    .TextShadow_Disable = GColor(  0,  0,  0,128);
    .TextShadow_DisableSelect = GColor(  0,  0,  0,128);

Here's the example I was going over with Ruff_Hi in the other thread. By changing the fourth value (alpha or opacity) of each of those GColor expressions to 0, the text drop-shadow can effectively be disabled by making it transparent. (Example) (Example)

Code:
with SF_CtrlTheme_Civ4_Control_Color
   {
    GColor .BG       = GColor( 69, 93,156,217)

This is the single color setting defined by the "BG Color" setting on the Text tab of CivScale. Here's a (butt-ugly) example of it set to GColor( 0,254, 0,255) which means bright green and full opacity (no transparency.)

Code:
.Link_Default      = GColor(  0,  0,  0);
   .Link_Select      = GColor(  0,  0,  0);

Here's another example of a specific text-color setting (with the green from the last section still on.) I've changed the color for the "link" category of text to black.


In the Font section:

Code:
with .Font
  {
   with SF_CtrlTheme_Civ4_Control_Font
   {
    GFont .Size1_Normal   = GFont("Sylfaen",  "Regular",  12, GFlags(GFontFeature, GFC_FONT_ALPHA))'

The values here are pretty obvious: font name, style, size. The CivScale setting "Sans Serif" simply changes all the font names to "seguibk" (example). Any Windows font can be used, such as "Comic Sans MS" (example). The CivScale setting "Font Size" simply increases all the sizes by a few points.

In the "with .Size" section:

Code:
with .Size
  {
   .ItemSpace       =  2;
   .ListItem       = 24;

These control spacing between items in a list. Lower values are useful to fit more data on-screen at the diplomacy table (Example) and the file dialog boxes (Example). But do observe a reasonable minimum, as certain screens can get messy (example).
Reply

Go T-Hawk! I would use this as I think CivScale will get ruled out due to the spoiler issue.

Also, I was looking at that file and CivScale re fonts. CivScale allows two fonts. The font file under themes has 3 fonts (arial is the 3rd) - the are just ttf files. I'm thinking that it should be possible to drop any old font (ttf file) into the font directory, reference the name in the theme file and ... game with new font. I will try it using wingdings!
Reply

T-hawk Wrote:Sirian, I'm asking if there's going to be a blanket denial of the whole manual editing approach.

I think we would need a Minister to take direct responsibility for overseeing.

I don't see any reason why mods would need to be big or official affairs. Manual editing amounts to small, home-grown mods, and if the edits are taking place in areas sure not to cause problems, then great.

The main obstacle here is that I don't have the inclination to do the extra work necessary to investigate the mods myself. Nor do I want to hand out blanket permissions only to get stuck with a crisis if one blows up in our faces, or even to be stuck cleaning up a mess if one has to be revoked. I don't want the stain of any events getting messed up by bad mods, either.

If mods are going to make it, others have to step up to the responsibility. That's the bottom line. I know how moddable Civ4 is, and I have the ability to get involved with mods to the highest degree, but I cannot afford to spare the time or energy.

Manual edits actually sound more promising than major mods. Blanket permission for some edits should be possible. We would need a list compiled of exactly what is OK to fiddle with, and probably a warm body in charge of approving each individual minimod, just to ensure that edits have not colored outside the lines.


Are you volunteering to be the RBCiv Minimod Minister? lol


- Sirian
Fortune favors the bold.
Reply

Sirian Wrote:Are you volunteering to be the RBCiv Minimod Minister? lol

I hereby volunteer to do so for Civ4Theme_Common.thm specifically. I'll confess right up front that I'm motivated by self-interest here as there's several UI changes I want to make for myself. wink But investigating mod possibilities for that file should be done in a way that's open and accessible to the community, and I'll try to do a good job with that. (When I get time; RL is fairly busy over the next week. Would quite like to have it usable in time for Epic Seven though.)

BTW, you might be able to answer this question: Is there any way to get Civ 4 to pick up changes to the .thm file without exiting and reloading the whole application?



Ruff_Hi Wrote:I'm thinking that it should be possible to drop any old font (ttf file) into the font directory, reference the name in the theme file and ... game with new font

Theoretically, yes, though it might not quite be that simple. There's several copies of Sylfaen.ttf (the game's font file) located in different places underneath the Civ 4 installation folder. In particular, the font usage for the city name labels on the main map screen is handled differently from every other font usage. CivScale can change every other in-game font but not that one. I shall investigate further when I get a chance.
Reply

Post edited -- info moved to the top post in the thread.
Reply

I know the Adventure 9 reports are taking center stage, but is anyone besides Ruff and myself interested in customizing the colors and fonts? Speak up, folks, if you want to see this approved.

"First they came for the font modders, and I didn't speak up because I wasn't a font modder..." wink
Reply

Ahhh ... good to see that I am back to Ruff lol

I am sure munterpipe is interested!
Reply

So do two very interested players compose enough of a critical mass to allow this in time for Epic Seven / Adventure Eleven?

Quote:* Is a mod "Graphical"? (Affecting appearance).

Yes, for the UI. No, for the game-content graphics.

Quote:* Is a mod "Utilitarian"? (Affecting player's interface).

No. No additional information is gathered or displayed to the player in any way (as long as the rule is followed about only "value" editing and no code shenanigans.)

Quote:* Is a mod "Rebalancing"? (Affecting game rules).

No.

Quote:* Which components are modified? (World Builder, XML, Python, C++)
* Which files are affected?

Civ4Theme_Common.thm obviously -- it seems to be program code but it's neither Python nor C++ so I'm not quite sure what it is. (C++ doesn't have a "with" keyword, though that could be implemented as a preprocessor macro.)

Quote:* If Python or C++ are involved, the mod needs to be certified free of trojans.

Only if you write one for yourself. lol

Quote:* VISUAL EVIDENCE showing and explaining what the mods actually do.

Provided above, though it's impractical to try to cover every one of the several dozen configuration points available in the file.


Sirian Wrote:It is my intent to approve all graphical mods that are shown to me to have no utilitarian or rebalancing effects. (I don't care what your game looks like. I only care how it plays. However, some graphics can affect gameplay, so that is where I start to care about those.)

Finally I'd just like to point that out, quoted from the original mod approval process thread. wink
Reply

OK. You have approval to do the edits you have described, as long as they are limited to the scope and type you spelled out here. Others may make similar edits, or make use of yours if you want to share them.

I'm looking forward to seeing screens of what you plan to change.

We need a blurb for posting to the Approved Mod list. If you could write something short enough to fit that need, we can complete the official approval process. You can go ahead and use your own edits for any event yet to open.


I guess Blue Marble won't be the first approved mod after all. Heh. smile


- Sirian
Fortune favors the bold.
Reply

Thanks. toast

Sirian Wrote:I'm looking forward to seeing screens of what you plan to change.

My example images above cover all the changes I personally want; no plans for any more at the moment. I'm interested in these three tweaks specifically, which are all shown in these example images:
- disable the text drop-shadow - Example
- custom font face and size - Example
- condense the vertical list spacing (unimportant but nice) - also illustrated in previous example

That said, my intent is to allow permission to tweak additional harmless settings like font colors during ongoing events; that "edits of this scope and type" means UI colors in general and not just limited to the particular ones I've demonstrated, as there's too many possibilities to demonstrate each one. I think I've set reasonable boundaries, which should be airtight as far as keeping utilitarianism out of this graphical mod.

This file allows much customized UI tweaking; I'm certainly happy to help anyone else interested in making particular edits and will volunteer to be the Minimod Minister for this one file. 8)


Quote:We need a blurb for posting to the Approved Mod list. If you could write something short enough to fit that need, we can complete the official approval process. You can go ahead and use your own edits for any event yet to open.

This should do it:

The file Civ4Theme_Common.thm (located in Civ4\Resource\Themes\Civ4) may be manually edited in the following sections: "with .Size", "with .Color", and "with .Font". Only individual values may be edited, not the structure of the code.

An example of acceptable modification is changing a color value or a font name. An example of unacceptable modification might be writing code to access in-game data such as an AI's research target and translate that into a visible color value. See this thread for more information.
Reply



Forum Jump: