View Full Version : Civilization IV Leader Picker


Zhahz
Nov 12, 2005, 09:51 PM
EDIT: Version updated to 1.4 to include trait changes in patch 1.61.

Here's a little utility I created (in the form of a simple web page) that'll list leaders with their related civ, trait, tech, and UU information by trait and/or tech selection.

Want a quick list of all the industrious leaders? Want a quick list of all the leaders that start with mining? Want a (short and) quick list of the leaders that have industrious AND mining?

This utility provides it. It's a handy way to do leader comparisons.

Here's an example listing:

http://i21.imagethrust.com/i/70136/sample13.gif

EDIT: You can see it at http://www.civfanatics.com/civ4/reference/leader_picker.html

(Thanks to Thunderfall for adding the utility to this site and linking it here!)

Feedback (comments, suggestions, error/data issues) are welcome!

Enjoy!

----------------

The source is attached as a text file. To use it yourself (locally or whatever) you'd want to save it and rename it as an .htm or .html file.

Tech Notes (of sorts)

This post has been edited numerous times...especially once I figured out the advanced editing features existed. :)

IE6. If you download the source and run it locally as a file the page might get hosed due to security settings. The page is made up of harmless html and javascript but you'll still have to let IE use the javascript. <sigh>

I got some of the unit info from a PDF that another forum user posted several days ago but I don't remember the username (and I had only saved off the file, not a link to the thread). Beyond that I used the manual and 'pedia.

Mujadaddy
Nov 12, 2005, 09:59 PM
http://forums.civfanatics.com/attachment.php?attachmentid=103589&d=1131856746 Like this?


EDIT: apparently not :-/

MusicLaunch
Nov 13, 2005, 01:28 AM
Yup, works good. Very informative too --

Thanks, Good job! Now I don't have to read the civopedia for five minutes 8-)

Zhahz
Nov 13, 2005, 09:04 AM
(EDIT - removed extra copy of the screenshot and text that was no longer necessary - but I couldn't figure out a way to delete this post entirely)

Samurai of Ice
Nov 13, 2005, 09:17 AM
how exactly to get to it? I'm not very good with internet things....

craigrc
Nov 13, 2005, 09:59 AM
Zhahz, cool utility! Thank you.

Zhahz
Nov 13, 2005, 12:19 PM
This question was posted before the utility was available via linkage...

how exactly to get to it? I'm not very good with internet things....

EDIT - Thunderfall has kindly added the utility to the Civ IV reference section of this site, so I've removed my ramblings about downloading and running the source.

Check out the original post or the post immediately after this one for a link to the utility.

Thunderfall
Nov 13, 2005, 12:27 PM
Very nice, Zhahz. :thumbsup:

I have uploaded it to the main site. The link is:

http://www.civfanatics.com/civ4/reference/leader_picker.html

homegrown
Nov 13, 2005, 12:33 PM
I like this so much, I've linked to it here. (http://home.houston.rr.com/homegrowns/files/civ4ldrpckr.html)

Bookmark it!

Zhahz, if you want to send me a little blurb for the bottom that gives you complete credit, I'd be happy to post it for you.

** bah: Thunderfall beat me. :) **

I still like it. :)

mikh07
Nov 13, 2005, 12:35 PM
thunderfall, don't you think you should give credit where credit is due? :)

Luv_Muffin
Nov 13, 2005, 12:37 PM
Good post, glad I read it.
*bookmarked* :goodjob:

Thunderfall
Nov 13, 2005, 12:38 PM
thunderfall, don't you think you should give credit where credit is due? :)
Of course. :)

Rik Meleet
Nov 13, 2005, 12:50 PM
Zhahz: 1 request; Would you please add in the "UU-column" the stats of the unit it replaces.
for example: Cossack (18/2/120) (Cavalry 15/2/120)

monkspider
Nov 13, 2005, 01:17 PM
This is great. Excellent work.

josephstalin
Nov 13, 2005, 01:33 PM
Very neat, nice job.

Civrules
Nov 13, 2005, 01:39 PM
Awesome job. Very nice. :cool:

*Civrules gives it 5 stars*

Sildo
Nov 13, 2005, 01:52 PM
Would it be possible to choose two triats or techs, either way, this thing is awsome.

Zhahz
Nov 13, 2005, 03:34 PM
Thanks for the feedback and I'm glad people like it!

Very nice, Zhahz. :thumbsup:

I have uploaded it to the main site. The link is:

http://www.civfanatics.com/civ4/reference/leader_picker.html

Thanks and I'm honored. Thanks for sticking my name in there too but it's not really necessary. (I had put my username/name in the javascript as a comment.) I'm going to edit my earlier posts in this thread to remove some of my no longer necessary ramblings.

Zhahz: 1 request; Would you please add in the "UU-column" the stats of the unit it replaces.
for example: Cossack (18/2/120) (Cavalry 15/2/120)

Good idea and I'll see about adding that.

Would it be possible to choose two triats or techs, either way, this thing is awsome.

