View Full Version : Main screen improvement (color-coded attitude and others)


SimCutie
Dec 10, 2005, 05:31 PM
UPDATE ON 2006-01-22 : Version 0.5

----------------------------------------------
SimCutie's Main Interface Screen Improvement.

Date: 2006-01-22
Version 0.5. Based on Civ IV Update 1.52
Author : SimCutie < simcutie (at) hanmail (dot) com >

This is upgraded version of old mod I have written some times ago, based on Civ 4 update 1.52 version. It is great leap from old version, not just small update.
This version includes preliminary version of SimCuties Event Framework and other Modding library so it has a number of files to install. Complete documents about the my "Event Framework" will come later. Please wait some..

What is improved on main interface screen:

1) Display diplomatic attitude of AI player on score display by color Civilization name or color icon or text description.
2) Simple game clock with turn number and game progress percent.
3) Changeable minimap button layout / Some button states are saved.
4) 12Monkeys's Plot Button Enhancement
5) improved happy/unhappy/unhealthy face icons.
6) Action button facility (Not used currently but need for library)

Most features are user selectable on CUSTOM tab of Option Screen

Download and unzip the "MainScreen-SimCutie-05.zip" file
and copy/move all content of "CustomAssets" folder to
"~My Documents/My Games/Sid Meier's Civilization 4/CustomAssets/" folder
See Documents/README-SIMCUTIE.TXT for more details

NOTE!!!: Make sure to back up "Civilization IV.ini" file in "~My Documents/My Games/Sid Meier's Civilization 4" folder. The ini file will be stripped of comments and entry will be re-ordered. It does not harm or hinder game playing but minor nuisance. This is not bug, but current limitation. I will improve this in next version.

This mod includes 12Monkeys's Plot Button Enhancement with little improvement.

------------------------
EDIT1 : Version 0.5 update announcement

EDIT 2: Fixed some mistake and uploaded ZIP file again. ("MainScreen-SimCutie-05.zip")

================================================== =============
OLD VERSION
Misc Main Screen Improvement by SimCutie.
Edited 2005-12-11 by SimCutie.

This is merge and improvements of
1) Show Attitude mod by Snaitf From Here (ttp://forums.civfanatics.com/showthread.php?t=146123)
2) Simple Game Clock mod by homegrown From Here (http://forums.civfanatics.com/showthread.php?t=137980)

My improvement:
1. Added Civ Name display on on screen civ score list.
2. Attitudes are displayed as color code, not text like "Annoyed".
3. Unit name display was extended to accomodate full name with description.
4. Show Turn number on clock / year display. Clock can be turn off with Option.
Color = WHITE / MAGENTA / PURPLE / CYAN / GREEN / YELLOW
Attitude = No Attitude/ Furious / Annoyed / Cautious / Pleased / Friendly
Install "CvMainInterface.py" file to
~My Documents/My Games/Sid Meier's Civilization 4/
CustomAssets/python/screens/CvMainInterface.py

See Attached screen shot. Feel free to comment or any suggestion for improvement.
http://forums.civfanatics.com/attachment.php?attachmentid=107069&d=1134260825

.

Citrus
Dec 10, 2005, 06:25 PM
this could be useful *happy that this is the first reply to this thread*, im expecting more adding to this, so that it'll be even beter =D

Tommy1234567890
Dec 10, 2005, 07:47 PM
I am happy that some one created this!

rbird
Dec 11, 2005, 04:01 PM
Interesting choice of colors on the attitudes...is the available palette limited, or did you have a particular reason for avoiding the red/orange/yellow/green/blue that seems the obvious choice (at least to me)?

Otherwise, it seems like a very nice mod. I will download it and play around with it, I think. Great job.

Bob

Kindness
Dec 11, 2005, 05:33 PM
Interesting choice of colors on the attitudes...is the available palette limited, or did you have a particular reason for avoiding the red/orange/yellow/green/blue that seems the obvious choice (at least to me)?

Otherwise, it seems like a very nice mod. I will download it and play around with it, I think. Great job.

Bob

I agree nice mod, gj.
I changed the colours to just that - although I couldn't get orange to work so I have it as red/yellow/white/green/blue. The light pastelle colours confused the heck out of me.

Requies
Dec 12, 2005, 01:30 AM
Interesting choice of colors on the attitudes...is the available palette limited, or did you have a particular reason for avoiding the red/orange/yellow/green/blue that seems the obvious choice (at least to me)?

Otherwise, it seems like a very nice mod. I will download it and play around with it, I think. Great job.

Bob

Actually, you are limited. For instance, I'm using RED/MAGENTA/WHITE/CYAN/GREEN for my Foreign Advisor (not yet released) for the same attitudes..... There is no orange available as far as I can tell (not for text, at least).

Req

rbird
Dec 12, 2005, 01:45 PM
SimCutie, will combining this with your other mod (additional colors) allow better customization of the attitude colors, or are we stuck with those few?

Thanks,

Bob

P.S. to Requies - Looking forward to future releases...I have two of your advisors installed already. :)

