Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components

Notices

Reply
 
Thread Tools
Old Dec 04, 2005, 06:55 PM   #61
HeroFromHyrule
Chieftain
 
Join Date: Oct 2005
Posts: 23
This looks great! Installing now, feedback coming soon.
HeroFromHyrule is offline   Reply With Quote
Old Dec 05, 2005, 05:29 PM   #62
jonpfl
Prince
 
Join Date: Oct 2005
Posts: 314
Which one should I use

Why are there 2 files?

Which one should I use?

Thx
jonpfl
jonpfl is offline   Reply With Quote
Old Dec 05, 2005, 06:19 PM   #63
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by jonpfl
Why are there 2 files?

Which one should I use?

Thx
jonpfl
v0.91

I kept v0.9 up since there were initially problems with v0.91

I'll remove that one now.

Req
Requies is offline   Reply With Quote
Old Dec 05, 2005, 08:35 PM   #64
zx1111
Warlord
 
zx1111's Avatar
 
Join Date: Oct 2005
Posts: 235
from line 654 of CvSpecialDomesticAdvisor.py
Code:
elif (szKey == "FOOD"):
	# Replace Food/Food Used with Net Food AND Turns until Growth...
	# If this is a food production (i.e., worker or settler)
	if (pCity.isFoodProduction()):
		nFood = pCity.getCurrentProductionDifference (False, False) \
                           - pCity.getCurrentProductionDifference (True, False)
	else:
		nFood = pCity.foodDifference (True)
	
	szReturn = unicode(nFood)
May I ask few questions?:

1) Is pCity.foodDifference (True) same thing as
(pCity.getFoodRate() - pCity.foodConsumption(False, 0) ?

2) What is the meaning of pCity.getCurrentProductionDifference (False, False) - pCity.getCurrentProductionDifference (True, False)

What does this number means? difference of difference?
Is this diffrent from "pCity.foodDifference()"?
Would you explain the code to us more kindly?
Where can I find more infos anout them?

Last edited by zx1111; Dec 05, 2005 at 08:45 PM.
zx1111 is offline   Reply With Quote
Old Dec 05, 2005, 09:15 PM   #65
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by zx1111
from line 654 of CvSpecialDomesticAdvisor.py
Code:
elif (szKey == "FOOD"):
	# Replace Food/Food Used with Net Food AND Turns until Growth...
	# If this is a food production (i.e., worker or settler)
	if (pCity.isFoodProduction()):
		nFood = pCity.getCurrentProductionDifference (False, False) \
                           - pCity.getCurrentProductionDifference (True, False)
	else:
		nFood = pCity.foodDifference (True)
	
	szReturn = unicode(nFood)
May I ask few questions?:
Sure.

Quote:
Originally Posted by zx1111
1) Is pCity.foodDifference (True) same thing as
(pCity.getFoodRate() - pCity.foodConsumption(False, 0) ?
I believe so, though I'm not exactly sure what foodConsumption would return.

Quote:
Originally Posted by zx1111
2) What is the meaning of pCity.getCurrentProductionDifference (False, False) - pCity.getCurrentProductionDifference (True, False)
Get the Current city's production (NOT ignoring food) - get the current city's production (ignoring food)

Quote:
Originally Posted by zx1111
What does this number means? difference of difference?
The amount of net food the city is producing.

Quote:
Originally Posted by zx1111
Is this diffrent from "pCity.foodDifference()"?
Yes, because foodDifference, I believe, becomes zero when the city is in "Food Production" mode which is why there is the comparison there and different paths there.

Quote:
Originally Posted by zx1111
Would you explain the code to us more kindly?
I'll definitely improve the comments once I get to v1.0. It's not quite there yet, though.

Quote:
Originally Posted by zx1111
Where can I find more infos anout them?
The Civ 4 API is a GREAT reference for getting a general idea of what functions there are in the Civ 4 game.

Just a warning, though. It is NOT complete or completely up-to-date as it's the API of the last update to the BETA TESTERS. Since the release and the 1.09 patch some of the API has changed.

The best way to get CURRENT information is to use in-language 'help' function of Python.

Unfortunately, it seems that this is NOT available if you only install Civ 4. It seems you also have to have Python installed, in addition (or at least that's what SEEMED to happen when some players reported that one of my version gagged because it couldn't find the "help" symbol).

Still the aforementioned website is a great jumping off point for trying to see what different functions are available in the Civ 4 code.

Req
Requies is offline   Reply With Quote
Old Dec 05, 2005, 09:47 PM   #66
zx1111
Warlord
 
zx1111's Avatar
 
Join Date: Oct 2005
Posts: 235
Thanks a lot, Requires.. For your kind explanation, I can understand the logics behind the displayed food number.
zx1111 is offline   Reply With Quote
Old Dec 06, 2005, 09:32 AM   #67
CautiousChaos
Warlord
 
CautiousChaos's Avatar
 
Join Date: Nov 2003
Posts: 107
Requies,

This is a really nice set of work. It's much closer to the Civ3 version and offers much more detailed and useful information than the Civ4 vanilla. Very nicely done.

