[MOD] MagisterModmod

I'm not sure the "empty city with good production" would be enough. The main issue was that in some modmods the Barb-AI do not always select Acheron project as something to build

Well what else could we do? I did make a barbarian city build him with WorldBuilder in my friend's singleplayer game, but for our multiplayer game that's obviously not an option.
 
I'm thinking about tweaking the way Planar Gates work, to reduce the economic problems caused by random unit appearing when you cannot afford their upkeep and to help the player direct such units to appear in cities were they would be more useful.

I would make there be a "Planar Gate (Open)" and a "Planar Gate (Closed)" version building, which are mutually exclusive and identical except in their python effects. No city could ever have both at the same time. Dimensional I would allow spells to open or close the gate, swapping one building for the other. No creatures would ever enter Erebus through a Closed gate, but the maximum number of units allowed to enter through the Open gates would be based on the total number of both open and closed gates counted together. The Open Planar Gate spell might go ahead and trigger the same code that runs each turn in that particular city, giving a chance (not a certainty) of a planar gate summon appearing at the time the gate is opened.


I was originally thinking that Closed gates would only be for human players rather than trying to teach the AI to understand it, but I suppose I could tell the AI to close gates if their gold was running too low and if that city did not have any enemies nearby.

I could make it so that the Closed gates can be built without the dimensional mana requirement, but dimensional mana is needed to open the gate and a gate in a city without dimensional mana would close automatically.

I might add some events where hostile creatures can enter through events which were unwisely left open.


What do you think of these ideas?

I like them! So, the thinking would be that you should just keep them closed all the time, and open them whenever you need units? Presumably multiple Dimensional I casters would be able to toggle the gate open and shut several times within a given turn, giving the possibility to summon a daemonic army instantly, with enough casters, gates, and luck. I think I like that quite a lot.

I also like the idea of the unfriendly demon spawning every so often. Perhaps there can be a small advantage to leaving the gates open, maybe one or two extra beakers or something, so that there's a strategic decision between risking an attack and closing the gates?

EDIT: I do like the idea of a horde of Dimension adepts raising a daemonic army, but I'm not really sure how the gates actually work - might it be lore-feasible to make toggling the gate an ability anyone can do if there's a gate in the city? I'm just thinking a skeleton could pull a lever, if that's all it takes. :P

EDIT 2: I had another thought, that maybe it doesn't make so much sense for adepts to be able to summon hordes of daemons - perhaps constructing the gate keeps it open, and Dimensional II units have a spell which can close/open it.

Also, I discussed it with my brother, who doesn't play this mod-mod very much, but he has asked me to put forward the view that the in-place mechanic is just fine, the proposed changes over-complicate things, and that if your economy is suffering from unit maintenance you can just disband the relevant units. I suppose he does have a point, though I still like the ideas!
 
I just finished uploading a new version.

You may download the installer here or the archive here.

It includes MNAI v2.61 plus worldbuilder changes which newly exposed functions allow.

Tholal did not properly expose all the functions I wanted, so this worldbuilder cannot let you change a plot's real terrain type, i.e., what the plot will become once the temporary timer expires. You can however change the temp timer for terrain and change the timers as well as the real type for features, routes, bonuses, and improvements. Temporary map items may now be saved in worldbuilder, which could be very useful in scenarios.


This version does allow the Cult of the Dragon to be founded by an event which gives a free Dragon Fanatic to Cardith, Tebryn, or Auric if the control the appropriate dragon bones unique feature and know Fanaticism.

The barbarian state should try harder to train Acheron, so that event wouldn't be as needed either.

I went ahead and changed the Planar Gate mechanic. The open gate causes 1 unhappiness (although owning the Nexus would cancel that out) and causes the units in the city to be 10% more vulnerable to enemy magic. It grants the beast and arcane units free xp like before, while the closed one only grants it to adepts. An Open gate has a chance or triggering an event equivalent to a Dimensional Node Flair; it may make various elementals, demons, or the normal planar gate summons appear as barbarians in adjacent tiles. The gates don't require any resource to build, but a normal Planar Gate reverts to a closed gate if the city does not have access to Dimensional mana. Gates can be closed by any unit, but require Dimensional 1 to reopen. The AI will only close gates or refrain from reopening them if their economy is so bad that units are on strike.

I also doubled the length of the disabled spell casting from the Amurite world spell, but made that only apply to the player's enemies rather than to everyone not on the same team.
 
Reporting another Waiting for Other Civilizations error to see if anyone can help. Relevant BBAI Log and saves attached. The first save is the turn before the error; the second save is from when the Waiting for Other Civilizations Message is up, but the save menu is accessible (which is a strange variation I've only ever seen in this modmodmod). The BBAI Log doesn't seem to tell much of a story, unfortunately.

This game was started before the most recent release, and I haven't updated yet--doubt that makes a difference, but not sure if the new version breaks save games.
 

Attachments

Hello Magister, could you please find another host for your files? For some reason downloads will stop after a few megabytes and I never get to download any of the files in whole.
 
Actually that link pretty much just goes to something that lets you set up an account with that website.

I wasn't able to find any way to download the mod, though I do have a myflare account now.
 
Yeah MyFlare sucks. Apparently it won't let you download stuff if you don't have an account.

FFS I can't even confirm that I have gotten the registration email because it's buggy. I have never before met a more user unfriendly service, and I have an iPad, so that's saying a lot!
... Or the blame might be with Yahoo on that one, because after I moved the mail from Spam to Inbox it suddenly worked.

Aaaaaaaand of course making an account and confirming the registration email didn't do anything either, because all that's showing when I follow there link that supposedly shows the way to the installer is aan empty page. Great stuff, really great stuff.

WHAT? Suddenly it worked? After the sixth attempt? Just like that? Well I won't be looking this gift horse in the mouth and just hope I will never again have to deal with this joke knock-off of Dropbox.
 
I have downloaded things from there without being logged in, and I can see that all but a couple of the 50 or so downloads so far were from guests rather than users.

Something may popup asking you to join, but you should be able to close and ignore that.

I'm open to suggestions for other free sites where I can host future versions, but so far someone has had trouble with every site I've used.
 
What about moddb?
 
Okay, the thing someone wrote about popups jogged my memory.

I normally use Firefox with the ad blocker.

If you use Internet Explorer (well something without an ad blocker is my guess) the download works normally.

Sorry I posted anything, but someone else might have a similar problem.
 
Aaaaaaaaaah, the ad blocker, of course. Why didn't I think of that? :crazyeye:
 
So, cycled back to this modmod after a good while playing others (RiFE/Ashes, mostly). As always, different versions of Erebus are lots of fun. However, a few things I've noticed in my current game that are bugging me, and may or may not be working as intended.

I've been exploring Letum Frigus, Bradeline's Well, and Maenalus every turn in a constant cycle for maybe 200 turns now. Results have varied, but one thing that seems to stand out is that Rods of Wind were apparently mass-produced back in the Age of Magic. I've got something like a dozen of those, maybe half a dozen Timor Masks, a couple Rings of Kanna, and a single Jade Torc. Now, it's been far too long since I've done any modding or tweaking of my own, so I've forgotten where to look for the event code, but I'm wondering if there's something unusual going on or some kind of weighting for equipment finds where things that show up earlier in the list have a higher chance to be found.

Assuage (Spirit III) doesn't remove Committed to the Asylum. It probably should.

Adventurers resetting via "Now for something completely different" allows infinite promotions for free, through Adept line free promotions combined with the upgrade discounts from both Adventurer and an attached Great Commander.

Adventurers resetting also removes Life III promotion, possibly because it thinks they're dying?
 
I've been exploring Letum Frigus, Bradeline's Well, and Maenalus every turn in a constant cycle for maybe 200 turns now. Results have varied, but one thing that seems to stand out is that Rods of Wind were apparently mass-produced back in the Age of Magic. I've got something like a dozen of those, maybe half a dozen Timor Masks, a couple Rings of Kanna, and a single Jade Torc. Now, it's been far too long since I've done any modding or tweaking of my own, so I've forgotten where to look for the event code, but I'm wondering if there's something unusual going on or some kind of weighting for equipment finds where things that show up earlier in the list have a higher chance to be found.

The code for granting lair results like equipment is found in CustomFunction.py under def exploreLairBigGood(self, pCaster):, beginning around line 600.

The result chosen is determined around like 677. The equipment gifts are among those that work through the Goody system, requiring a result defined in CIV4GoodyInfo.xml. (You could technically make anything found in that file be revealed by exploring a goody hut.)

Where an item is placed on the list should not matter, as the whole list is composed before a (pseudo-)random number is generated based on the length of the list to select an item from the list.

I included checks that should prevent Kanna's Ring, the Rod of Winds, or the Spear of Majosi equipment from being added to the list to begin with if the item's unitclass has already been maxed out.

I however forgot to assign those unitclasses any <iMaxGlobalInstances>, which meant they could never be maxed out.

While correcting this just now, I realized that I added a "Shield of Balance" equipment to the game a long time ago but never made there be any way for it to actually appear in the game. I suppose I'll add it to the goody list now.


Assuage (Spirit III) doesn't remove Committed to the Asylum. It probably should.
I believe that it already does, but just is not well documented.

Because the DLL/xml schema only allow up to 3 promotions to be removed through a spell's xml defines, I had to resort to python.

In Python, the spell removes Crazed, Enraged, Burning Blood, Committed, and Rebellious. Only the first 3 of those are removed in python and so automatically listed in the 'pedia and mouse-overs.

I should probably update TXT_KEY_SPELL_ASSUAGE_HELP to clarify that the spell removes the other two too. It would look a little odd though for it to list 3 promotions to remove at the top and two at the bottom, as the range would automatically be placed after the automatically listed promotions before the custom stuff.

I could remove the XML effect as python can really handle all of it, but I believe that the AI players have a much better understanding of when to use spells if more of their effects are in XML.

Adventurers resetting via "Now for something completely different" allows infinite promotions for free, through Adept line free promotions combined with the upgrade discounts from both Adventurer and an attached Great Commander.

I like letting Adventurers get a huge number of free promotions, including the free promotions based on mana and those earned though experience even if unavailible to other unitcombat types. I have tried to remove the exploit of free promotion picks from upgrading, but that is really hard to do.

The process of upgrading a unit technically initializes a new unit (which gets its free promotions, free promotion picks, etc) before passing any information from the old unit, and then kills the old unit. There is not a special python handle that lets me run code after a unit has been upgraded and check for things like the Adventurer promotion. I can only check the new unit before the old data has been passed on.

Edit: Now that I think of it, it might be possible to add a few lines to the top of the Something Different effect which remove the free promotion picks when the unit does not have more xp than is required for a conventional level up. If I remember correctly, and I'm not sure I do, such a PythonPerTurn effect would be run automatically once the promotion is added to the new unit during its upgrade conversion.
Edit2: Well, that does not seem to work.
Adventurers resetting also removes Life III promotion, possibly because it thinks they're dying?

I have to remove immortality (including the Immortal or Life III promotions) in order to prevent adventurers from being duplicated in the process of being converted to a different unit type. I could add the promotions back later. That would make the code a little more complicated and the units even more overpowered. It may be an ok trade off if I get the free promotion picks removed though, as they would have to be removed even in cases where a normally upgrading unit would benefit from them.
 
Lair exploration and equipment finding
Hmm. New thought. Are the pCaster.plot() checks being performed all at once, or sequentially? For example, one of the more common Unique Improvement exploration results appears to be getting both a bigBad and a BigGood. Because I still suck at finding things in the code, which happens first? If the BigBad happens first, does the exploring unit being kicked out of the tile containing the Lair then cause bigGood's pCaster.plot() check to return the tile the explorer gets kicked to, thereby preventing results that check the tile for the Unique Improvement (basically just the Spear of Majosi).

Also, this might manage to create some oddball results when exploring a lair with a unit capable of traversing both land and water, if the unit is kicked from one to the other.

Mind, only being able to find the unique equipment if you manage to get the BigGood result without running into a BigBad might serve as another means to make unique equipment much rarer to obtain, but as of now it would only apply to the Spear of Majosi.

Stuff about Spirit III/Assuage and Committed
Hmm. I remember having a unit that wound up still having the Committed promotion after having Assuage cast in the same city. Said unit also lost the ability to cast Escape from Asylum though, and I'm not sure if it actually remained Crazed/Committed by the next turn on account of having far too many Lunatics running around already to tell apart. It sounds like it might have just been a display error or desync of some sort due to the Python/XML duality though.

Adventurers and free promotions
Oh I agree that Adventurers becoming extremely powerful over time is as it should be. It's just that the process of becoming so feels like it should incur some risk or cost, not just parking oneself in a city and installing a revolving door on the local Mage Guild.
 
You can only get both big bad and big good results from exploring epic lairs. The Big Bad results did come first, but I just now decided to switch that because the Spear of Majosi really is too hard to get.

The Python code checks pUnit.isResisted(pCaster, iSpell), but I noticed that the XML spell did not have <bResistable>1</bResistable>.

I think that might mean that the promotions were being removed in XML even when the other promotions were not being removed in Python. I just changed that boolean, but still need to test it to be sure that there wasn't a good reason for doing it that way which I have since forgotten.


I'm thinking that perhaps a unit with the Adventurer promotion abandoning his career course and reverting back to an Adventurer unit should result in loosing some experience points. That way, they could level up better if they actually go into the wilderness on adventures rather than staying safe and board guarding a safe city.

How much of an xp loss would be appropriate? Maybe one XP per level?

I also considered making Adventuers loose the hero promotion when kept in safe places and only regain it while abroad, but that would remove their weakness to the Netherblade so I don't think I'll do it.
 
Fun discovery: Thalatth the Blue Dragon can be committed to Asylums as well. Evidently, the Overlords build them on a truly massive scale. Furthermore, you can forcibly ship him off to one using the Trojan Horse even when he's Enraged.

Anyway, perhaps Dragons should be blocked from being loaded into transports altogether. It really doesn't make much sense that you can fit them into any kind of ship. Not sure about interaction with Rifts though.

edit:
Also, apparently resurrecting Acheron the Red Dragon (Life III) from his bones produces an "Acheron the Red Dragon's Acheron the Red Dragon". Rekilling and resurrecting again results in "Acheron the Red Dragon's Acheron the Red Dragon's Acheron the Red Dragon", and so on. Dragonception!
 
Blocking dragons from being Committed to Asylums would require a python prereq which I don't really want to add since something that runs so often could slow things down.

I'm not really sure how I could go about blocking Dragons from using transports, just as far as game mechanics go.


I just now fixed the dragon resurrection naming issue. (At least, I copied the lines of code that worked to fix an equivalent issue when I found in in the regular resurrect spell a while back. I have not tested it yet to make sure it works here too.)


-------

Since I was addressing the limits on finding equipment when exploring, I'm thinking of adding some new options.

The Netherblade and the Heartstone were both items taken from the Netherworld into Erebus through the Well of Shadows, but I think the Bradeline's Well could provide just as good a path. I'm thinking of making them available from exploring that feature, so long as they have not been in the game yet and so long as the Sidar and Sheaim (respectively) are not in the game either so Gosea or Rathus would not be built to let the enter the name the normal way.


I'm also thinking of introducing some brand new equipment.

I don't have any Erebus-specific lore justification for Seven League Boots, but they are a pretty basic fantasy item and it seems like there should be some equipment which improves mobility.

Since Nullstone can canonically reflect spells, I'm thinking of having a Nullstone Necklace which grants magic immunity. (There may be some issues with taking equipment from a magic immune unit though. This may need further testing.)Edit: I forgot that this is exactly what the Crown of Akharien does. There is no need to duplicate the effect. I think I'll change this to the Helm of Darkness, granting invisibility.


I'm thinking of adding the possibility of sacrificing Orthus's Axe at the Pyre of the Seraphic in order to restore the Matron Essendi. It is canon that Orthus desecrated this sacred scepter of the high priestess of Bhall, attaching a crude battle axe to it. He killed the priestess's whole family in the process, except for the young Rantine who escaped. Rantine canonically despises Orthus and wants to regain the holy relic for safekeeping. I'm thinking that when used properly the Matron Essendi would be even more powerful, granting Blitz, Fire Affinity, Fire Immunity, and the ability to cast Pillar of Fire (possibly only in the hands of a Bhall-Orc, one of the goddess's remaining priestesses). I'm also thinking of making the basic Orthus's Axe provide +2 fire damage instead of +1 (which is better than affinity if you don't have much Fire mana), and making Orthus himself bAlwaysHostile. That would allow Rantine and him to fight without braking peace with the barbarians.


Does anyone else have suggestions for new equipment?

Would it be too much to add various one time use spell scrolls, which could be passed form unit to unit and then used one when one of them decided to use it to cast something like Escape without needing the usual spell sphere promotions?

What about a relic which acts like the Immortal promotion for whatever unit holds it?
 
Fun discovery: Thalatth the Blue Dragon can be committed to Asylums as well. Evidently, the Overlords build them on a truly massive scale. Furthermore, you can forcibly ship him off to one using the Trojan Horse even when he's Enraged.

That's cool to no end. I can picture a bunch of people sitting in chairs in a gym sized building, and the discussion leader turns to a gigantic creature reposing at one end of the group: "And how do you feel about that, Thalatth?"

I once tried to cure Thalatth with Spirit 3 using the Kuriotates and it didn't work. He just goes insane again the turn after you cure him and suicides on something again.

I do not think I have ever gotten the Spear of Majosi from a ruin, though I almost never investigate lairs on the ocean. Sadly the sea is just a waste of time for everyone except the Lanun, and just a barrier you jump to get to opponents.
 
The Dragon promotion include Magic Immunity, so Spirit III should never work on any dragon.

The Pool of Tears can still cure his Rage, but not his crazed state.

Thalatth is fully sane is resurrected or captured with The Spear of Majosi though.

The Spear of Majosi can only come from exploring Maenalus, so it is very hard to get. Since it is so hard, I think I'll change it so that it may resurrect Thalatth even without Life 3.
 
I had an interesting pair of bugs when playing as the Calabim in the Against the Grey scenario. I created Gibbon Goetia, and used him to essentially clear out the map (shadow affinity is so good). I accidentally used Shape Change while next to a Sidar city, however, which copied him to become a longbowman. The problem came in that the defenders in that game have the Held promotion; preventing movement and spellcasting - making him unable to change out of it.

I used the console to manually remove it, and some time later in the map found Rathus had been built. Killing him with Gibbon, i was dismayed to find both of them removed - again using the console, i discovered that apparently both of them died to the Netherblade - or perhaps only Rathus (suicide?) and Gibbon copied it.
 
Back
Top Bottom