1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. Arminius14

    Arminius14 Chieftain

    Joined:
    Nov 23, 2014
    Messages:
    12
    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.
     
  2. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    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?
     
  3. Mattygerst

    Mattygerst Chieftain

    Joined:
    Jan 19, 2008
    Messages:
    536
    Location:
    St. Louis, Missouri, USA
    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]
     

    Attached Files:

    Last edited: Apr 4, 2018
  4. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    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: Apr 6, 2018
  5. Mattygerst

    Mattygerst Chieftain

    Joined:
    Jan 19, 2008
    Messages:
    536
    Location:
    St. Louis, Missouri, USA
    So, just going to go a new route with regard to the above post I made last Tuesday. How can I disable great people in full?
     
    Last edited: Apr 8, 2018
  6. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    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.
     
  7. oktot0320

    oktot0320 Chieftain

    Joined:
    Jun 12, 2017
    Messages:
    22
    Gender:
    Male
    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?
     
  8. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,289
    Gender:
    Male
    Location:
    Canberra, Australia
    In slots with the number 95. First the standard one and then the founded one. Both files.
     
  9. oktot0320

    oktot0320 Chieftain

    Joined:
    Jun 12, 2017
    Messages:
    22
    Gender:
    Male
    Thank you!
     
  10. oktot0320

    oktot0320 Chieftain

    Joined:
    Jun 12, 2017
    Messages:
    22
    Gender:
    Male
    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?
     
  11. Yoda Power

    Yoda Power ✫✫✫✫✫✫✫

    Joined:
    Sep 24, 2002
    Messages:
    13,866
    How do I slow down city growth? Ideally, so that they grow slower the larger they become?
     
  12. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    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.
     
    Imp. Knoedel likes this.
  13. Yoda Power

    Yoda Power ✫✫✫✫✫✫✫

    Joined:
    Sep 24, 2002
    Messages:
    13,866
    Thank you! But which XML file?
     
  14. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    Oh, sorry. GlobalDefines.xml, it's in the XML directory.
     
  15. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,299
    Location:
    In a constant brainstorm...
    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?
     
  16. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    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.
     
  17. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,299
    Location:
    In a constant brainstorm...
    Aha...
    As I see the rules are set in the dll and not in python. That's faaaaar off my reach.
    Thank you for your quick answer :)
     
  18. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,052
    Gender:
    Male
    Location:
    Leblanc
    I know, I was also frustrated with how baked in these rules are.
     
  19. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    8,885
    Location:
    Hiding
    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)
     

    Attached Files:

  20. Imp. Knoedel

    Imp. Knoedel Knoedel Imperator Satani Filius Augustus Nooborum

    Joined:
    Nov 11, 2011
    Messages:
    8,542
    Location:
    Land der Mörder, Land der Hetzer
    If a random event grants an instant culture boost to a city or several, where exactly in the code does that actually happen?
     

Share This Page