[INFO] Flexible TGA

Opera

Deity
Joined
Sep 21, 2008
Messages
4,643
Flexible TGA
(see post#2 for download)

Ahwaric isn't aware of it for now, since he's away on a work trip for two weeks, but I decided to add a cool functionality to base Orbis; it would be his call to choose to add it or not. Even if he doesn't, I will add it to my own mod.

What is it?

The GameFont.tga file is a file where the game draw the icons it uses, like the smile for happy faces, the unhealth icon, the production icon, the gp icon, the resources icons and the religions/corporations icons.
Originally, the file is pretty compact with only the necessary icons. The game reads each icon successively, assigning them in the order it reads them to some variable like [ICON_HAPPY].
This is a pain for religions and corporations as you basically have to move each icons to make room for your new ones and then you have to be careful about their order.

With the flexible TGA, you can specify in ReligionInfos.xml and CorporationInfos.xml which TGA slot the religion/corp should use. Thus, you can order them as it pleases you without having to reorder the icons in the TGA file.

Last but not least, the new TGA has many more slots (up to 46 religions, 46 corporations and 360 bonuses).

It is a pretty trivial modification for non modders. For modders, it will simplifies many things. One idea I had was that, at least here in the FFH playerbase, we could share one TGA file and update it if necessary. Well, at least, FF and Orbis would be able to share their icons, being the only mods to have the flexible TGA.

Development

For now, there's still some issues for the Orbis version due to strange codding from the original author of flexible TGA. Xienwolf and I are working on it, though.

Also, I still haven't done the python part in which I'll take out the greyed icons of the city screen. It will only show which religion/corp is in the city. So, when there is nothing, nothing will be shown at all.

And please remember that even though I will eventually finish this modification, it won't be effective until Ahwaric returns and accepts to add it. I will make sure everything will be trivial for him to do, setting everything right so he won't have to tear his hair off his head.

For Fall Further modders

You may not use any of those but I modified the TGA file so that it has all Orbis' icons too. As I said above, maybe it would be simpler for us to just use the same TGA file. I know that Valkrionn is working on adding a new religion icon for Ordo Machinarum (and eventually one for the White Hand I guess) and I hope to update the TGA file I will distribute here with his icons in.

Note

The advantages of the Flexible TGA won't be at their highest until I (or someone else) import the new modular system from FF to Orbis. Then, it will be even easier for anyone to add a religion or a corporation.

Misc

I also edited the Cult of the Dragon icon to not be square anymore. The black parts of before are now transparent. It's minor but looks really nice :)

The file

Here's a screenshot of the new TGA file:
Spoiler :
GameFont.jpg

:king:
 
Download

Here is attached a first version of the TGA file, let's call it version 1. It contains all Fall Further 051(a) icons and all Orbis 0.24c icons.
 

Attachments

sounds very good to me. :goodjob: Yesterday I wondered how the tga file and modules would work together :lol:
 
Maybe I should have said that I imported it from FF, and Xienwolf imported it from World of Civilization. So I don't deserve to receive all credits :)
 
yeah, I had that figured out :p still, it's great to see that the awesome new stuff from FF 051 is being imported in Orbis already. can't wait for the new great general mechanics and the new items mechanic. :D
 
Basically hot the TGA works with modules is that you just hope to have so much extra crap in there that anything they need in the module is already available :) Thus the "Unified TGA" project/concept :)

I suppose I could include the 149 religious icons or so from Rapture, but few of them seem likely to get used in FfH based mods.
 
Well, it depends on what they look like. I guess some like those of Christianism and Islam won't be used but maybe others are more "obscure" so that they could fit. You would need to change the file to that used by RevDCM and similar though...
 
For Fall Further modders

You may not use any of those but I modified the TGA file so that it has all Orbis' icons too. As I said above, maybe it would be simpler for us to just use the same TGA file. I know that Valkrionn is working on adding a new religion icon for Ordo Machinarum (and eventually one for the White Hand I guess) and I hope to update the TGA file I will distribute here with his icons in.

I'll have to switch to this one soon then... :lol: Yeah, I got the icon added, and will eventually have one for the White Hand and a few religious 'guilds' as well.
 
is it possible to lower the file size? It's 8 times as big as the old one I think.
 
Well, I don't know. I think you can if you remove some parts of it, like allowing 30 religions/corps instead of 46 and 180 resources instead of 360. I'm not sure how the game would react though. If you tweak the values accordingly, it should be fine to use a smaller one.

I think WoC actually use one that is even bigger than ours :crazyeye:
 
Well, you can't use this without a special DLL, and the size is small compared to the DLL (it should be, I haven't checked though) so the extra size ought not to be a huge issue. But yes, you can probably get away with trimming the overall size down if you felt like it, I'd say the best bet is to make fewer columns rather than fewer rows, as to reduce the filesize you need to reduce the image area (well, I'd have to check actually, I know for many image compressions the complexity of the image is more important than the net area of the image, so actually the extra size would just be due to the extra quantity of icons, rather than to the new dimensions/layout)
 
This could open the door to religious schisms! I suppose they could work like a guild and would represent major dogmatic differences between sects of a certain religion. Think Catholicism/Orthodoxy/Protestantism in Christianity (though it gets a lot more complicated than that of course), Sunni/Shi'a/Sufi in Islam or Orthodox/Conservative/Reform in Judaism.

