These Fractured States of America

ok - notes:
Since there is no BUILDINGCLASS_AIRPORT, there is a failed assertion when BULL checks whether an Airport icon should be displayed on the city bar. The warning is harmless but annoying and can be disabled by changing
int eAirportClass = GC.getInfoTypeForString("BUILDINGCLASS_AIRPORT");
to
int eAirportClass = GC.getInfoTypeForString("BUILDINGCLASS_AIRPORT", true);
in CvGameTextMgr.cpp. (Not attaching that large file for this tiny change.)
fixed.
The same assertion is triggered by this line in CvAdvisorUtils.py:
if (pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_SPY")):
and several others in that file. Those are executed even if the "Advisor Popups" option is disabled (because the game still records accomplished feats – in case that Advisor Popups are enabled at a later time). I suggest to fully disable the unit and building feats by immediately returning from the functions unitBuiltFeats and buildingBuiltFeats as in the attached CvAdvisorUtils.py.
done.
DotO makes the XML tags above (and others) optional through the Schema.xml files (by setting minOccurs="0") and by disabling AdvCiv assertions in CvXMLLoadUtilityGet.cpp. That can be convenient when adding new tags – will only have to add non-zero entries in XML. (E.g. in Civ4FeatureInfos.xml, it's enough to add <iWarmingDefense> elements to Forest and Jungle.) However, there's a crucial line that DotO comments out in CvXMLLoadUtilityGet.cpp, and this causes missing XML data to be set to MIN_INT (ca. minus two billion). So the blocks of code surrounding the "Try to allow the caller to ignore the error" comments need to say either (warning enabled)
merged.
Open issue: gDLL->getEngineIFace()->AutoSave() sometimes fails; the EXE doesn't even call CvEventReporter:: preSave in those cases, no save file is created and an assertion is triggered. I've never had this problem with AdvCiv. For now, to ignore the problem, you may want to disable the assertions in CvEventReporter:: preAutoSave and CvEventReporter:: preQuickSave if they trigger frequently.
done.
The tech tree crashes because the era <Type> strings (e.g. ERA_MEDIEVAL) are hardcoded in Config\Not Just Another Game Clock.xml. Quick fix: Comment out this line
self.setTechPanelShadowColor(screen, szTechRecordShadow, gc.getTechInfo(i).getEra())
in Python\Screens\CvTechChooser.py (not attached). And, maybe at some later point, either remove the "Era Colors" and "Era Display" on the "Time" tab of the BUG menu (through Python\BUG\Tabs\BugNJAGCOptionsTab), or update the options to use the new era types. (Going back to the BtS types would be difficult as the LSystem files, LeaderHead and Tech infos all use the new types.)
that i leave to you (depends in your era settings).

The AI makes use of the era number in many places (hundreds of getCurrentEra calls). For example, CvCityAI::AI_minDefenders assigns extra defenders to coastal cities by the 4th era – assuming implicitly that oceangoing transports become available then. So a mod with a different era progression is going to have some problems. Merging this commit from the latest Kek-Mod version could help a bit.
didnt do that - as above depend on the above - i suggest keep the same number of eras.

the rest are merge.


now an important issue - religion and corporations -
this uses the new tga mod - each icon needs a number that will direct it to the appropriate location on the tga file.
loos at the res folder to see the ionization order - edit the tga files using any image editor.
look at my mod for example.


mod is using the debug dll, i als ran some turns, looks fine.

link : https://www.mediafire.com/file/kwyhe8wpxof4izk/Fractured_States_dotoadv_2.zip/file
 
Last edited:
Hello OzzyKP, I'm really looking forward to the release of this mod!

@keldath, I wanted to ask about the 'new tga mod' and how it references tga files by icon number? I have been brewing up my own personal mod and encountered a problem when I began adding religions in K-Mod/BUG. All the tga font icons seem to be referenced correctly in-game, but there is a minor issue in the pedia (concerning the [dis-]appearance of icons and slight textual overlay). I took a peek at the GameFont_75.tga files in your incredibly awesome :bowdown:Doto, but I still don't understand where to find the rest of the tga mod and how exactly it functions. I would really like to learn from you - it has long been a dream of mine to be able to modify tga files without pain :thumbsup: Thank you very much for your help!


now an important issue - religion and corporations -
this uses the new tga mod - each icon needs a number that will direct it to the appropriate location on the tga file.
loos at the res folder to see the ionization order - edit the tga files using any image editor.
look at my mod for example.
 
Last edited:
hello friend,

thanks for the good words.

so, the tga, is a mod created long time ago, world of civ used it, i think by johnny smith, so its not mine, i just carried it along the years.
anyway - the code is a c++ code that lyes in the dll sdk files, if you would compare my source files with that of advanced civ, you will be be able to spot the relevant parts - mostly marked with //tga.
you can also browse the mod parts thread for woc light mod, it is there as well.
the way it works is simple, assigned the number of the icon location on the gamefonts, and that's it,
looking at the tga files, you can find a reference location with my mod for example - lets say Islam is numbered 54 in the tga tag in the xml,
when you'll look on the tga file, find the Islam symbol, and bang, you got a reference point.

look at the tga tags in the religion xml and corporations and also in the bonus xml file. all have the tga xml tag.
its quite easy to get it going.

the pedia icons are not controlled via tga files, but individual dds buttons files, usually assigned by a reference in the XML file of the data it self or the corresponding art XML file.


and ps. welcome to fanatics, message number 1 :)
 
Hi Keldath, thank you very much for the prompt response and warm welcome! Ah, I think I’m beginning to understand. I noticed in Doto’s CIV4ReligionInfo file that you have numbered <iTGAIndex> tags and that you provided similar tags for Fractured States. I also noticed in Doto that you have three fonts folders – does this mean you can reference more than a single GameFont.tga or GameFont_75.tga file?

I am familiar with johnny smith’s RevDCMRapture – it’s been my primary source for plundering religious art and icons :D However, I never realized there was an actual underlying C++ code. (I’ve only managed to learn XML; unfortunately C++ and dll sdk files are beyond my current abilities. At the time I didn’t understand the mistake I was making when I merged JARM with K-Mod and began inserting religious font icons directly into K-Mod’s GameFont.tga files...:smoke:)

I’ll continue to study up on modding and take this project as far as I can on my own. Maybe I’ll start my own thread, and ask for your help and guidance down the road? Thank you very much again for your assistance!
 
Last edited:
heya,

yup these are the location index - <iTGAIndex>.

three fonts folders
probably i forgot to remove test files....
in my latest you saw this?


i dont know c++ my self but ive learnt to merge files, so, trust me, its easy.

but anyway, you can also use the platform i provided with ozzy here.


ofc, ill help if i can, im always here :)
 
