Unit Statistics for FFH

Joined
Jan 21, 2006
Messages
737
This is a merge of the Unit Statistics mod and FFH. I personally enjoy tracking the history of my units and heroes, especially in FfH, where unit development plays such an important role. For the merge, I need access to the SDK, which means that the mod will not always be available for the newest version.

Check the main thread for screenshots and more info on the mod.

Download

Unitstats for FFH 2 p


What's new

Compatibility with FFH 2 p


Known issues

Some FfH-specific features can confound the statistics. Elemental weaknesses and resistances modify the damage after it is reported to UnitStats, for example.

Installation Instruction

Copy the contents of the archive you downloaded into the FfH main folder.
Some files will be overwritten, which is ok. If you want to play without the mod later on, you can just disable it in the PythonCallbackDefines.xml. If you need to remove it entirely (for example for multiplayer matches), the original files can be restored by (re-)installing the latest patch.

Screenshots
 
That's freakin Awesome :) Can't wait for some screenshots from this program for brag rights :)

Any unique trophies for FfH? ie. Most Equipment Carried, Most Spells Cast...

And are there any chances for an Icon Overhaul to make the icons match a bit better with FfH's standard icons (pretty pictures in full color)?
 
I originally wanted to include some FFH-specific information (I'm especially interested in spell damage), but this would require some changes to the python files that I'd have to rewrite every time a new version is released. Hence I decided not to do that.

And I'm not much of a graphics guy, that's why I 'stole' the icons (well, they were freely available), and also why they are mostly arbitrary. It would be great if someone made icons that match the FFH style and/or have more to do with the actual category they stand for.
 
I could check into what I can make for you. Just made a couple for my PDF last night, and overall it isn't too hard if you have Photoshop, they included the template that was used to make their buttons so that you can easily match the size/border design.
 
There is a Template.dds in the art folder that I used to modify some of the buttons and that could be used as starting point. I know how to do it, but I don't have the patience to make 30 new buttons and I don't think the result would be any good... :)
 
Ok, going to look around for some button ideas, but some quick questions first:

Why multiple sizes? I would have to do quite a bit more work to make smaller options for the buttons, but I don't think that the smaller ones look that good on the Living Units & Hall of Fame screens. I prefer how they look on the Top 10 (full size) screen. So, will cutting you down to large size only be a problem? --- EDIT --- Nevermind, my DDS program automatically creates these smaller size images for me :) Still prefer full size for all screens though...

Can you tell me if you use the following buttons? Didn't see entries for them in the Hall of Fame: Air Strike Inflicted/Suffered (obviously not using I assume), 4, 1, 0, Commando, Cargo Counter, Move Counter, Max Turns Fortified, TotalTurnsFortified, Warp, UnitAge, Unitstatsbutton, Unitstatsbutton2, Unitstatsbutton3.

Also, could really see the use for a Total Movement in the High Scores, looks like there used to be a ranking for that, or I just missed finding where it was. Would it be hard to add a "Number of Spells Cast" high score? Seems it'd be a fairly simple one that isn't too invasive into python, but not sure. One final area that may be fitting to add is a Hero's Slain field, if not specific trophies for specific heroes.
 
Attached a .zip file with new icons for the highscores sheet. I only put in the ones that I saw actually used, tested them out and they do work. Haven't played with them long enough to decide how well I like them. Somewhat hard to see what they are while fogged out because I have no high scores as yet.
 
Wow, that was fast!

Air Strike Inflicted/Suffered are used in the vanilla game, but not in FFH

4, 1, 0 are not used at all. They're just there in case I want to create a new category.

Cargo Counter (number of tiles moved with cargo on board, the high score for transport units :p), Move Counter (number of tiles moved regularly) and Warp (total distance moved, including 'warp' effects (for example expulsions) are disabled by default. Depending on the size of the game and the number of units, they might slow down AI turns. They can be enabled in the UnitStatisticsDefines.py

Max Turns Fortified, TotalTurnsFortified and Commando (turns in enemy territory) dito. The value to enable this is g_bTrackTurnInformation

UnitAge. Hm, it should be there - perhaps a bug because FFH doesn't start 6000 BC. I'll have a look later :)

UnitStatsButton 1-3 are for the top right button on the main screen that you use to open the stats. Only one of them (UnitStatsButton) is actually used.

Numbers of spells cast is possible with hooks in CvSpellInterface.py. The system has been reworked for BTS and I'm not sure how it works. If the 'cast'-function catches all spells, then it would be feasible. If not, one would have to add a hook to every spell, and this would be too much work if it had to be redone for every version.