weakciv
Dec 12, 2005, 02:09 PM
I had basicly the same idea although I would have changed the color of the player's score instead of their nationality.

Kindness
Dec 14, 2005, 12:28 AM
SimCutie, will combining this with your other mod (additional colors) allow better customization of the attitude colors, or are we stuck with those few?

Thanks,

Bob

P.S. to Requies - Looking forward to future releases...I have two of your advisors installed already. :)

I just used her colour mod to make the colours a nice gradient of Red -> Green.
http://img232.imageshack.us/img232/3391/colour3ps.png (http://imageshack.us)


self.attitudeColors = (
gc.getInfoTypeForString("COLOR_WHITE"), # NO_ATTITUDE
gc.getInfoTypeForString("COLOR_RED"), # ATTITUDE_FURIOUS
gc.getInfoTypeForString("COLOR_W_ORANGE"), # ATTITUDE_ANNOYED
gc.getInfoTypeForString("COLOR_YELLOW"), # ATTITUDE_CAUTIOUS
gc.getInfoTypeForString("COLOR_X_GREENYELLOW"), # ATTITUDE_PLEASED
gc.getInfoTypeForString("COLOR_GREEN")) # ATTITUDE_FRIENDLY

rbird
Dec 14, 2005, 06:05 PM
Excellent! Thanks, Kindness!

Bob

Saintedwyn
Dec 19, 2005, 01:04 PM
This is a great addon, and along with your color mod and the changes suggested by Kindness this works out well.

However there is one "bug" if you can call it that: If you turn off "Time" victory condition it kills all the interface text. I think this is linked more to the clock mod than anything, but I just wanted to point it out for anyone else who might download this.

Thanks again. :goodjob:

duderally
Dec 29, 2005, 08:56 PM
This is a great mod! Thanks SimCutie!:cool:

I read somewhere on the forum that the "CvMainInterface.py" file was modified in the 1.52 patch. Any chance of getting an updated version of this mod for 1.52? Or is there an easy way to incorporate your changes into the new file?

alerum68
Jan 02, 2006, 07:53 PM
SimCutie, is there a way to set the mod up so instead of calling the civ desc, to have it come up with icons, like the religions do? I have already made some smiles into .dds, but I'm not sure how to do it with the Code. This is a great MOD, especially like how you put the % of the game used as well as the turn limit.

SimCutie
Jan 05, 2006, 07:00 AM
SimCutie, is there a way to set the mod up so instead of calling the civ desc, to have it come up with icons, like the religions do? I have already made some smiles into .dds, but I'm not sure how to do it with the Code. This is a great MOD, especially like how you put the % of the game used as well as the turn limit.

I think that it can be done. I am preparing new 1.52 based version of this mod.
But I have greater ambition like user option selectable colored Civ name/attitude text / graphic icon choice. Base work has been done, but it needs more polishing.

Will you send me the icons file to me for experiments? Please send me PNG or PSD image file, not dds file. (preferably along with un-resized larger version so that I can fine-tune them)
The game font is TGA file not DDS.

alerum68
Jan 05, 2006, 12:36 PM
I can convert them, but I no longer have the originals. I put them in DDS because I read on the forum that the icons were in that format. Oh well. You can edit the images as much as you want, but they're already at 15x15 in size so you better like working in zoom.:p

Exavier
Jan 05, 2006, 12:58 PM
definatly waiting for the v1.52 compatable version of this mod :)

SimCutie
Jan 22, 2006, 06:20 AM
Updated to version 0.5 ( Civ 4 Update 1.52 Compliant )..
See first posting for information.
Enjoy!...

Cammagno
Jan 22, 2006, 09:28 AM
Updated to version 0.5 ( Civ 4 Update 1.52 Compliant )..
See first posting for information.
Enjoy!...

Great idea! :goodjob:
But unfortunately, it prevents Exotic Foreign Advisor Mod from working, so I can't use it. :( I've tried to merge the common file, but it didn't work.

alerum68
Jan 22, 2006, 03:41 PM
I don't know if it's just me but I tried the MOD and was going to change the options and the exit button no longer worked in the Options screen. It only does it after I try to change something inside of the "Custom" tab.