Tough call. I would prefer to keep it simple and you can get a reasonable list by picking a single trait or tech so I'm not sure I'll add this, but I may experiement with it. Not a bad idea by any stretch, but not quite what I had intended (I mainly built the thing to reduce the amount of time I spent manually comparing leaders in the manual, 'pedia, and/or startup screens, when starting a new game).

-------------------

I'm told (via PM) that there's a problem with the utility running thru Safari on Macs. I'm not familiar with Safari so I'm not sure what the problem might be. I suspect it's due to how the dropdowns are dynamically populated. If anybody knows for sure, please let me know!

Öjevind Lång
Nov 13, 2005, 03:43 PM
Nice work! :-) Incidentally, I can't get over the stupid fact that Greece is only represented by one leader. They should have had an alternative in the form of someone from Greece's classical period, Pericles of Athens, for example, and let him have been creative and financial, corresponding to the characteristics of Athens and the other Greek city states in their days of glory. And it would also duplicate the Greek characteristics in Civ III.
True, in due time Athens lost its leading position and their hegemony went to pieces. But then, Alexander's empire went to pieces at the moment of hisdeasth, and yet his legacy endured And he buiklt on the achievements if city states such as (above all) Athens.

Öjevind Lång

Zhahz
Nov 13, 2005, 06:31 PM
I've updated the source attachment in the original post to version 1.1, which includes expanded UU replacement unit information per Rik Meleet's suggestion (but I'm not sure if the format is optimal). There's an updated screenshot reflecting this addition.

There are also a few minor text/content fixes - Navy SEALs were missing first strike and Quechua cost was incorrect.

Isak
Nov 14, 2005, 01:02 AM
Very good work. Another 5 star rating coming your way. :goodjob:

CustodianV131
Nov 14, 2005, 02:03 AM
Very handy!

Saves me a lot of time and allows me to decide on which Civ to play in my next game in places that don’t have Civ access :D

corwin90
Nov 14, 2005, 09:08 AM
Awesome tool. I was playing Romans expansive, organized and wanted to find a leader that had aggressive, organized. Your tool is just the ticket. Highly recommended!

homersheineken
Nov 14, 2005, 10:18 AM
Nice job!!!

Grimshok
Nov 14, 2005, 11:52 AM
VERY NICE! MANY thanks!

... would it be possible to add the Second Trait under the TECH section... possibly under a "-------" divider (that would select 'Any').

But in any event WELL DONE, and again, MANY thanks! This is awesome!


EDIT: I agree with the post below (WalrusMan), ... the second trait may not be necessary due to the limited number of leadership options available. But, then again,... it couldnt hurt. *shrugs*

WalrusMan
Nov 14, 2005, 11:55 AM
Very nice utility!

The only thing I would add would be a version that let you pick a leader by both characteristics, but that seems to be uncessary due to the limited number of leaders with the first characteristic.

Teutonic_Knight
Nov 14, 2005, 12:13 PM
Wow, this is an awesome utility. Saves a ton of time searching and very useful for finding a new civ to try! Thank you, Zhahz!

Quasimodo
Nov 14, 2005, 12:17 PM
Great tool Zhahz! :goodjob:

Was wondering if there was an "offline" version?

The computer I have Civ on doesn't have an Internet connection. :sad:

Zhahz
Nov 14, 2005, 02:14 PM
Was wondering if there was an "offline" version?

The computer I have Civ on doesn't have an Internet connection. :sad:

The "source" (so to speak, it's just a stand-alone web page) is attached to the original post. This is the same file civfanatics has in the reference section (barring any changes they make when they grab the latest version from this thread, which are minimal if any).

If you download it and rename it as an .htm or .html page you can "run" it locally by double-clicking on it (it should load into your default browser and run the same as it runs at civfanatics). You do need to have a browser to "run" it locally/offline (browsers can render simple resources like stand-alone html pages you have stored locally even if you're not online).

The only issue is that if you "run" it this way locally thru IE you might encounter a security warning and need to enable the page for it to fully function (you'll get a warning and have a typical "yellow bar" at the top of the page, right-click, allow, and page works after that). Mozilla didn't seem to have the same issue if memory serves.

Tarkeel
Nov 14, 2005, 02:31 PM
Just wanted to add that it works perfectly in Opera :) Thumbs up for that!

myhf
Nov 14, 2005, 02:46 PM
To get it to work in Safari, change the line
document.getElementById(sDropDownId).options.add(o Item);
to
document.getElementById(sDropDownId).options[document.getElementById(sDropDownId).length] = oItem;
I'm no Javascript expert but Safari was choking on the add so I messed around until it worked in both Safari and Firefox.

Zhahz
Nov 14, 2005, 03:21 PM
I've updated the source attachment in the original post to version 1.2, which incorporates myhf's fix for the dropdown populating in Safari...which also continues to work in Internet Explorer, btw. ;)

Thanks, myhf!

I didn't update the screenshot, which still shows v1.1. There are no other changes so I probably won't bother.

PS - I'm not sure when v1.2 will be up on civfanatics. I expected to do a few updates and didn't want to be a nuisance so I never made an attempt to notify anyone for v1.1, yet it was updated at some point (thanks, btw).

ruff_hi
Nov 14, 2005, 09:01 PM
That is terrific. I was wondering if you could do something similar with the wonders / Great Persons / city improvements. I was trying for a culture win and looking through all the wonders / city improvements for those that created culture and GPPs. I suppose what I am after is a list of all the wonders / city improvements that generate culture (or help with hammers / health / wealth / GP bonus / etc). It might be a little judgemental as one person might think that a wonder is a cultural wonder while another might say it is a wealth wonder).

Thunderfall
Nov 14, 2005, 09:06 PM
PS - I'm not sure when v1.2 will be up on civfanatics. I expected to do a few updates and didn't want to be a nuisance so I never made an attempt to notify anyone for v1.1, yet it was updated at some point (thanks, btw).
Don't worry about it. :) It takes less than a minute to overwrite the page with the new version.

Thunderfall
Nov 15, 2005, 10:53 PM
I am moving this to the Civ4 Reference forum so it's easy to find. It's currently at page 3. :eek:

DaveShack
Nov 15, 2005, 11:55 PM
This is really cool, thanks for taking the time to put it together! :goodjob:

One minor nit, if all leaders are shown, it takes a full screen in Firefox at 1280x1024, and the mouseover causes a vertical scrollbar. I was able to work around it by turning off the status line, but if it were possible to shrink the text size one click that would do it. Even better, drop down a text size when more than about 23 rows show in the table.

In Firefox at least the user can also hit CTRL - (control and minus sign) to shrink it, so there is an easy workaround. :)

