[MOD] MagisterModmod

Is it really though? Your first screenshot tells a different story.
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.
 
Hm, the installer itself should ask you for the path during the setup, no? Perhaps double check that.
 
I just tried to install this, and am receiving this

View attachment 485524

I get that whether I run the install or extract from the archive. The mod is in the "correct" folder:

View attachment 485525

Am trying to see if I can find the entry, but any advice appreciated!

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?

Magister, I really enjoy using your mod for single player games. My one issue is the +50% cost to settler per one existing mechanic. I find this very annoying in most games, especially as the marginal benefit of a settler generally reduces as more are built, encourages odd min-maxing behavior (building until one finishes then pausing till it settles), and makes it hard for a large civ to expand in many directions.

Preferably there would be one set cost, but if it must change (presumably because hammers are more available later in the game, and you want the first few to be cheaper), I have some suggestions:

  • Increase per cities in your civilization, to a flat maximum.
  • Increase per total population, to a flat maximum.
  • Increase in each era (preferably with reduced bumps, so as not to prompt artificial behavior)
If you're not interested in doing this, would you be able to point me to the code so I can adjust it myself?
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.)

As a separate issue, is there a way to change BUG so that cities start with "Avoid Unhappy Population" unchecked? It's really annoying unchecking this, and very, very rare for me to prefer this behavior to normal growth mechanics.

Thanks.

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

Great work, I am amazed you are still working on this in 2018. I was about to install the latest version, but the installer can't find the location of my FfH2 installation. Does anyone know which registry key it checks? Furthermore, if I was to use the zip file, do I have to do anything other than extracting the content to .../Mods/ ?

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 figured I'd experiment with the Revolutions option in the latest version, and now something bizarre is happening.
View attachment 485239
Here in the screenshot is a city showing that my Empire stability is "Dangerously Unstable: (Worsening)" despite listing five good factors and no bad factors! What should I do about this?
I have Theocracy government and the Runes of Kilmorph holy city. My other civics are Nationhood, Arete, Foreign Trade, No Membership.

Strangely, every individual city is at Safe.

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.

Do you know why sometimes workers surrender, and sometimes they fight to the death?
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:
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 ...
 
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.
 
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?
 

Attachments

  • endturntocrash.CivBeyondSwordSave
    676.1 KB · Views: 170
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.
 
Playing as the Doviello, my units are being attacked by Barbarian units. Is this a bug or my misunderstanding of what should happen?
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.

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.
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.


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?
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.

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.
The cause is a bug I found right after the release:
I'm not sure how it got there, but I just found a mistake in line 6811 of CvRandomEventInterface.py, where it says 'pInfernalTeamFounderTeam' instead of pFounderTeam." This needs to be fixed for the Infernal Pact's demon summoning to work right. Actually, now that I look at it, that line is completely superfluous as the same (corrected) statement is already made a couple lines higher.
 
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.

Charadon. It's weird ... wandering units (Hill Giants, for example) attack but stationary ones (goblins in forts) do not.

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.

Fair enough. Is Tholal still active?

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.

Would that be best, do you think, in Pedia entries (and, hence, self contained in the game) or something like a wiki?
 
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.
 
Predictable crash moving to next turn. Any thoughts on how to resolve?

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
 
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.
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.
 
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

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.
 
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:
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.
 
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?
 
Top Bottom