I was wondering if there are any python calls that could be made so that you return to the Domestic Advisor after you "View" a city? It's probably not a big deal, because you display most of the information in the advisor, still there's a limit to what you can show and this could be a helpful behavior.

Food for thought...
-cc
CautiousChaos is offline   Reply With Quote
Old Dec 06, 2005, 10:01 AM   #68
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by CautiousChaos
Requies,

This is a really nice set of work. It's much closer to the Civ3 version and offers much more detailed and useful information than the Civ4 vanilla. Very nicely done.

I was wondering if there are any python calls that could be made so that you return to the Domestic Advisor after you "View" a city? It's probably not a big deal, because you display most of the information in the advisor, still there's a limit to what you can show and this could be a helpful behavior.

Food for thought...
-cc
Try [F1] .

Req
Requies is offline   Reply With Quote
Old Dec 06, 2005, 10:22 AM   #69
CautiousChaos
Warlord
 
CautiousChaos's Avatar
 
Join Date: Nov 2003
Posts: 107
heh heh heh... Ok, you got me. Laziness...

-cc
CautiousChaos is offline   Reply With Quote
Old Dec 06, 2005, 01:23 PM   #70
kurdt
Chieftain
 
kurdt's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA, USA
Posts: 15
Suggestion:
I was reading about Great People generation rate and was wondering if you could add code to color the GP point/turn column red if they're producing at so low of a rate that they will never produce one, and yellow if it's less than double that rate.

And yes I realize the amount of math this would require (which is would be why it would be so much easier for the comp to do it than me )

And, a simpler one: could you set the food/turn column to turn yellow when production is 0 instead of red? Some cities I do want to be stagnant. Also, could you you make it yellow or green if food/turn is >=8 ? After getting Biology I often have to hunt down my towns with insane food production and make it more manageable compared to my health/happiness rates.

Edit: one more food condition: if the (food/turn) /2 > Min (net health, net happiness), turn it red - meaning the city is going to go over it's max size even if the new citizens don't produce any food. This is the same idea as turning it green for >=8, but I figured I'd leave both ideas in so you can do just one or both.

And lastly, under the Buildings column, could you show National Wonders too?

And one suggestion, for the Specialists, it might be more compact to in the column list the type and number than have an icon for each one.

Other than that, this is the best mod I've seen yet! Thanks for this, can't wait to get home and get this installed!

Last edited by kurdt; Dec 06, 2005 at 01:34 PM.
kurdt is offline   Reply With Quote
Old Dec 06, 2005, 01:44 PM   #71
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by sportybrian
Suggestion:
I was reading about Great People generation rate and was wondering if you could add code to color the GP point/turn column red if they're producing at so low of a rate that they will never produce one, and yellow if it's less than double that rate.

And yes I realize the amount of math this would require (which is would be why it would be so much easier for the comp to do it than me )
Hmmmm, there's quite a bit that I would have to change for this one. I'll have to think about it.

Quote:
Originally Posted by sportybrian
And, a simpler one: could you set the food/turn column to turn yellow when production is 0 instead of red? Some cities I do want to be stagnant. Also, could you you make it yellow or green if food/turn is >=8 ? After getting Biology I often have to hunt down my towns with insane food production and make it more manageable compared to my health/happiness rates.
That's definitely very doable. I'll have to think about tackling it since right now, my code is standardized and I'd have to make exceptions to it for this.

Quote:
Originally Posted by sportybrian
Edit: one more food condition: if the (food/turn) /2 > Min (net health, net happiness), turn it red - meaning the city is going to go over it's max size even if the new citizens don't produce any food. This is the same idea as turning it green for >=8, but I figured I'd leave both ideas in so you can do just one or both.
Probably not as feasible. Perhaps I could just turn the health and happiness to yellow if they're 0?

Quote:
Originally Posted by sportybrian
And lastly, under the Buildings column, could you show National Wonders too?
Already done, and not by me . If you mean SPECIFIC National Wonders, what icons would you use? I'm limited to a very low number. I guess I could use letters, but it seems so inelegant.

Quote:
Originally Posted by sportybrian
And one suggestion, for the Specialists, it might be more compact to in the column list the type and number than have an icon for each one.
Already done. You think like a lot of other civvers .

Quote:
Originally Posted by sportybrian
Other than that, this is the best mod I've seen yet! Thanks for this, can't wait to get home and get this installed!
Thank you. Keep those suggestions coming!
Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 11:28 AM   #72
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
for v 0.92.

-Added more color coding (Yellow for neutral - 0, Green for great)
-Added in foreign language support (I'm not sure if the translations are correct, so please let me know if they're wrong!)
-Added a LOT more documentation and some handy info if you want to try changing it....

It's getting close to being finished. I think I have one more idea I might put in for v 1.0.

If you guys have any other great ideas, let me know!

Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 12:05 PM   #73
Mysterio10000
Prince
 
Mysterio10000's Avatar
 
