1. CSD

    [TUTORIAL] How to Set Persistent Variables in Pure Python

    This meant that anyone who was due a free tech on load would be sorely disappointed. 😞 "Up in the sky, look: It's a bird! It's a plane! It's ScriptData! And it can save the day, once per instance* (data serialization imported separately)!" 🦸‍♂️ It's a persistent string intended for modding...
  2. S

    [BTS] Help with Project Structure and Enums

    I am just starting to mod Civ4 in order to implement a Reinforcement Learning agent from a 2009 paper and try to improve upon it as a project for an exam. The code for the paper was written in C++ and embedded in the SDK instead of using the Python API so for now I am mostly working with the C++...
  3. 8

    [MOD] Does anyone know what Final Frontier (Plus) changed to break specialists?

    I'm working on some tweaks to Final Frontier Plus, one of which is adding back specialists to give some use to all that excess food you tend to have in lategame. With some tweaks to the XML and python I was able to get them to show up mostly correctly, but there are two major issues: 1)...
  4. A

    How to add custom script to mod?

    I want to modify the ships in civ4 bts in order to be a little bit more realistic in my point of view... So, for this, I commented out from the .xml: <!-- <TerrainImpassable> <TerrainType>TERRAIN_OCEAN</TerrainType>...
  5. Louis the XIV

    [BTS] get buildings of every city

    How can I loop through all the buildings in all the cities of a player? Or maybe just check if the city has a building. I managed to make the looping through all cities work (loopCity, iter) = player.firstCity(false) while(loopCity)...
  6. The Snug

    [BTS] Dale's Combat Mod help (DCM)

    It doesn’t seem like there’s many people around here anymore who do sdk or python, but hopefully I can find some assistance for two problems. First, how would one go about adding a new unitcombat for Mounted_Archers that would possess the same bombard capabilities as the unitcombat for archers...
  7. L

    Stub/Skeleton for CvPythonExtensions, for auto-complete in PyCharm

    Background Advanced features of python IDEs like PyCharm, such as content assist/auto-complete, do not work very well for CivIV python modding, since the IDE doesn't know Civ's C++-generated module "CvPythonExtensions". This is not an unknown problem in the python world, since many python...
  8. Louis the XIV

    [SOLVED] not able to edit/open files?

    Hi! I have been trying to make civ open a file and write the turn in it on the endTurn function in the file. My endTurn function looks like this but it is not writing anything in the file when I click end turn in game, nor any errors. def onEndGameTurn(self, argsList)...
  9. sleepground123

    [PYTHON] How to color techs by era?

    Many mods did that. It seems that simple python changes can do that, but I repeatedly failed. Please tell me how.
  10. Louis the XIV

    [Python+XML] Valhalla 2.0

    This is my first wonder and it has a pretty spectacular ability! Hope this comes in useful:)! Pictures Below! If you have any questions or problems please visit my wonder thread here Valhalla Ability: +25:gp:% Great General emergence, +2:gp: Great Prophet, and gives the Valhalla promotion to...
  11. TreeSpawned

    [PYTHON] How to make a leader only say his specific dialogue

    I writing a mod, where I want one of my leaderheads to only ever respond with dialogue, that is associated with him in particular, i.e. responses that have his LeaderType and not any dialogue responses that are generic to all leaders, i.e. responses without any LeaderType. I think I almost have...
  12. Louis the XIV

    RFC Python (Rise and Fall)

    I have always been looking at random RFC python codes, I understand some of them not totally just a bit, but I have a major question to ask, How can you Spawn a civ like in RFC?! I know the Spawn a civ util but that doesn't let you choose the civ at the beggining of the game. Let's say the...
  13. F

    [BNW] [SDK] TCP Client to Python

    So I'm working on a project I had in mind for a while. I'm working on a way to override the Civ5 AI in python via TCP. Python has so many good AI libraries (Tensorflow, pytorch) and mathematical ones (numpy) that makes development of...
  14. Merkava120

    Animals with Seasons 2020-07-11

    Simply a combination of Animal Spawning and Seasons with Snowfall, with one addition - animals do not reproduce in their hemisphere's fall/winter.
  15. Merkava120

    Hunting and Hunger 1.0

    Adds a bunch of new animals (the ones from my animal spawning modcomp, which includes this), changes all heal rates to nearly 0, and adds damage outside borders ("hunger") which can be healed by hunting animal units. The damage outside borders can be disabled in the file by setting...
  16. Bangra 7

    Audiodefine problems, and game hangs on PythonInit

    I am having a series of problems modding Civ4 Reimagined. I wanted to add in a couple original nations to the game. I got their artwork in, plus the nations work effectively. HOWEVER, I got brave. I wanted to add game music. First, I added the audio defines into that respective xml file. I then...
  17. N

    Event handler bug, non-SVN

    First: I deeply appreciate all the work you modders have put in to create and improve Caveman2Cosmos, it has already given me years of pleasure playing this game now. Just recently, I upgraded to v39 from v38.5 and I also downloaded the Interface Overhaul modmod. And while it works, it doesn't...
  18. Andera412

    OOS logging

    I modifyed using Gerikle's OOSLogger so it writes log when the OOS occurs. I need your help in writing more full log with larger number of functions. Log comparation doesn't show any differences now.
  19. S

    Map making tutorial

    Sorry if this has been answered elsewhere, but I couldn't find it. I'm just looking for help with how to make map scripts. A tutorial on creating randomized maps in python would be fantastic. If it helps in finding the right tutorial, what I want to create is a randomized map in the Caribbean...
  20. Z

    [SDK] Problem with enabling interface buttons after SDK change

    Hi all, I've done a lot of SDK modding (I'm far more comfortable with C++ than I am with application-level python code). I've recently made an SDK change that seems to work, but the interface buttons don't seem to have gotten the message. I'm trying to modify the way corporation interact with...
Top Bottom