I'll now go play a round of FFH and have a look at the new buttons :)
 
FfH doesn't use Year at all, only turn timer. So that'll change everything about your Unit Age if you had based it off of the year entry.

Had figured that the UnitStatsButton entries were so you could get to the screen without the keyboard, but only looked in the bottom section of the HUD for them. Personally I think it would be better located on the right side of the END TURN button, but I am not sure how that will look in the city screen. As it is the button is BARELY noticeable under the Brotherhood of Wardens Icon.

Not entirely sure I can manage the black border jsut the right way to get the transparency to work properly or I would play with changing out that key as well :)

Cargo Counter would probably go to a Recon every game for his Hawk, so not sure that it will work well with FfH. I suppose if the Move Trackers will slow down time between turns even more that it is a good thing that you have them off by default, enough people have long turns already ;) But if you like this set of icons I can look into making some new ones for the rest of the set. I already have a couple in mind for movement, but Cargo will probably be a bit hard to come up with. I know that I will wind up using the cover from Terry Pratchet's "Last Hero" picture book version for Age if I do anything for it. Cohan the Barbarian DEFINES oldest Hero ;)
 
It's a bit too late to look into the bug(s) today, but if I have time tomorrow, I'll try to fix them.

About your buttons: something is wrong with the borders; they are not transparent, but blue-ish. I uploaded the .png version of my templates, perhaps it's easier to achieve transparency with them.

I like the icons that have a clear subject and a simple, contrasting background (for example BattleCount or BestOdds), because those are recognizable despite their small size. If there is too much detail (for example averageOdds), I find it hard to make anything out.

If you can make buttons for all high scores, I'm thinking about adding them in as an additional option. One could then either choose which one to use in the config file (UnitStatisticsDefines), and I could make yours to be used by default in FFH mode, the others in vanilla mode.
 

Attachments

  • Template.png
    Template.png
    2.6 KB · Views: 2,804
  • Template2.png
    Template2.png
    2.6 KB · Views: 2,802
I had the same feel just now when I loaded up the game to play for a while. The buttons I made are just too... busy.

I had made them with the borders which are standard in most of the FfH sets (silver), but I think that I understand now that a black border shows up as transparent in the game, so I can probably make some that have some transparent borders.

EDIT: Yeah, I was way off. It isn't that the border is black, it is that .dds actually saves Alpha Channel data, and I wasn't setting mine to do so. I got it fixed now, so I just have to decide on some better pictures for everything.
 
Very nice! I really like unit statistics, so I'll try this. Hopefully we do eventually get it integrated again in the basic FfH.
 
I'll try it now, and if I like it I may use it as the base for my modmod instead of normal FfH.
 
Here is a new set. Let me know if you want a larger transparency outline on them, I understand what I am doing quite well now :)

Towards the end I began to get comfortable with cleaning up images to make them less "busy," so if some of these are still a bit much I can actually do something about it now :)


Hadn't tracked precisely where I got each icon from, many are pictures that have been on my harddrive for ages, some are from Deviant Art. I tried to stick to the artists already used in FfH though.

Anyhow, let me know your thoughts on them, I might redo some tomorrow if you think they need it. I loaded a game to decide on them, but I've been so immersed in it I can't judge anything just yet ;)

Oh yeah, included the template that I wound up using for the setup of each icon, it is in PSD though, so I think you'd need photoshop. I shoulda probably saved a blank in DSS as well...
 
Me likey! :)

I checked why the unit age high score doesn't work: since it is checked every turn, it's disabled by default, together with the commando and fortify information.

I switched OtherDamageInflicted with OtherDamageSuffered: both are not used ATM, but could be used if I add spell damage tracking. I guess I'll play with the code for the next few days and then release a new version.
 
Those two were actually the first ones I grabbed this time through, so I was looking for "Clean" more than "Appropriate" :) But in general trying to find something where the fellow looks HURT means you need more detail than fits on an Icon :( (Hence the most damage suffered image just being a fellow with no armor. He does have blood all over him, but I am not sure if you can easily tell)

I'm glad they work decently well this time :)
 
Alright, I added two new high scores (most heroes killed and most spells cast), fixed one (most summoned units survived --> fireballs etc. will now longer count as killed units), and made it possible to switch between different sets of buttons.

xienwolf, could I ask you to make two new buttons for the new high scores? I'll then repackage everything and upload it.
 
I like the new UnitStats button. Can't find HeroSlayer though.
 
Top Bottom