Thanks for the suggestions!

I’ve got a specific question about unit graphics. The female Mormon missionary unit in Caveman 2 Cosmos is awesome, but I can’t figure out how to add it. The unit has a .dds file, not a .nif, and I can’t find the xml for it in the unit art file. How do I add it?
Look in the Assets\Modules folder, under Custom Religions.
 
Ok, I don't know if I screwed things up already or if this problem was in the files you gave me, but the controls in the city screen are missing:
IgVXHPb.png


Does that have to do with the TGA stuff? I got a new computer and just finished installing photoshop, so I'll take a look at that stuff soon.
 
check the bug options,
theres an option that controls it,
shows only founded religions.
But it also doesn't show the icons for the civiliopedia or main menu or any of that. So you can't exit the city screen except by hitting esc.
 
I think it's normal that the city screen hides the buttons on the upper right. As for exiting, I did make some changes:
- Disabled exit upon clicking on a tile outside the city radius. That can be re-enabled through CITY_SCREEN_CLICK_WILL_EXIT in GlobalDefines_advc.xml.
Disabled the flashing "Press ESC to exit". That can be reverted by restoring this line
acOutput = localText.getText("SYSTEM_RETURN", ())
under "advc.004t" in CvMainInterface.py.
- Disabled exit through double-click on the city tile (because a single click enables citizen automation; easy to do this by accident). This is handled by the DLL (toward the end of CvGameInterface.cpp).
- New: Can exit through a right-click on the city tile.
- Unchanged: Can exit through middle-click, left-click on the mini-map, Esc, Enter or Space.
 
good info f1rpo, thanks.

ozzy, did you use the tga tags from my code? they are a must. also - possible you chose wrong index for them.

ozzy -
im in the process of updating to version 096 by f1rpo.
once im done, ill get you your new version :)
 
Last edited:
I think it's normal that the city screen hides the buttons on the upper right.

Oh. *blushes* You're right. I was having various other issues, and I guess I got confused. Oops. Thanks for the good info though!

And after spending a bit of time tearing my hair out trying to edit the .tga I found this amazing utility. Wow, so easy!
 
Look in the Assets\Modules folder, under Custom Religions.
You have to have the MLF_CIV4ModularLoadingControls file as well All Modules used need this Control xml file. Open the file with Notepad++ and look at it's structure. Then base your file off it's template.

@keldath,
Hey old friend how are you?! :)

Do you still have a working copy of Song of the Moon? Or the Mars mod we were working on?
 
Last edited:
@JosEPh_II
hey man,
pretty good , hope your also.
we old timers, still huh....


i actually have quite a library on my disk,
i got most of the major mods from the past.

both barsoom and song2 , i had improved along the years, could not remember how far i got.

i guess barsoom has the most stable one.

but, my best stable solid mod is the new advc doto.
if i had time, i would have updated barsoom, maybe, someday ....


ozzy,
check the new xml tags in the mod, maybe theres stuff you can work with there.


 
@JosEPh_II
ozzy,
check the new xml tags in the mod, maybe theres stuff you can work with there.


Ok, so for now I've added a Grain Elevator and Food Plant. The Grain Elevator gives -4 food to the city and +8 commerce. The Food Plant requires 2-4 Grain Elevators to be built and gives +12 food and a +4 population limit. I've seen some mods where trade routes give food & production, I'm not sure how to do that, but a flat bonus, while inelegant, should work for now.

Another question for you and f1rpo, how do I add a city style? I found some really nice ones, but I can't seem to get the XML to work so they show up. Is there a guide somewhere?
 
Another question for you and f1rpo, how do I add a city style? I found some really nice ones, but I can't seem to get the XML to work so they show up. Is there a guide somewhere?

Ok, I have half-way successfully merged city styles from the Cultural CityStyles mod. The native set seems to be working, but not the Anglo-American.

I also want to get this one working (but haven’t had success):
https://forums.civfanatics.com/resources/spanish-colonial-cityset.13149/
 
Last edited:
Back
Top Bottom