I was really looking forward to merging this in my collection, but am running into the same problem as Cammagno. If it's not asking to much, would you be able to look into it and see what it's running into conflicts?

Thanks for all the hard work!

Cammagno
Jan 22, 2006, 04:00 PM
I don't know if it's just me but I tried the MOD and was going to change the options and the exit button no longer worked in the Options screen. It only does it after I try to change something inside of the "Custom" tab.

I confirm this prroblem too. Maybe it's another of those "custom-event-managers' problems" :confused:

SimCutie
Jan 22, 2006, 05:08 PM
OOPS! I made a mistake.. A folder name in zip file is wrong...
In zip file, CustomAssets/python/endpoints folder should be named as ...../entrypoints (spellling error)
I uploaded fixed ZIP...

As for "Exotic Foreign Advisor Mod", it has no problem with my mod.
No file collision except one ( "CustomAssets/xml/CIV4ArtDefines_Interface.xml")
Just copy last 5 entry ( from -SCROLL_UP_ARROW to WHITE_CIRCLE_50 ) from "CIVArtDefines_Interface.xml" of Exotic Foreign Advisor Mod and paste to xml file of same name. Then it is done. I did it and it seems works well with the Exotic Foreign advisor.

alerum68
Jan 22, 2006, 06:12 PM
I changed the name to Entrypoints, and no change. I then downloaded your updated zip file with the same results. It now changes it to Icons, but I can't exit the screen. Only thing I can do is restart Civ4.

SimCutie
Jan 22, 2006, 07:07 PM
I changed the name to Entrypoints, and no change. I then downloaded your updated zip file with the same results. It now changes it to Icons, but I can't exit the screen. Only thing I can do is restart Civ4.

Have you flushed file cache? (by holding Shift key while Civ4 startup)
I tested with entire my working CustomAssets completely replaced with CustomAssets foler from newly downloaded ZIP and have no problem at all.
Click action on Exit button in normal option should be processed by (CIV4 MAIN INSTALL DIR) /Assets/python/entrypoints/CvOptionsScreenCallbackInterface.py which I didn't modified.
So if it works without error, Exit button on normal option should have no problem.

Can you find file C:\Documents and Settings\<your-name>\Application Data\My Games\Sid Meier's Civilization 4\Profiles\{Deafult Profile.pfl, Deafult Profile.ini} ?

Cammagno
Jan 23, 2006, 05:28 AM
OOPS! I made a mistake.. A folder name in zip file is wrong... In zip file, CustomAssets/python/endpoints folder should be named as ...../entrypoints.

Ok, now it works fine :) Thanks! :goodjob:

(spellling error) I uploaded fixed ZIP....

Speaking of spelling, there is also another mistype, "EnhEncement" instead of "EnhAncement" in the name of a folder. But it seems to work nevertheless, so you may change it in a future release or don't do it... just to let you know.

As for "Exotic Foreign Advisor Mod", it has no problem with my mod. No file collision except one ( "CustomAssets/xml/CIV4ArtDefines_Interface.xml") Just copy last 5 entry ( from -SCROLL_UP_ARROW to WHITE_CIRCLE_50 ) from "CIVArtDefines_Interface.xml" of Exotic Foreign Advisor Mod and paste to xml file of same name. Then it is done. I did it and it seems works well with the Exotic Foreign advisor.

Yeah, I did a stupid error merging the two files, my mistake :mischief:
Here there is the correct merged file, if someone wants it.


Later I'll try some of the possible customizations in the files, to see if they work fine :)

Cammagno
Jan 23, 2006, 05:41 AM
I changed the name to Entrypoints, and no change. I then downloaded your updated zip file with the same results.

The compatibility error with EFA is gone? If not, try using my merged file, it works fine for me.


It now changes it to Icons, but I can't exit the screen. Only thing I can do is restart Civ4.

Note that CvSimCutieEventManager.py have to be "active" (pay attention to CvEventInterface.py), so you may have some problems with the GreatPerson Mod (which also have its CvEventInterface.py linked to CvGreatPersonEventManager.py) or with your CvCustomEventManager.py.
I'm working on GreatPerson Mod's compatibility issue, but it's difficult to fix (for me, at least :blush: )

Also note that to enable the changes set into show attitude options screen, after exiting the option screen, you have to turn down the windows in which the attitudes are shown and then turn it on again.

Cammagno
Jan 23, 2006, 06:10 AM
Later I'll try some of the possible customizations in the files, to see if they work fine :)

