Quick Modding Questions Thread

I have looked everywhere, and can't find anything on how to create a new religion? I was going to create one for bts mod "pie's ancient Europe". One for other bts mods as well. Can anyone direct me to where this info can be found or explain it here? It seems you may have to do some python work I tried to make one just by XML but it screwed up all the icons for the religions. TIA.
 
In vanilla BTS, great artists produce great works at 1,000 per era. I changed this to 800. The change from 1,000 to 800 works as intended. But when I further reduce that to, say 10, or 1, the change does not occur. That's what I mean when I say nothing occurs ... the change to reduce from 800 does not occur. If this cannot be changed for whatever reason, is there a way to disable the great artist as a unit?
That's not true, BtS great artists provide a flat culture bonus that is the same throughout all eras. K-Mod for example introduced this rule. Also, your post is contradictory. Does or doesn't the change to 800 work?
 
That's not true, BtS great artists provide a flat culture bonus that is the same throughout all eras. K-Mod for example introduced this rule. Also, your post is contradictory. Does or doesn't the change to 800 work?

Ok, here is what I have:

#1: Screenshot of vanilla BTS; with greatworkculture of 1,000
#2: Screenshot of KMod, which MMod is built upon, with greatworkculture of 800.

To answer your question regarding contradictory; yes, the 800 change works in KMod. With each advance of era, the great work is multiplied. So, it goes 800 > 1600 > 2400, etc. What I am trying to do is reduce this (or, even better, simply disable the great work culture bomb). If I reduce values from screenshots [vanilla] and [kmod] to '0' ... the game remains unchanged in that the culture bomb is remains in effect. So, changing the culture bomb to '0' in both vanilla and kmod aren't doing any in-game changes ... and I don't see any other value to XML line to change or modify to enact this change? Any suggestions regarding this? If the XML is being ignored for some reason and no changes to these will help, is there another suggestion, up to and including disabling great artists? If so, what value has to be changed to disable them?

Note: If I change vanilla value to 0, and play a vanilla game, the culture bomb disappears. So, somehow the XML is being ignored for the culture bomb value in KMod. So, I would have to find the source of this I assume, or disable the unit?

Note: Besides the culturework change from 1,000 to 800, I've uploaded screenshots of the only other line changes [screenshot vanilla2 and kmod2]
 

Attachments

  • Vanilla.jpg
    Vanilla.jpg
    335 KB · Views: 109
  • KMod.jpg
    KMod.jpg
    322.2 KB · Views: 96
  • Vanilla2.jpg
    Vanilla2.jpg
    64.5 KB · Views: 115
  • KMod2.jpg
    KMod2.jpg
    57.1 KB · Views: 118
Last edited:
Does anyone know the section in the DLL source that controls when units immediately lose a battle? By default this of course applies to non-combat units like settlers and workers, but I want to implement a special ability where you can immediately defeat barbarian units and then later capture them (I have already implemented the capture part).

Edit: I think the best way for that is the "if (!pDefender.canDefend())" line in CvUnit::updateCombat(), trying that now.
 
Last edited:
So, just going to go a new route with regard to the above post I made last Tuesday. How can I disable great people?
If you want a low tech solution, how about edit xml to make everything give 0 points towards great people? I'm sure there are more technical elegant solutions, but they would likely require more than just xml editing.
 
I used RevDCM as a base for my private mod, and it seems like RevDCM has modified GameFont files. When I try to add a religion's icon (e.g. Shinto) even in the location which I presume to be correct, the religion icons get switched when they are viewed in the cities (Shinto & Judaism appear as Christianity, Christianity appears as Islam, Islam appears as Confucianism, Confucianism appears as Taoism and Taoism appears as one of the Corporation icons (The one that looks like this: (C) )
Here, I've provided links to the two files:
https://www.dropbox.com/s/pmex65cwix4rdep/GameFont_75.tga?dl=0
https://www.dropbox.com/s/4an68etaxmrhp33/GameFont.tga?dl=0
Maybe someone could tell me where to add my additional religion icon if the additional religion is at the bottom of the ReligionInfos xml file?
 
Unfortunately, the same problem I've had still happens, even when I've put the icon in the slot that you told me to put it in. Could someone please help?
 
How do I slow down city growth? Ideally, so that they grow slower the larger they become?
 
The basic formula is defined in CvPlayer::getGrowthThreshold(), but for your purposes the XML defines BASE_CITY_GROWTH_THRESHOLD and CITY_GROWTH_MULTIPLAYER should be enough. The latter is multiplied by the current population to determine the amount of food needed for the next population point.
 
Oh, sorry. GlobalDefines.xml, it's in the XML directory.
 
Can someone explain the WeLoveTheKing tag in Civics.xml?
  1. When does it trigger? Can I force it somehow? Like through an event?
  2. What happens when I set up "We Love The King day" texts for more than one civic category? For example: Hereditary Rule (Government) has "We Love The King day" and Free Speech (Legal) has "We Love The President day". Which is displayed? The first or the last in the xml? Or both?
 
To answer your second question first, it is the first active civic (as per the XML order) with a We Love the King day text set.

The requirements for it are as follows:
Code:
if (isOccupation() || (angryPopulation() > 0) || (healthRate() < 0))
{
     setWeLoveTheKingDay(false);
}
else if ((getPopulation() >= GC.getDefineINT("WE_LOVE_THE_KING_POPULATION_MIN_POPULATION")) && (GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("WE_LOVE_THE_KING_RAND"), "Do We Love The King?") < getPopulation()))
{
     setWeLoveTheKingDay(true);
}
So there is a minimal population a city must have and then there is a random chance based on the population (larger cities have a higher chance). Cities must not be in revolt and have no angry or unhealthy population, and if they to the WLTKD ends. I don't think you can trigger it explicitly outside of these rules. You might expose setWeLoveTheKingDay to Python, but even then without changing these rules the effect will immediately end the next turn if the requirements are not met.
 
I know, I was also frustrated with how baked in these rules are.
 
I lowered time progression in CIV4GameSpeedInfo because of my mod's higher tech cost. This has caused the ingame date and tech bar to disappear for three turns out of four, and the era to flicker constantly. I'm not even sure how this could cause a visual glitch? :dubious:

(I use K-mod 1.46)
 

Attachments

  • CIV4GameSpeedInfo.xml
    9.5 KB · Views: 196
If a random event grants an instant culture boost to a city or several, where exactly in the code does that actually happen?
 
Top Bottom