• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

Where is this code located? Is it in the DLL or in the exe? As in can we access it?
 
Where is this code located? Is it in the DLL or in the exe? As in can we access it?
The DLL uses pStream for all reads/writes to the save game files and is unaware of compression and how it works. The exe contains the pStream implementation and handles compression/decompression on behalf of the DLL. You'd need to look at the exe if you want to access this code.

In terms of my post above, I used code format only because I wanted a fixed size font in order to create properly aligned tables; the tables don't reflect actual code but instead refer to a hypothetical save game file. You'll find similar values in every Civ4 save game file (well, other than world builder saves, which are text based), but of course the offset to zlib magic, the data itself and the number of chunks will vary from game to game.
 
Last edited:
I know I'm repeating myself, but AI doesn't produce planes in my mod and I literally don't know why (i mean my aliens mod)
 
aanyone can check, Is it just a problem that in my mod I don't build airplanes?
 
Last edited:
But you still don't know why it doesn't work in the scenario? Have you tried to verify that the AI cities are able to produce planes, i.e. that they have the proper tech and resources? Not sure if just opening their city screens in Debug mode is a reliable way to check that. Taking control of an AI civ through Alt+Z should work better (but is certainly going to miss problems that are somehow caused by the nonhuman status of the AI civs). If the AI just decides not to produce planes, that'll be difficult to get to the bottom of. Somehow systematically eliminating whatever differences exist between a random map and the scenario might be your best bet.
 
But you still don't know why it doesn't work in the scenario? Have you tried to verify that the AI cities are able to produce planes, i.e. that they have the proper tech and resources? Not sure if just opening their city screens in Debug mode is a reliable way to check that. Taking control of an AI civ through Alt+Z should work better (but is certainly going to miss problems that are somehow caused by the nonhuman status of the AI civs). If the AI just decides not to produce planes, that'll be difficult to get to the bottom of. Somehow systematically eliminating whatever differences exist between a random map and the scenario might be your best bet.
I fund problem (this resulted in the always peace option) but it's like turning off AI declaring war on itself
 
I am in the process of creating new religions in a mod I'm working on. Can anyone direct me to the size the buttons needs to be for the religions in the following XML code:

<Button>Art/Interface/Buttons/Religions/Christian.dds</Button>
<TechButton>Art/Interface/Buttons/TechTree/Christianity.dds</TechButton>
<GenericTechButton>,Art/Interface/Buttons/TechTree/Christianity.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,1,3</GenericTechButton>
 
Hello all,
.
I am attempting to access the art files for certain things in the XML; for example:
.
If I go to: Assets -> XML -> GameInfo -> Civ4ReligionInfo, and I search to Christianity, I get to the artwork pathways such that:

<Button>Art/Interface/Buttons/Religions/Christian.dds</Button>
<TechButton>Art/Interface/Buttons/TechTree/Christianity.dds</TechButton>

Then if I go to: Assets -> XML -> Buildings -> Civ4BuildingInfos, and I find Christian Temple, I get to the artwork for the button such that:

<Button>,Art/Interface/Buttons/Buildings/Temple_Christian.dds,Art/Interface/Buttons/Buildings_Atlas.dds,8,13</Button>

So, then I go to the folders quoted above; Art -> Interface -> Buttons ... but the pathway ends there. I cannot go from Interace to find the subfolders for TechTree or Buildings. So, how do I get to them? I'm lost...
 
Hello,
.
I am in process of adding new religions to my mod. I am able to find the necessary buttons so it appears in the game such as when you are able to choose w religion screen [see pic]
Hellenism2.jpg

.
But - I cannot find where the button is for the religion adviser screen and as such I get the pink screen on that slot. Where do I have to change the art in the art files / xml for the religion adviser screen? [see pic]

hellenism photo.jpg



Additionally, when I found the religion, the icon for the religion does not appear in the city. Instead, the Cereal Mills icon appears. Where can I go to place the button for the religion [see pic]
Hellenism4.jpg
 