Join Date: Nov 2005
Location: Wesley Chapel, FL
Posts: 309
With 0.92, my screen looks like this. The REDRAW and VIEW buttons aren't shown correctly, and the first column's text is wrong.

Click image for larger version

Name:	Civ4ScreenShot0003.JPG
Views:	246
Size:	219.0 KB
ID:	106778

Last edited by Mysterio10000; Dec 08, 2005 at 12:12 PM.
Mysterio10000 is offline   Reply With Quote
Old Dec 08, 2005, 12:24 PM   #74
kurdt
Chieftain
 
kurdt's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA, USA
Posts: 15
One more minor problem I noticed in v0.91:
When adjusting specialists via this Advisor, it goes off the original city in the list, not how you currently have it sorted. I assume it's the same problem as #1 and #2.

(and sorry about not noticing my suggestions were already proposed, I started skimming when I saw the install problems, and guess I skimmed right over them)

P.S. This mod rocks! Makes my need for MM so much easier!
kurdt is offline   Reply With Quote
Old Dec 08, 2005, 12:27 PM   #75
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by Mysterio10000
With 0.92, my screen looks like this. The REDRAW and VIEW buttons aren't shown correctly, and the first column's text is wrong.

Attachment 106778
Clear the cache. I would suggest deleting it :/. It's all in the new XML file which isn't being loaded properly unless you clear the cache.

Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 12:28 PM   #76
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by sportybrian
One more minor problem I noticed in v0.91:
When adjusting specialists via this Advisor, it goes off the original city in the list, not how you currently have it sorted. I assume it's the same problem as #1 and #2.

(and sorry about not noticing my suggestions were already proposed, I started skimming when I saw the install problems, and guess I skimmed right over them)

P.S. This mod rocks! Makes my need for MM so much easier!
Yeah, it's the same problem. That feature probably won't make it into v1.0. As, it will 1) slow it down and 2) be kind of a pain to program.

Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 01:40 PM   #77
Mysterio10000
Prince
 
Mysterio10000's Avatar
 
Join Date: Nov 2005
Location: Wesley Chapel, FL
Posts: 309
Quote:
Originally Posted by Requies
Clear the cache. I would suggest deleting it :/. It's all in the new XML file which isn't being loaded properly unless you clear the cache.
That's not the cause, since I both cleared the cache manually and held the SHIFT key down before taking that screenshot.
Mysterio10000 is offline   Reply With Quote
Old Dec 08, 2005, 01:44 PM   #78
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by Mysterio10000
That's not the cause, since I both cleared the cache manually and held the SHIFT key down before taking that screenshot.
Hmmmm, strange.... You do have the Civ4AdviserInfo.xml file in XML/Text, right?

Anyone else running into this problem?

Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 01:51 PM   #79
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by Requies
Hmmmm, strange.... You do have the Civ4AdviserInfo.xml file in XML/Text, right?

Anyone else running into this problem?

Req
If the XML file is there, can you try moving your My Documents\Civilization 4\ folder, have Civ 4 re-install those files, unzipping the mod and deleting the cache?

I just did that and it worked immediately.... Either that or maybe my setups different.

Req
Requies is offline   Reply With Quote
Old Dec 08, 2005, 02:02 PM   #80
Mysterio10000
Prince
 
Mysterio10000's Avatar
 
Join Date: Nov 2005
Location: Wesley Chapel, FL
Posts: 309
Quote:
Originally Posted by Requies
Hmmmm, strange.... You do have the Civ4AdviserInfo.xml file in XML/Text, right?
No, I didn't know that file was part of your mod, since it's not mentioned in your installation instructions. Rather than copying the entire folder, as you instruct, I prefer to copy the individual files, since some of my mods use the same files as your mod. So, I rely on the specific files you mention in the readme to know which files to copy, and the XML file isn't mentioned.

It's odd, though, because I never copied that XML file over to my CustomAssets folder while running 0.91, and the button text was just fine. I also don't have that file in my Assets folder, which means it's not part of the default install.

Copying your Civ4AdviserInfo.xml file to my CustomAssets/xml/text folder corrected the problem.

EDIT: Proper file name is CIV4AdvisorInfo.xml, not CIV4AdviserInfo.xml.

Last edited by Mysterio10000; Dec 08, 2005 at 02:10 PM.
Mysterio10000 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Mod Components > A "Special" Domestic Advisor (Please try out!)

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BTS & Modified Special Domestic Advisor Denniz Civ4 - Hall of Fame Discussion 2 Jul 28, 2007 11:28 PM
A "Sum" row in the Domestic Advisor Blkbird Civ - Ideas & Suggestions 2 Jul 27, 2007 04:32 PM
[MOD] Modified Special Domestic Advisor 12monkeys Civ4 - Mod Components 113 Jan 12, 2007 07:37 PM
A "Better" Domestic Advisor ? homegrown Civ4 - Mod Components 118 Feb 11, 2006 03:27 PM
Can I run my Special Domestic Advisor mod? Requies Civ4 - Game of the Month 12 Dec 12, 2005 10:47 PM


Advertisement

All times are GMT -6. The time now is 11:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR