ExtraModMod continued

What happens if a hero mage unit (Hemmah, Govannon, etc.) casts Lichdome?
IIRC, you lose the promotions that automatically gain XP (the one that any adept/mage has, but I think the hero loses the Hero promotion as well) and you become vulnerable to the Destroy Undead spell, but like any Undead, you are then immune to some other spells, including some beneficial ones like Haste. Since those hero units already have Channeling III, I consider it a waste of a perfectly good national unit slot.

Actually, now I can't remember if liches are national units, i.e. limited to 4.
 
IIRC, you lose the promotions that automatically gain XP (the one that any adept/mage has, but I think the hero loses the Hero promotion as well) and you become vulnerable to the Destroy Undead spell, but like any Undead, you are then immune to some other spells, including some beneficial ones like Haste. Since those hero units already have Channeling III, I consider it a waste of a perfectly good national unit slot.

Actually, now I can't remember if liches are national units, i.e. limited to 4.

I tried playing around with the worldbuilder, any hero I gave the Death 3 and/or Channeling 3 promotion to was unable to cast Lichform with the button being grayed out. They were able to summon Wraiths so their spellcasting ability was also otherwise unhampered. I also tried various kinds of heroes to check if any of their background promotions/effects were interfering, but that didn't seem to be the case.

Grigori would be the one oddball in this case since they can get non-unique hero archmages, so I gave Death 3 and Hero to a random Acolyte and it was able to cast Lichform just fine. It also didn't lose the hero promotion in the process.

Liches are national units, if you have 4 or more the Lichform button is grayed out. Notably they have significantly higher base strength than Archmages (5+2 vs. 5) which can be further increased with the Tower of Necromancy.
 
What happens if a hero mage unit (Hemmah, Govannon, etc.) casts Lichdome?

IIRC, you lose the promotions that automatically gain XP (the one that any adept/mage has, but I think the hero loses the Hero promotion as well) and you become vulnerable to the Destroy Undead spell, but like any Undead, you are then immune to some other spells, including some beneficial ones like Haste. Since those hero units already have Channeling III, I consider it a waste of a perfectly good national unit slot.

I tried playing around with the worldbuilder, any hero I gave the Death 3 and/or Channeling 3 promotion to was unable to cast Lichform with the button being grayed out. They were able to summon Wraiths so their spellcasting ability was also otherwise unhampered. I also tried various kinds of heroes to check if any of their background promotions/effects were interfering, but that didn't seem to be the case.

In regular MNAI, world units (which includes all unique heroes) cannot cast Lichdom. Flesh golems and puppets have the same restriction.
 
I captured a slave from a hellhound and was surprised to get a normal human rather than a demon unit. Why?
 
Hey lfgr, there's a small issue in the EMM archive download:

Download and install Fall from Heaven 0.41 and patch "o" from here.
Copy or move the the "Mods/Fall from Heaven 2" folder to "Mods/ExtraModMod".
Extract mnai-2.9-beta1u.zip into "Mods/ExtraModModI". If you do everything right, you probably have to confirm that you want to overwrite files, and in the end there should be a folder "Mods/ExtraModMod/doc".
It names the wrong zip (should be emm-0.6.0-beta5.zip) and has a typo in "Mods/ExtraModModI". :)
 
I’m trying to figure out how to modify the random civ selections when playing a custom game. You know, where you can choose each civ and select random or @random by alignment, etc.. I found the random txt info in the CIV4CivlizatioinsInfo xml, then in the CIV4GameText_FF2 xml but cant find it in any python code. at least not where ive looked, and i think ive looked at just about every file that made any sense.
I was hoping this wouldnt be that big of deal and i wanted to add a "special random" or something like that for myself to randomly select from only the civs i want to play.
Anyway, ill keep looking but it seems that the xml entry would correspond to a python entry somewhere. any help would be appreciated, ty for all you do, the mod is great!
 
Last edited:
I’m trying to figure out how to modify the random civ selections when playing a custom game. You know, where you can choose each civ and select random or @random by alignment, etc.. I found the random txt info in the CIV4CivlizatioinsInfo xml, then in the CIV4GameText_FF2 xml but cant find it in any python code. at least not where ive looked, and i think ive looked at just about every file that made any sense.
I was hoping this wouldnt be that big of deal and i wanted to add a "special random" or something like that for myself to randomly select from only the civs i want to play.
Anyway, ill keep looking but it seems that the xml entry would correspond to a python entry somewhere. any help would be appreciated, ty for all you do, the mod is great!

The implementation of those special random options is done through the DLL inside the function CvGame::init. So you would have to edit the C++ code and recompile the DLL if you wanted to change something.
 
The implementation of those special random options is done through the DLL inside the function CvGame::init. So you would have to edit the C++ code and recompile the DLL if you wanted to change something.

ah, well that would explain it. I’ll take a look. Ty very much for the help!
 
Yes, here are the maps included. Also, the scenarios all work great except the "dungeon crawler" one (Gift of <something>).
Install FFH2, patch O and then extramodmod. This is the most stable version of modmods that ive found out of the mods for ffh2The scenarios being the "funnest" to me.
I find the smartmap_mst to be a very good generator. Any "mst" will remember your choices.
 

Attachments

  • Extramodmod_Maps.PNG
    Extramodmod_Maps.PNG
    59.1 KB · Views: 53
I have one other question on modding. I have learned and modified things here and there as I wanted, mostly simple xml modifications but some in code. The only part I'd really like to delve into is creating some more scenarios. Maybe to tell the story of some other different civs. I see there is a CustomFunctions and the ScenarioFunctions py. I cant figure out how the game "knows" how to find a specific method called? Would one simply setup the scenario map (with all the civs etc) and then have method callbacks to the python code from the xml? Does it search a certain way from one source to the next until it finds what it's "looking" for, or does the class need to be included in some way? I don't see any real "class imports" or some such that would indicate to the program how it would.

For instance, "GameStart". When the scenario runs how does it know to "go to" this method? I know how it works after that, but not sure how to start one, if that makes sense.

Also, cant figure out how to actually "print" something to the screen (some things, to me, need spelled out on screen at the times they occur)? I tried a few things, but always end up in some crash, as im not sure the syntax to use. I tried to use the szBuffer (pic below) but the ways I used to pyPrint to screen or a popup ended in failures.
 

Attachments

  • EMM_GameStart.PNG
    EMM_GameStart.PNG
    38.2 KB · Views: 50
  • EMM_PrinttoScreen.PNG
    EMM_PrinttoScreen.PNG
    23.3 KB · Views: 46
There are a couple of ways to get a method to run on a specific event. FfH scenarios do it the following way: First, the methods in CvEventManager, like "onGameStart", are called "automatically" by the game (its not important how that works). In CvEventManager.onGameStart() you can find the following code:
Code:
if CyGame().getWBMapScript():
   sf.gameStart()
The if condition checks whether a scenario is loaded (scenario in the wider sense of civ scenarios, not only FfH scenarios). If yes, it calls gameStart() of ScenarioFunctions; "sf" is the name of the ScenarioFunctions object defined in line 56:
Code:
sf = ScenarioFunctions.ScenarioFunctions()

Now, as you probably can see, FfH just puts all code for every scenario into ScenarioFunctions.gameStart(). There are better options then this, but if you're new to modding (and programming?), then I suggest you start this way. Or is there a reason why you cannot do that?

One remaining problem is that FfH differentiates between scenarios by having a special invisible gameoption for each scenario. You cannot currently add new gameoptions, unfortunately. I will try to make this possible in a limited way for the next version. Until then, you could see if "CyMap().getMapScriptName()" returns something useful that could be checked (I'm not sure right now).

Printing to screen is done with the "CyInterface().addImmediateMessage(...)", to display it immediately, or "CyInterface().addMessage(...)", to add it to the messages that are displayed one-by-one, with some time between them. See the code for examples on how to use these two messages (there is documentation, but it seems to be unreachable right now).

Let me know if you have further questions, I'll probably be able to answer with less delay in the coming days and weeks. :)
 
Man that’s awesome, thanks for the reply!

I am developer by profession. Mainly java and C#, but I’ve dabbled in python/ruby (Rpg maker) and a hint of C++ and other languages. I know how to read and follow code, but as you probably know, it’s a lot easier to do that when you’re not picking up where someone else left off. Truly though, I can read just about any language. I mean at some point they are all “the same”. You know this. I haven’t been developing long though, a few years.

Anyway, what I mainly wanted to do was simple at first. I just want to create a scenario for myself (doesn’t have to be tied with the others the way they are. Meaning, just a stand-alone, not finish this one before you play that one. I know this is most likely some flag that gets sets to 1 or whatever. I haven’t looked and don’t care really at this point. What I was mainly interested in was how to “control” an event triggering in my own scenario. Let’s say at the beginning I want the faction to play until something specific happens. Then, at that point the next “objective” becomes available, then when that is accomplished the next one, etc etc. I can find the code behind, let’s say Fall of Caurantine, and basically follow that but was unsure where all the code actually “connects to” in the other scripts. Civ4 or FFH scripts. You know what I’m saying? So, what all to ensure is imported when I’m building my class and methods (not sure if I would make a new class or just add methods in the scenarios class).

I can get more details in the future. I will run with what you gave me so far. I probably won’t have time to delve into it right now, but will be sporadically here and there. I’ll post some questions I have as I come across some and if you have time would really appreciate any pointers.

oh, btw, not too sure how to “log” or debug code as I go? Basically to “see” like you said if some method brings back something useful to me.

My basic scenario idea is having one for the Sheiam. I’m thinking of having only 4 mana nodes on the map. One “enemy” faction, probably the Bannor, a few neutral factions and the below objectives.
- the 4 mana nodes must be “captured” (within the factions borders). One of each type of mana must be built on each mana node.
- a neutral empire has a capital in which once conquered an item is obtained.
- once all mana nodes are constructed, and the item has been obtained, a ritual can be performed in the shieam capital city which allows a special building to be constructed. Once the building is constructed the sheiam win the scenario.

this is a rough draft, but shows you my thinking. I also won’t it where you could play as the good or bad faction. So shieam or bannor. Anyway, just my thoughts and objectives I want to pursue but was unsure how to make sure nothing triggered but my scenario and no “outside” influences disrupted that.

so I’ll dig into this when I get the time. I really appreciate your feedback, much appreciated, ty!
 
First off thank you for continuing the mod! I'm always on the hunt for a good AI challenge and it's shocking to me that the free market is failing to provide this!
Would expect the below could be fixed in the next release :) - took me a shameful amount of time to figure out from the somewhat cryptic instructions in the OP.
------------------------------------------------------------------------------------------------------------------------------------------------
for anyone experiencing the GFC error:

// *** Control Bitmap Theme file

// Set the resource
resource_path "Mods/Fall from Heaven 2/Resource";

// Setup common properties
include "Mods/ExtraModMod/Resource/Themes/Civ4/Civ4Theme.thm";

in

\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\Fall from Heaven 2\Resource\Civ4.thm

shows it's expecting the mod folder to be called ExtraModMod and not Fall from Heaven 2 - change it to


// *** Control Bitmap Theme file

// Set the resource
resource_path "Mods/Fall from Heaven 2/Resource";

// Setup common properties
include "Mods/Fall from Heaven 2/Resource/Themes/Civ4/Civ4Theme.thm";
 
There is a bug that currently requires the old "Fall from Heaven 2" folder to be present to play EMM. So in the archive instructions, you have to "copy" the folder, not "move" it (I just changed it accordingly). See here for details (the same bug is present in MNAI). This will be fixed in the next version.

Your second file makes the mod work in the "Fall from Heaven 2" folder, the way it worked in earlier versions. Be aware that in future versions, you'll have to change the Civ4ArtDefines_Misc.xml line for that, too, since it will still expect the mod to be installed in the ExtraModMod folder.
 
Thanks

E: Ignore below - it seems like the bug is that they can be automated just fine if Spring is their only spell. It breaks when they learn anything else!

E2: Also - currently playing as Illians - the automated Adept with Sping only decided to cast the world spell Statis... thanks Adept.

I can't automate my Adepts with Spring as Amurites, but I could as Malakim. I tested it in my game with Amurites - went into worldbuilder, created Malakim, created an Adept, changed it to my civ - it could be automated. Spawned a Malakim city, conquered it, built an Adept - could still be automated. Have a Balseraph city conquered and that Adept couldn't be automated. So it seems the code for automating Adepts is specifically attached to the Malakim Adept. Also the Malakim Adept couldn't be automated while sat in the city tile. Also FWIW the Amurite Adept is female but uses the male warrior grunt voice :D

Hope this helps fix it.
 
Last edited:
Top Bottom