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

MagisterModmod

Discussion in 'FfH2 Modmods, Scenarios, and Maps' started by MagisterCultuum, Feb 27, 2012.

  1. Imp. Knoedel

    Imp. Knoedel Properly Paranoid Proletarian

    Joined:
    Nov 11, 2011
    Messages:
    8,733
    Location:
    The cooler Germany
    Is it really though? Your first screenshot tells a different story.
     
  2. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Wow, way to be helpful.

    The first screenshot is the one that is, I believe, in error. That is why I included the second. I have no idea where the \ods\ directory thing is coming from--if you look at the second, you can see that it is *not* part of the directory structure.
     
  3. Imp. Knoedel

    Imp. Knoedel Properly Paranoid Proletarian

    Joined:
    Nov 11, 2011
    Messages:
    8,733
    Location:
    The cooler Germany
    Hm, the installer itself should ask you for the path during the setup, no? Perhaps double check that.
     
  4. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,256
    Location:
    Kael's head
    I'm not really sure what is happening. The first thing I notice it odd is that it says "Mods\ods\..." instead of just "Mods\.." I have no idea where the ods came from.

    Is it doing that even if you manually place it in the Mods folder?

    The code to remove the price increment is right near the top of CIV4UnitClassInfos.xml, where you would have to change the 100 to a 0.
    Code:
    
           <UnitClassInfo>
               <Type>UNITCLASS_SETTLER</Type>
               <Description>TXT_KEY_UNIT_SETTLER</Description>
               <iMaxGlobalInstances>-1</iMaxGlobalInstances>
               <iMaxTeamInstances>-1</iMaxTeamInstances>
               <iMaxPlayerInstances>-1</iMaxPlayerInstances>
               <iInstanceCostModifier>100</iInstanceCostModifier>
               <DefaultUnit>UNIT_SETTLER</DefaultUnit>
           </UnitClassInfo>
    The code for more complex code adjustments would go in CvGameUtils.py under def getUnitCostMod(self, argsList)

    At one point I did have it set up so that each city and each settler equally increased the settler's cost. I forget why I changed it, but think it may have had something to do with the AI understanding the xml-based unit cost increments better. I think I'll test out some python code again though.

    Code:
        def getUnitCostMod(self, argsList):
           iPlayer, iUnit = argsList
           iCostMod = -1 # Any value > 0 will be used
    
           pPlayer = gc.getPlayer(iPlayer)
    
           if iUnit == gc.getInfoTypeForString('UNIT_SETTLER'):
               iCostMod = 100
               iCostMod += 10*pPlayer.getNumCities()*pPlayer.getAveragePopulation()
               iCostMod += 25*pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_SETTLER'))
    
           return iCostMod
    
    I'm also thinking about playing around with letting ordinary Settlers cast the Add to Population spell, the same as Infernal Manes (except not adding the Demonic Citizens building if the settler's race is not demon.)

    That is more a question for Tholal, as I have not touched the BUG code.

    It should automatically find the Mods folder, but might have issues if your main installation is the Steam version or something.

    If you are manually extracting the archive, it must be copied over a properly renamed version of the original Fall from Heaven 2 (patch 0) in order to work.

    I forget whether you might need to change any security settings in order to give yourself or the installer permission to change the mods folder within the Program Files (x86) folder.

    The installer code is this:
    Spoiler :
    Code:
    [Setup]
    AppId={{71C68BFF-4F7F-4A95-927D-C32B6A4EDE07}
    AppName=Magister Modmod for FfH2
    AppVerName=Magister January 8 2018
    DefaultDirName={reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\Mods\Magister Modmod for FfH2\
    OutputBaseFilename=Magister Modmod January 8 2018 Setup
    Compression=lzma
    SolidCompression=yes
    DisableProgramGroupPage=yes
    SetupIconFile=C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Magister Modmod for FfH2 January 8 2018 Changes\govannon.ico
    
    [Types]
    Name: "full"; Description: "Default installation"
    
    [Components]
    Name: "Magister"; Description: "Magister Modmod for FfH2 January 8 2018 Changes"; Types: full; Flags: fixed
    Name: "FfH2"; Description: "Copy Fall from Heaven 2 Files"; Types: full; Flags: fixed
    
    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"
    Name: "german"; MessagesFile: "compiler:Languages\German.isl"
    Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags:
    
    [Files]
    
    Source: "{reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\Mods\Fall from Heaven 2\*"; DestDir: "{app}"; Flags: external recursesubdirs createallsubdirs comparetimestamp; Components: FfH2
    Source: "C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Magister Modmod for FfH2 January 8 2018 Changes\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Magister
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    [Icons]
    Name: "{userdesktop}\Magister Modmod for FfH2"; Filename: "{reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\Civ4BeyondSword.exe"; Parameters: "mod=\Magister Modmod for FfH2"; Tasks: desktopicon; IconFilename: "{app}\govannon.ico"
    
    [Run]
    Filename: "{reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\Civ4BeyondSword.exe"; Parameters: "mod=\Magister Modmod for FfH2"; Description: "{cm:LaunchProgram,Magister Modmod for FfH2}"; Flags: nowait postinstall skipifsilent

    I don't really understand all the details of the Revolutions system Tholal included in MNAI. I use python to set a city's revolution index to zero if it has Unyielding Order, which should make it impossible to have a revolution there. I think that occasionally instability can rise fast enough for other reasons to trigger a small revolt before the risk is removed though.

    A unit with zero combat strength (more specifically zero defensive combat strength, but holy/unholy/death/fire/cold/lightning/psychic strength is not divided like that) cannot fight or defend itself, and so surrenders. Workers have zero base combat strength. They can however have their combat strength increased by certain promotions, most commonly +1 Holy damage from the "Blessed" promotion granted by the Confessor's spell or the Chancel of the Guardians building.
     
    Last edited: Jan 16, 2018
  5. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Update: I deleted the MOD folder, reinstalled with the auto-installer (prior install had been through the manual copy), and am now playing a game! W007!

    One note: are there known issues with this mod and Totestra or PerfectWorld? I got a placement error with about a dozen different map generations, but the map itself looks great, the error had to do with finding a good starting spot. Just assume it's more of a challenge ...
     
  6. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Very new to this modmod, and have great respect for MC's continued work and effort. Please take these (and later) comments in that light.

    * The mod runs very slowly between turns. As a comparison, Ashes of Erebus in the early turns runs sub 2 seconds, this game is taking 15-25 seconds between turns. unsure if there are mods Black_Imperator has made there that are worth considering.
    * I liked the change where worker behavior wasn't tech dependent--they could build a pasture whenever, it just went numbingly slow. Is there a rationale as to why you kept the hard dependence on techs?
    * Is there a single place to see changes in the mod--like, in this game I randed the Balseraphs, is there a way to see how they are different other than clicking through the pedia somewhat randomly?
    * In Ashes, when a unit is mutated, you can hover over the mutation badge to see the mutations. It saves display space, seems a cool thing to steal as well.
     
  7. Imp. Knoedel

    Imp. Knoedel Properly Paranoid Proletarian

    Joined:
    Nov 11, 2011
    Messages:
    8,733
    Location:
    The cooler Germany
    My game crashes whenever I end the turn I'm currently at. Savegame is attached, end the turn and see for yourself.

    Unrelated, but now that I'm here: Wouldn't it make more sense for the Heron Throne to be a late or at least mid game wonder? It's supposed to be the shared seat of Rhoanna and Falamar after their storyline in the scenarios IIRC, and that doesn't strike me as something that happened while Erebus only just started recovering from the Age of Ice. In that same vein, maybe building the Heron Throne should require being in a Permanent Alliance?
     

    Attached Files:

  8. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    A note on diplomacy. The same 2 leaders are asking me for a non-aggression pact every turn. Perhaps making it so they can only ask 1 / x turns?
     
  9. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Predictable crash moving to next turn. Any thoughts on how to resolve?
     

    Attached Files:

  10. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Playing as the Doviello, my units are being attacked by Barbarian units. Is this a bug or my misunderstanding of what should happen?
     
  11. zldrago1000

    zldrago1000 Chieftain

    Joined:
    Feb 8, 2013
    Messages:
    78
    Something weird happened when I did the ritual to summon the demon lords. I chose Hyborem, but all that happened was he took a city, but no units spawned with him. I suspect there's an issue with the new code for the infernal pact.
     
  12. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,256
    Location:
    Kael's head
    Are you playing Malaha or Charadon. Charadon is the only Doviello leader with the Barbarian trait.

    I changed the trait so that the Barbarians should declare war on you if you get too strong, but make peace again if your score falls behind others again. It did not really seem to work as intended in some of my playtests though. I'm going to need to play some more to track down the cause.

    I think most of the speed differences are due to changes in the source code of the DLL, so they are Tholal's responsibility instead of mine. AI decisions are the biggest cause of lags between turns.

    The fact that I need to use the def unitCannotMoveInto(self,argsList): callback also slows things down, and cannot really be helped without eliminating some important features of this modmod.

    I don't think Tholal's DLL allows techs to modify how fast specific improvements get built.

    I don't really have all of the changes centralized, mostly because they were made gradually without keeping track of everything. I think I have things in the pedia well documented now, but guess I should try consolidating a list of changes where those familiar with base FfH2 can more easily find them.

    (The Balseraphs in this version are not a heavily modified civ. One change is that the Mimic's special ability works through a promotion, so they can keep stealing promotions once upgraded. In my version Puppets are permanent summons, with a limit of one for each caster. Loki does not have his Disrupt ability, as that is a Council of Esus priest spell, but starts with Mind 1, Mind2, Creation 1, Chaos 1, and Chaos 3. There are more races whose slaves can be caged in carnivals.)

    I don't know how that mouseover for mutation works, whether with C++ or python. Mutation can lead to some promotions that can be gained other ways in my modmod, and keeping track of them so that the info is accurate seems impossible.


    That is an issue for Tholal. The behavior is, I believe, all controlled in C++. I agree it is annoying. MNAI does however let you prevent it by telling the AI to stop contacting you at all.

    The cause is a bug I found right after the release:
     
  13. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Charadon. It's weird ... wandering units (Hill Giants, for example) attack but stationary ones (goblins in forts) do not.

    Fair enough. Is Tholal still active?

    Would that be best, do you think, in Pedia entries (and, hence, self contained in the game) or something like a wiki?
     
  14. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,256
    Location:
    Kael's head
    Hill giants and Animals start with Hidden Nationality, even in vanilla FfH2. It is perfectly normal for them to attack you.

    Tholal doesn't post here often, but is not entirely gone. He made a comment about an upcoming update about a month ago, but with no specific date set for its release.
     
  15. Imp. Knoedel

    Imp. Knoedel Properly Paranoid Proletarian

    Joined:
    Nov 11, 2011
    Messages:
    8,733
    Location:
    The cooler Germany
    Can confirm, downloaded this save and had the game crash when the next turn was about to begin, which seems to be exactly the same problem I'm suffering from.

    Magister pls fix
     
  16. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    Sweet! Always preferable for the issue to be user understanding than something in the code!

    Oddly--or maybe not--the multiplayer game I am playing now (same map size, same number of civs) is moving *much* quicker between turns than the single player game that eventually crashed.
     
  17. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    If only it were that simple ...

    I have finally gotten the python logging working. Will crash that game tomorrow if I can and report back if that has any clues as to the cause.
     
  18. Imp. Knoedel

    Imp. Knoedel Properly Paranoid Proletarian

    Joined:
    Nov 11, 2011
    Messages:
    8,733
    Location:
    The cooler Germany
    I am reasonably sure the issue is with the DLL, not Python, but go ahead.

    In the meantime I will return to the October 31st build. :(
     
    Last edited: Jan 22, 2018
  19. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,256
    Location:
    Kael's head
    I am in the process of uploading a new update, as my birthday present to you.

    It is fairly minor, consisting of little more than fixes for bugs that I've already noted in this thread. Unfortunately it does not fix bugs that depend on Tholal providing a new DLL, but it should make the Infernal Pact work properly.

    It also strengthens the Bhall Orc unique unit, giving them free promotion picks based on the Free mana you control and letting them capture units as slaves. More significantly, they gain a new spell which lets them sacrifice non-Orcish slaves in order to restore their casting and attacking abilities. (The prereq for this spell also removes any religion they might have been randomly assigned, so they don't get access to various other priest spells.) If they sacrifice slaves while on the Pyre of the Seraphic or a Demons' Altar it also triggers those respective Sacrifice spell codes.
     
  20. Erik Mesoy

    Erik Mesoy Core Tester / Intern

    Joined:
    Mar 25, 2002
    Messages:
    10,955
    Location:
    Oslo, Norway
    I'm impressed you keep working on this.

    With this latest version I experienced something odd: Turn 160, Perpentach declared war on me and brought in six Fire Elementals somehow. (Loki's Wonder?) Permanent Fire Elementals, not summons. Since the strongest units I had available at the time were Hunters and Fauns, this led to my rapid defeat. Is this supposed to be possible?
     

Share This Page