For example, three major schisms for Fellowship of Leaves (in LE/NA .4) could be a) Developed Forests (Ljosalfar - and non-thematic Svartalfar - to represent their ability to build improvements in forests), b) Unspoiled Forests (Ngomele, to represent the fact that they won't build improvements at all in .4), c) Managed Forests (any other non-elven civs, to represent the fact that they probably cut down even Ancient Forests to access resources, etc.). :mischief:

Basically, all religious sects/guilds would compete (though not necessarily consume resources) and if a player founded a particular sect through event, through civ type or through expending a great person - if the rewards for doing so were great enough, such as a sort of "sect holy city/guild HQ" bonus - they would receive a diplomatic penalty with civs with competing sects. This might also happen if a majority of that civ's cities had the particular sect, and would at least alleviate the normal lovefest that tends to exist between civs of a particular religion. :rolleyes:

Just think of all the strife that's happened in our world between certain powerful sects and those they didn't agree with. Like the Inquisition and the various "heretic" purges (and Crusades, which often victimized Orthodox areas) committed by the Catholic Church, or the constant fighting between Sunni and Shi'ite Muslims. Speaking of which, Inquisitors should also have the power to remove competing sects from a city, leaving it open to re-indoctrination by a representative of the "preferred" sect. ;)
 
(well, I'd have to check actually, I know for many image compressions the complexity of the image is more important than the net area of the image, so actually the extra size would just be due to the extra quantity of icons, rather than to the new dimensions/layout)
yeah, that is why I was so surprised about the file size. Anyway, thanks for the tga Opera :goodjob: looking forward to actually use those new icons :lol:
 
This could open the door to religious schisms! I suppose they could work like a guild and would represent major dogmatic differences between sects of a certain religion. Think Catholicism/Orthodoxy/Protestantism in Christianity (though it gets a lot more complicated than that of course), Sunni/Shi'a/Sufi in Islam or Orthodox/Conservative/Reform in Judaism.

For example, three major schisms for Fellowship of Leaves (in LE/NA .4) could be a) Developed Forests (Ljosalfar - and non-thematic Svartalfar - to represent their ability to build improvements in forests), b) Unspoiled Forests (Ngomele, to represent the fact that they won't build improvements at all in .4), c) Managed Forests (any other non-elven civs, to represent the fact that they probably cut down even Ancient Forests to access resources, etc.). :mischief:

Basically, all religious sects/guilds would compete (though not necessarily consume resources) and if a player founded a particular sect through event, through civ type or through expending a great person - if the rewards for doing so were great enough, such as a sort of "sect holy city/guild HQ" bonus - they would receive a diplomatic penalty with civs with competing sects. This might also happen if a majority of that civ's cities had the particular sect, and would at least alleviate the normal lovefest that tends to exist between civs of a particular religion. :rolleyes:

Just think of all the strife that's happened in our world between certain powerful sects and those they didn't agree with. Like the Inquisition and the various "heretic" purges (and Crusades, which often victimized Orthodox areas) committed by the Catholic Church, or the constant fighting between Sunni and Shi'ite Muslims. Speaking of which, Inquisitors should also have the power to remove competing sects from a city, leaving it open to re-indoctrination by a representative of the "preferred" sect. ;)

I would see religious splits among FoL followers differently... Rather than the state of the forest, more the way they worship. For example, you have the Ljos, who worship nature's beauty and peace... Treehuggers, basically. Then you have the Doviello, for who FoL is the best fitting religion, but view it completely differently. They'd worship nature for it's barbarity, for the Survival of the Fittest.
 
I would see religious splits among FoL followers differently... Rather than the state of the forest, more the way they worship. For example, you have the Ljos, who worship nature's beauty and peace... Treehuggers, basically. Then you have the Doviello, for who FoL is the best fitting religion, but view it completely differently. They'd worship nature for it's barbarity, for the Survival of the Fittest.

No reason your sects couldn't exist alongside the ones I mentioned. They wouldn't all have to be present in every game, after all. The Ljosalfar could follow either "Developed Forests" or "Nature's Peace"; the Doviello could choose "Managed Forests" (most likely under Mahala, or at least the neutral Orbis/LE version of her rather than the evil vanilla version) or "Nature's Fury" (Charadon). :mischief:
 
@Sephi: you're welcome :goodjob:

@Valkrionn & Cylnar: well, that could be nice. However, how would you think it could be done?
 
Most likely something like the guild mechanic or maybe the world spell mechanic, or a combination thereof. I would use the guild mechanic (spend a great person) only if there were decent rewards for starting a sect and having its "holy city" and any other buildings or bonuses that might be possible thereby.

Otherwise (if the rewards were lesser - there would be little point to sects if there were no rewards whatsoever), perhaps simply spend a low-level disciple unit, or like a world spell, any unit could cast without being consumed. Criteria to get the sect icons/spells could be certain civ, certain alignment, certain tech, certain civic, etc.

For example, using my and Valkrionn's discussion about FoL, "Nature's Peace" would be available to the Ljosalfar immediately; other civs might have to run the Guardians of Nature civic or at least research Hidden Paths, and be of a good or neutral alignment. "Developed Forests" would be available to Ljosalfar and Svartalfar only since only they can improve most forest tiles without destroying them. "Unspoiled Forests" would be available only to the Ngomele since they won't improve tiles. "Managed Forests" would be available only to civs other than the elves and Ngomele. "Nature's Fury" would be available only to evil (and maybe neutral) civs.
 
Okay, so. That's cool. But what about having some buttons atlases with the buttons for those resource icons? Because I'm modding a bit these days, using new icons from the tga file and I don't have a regular dds button to go with the icon. I mean, I could create one but, obviously, someone else did the same thing before myself.

If anyone is willing to hunt down what each resource icon represent and where it comes from and which dds button it uses, I'd be happy :)
 
Back
Top Bottom