Last edited:
To elaborate a bit on that answer, you will have to edit the GameFont.tga and GameFont_75.tga files, which is not the most straight-forward thing. Maybe this thread will help:

 
To elaborate a bit on that answer, you will have to edit the GameFont.tga and GameFont_75.tga files, which is not the most straight-forward thing. Maybe this thread will help:

SaibotLieh
.
Very much appreciated. I will give this a try this weekend.
.
In my above post you can see I have the pink square on the religion adviser screen. Do you know what pathway leads to that button in the XML?
.
Additonally; after reading thru the link on editing game fonts, it reads as if I would be erasing and copying in a new button [presumably in place of the cereal mills from my example above] -- BUT -- what if I don't want to delete anything and only want to add the new buttons? How do I direct my new religion to use the newly created and copied-in button? Where is the pathway for that?
 
Last edited:
Additonally; after reading thru the link on editing game fonts, it reads as if I would be erasing and copying in a new button [presumably in place of the cereal mills from my example above] -- BUT -- what if I don't want to delete anything and only want to add the new buttons? How do I direct my new religion to use the newly created and copied-in button? Where is the pathway for that?
I believe that needs some dll changes. In my mod I have far more than the vanilla religions (and I'm adding a lot more corporations now) and it has a different GameFonts file. But CoM is a modmod of AND2, so I had those changes readily at hand.
Some other mod or modcomp is required but I don't know what exactly.
 
I believe that needs some dll changes. In my mod I have far more than the vanilla religions (and I'm adding a lot more corporations now) and it has a different GameFonts file. But CoM is a modmod of AND2, so I had those changes readily at hand.
Some other mod or modcomp is required but I don't know what exactly.
Please see attached pic; as you can see, I followed the instructions sent via SaibotLieh and have successfully imported the religion button into the GameFont file. But, I have no idea how I am supposed to create the pathway from this slot to ensure it appears on the city screen in the game. I have searched and don't really see any instruction in the thread sent to me to indicate how to do this. I am making significant progress and feel this is essentially my last step to completing this part of my mod. Can someone please help direct me on how to create the pathway from that new slot to the city screen in the game? [see pic]
.
Hellenism5.jpg
 
Last edited:
Haha! I googled doe it and found out that I already gave an answer to this question :lol:
 
Please see attached pic; as you can see, I followed the instructions sent via SaibotLieh and have successfully imported the religion button into the GameFont file. But, I have no idea how I am supposed to create the pathway from this slot to ensure it appears on the city screen in the game. I have searched and don't really see any instruction in the thread sent to me to indicate how to do this. I am making significant progress and feel this is essentially my last step to completing this part of my mod. Can someone please help direct me on how to create the pathway from that new slot to the city screen in the game? [see pic]
.
View attachment 700673
That's one of the awkward parts of this file: You do not create any pathway, the game will go with the order in the xml file. If you check the CIV4ReligionInfo file, you'll see that the entries are in the same order as the symbols. This would not be too bad, if it would not be the case that the corporations are directly put behind the religion icons in the BtS GameFont files. The file you modified is probably from the vanilla game and will not work correclty with your mod, you'll need to use the one in ...\Sid Meier's Civilization 4\Beyond the Sword\Assets\res\Fonts. In the end, it should look something like this:
Spoiler :

GameFont copy.jpg


There are some other important bits, namely that the single turquoise pixel at the right side of each icon is important, since Civ4 will use it to identify entries. Also, all of the pink pixels need to be exactly the right pink, otherwise the file will not work properly. And you also need to make sure, that the alpha channel is setup up correctly as well.

As for the link for the religion adviser screen, I believe it should be the <Button> entry in the CIV4ReligionInfo file. If you are using that already and it does not work, try the entry of one of the existing religions instead. If that button then appears, there might be something wrong with your entry or the button itself.
 
As for the link for the religion adviser screen, I believe it should be the <Button> entry in the CIV4ReligionInfo file. If you are using that already and it does not work, try the entry of one of the existing religions instead. If that button then appears, there might be something wrong with your entry or the button itself.
For some reason I seem to remember that this is in one of the py files, probably the one controlling that screen.
...but my mind may betray me.
 
Back
Top Bottom