Search results

  1. Baldyr

    CivPlayer scripting utility

    CivPlayer is a Python module and a Python scripting utility application. Download here. What does it do? CivPlayer has two main features: 1. Making handling various player and team values and instances easy to handle. 2. Has built-in support for storing custom data - both player specific and...
  2. Baldyr

    Immobile Timer?

    I noticed something called the Immobile Timer for units. Looking at the SDK I could only get as far as finding the m_iImmobileTimer variable. What exactly does it do? edit: I looked even further and figured out that the value indeed makes a unit sit idle for that number of turns. Correct?
  3. Baldyr

    Identifying Wonders

    I don't seem to be able to find anything in the CvBuildingInfo nor the CvBuildingClassInfo class for detecting whether or not a BuildingType is actually a Wonder. All I can think of (for a default BtS game) is fetching CvBuildingInfo.getGreatPeopleUnitClass() and conditioning the return value to...
  4. Baldyr

    Prehistoric mod idea

    I noticed that the Cavemen2Cosmos mod included a Neanderthal civilization. This got me thinking - and I have no idea if this idea is new or already done to death - what if a game starting in the Stone Age could have human races like Homo Sapiens, Homo Erectus and Homo Neanderthal as the only...
  5. Baldyr

    Proposal: Custom Barbarian Spawn Python Module

    Since there are several active Barbarian modding threads on these board I guess people really wanna be able to script this stuff. What if we designed our own custom barbarian spawn Python module as a community? It would be as easy as any XML file to edit by adding lines into a data structure at...
  6. Baldyr

    What is CyPythonMgr?

    I guess the class names stands for Python Messenger or something along these lines, but what is it for? I especially notice the method CyPythonMgr.debugMsg() taking the string parameter msg. Does it simply print debug strings into the Python Debug Log? Is there any reason to use it instead of...
  7. Baldyr

    No plotIndex() method?

    I'm come to believe that plot IDs are the way to reference map plots - instead of using coordinates (in a tuple) or CyPlot instances. But there is one awkwardness associated with this, namely the lack of a plotIndex() method that takes a CyPlot instance as a parameter and returns the plot index...
  8. Baldyr

    Where are the extinction messages defined?

    Never mind! :p And the message seems to be triggered in CvPlayer::setAlive in the SDK.[/SPOILER]
  9. Baldyr

    Another idea for a mod

    I'm getting less and less intrigued with the core premise of the Civ franchise with every new edition; starting up with a stone age tribe in an unknown world and develop from there over the next 6000 some years. I much prefer the Rhye's and Fall of Civilization mod since it puts the game in a...
  10. Baldyr

    what's up with canUpgradeAnywhere?

    I'm stuck on the finishing line with a project because I can't get the canUpgradeAnywhere callback to CvGameUtils to register, at all. I basically put a print statement in the method to see when it will fire - never as it turns out. And I can't find anything to enable in...
  11. Baldyr

    pSkipCity parameter in CyMap.findCity()

    I'm having a problem with CyMap.findCity(): The last parameter is pSkipCity and it has to be a valid CyCity instance. But it should really be valid to not add this parameter - if you don't wanna skip any city. In CvMap.cpp the value NULL is referenced in this context but the Python method...
  12. Baldyr

    ModNetMessage?

    I recently realized there was a ModNetMessage event coming from the C++ code to the Python event interface. There is also a CyMessageControl.sendModNetMessage() method in the API. So you can basically create your own "event callback" with Python, then? :confused: I can see how data is being...
  13. Baldyr

    XML encoding/decoding issues

    For some reason I haven't been able to edit XML files lately. I can create new XML files and save those, using whatever text encoding the game requires. But whenever I try to save my edits in pre-existing files (like GlobalDefines.xml) the decoding gets screwed up on initialization. Failed...
  14. Baldyr

    getWorkingCity() returns what city?

    So I'm trying to figure out how I can find the nearest city to any owned plot belonging to the plot owner. So basically the city that "owns" the plot. I found the CyPlot.getWorkingCity() method in the API but looking at the SDK function really only revealed that it is returning the value...
  15. Baldyr

    CyUnit.convert()... eh?

    I'm trying to figure out what exactly CyUnit.convert() does. :confused: I guess it clones some attributes from one CyUnit instance to another, but which ones and how does it work? And what's the point of it all? (I would probably use it to "flip" units so that they appear to change owners. So...
  16. Baldyr

    Unit base strength from UnitType

    I'm experiencing an unexpected problem. I need to retrieve the base unit strength for a unit type - without using CyUnit.baseCombatStr(). I naturally counted on there being something like CvUnitInfo.baseStrength(). But I guess not... :rolleyes: Is there a way to do this - with Python - without...
  17. Baldyr

    Dynamic Byzantium

    This is a small mod-scenario enabling the AI only controlled Byzantine Civilization to spawn in the 3000 BC scenario for the RFC Epic/Marathon v2.1 mod-mod. It will not work for the official release for Rhye's and Fall of Civilization, so don't even try it. Installation To install, unpack...
  18. Baldyr

    Which is faster? Indexing a data structure or calling 3 SDK methods?

    I'm curious to know which setup would be faster (in theory that is - I could just time it myself, I know): 1. Use CyTeam.isAtWar(CyGlobalContext.getPlayer().getTeam()) each time a unit moves onUnitMove to check whether or not the unit's owner is at war with a specific player/team. 2. Keep...
  19. Baldyr

    Top changes in Civ5 to be implemented in CivIV?

    So while I'm not getting Civ5 myself I've been reading up on some of the new and "improved" features. Some of them actually make a lot of sense and I would gladly implement them into CivIV. Like how they have taken away the whole commerce slider thing that has plagued the series from the very...
  20. Baldyr

    Fixing General Winter

    This is the current Russian UP from UniquePowers.py: #------------------RUSSIAN U.P.------------------- def russianUP(self): pRussia = gc.getPlayer(iRussia) teamRussia = gc.getTeam(pRussia.getTeam()) for x in range(tRussianTopLeft[0]...
Top Bottom