Quick Modding Questions Thread

How do I add a page to the Civilopedia?
 
You have to edit the Civilopedia XML doc in the assets folder: Assets/XML/Text/CIV4GameText_Civilopedia.XML
 
You have to edit the Civilopedia XML doc in the assets folder: Assets/XML/Text/CIV4GameText_Civilopedia.XML

Okay? How do I tell the game where exactly in the Civilopedia to display my added text? :confused:
 
How do I add a page to the Civilopedia?
It depends on how you define "add a page". If you want to add a page for a unit, you just add the unit to xml and the DLL should take care of the rest. If you want to make a new category of pages, then you need to write code in python. In fact I would say it is so much code that it wouldn't fit a quick question.

If you want to add text to an existing page, it can be done by editing pedia python files or the help text generator in the DLL.
 
I want to add a new page in the concepts category, explaining changes I made to the culture mechanic.
 
The easiest way is to create a new concept in the XML/BasicInfos/CIV4NewConceptInfos.xml file.

Indeed, adding a new page to the Civilopedia is not a trivial thing to do. If you really want to go that way, then you can study Platy's Pedia who introduced several new pages.
 
Hello, i have two bugs:
1) I have memberships like in FFH2 (similar) and all really works good, but i have some bugs in Victory Conditions screen in Members section. First i built GDI HQ, image 1

ChgOT98.jpg

IMAGE 1

and i haven't info about UN (this is built AI before me, after that i build GDI HQ), after some turns, some AI built NOD HQ, image 2

gqqpciq.jpg

IMAGE 2

and as you can see (down right corner there is no more General Secretary of GDI, now is Brotherhood of Nod Prophet), my question is where is this screen and how to have infos for General Secretary of GDI, Brotherhood of Nod Prophet and UN (right down text) ?

2) During game a press F1 and i get this:

Assert Failed

File: CvArtFileMgr.cpp
Line: 182
Expression: false
Message: get##name##ArtInfo: was not found

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

Assert Failed

File: CvArtFileMgr.cpp
Line: 182
Expression: false
Message: get##name##ArtInfo: ERROR was not found

----------------------------------------------------------
 
A Command & Conquer mod? Tell me everything!
 
I am trying to add content to the CIV V community mod. This mod has the particularity to use a lot of different ressources as every type of weapons has to be manufactured to enable the units.
So I tried to add some ressources of my own, their icon are already in gamefont.tga, otherwise I can edit it, no problem. But I noticed a strange thing. Some ressources that worked well before make some icons switch places. All the balls at the beginning of the sentences are replaces with angry faces, the city defense bonus icon is replaced by the eaten red bread etc. I tried to isolate the problematic bonuses in the XML and found some but in the end I realized that it was not the graphism of the bonus per se, it was their number that caused the problem. I deleted another bonus and added a "bad one" and all seemed to work fine (otherwise some expected xml errors).

So in the end is there a ressource limit somewhere around 75? (BTW the gamefont editor show that you can put icon ressources up to 300.)
 
The simple answer is yes there is a limit. You need to use a modified dll to go above the limit. I can't remember what the limit was but going over caused all sorts of font and icon problems.
 
There is a limit to GameFont? When I looked at the code, it looked like it could handle any number of icons. It has a bunch of padding and stuff, which mean you can get offset errors, meaning if you want a happy face, you can get an angry face.

Billboards appear to have a limit, which I think is 288. However I have an untested idea on how to get around that limit. Icons for 2D screens (like advisor screens) works just fine even if they are outside that range.

The biggest problem with the system is that you can end up with an icon, which the DLL/EXE expects to have the ID 8522. The question is: how you do place it in GameFont.tga to assign that number to the icon? I added debug tools for M:C to help doing that and I planned on making a modcomp for vanilla BTS, but I never got around to actually do it.
 
Without a modified DLL, the limit of resources is 74 (3 rows of 25 minus 1 slot so that it still works!).

@ Zlatko: it's the ... CvVictoryScreen.py (def showMembersScreen(self)).
 
Without a modified DLL, the limit of resources is 74 (3 rows of 25 minus 1 slot so that it still works!).
CvGameTextMgr::assignFontIds() doesn't appear to have a limit :confused:

Since you appear to know the limit, can you make a test version (preferably based on vanilla, or the ModComp git), which fail? I would like to know precisely what happens and how it goes wrong. With a bit of luck, I will finally make the ModComp, which makes GamtFont configurable and much easier to use.
 
Does anyone know of mods with crowding penalties, i.e. the more units are on the same tile the less effective they fight?
 
I'm looking more for something that properly scales with the number of units on a tile, e.g. a unit sharing a tile with 17 units would get a -17% combat penalty.
 
I'm looking more for something that properly scales with the number of units on a tile, e.g. a unit sharing a tile with 17 units would get a -17% combat penalty.
I think it requires DLL modifications. However it should be fairly easy to implement. Something like power = power*(101-X)/100, where X is the number of military units on the plot in question. Add this at the right location and you have what you are asking for.

The question is: where is the right location? Also X should likely be capped or the AI can place 102 units on the same plot and maybe the game will crash due to negative power.
 
I think it requires DLL modifications. However it should be fairly easy to implement. Something like power = power*(101-X)/100, where X is the number of military units on the plot in question. Add this at the right location and you have what you are asking for.

The question is: where is the right location? Also X should likely be capped or the AI can place 102 units on the same plot and maybe the game will crash due to negative power.

Yeah I figured something like that, and I also figured that in the decade that Civ4 existed someone probably had the same idea and already implemented it somewhere, but I guess I was wrong. :lol:
 
It has been implemented in a couple of mods but I can't remember which. I thought it was The Ancient Mediterranean and Realism Invictus but may be wrong.
 
Back
Top Bottom