Zhahz
Nov 16, 2005, 12:04 PM
I've updated the source attachment in the original post to version 1.3 and redid the screenshot.

The whole utility has had a style makeover to tighten it up and make it more "resolution friendly" as a result DaveShack's comments. It should now be able to do a full listing at 1024x768 depending on how you have your browser setup. If you have extensive toolbars and menubars it still might not fully fit.

The makeover includes tightening up the list grid so that it looks more like a real grid, reducing the whitespace between major element sections, shrinking the title at the top of the page, and dynamically altering the font size from 9pt to 8pt for full listings (per DaveShack's suggestion).

I also fixed the cursor style for mouseovers to be standard compliant (doh) so you now see the "hand" cursor in Firefox. (Original post edited to remove Firefox issues since they were due to my ignorance - I use IE!)

I only have IE and Firefox and all these changes seem to work fine in both. If any Opera, Safari, or other users have problems please PM or post them!

One minor nit, if all leaders are shown, it takes a full screen in Firefox at 1280x1024, and the mouseover causes a vertical scrollbar. ... Even better, drop down a text size when more than about 23 rows show in the table.

I should've been more resolution sensative but I'm lazy! (and I have a 22" monitor running 1600x1200) Thanks for the suggestion on dynamically altering the font size - I've incorporated it in 1.3.

I was wondering if you could do something similar with the wonders / Great Persons / city improvements. I was trying for a culture win and looking through all the wonders / city improvements for those that created culture and GPPs. I suppose what I am after is a list of all the wonders / city improvements that generate culture (or help with hammers / health / wealth / GP bonus / etc). It might be a little judgemental as one person might think that a wonder is a cultural wonder while another might say it is a wealth wonder).

The biggest pain in doing this utility or in doing your suggestion is compiling the data and building the data structures in javascript. If there's a comprehensive list in a programmatically accessible file format (ideally xml or delimited text) or if anyone knows of xml from the game that would contain all suitable data then I might give this a shot. I wouldn't want to manually build up the data structures for a wonder list - I'd instead hack together a quick C# app to build them for me from structured data.

Gherald
Jul 14, 2006, 04:34 AM
For Warlords: http://forums.civfanatics.com/showthread.php?p=4272409#post4272409

Frisxo
Aug 07, 2006, 07:37 PM
Love the Leader Picker!

Will you be updating for Warlords expansion pack? (pleeeeeaaasse)

Emerald Melios
Aug 13, 2006, 12:01 AM
I wish the on-site leader picker was updated to Warlords.

Putchuco
Sep 12, 2006, 09:46 PM
I wish the on-site leader picker was updated to Warlords.


See above, Gherald updated Zhahz' work for Warlords.

Putchuco
Sep 12, 2006, 09:47 PM
And me and a friend of mine (CANDT) got together to update the 'leader picker' for Sevomod3.1.

Have a look here: http://www.putchuco.com/leader_picker_Sevomod3_1_3.html

Not sure how long I will host that file there, maybe someone here at civfanatics wants to include this in the hosted files.

(Note: the original 'leader picker' was done by zahz, see here: http://forums.civfanatics.com/showthread.php?t=140336; the add-on for the Warlord extension was done by Gherald, see here: http://forums.civfanatics.com/showthread.php?p=4272409#post4272409)

Hope you like it, I thought it's a very useful tool, especially for Sevomod with all the leaders/civs it gives us.

If you find anything wrong with it, or have other suggestions, let me know.