Well, I've tried to set the Grid on (following the instructions in your readme). The grid button now appears to be "turned on", but the grid isn't there. So it has changed the status of the button, but not its effect. Now I have to turn it down to see the grid and to turn it on to remove the grid. Same thing with other buttons.

SimCutie
Jan 23, 2006, 08:26 AM
Speaking of spelling, there is also another mistype, "EnhEncement" instead of "EnhAncement" in the name of a folder.
What a poor English skill I have.. .. Hmm I will fix it soon..
I can run spell checker with text file but can not do that with python source code or zip file :)

Later I'll try some of the possible customizations in the files, to see if they work fine :)
I downloaded it and tested it. It seems work OK.
But I suggest you to put the new entries between line number 1260 - 1261..
Because the data entry below line 1261 (CUSTOM_IMAGESLOT_XXX stuffs) are kind of empty expansion slot.
It is used to dynamically (re-)define new images and tag pair on run-time.
So I think that it is more appropriate to place static entries before dynamic ones.
See CvUtilCustom.py line 255 , def defineImage() function.

Note that CvSimCutieEventManager.py have to be "active" (pay attention to CvEventInterface.py), so you may have some problems with the GreatPerson Mod (which also have its CvEventInterface.py linked to CvGreatPersonEventManager.py) or with your CvCustomEventManager.py.
I'm working on GreatPerson Mod's compatibility issue, but it's difficult to fix (for me, at least )

The *VERY* purpose that I wrote this new version is to eliminate such incompatibility and manual editing of CvEventInterface.py. My CvSimCutieEventInterface.py is dynamically configurable.
No need to modify Cv(SimCutie)EventInterface.py or anything related to event manager. Not a line.
Actually, I have modified GreatPeople Mod to use my event framework. ( Not yet released. It need little more polishing and clean up).
But for your reference and information, and to show how this can be accomplished, I attach the modified GreatPeople Mod (python file only) here. This is not drop-in replacement of original but you can see how it works.
See EventHandlerRegister() function near line 30. and read codes upto line 80.

.

Cammagno
Jan 23, 2006, 08:51 AM
What a poor English skill I have.. .. Hmm I will fix it soon..
I can run spell checker with text file but can not do that with python source code or zip file :)

I'm an Italian guy, so... I know the problem myself :lol:


The *VERY* purpose that I wrote this new version is to eliminate such incompatibility and manual editing of CvEventInterface.py. My CvSimCutieEventInterface.py is dynamically configurable.
No need to modify Cv(SimCutie)EventInterface.py or anything related to event manager. Not a line.

Oh, very very good! :)

Actually, I have modified GreatPeople Mod to use my event framework. ( Not yet released. It need little more polishing and clean up). But for your reference and information, and to show how this can be accomplished, I attach the modified GreatPeople Mod (python file only) here. This is not drop-in replacement of original but you can see how it works.
See EventHandlerRegister() function near line 30. and read codes upto line 80.

:goodjob:
I'll be one of the first users of your modified GreatPeople Mod!

And what can you say about the following issue? :blush:


Well, I've tried to set the Grid on (following the instructions in your readme). The grid button now appears to be "turned on", but the grid isn't there. So it has changed the status of the button, but not its effect. Now I have to turn it down to see the grid and to turn it on to remove the grid. The same thing happens with other buttons.

SimCutie
Jan 23, 2006, 09:43 AM
And what can you say about the following issue? :blush:
Yes, I know the problem, But plz don't blame it on me..

CyInterface() class has function to toggle Bare map, Yield display or score display. But, I can not find any function that controls grid on/off and resource baloon on/off function from CyInterface() class.

from CvMainInterface.py : line 620...

# I dont know how to toggle grid and resource/bonus display.
#if screen.getCheckBoxState("Grid"):
# CyInterface().toggleGrid()
#if screen.getCheckBoxState("ResourceIcons"):
# CyInterface().toggleResourceIcons()
if screen.getCheckBoxState("BareMap"):
CyInterface().toggleBareMapMode()
if screen.getCheckBoxState("Yields"):
CyInterface().toggleYieldVisibleMode()
if not screen.getCheckBoxState("ScoresVisible"): # default is True
CyInterface().toggleScoresVisible()

Cammagno
Jan 23, 2006, 10:04 AM
Yes, I know the problem, But plz don't blame it on me..
(...)
from CvMainInterface.py : line 620...

I'm sorry, I've not seen that comment line :blush:

Nothing matters, it's a great work anyway. :goodjob:
I like very much the mod packs as this one, which put together all the mods that affect a specific aspect of the game. :)

alerum68
Jan 23, 2006, 01:35 PM
Wow, looks like a lot has gone on since I last logged on... that's the nice thing about having you two on the other side of the world... When I wake up, I always have more interesting things to go through.;)

I'll try everything out tonight and see what I can do.

SimCutie, I don't want to be a pest or seem an idiot, but can you explain how your EventManger works, and If I would be able to ditch the other ones that other MODders have used and consolidate it into your file? Seems like that's what its purpose is but I'm just not bright enough to do it I think.

Edit: Okay, I deleted both the cache and the profiles directory in my documents. Then I loaded this body completely by itself, unzipped as my CustomAssets directory and am still getting the problem with the Exit button. The directory is name Entrypoints but still no go. I can hit Escape to get out, if I'm still at the main menu, but actually clicking on Exit does nothing once I go into the Custom tab, and I can't Escape out once I've actually started the game.

Here is the contents of my profile file.
[MODS]
custom_event_handler = True
blank_wonder_movie = True

[MAINSCR]
color_no_attitude = COLOR_X_WHITE
minimap_buttons_state = False,False,False,False,True,False
color_attitude_pleased = COLOR_X_LIME
minimap_buttons = Ping,Grid,BareMap,Yields,ScoresVisible,ResourceIco ns
color_attitude_annoyed = COLOR_X_PURPLE
color_attitude_cautious = COLOR_X_CYAN
show_attitude = 2
color_attitude_friendly = COLOR_X_YELLOW
enhanced_plotlist = True
color_attitude_furious = COLOR_X_MAGENTA
turn_number_on = True

Cammagno
Jan 23, 2006, 02:56 PM
Okay, I deleted both the cache and the profiles directory in my documents. Then I loaded this body completely by itself, unzipped as my CustomAssets directory and am still getting the problem with the Exit button. The directory is name Entrypoints but still no go. I can hit Escape to get out, if I'm still at the main menu, but actually clicking on Exit does nothing once I go into the Custom tab

Is your Documents and Settings\...\My Games\Sid Meier's Civilization 4\Mods folder empty? I had some error in PythonErr.log when I tried to use this mod having another mod (terraform mod) in that folder, even if it wasn't active. I don't know if this matter, however. Anyway, after trying to use "exit" button, do you receive some py error in PythonErr.log? The strange tning is that I had the same problem with "exit", but once I put those files in the correct "entrypoint" folder, the problem is gone. (my other problem with Exotic Foreign Advisor was due to my stupid error in merging the common files).

alerum68
Jan 23, 2006, 03:27 PM
I have no idea why that would affect things but just to be safe I moved my MODs folder to another directory, and am still getting the same problem.

There is no error message saying what it is. It's just like it doesn't recgonize the exit button.

I was able to merge all the MODs I had, exluding the Great Person and Great People MOD into this one without a hitch, but I don't want to post it until I can figure out this exit button problem.

Would it be possible to get just the bit of code which changes the attitude and lets me use icons? I don't know why I keep having problems with the other aspects, but the attitude modification is the thing I really wanted to add. I'll make sure to give you full credit for it inside of my pack.

Cammagno
Jan 27, 2006, 08:46 AM
I think that there is a minor bug causing the "smile" icons in some screens (civs screen and civilopedia, for exmple) to be displayed in a wrong way. Nothing serious, of course.

duderally
Jan 27, 2006, 09:49 PM
Amazing update SimCutie!... :worship: I was hesitant of the plot list incorporation before trying this, but man that is a sweet addition. Props to the original author on that one!

This is definitely my favourite mod. It adds so much to the game without altering the game play. Perfect! :king:

CobaltTiger
Feb 13, 2006, 12:47 AM
I had a problem with some icons (happiness, health, science, etc) being replaced with a white dot with this mod, most notably in the civics window and in some civilopedia entries. I think this may be what Cammagno was referring too. Well, after much gnashing of teeth and looking in the wrong place I tracked this down to a bad alpha channel in the gamefonts.tga (which contains the new icons). After some tinkering I think I have it fixed finally.

Here is the updated file in case anyone has had similar issues. :)

jojoweb
Mar 17, 2006, 07:20 AM
Very good ideas.

mikezang
Mar 27, 2006, 09:45 AM
Can you provide a mod to toggle grid/resource on when start game?

Porges
Mar 28, 2006, 05:30 PM
I built off CobaltTiger's fix to create a set of icons that match the theme of Civ IV more closely. I've attached a pic of how they look in-game, although you can't see the friendly one in this pic, just pleased, neutral, annoyed and angry. (You need to turn on the option for it to show icons instead of text.)