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

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,089
    Location:
    Kael's head
    I have merged in lfgr's latest update but am pretty busy this week and so not had much time to playtest or discover any bugs. I'll probably release a new version this weekend.

    Some of the time I could have spent playtesting was instead taken up implementing new features I am not sure I will keep.

    One is allowing various arcane units to use ranged combat, with the Spell Extension 1, 2, & 3 promotions serving to increase their operation range. (With no Extension promotions they have no range and thus no ranged attack at all.) Adepts do a maximum 20% damage, Mages a maximum 40%, (Wizards a Maximum 50%), and Archmages a maximum 100% damage (i.e., they can kill at range.) Their actual attack strengths are small though. I don't think the dll allows for promotions or affinity to change <iAirCombat>.

    I also changed the way that Barnaxus teaches golems. I got annoyed by how some golems have the blue glow of being promotion ready when they could never actually purchase promotions, so I gave the race promotion a pyperturn effect that changes that status and removes xp from any golem but Barnaxus. Then I realized I might as well use that same call to let them learn from Barnaxus. I ended up making a new spell whose xml defines allow it only when a unit with the Golem promotion is in the same stack as a Barnaxus unit. I think it is faster for the python code to check whether that spell is castable than to check manually in python to see if Barnaxus is around. A golem can can this spell manually if on Barnaxus's tile, and will cast it automatically if there when the py per turn effect runs. It could thus gain 2 promotions per turn. I decided that rather than hardcoding a list of promotions, I'd instead check everything Barnaxus has and check the promotion info to exclude promotions with a min level of -1 (or more than the golem's level), any promotion with a bonus prereq, etc.

    I just gave the Luchuirp a new unique unit, the Sheut Stone Golem, replacing the Eidolon. These are of course golems that can only be built by evil Luchuirp who have access to the Hellish resource Sheut Stone. They start with Golem, Sheut Stone, Unholy Taint, Undeath Affinity, and Channeling 3. Canonically the Sheut Stones are known to attract Wraith and were formed into powerful weapons used necromancers in the Age of Magic. Now, in the age of rebirth, they are being forced into weapons that use necromancy by themselves. (If they somehow loose the Sheut Stone promotion, they regain it at their next retrofit.)

    (Similarly I gave Iron Golems the Iron Weapons promotion, which they should be able to loose through the Rust spell (although the way things work now that won't give non-combat units the Rusted promotion) and then regain through Retrofitting.

    Much older (pre-BtS) versions of FfH2 had an Arcane Golem unit, which could summon imps and seemed thematically most similar to Sheut Stone Golems. I looked through old art files on an external harddrive to reuse that art, but was disappointed to find ti was just the current Aureales graphics. I decided it was better to just use a slightly smaller Nullstone Golem graphics with the icon from the Pass Through the Ether tech.

    While looking through old files I decided I wanted to bring the old Forest Stealth promotion back, but might need to be careful to make sure that it adding and removing Hidden does not interfere with Whiteout or the normal Hide spell.



    This post convinced me to make most Enchant Spellstaff and Enchant Spellstaves delayed casting spells (like Bloom of lair explorations). You'll be able to cast the spell whether or not you have casted already that turn, but the unit will be immobile and you won't get the Spell Staves until the next turn.

    If you use a Djinn with Enchantment affinity the delayed spell does resolve before the unit's duration expires, but it does not give a spell staff to arcane units expiring the same turn. (At first I thought this was because I'd given Djinns magic immune, but it does not make a spell staff for a summoned imp expiring that turn either yet does give spell staffs to imps expiring a turn later.) I'm not quite sure why it works that way, but am fine with it.

    To be honest I'm not sure whether POV Exchanges do anything, except provide a small diplomatic bonus. They are an MNAI thing I have not touched..

    I kept getting the unknown item type 10 messages even after merging in lfgr's latest update. I got them to go away by removing the ## before a line " addPlainTrade("pow exchange", TradeableItems.TRADE_POW, "TXT_KEY_TRADE_POW")" in C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Magister Modmod for FfH2\Assets\python\BUG\TradeUtil.py

    I believe this was commented out by lfgr a couple versions back, but am not sure why. I'm not really sure what it does except prevent that message.

    I also uncommented the line two lines down, addPlainTrade("war reparations", TradeableItems.TRADE_WAR_REPARATIONS, "TXT_KEY_TRADE_WAR_REPARATIONS")


    You know what I'd really like? An option to make diplomatic windows start minimized, like production in a city that you may not want to deal with immediately and could end your turn without addressing at all.

    I have no idea how to code that, but maybe you could figure it out?
     
    Imp. Knoedel likes this.
  2. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    Can the Blue Dragon be summoned somehow or does it come into being only when all of the dragons come back and not under any Civilization's control?

    Also, why does the White Dragon have Fire Vulnerability but none of the other Dragons have a vulnerability?
    I would think the
    Red dragon would have cold vulnerability. Maybe the
    Blue dragon would have Earth vulnerability and the
    Black dragon would have Air vulnerability.
    All to balance them out.
    Leaving only the Gold Dragon to not have one.
     
  3. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    710
    This was done by Tholal, see here. I know he wanted to remove POW and War reparations at some point, as he believed they don't do anything, but I'm not sure if that's actually true. Your fix makes sense, as it seems to make these trades known to BUG, I'll test it and include it in MNAI. Thanks!

    It is not possible to change the diplomacy windows, as it is hardcoded in the exe. However, I'd guess the DLL triggers the opening when a leader contacts you with a trade. Maybe we could have (as an option) some sort of button in the main interface that is normally greyed out, and when you are contacted, it becomes active and you can click it to accept trigger the diplomacy window (instead of the diplomacy window just appearing). Multiple contact attempts would be queued. If you end the turn, you automatically decline all unopened trade offers/demands. Maybe the queue is visible as a tooltip, and you can cancel the first contact attempt with a right click or something.
    I'll look if something like this is feasible at some point.
     
    thegreekweegee likes this.
  4. thegreekweegee

    thegreekweegee DEMON, ATHETOS SAY, KILL

    Joined:
    Mar 20, 2013
    Messages:
    291
    Location:
    Mar-Uru, Sudra
    Realtalk? That'd be a useful feature for a LOT of mods outside FFH2, especially when leaders just spam you with trade offers, gift requests, resource demands, and whatever's under the sun they can wring out of you. I'd really love to have something like that, as it'd clean up this sort of clutter very nicely.
     
  5. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,571
    Location:
    The cooler Germany
    Don't the trade offers technically happen on the AIs' turns, not yours?
     
  6. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    710
    I took a look at the code, and gDLL->beginDiplomacy(...), which is implemented in the exe, is indeed called during their turns. I don't know whether you can call it while its not the initiator's turn (with the window actually popping up). I don't see a reason why not, but who knows what the exe does. I'll try it out. If it is possible, the CvDiploParameters can be easily queued, and the auto-rejecting code already exists via the "Cease bothering us" option in RevDCM.
     
  7. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,089
    Location:
    Kael's head
    I just uploaded the latest update.

    The August 4th, 2019, update includes lfgr's mnai-2.8.0u update and some of my own bug fixes plus improvements that the new DLL allows. It gives every 3rd tier spell +1 affinity for its mana type, and each affinity promotion +1 strength in an appropriate damage type. (Creation is an exception, although the Blessed promotion it randomly grants is the equivalent to a +1 holy damage that can be removed and then restored.) Djinns gain Magic Immunity but loose Spell Extension. The greater version now summons 3 Djinns instead of 1 with Mastery of Magic. Arcane units get a ranged attack but no range to let them use it without Spell Extension. The Forest Stealth promotion is back, allowing the Hide in the Woods ability to let units become Hidden when in Forests, Ancient Forests, or Jungles. It is allowed by Feral Bond and Satyr, Dexterous, or Sinister. Guardian Vines, Frydwell, and Nyxkin start with Forest Stealth. Nyxkin gain +1 Poison strength and defensive bonuses in exchange for not having ranged attacks like other unitclass_horse_archer units. Three units capable of conducting Trade Missions were added: Caravans, Merchantmen, and Smugglers. Enemies can capture these for gold. Unseelie Shadows gain Divine, letting them use Council of Esus priest spells. Disrupt can steal cities, when at war or with an HN caster of the CoE state religion, but the spell now requires Undercouncil membership and the passage of the Fund Dissidents resolution. Embezzle now requires CoE state religion. CoE + Divine allows Kidnapping. Aphotic Thrones now have friendly and hostile forms. The new Ally with Aphotic Throne Undercoucnil resolution lets members have the friendly version instead of the hostile version all other non CoE players have. Agents of Esus can add culture like all basic disciples and can be build without a state religion requirement, but only from a friendly Aphotic Throne. Agents of Esus can steal plans, sabotage, and destroy production. Their upgrades can do the same without dying if caught. Sinister improves the odds of kidnapping, stealing, and reduces the cost of CoE priests, Shadows, Hunting Lodges, etc. Dexterous decreases the cost of Satyrs, Beastmasters, Archery Ranges, Etc. Life Affinity no longer allows access to Life 3, but blocks it like other affinities do their 3rd tier spells. Mass Resurrection now works on your heroes, but not those of other civs or units that would abandon you for having the wrong civic or state religion. Sluagh's are no longer placed at tile (0,0), but stay near where the units were slain so that Life Affinity archmages can resurrect them there. Vampire Spawn are still renamed to identify their sires, but not generations of grand sires. Spawn of city governors can get mana-based spell promotions. Escape no longer takes a unit to its summoner, unless the player has no capital city. Golem has a PyPerTurn call which prevents useless promotion ready glows, and handles their ability to learn from Barnaxus. The Eyes and Ears Network no longer steal technologies, but instead grants you the line of sight of all player you know. The Sidar maps are excluded from this and from being shared through the Overcouncil resolution. The Sidar default race of Grey lets units of level 7 learn Immortal (with Divine Essence) and stops them from returning as angels or manes. Only evil players can rob graves on holy ground. Tomb Wardens no longer start with Death 1 and are not summoned by Sanctifying graveyards, but can rise to defend Graveyards on Hallowed Ground and will extend the duration of that improvement.
     
  8. thegreekweegee

    thegreekweegee DEMON, ATHETOS SAY, KILL

    Joined:
    Mar 20, 2013
    Messages:
    291
    Location:
    Mar-Uru, Sudra
    Doing a first look and I see you've integrated Psychic Damage as a damage type in full and removed the Affinity UI clutter; good stuff! Will fire up a new session soon.

    Mind if I ask what near future plans you got in terms of the modmod? I'd like to see what will come in the next version.
     
  9. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    LOL! Probably resting after posting his changes today.
    Yea, I'd do this. I'm sure he'd like a day off between updates. :)
     
  10. thegreekweegee

    thegreekweegee DEMON, ATHETOS SAY, KILL

    Joined:
    Mar 20, 2013
    Messages:
    291
    Location:
    Mar-Uru, Sudra
    Hey now, it's not like he does it as a full time job :^)

    Just curious on what he has next in store for us.

    @MagisterCultuum Scouring the Leaderhead Infos xml for the unit voiceline stuff, I've noticed the fact Amelanchier and Volanna were commented out of the Doviello. Did you plan to add them for the same reason you added Thessa and Rivanna to the Calabim before deciding it didn't fit that well?
     
  11. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    :) No worries. I'm just picking on you. I know those of us that play it a lot, enjoy it and keep thinking of ways to evolve the game and make it even better. We wait in anticipation of new changes that occur also.

    That sounds like a good idea.
     
  12. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,089
    Location:
    Kael's head
    I don't really have firm plans on what will be in the next version just yet. It may depend on what lfgr's next version allows.

    After the last release I noticed some python errors in CvSpellInterface.py def canCast(argsList):, in the lines of code I added to make the Nullstone Citadel block spells that are bIgnoreHasPasted.

    I think the problem was actually a bunch of places where some spells like Vitalize check the python prereqs of other spells without including the eSpell parameter.

    While fixing it I decided to go ahead and let Nullstone Golems similarly block the ability of adjacent hostile units from using magic.

    I then got to thinking that canonically it would make a lot more sense for Nullstone to make units Miscast rather than blocking magic.

    Currently no spells have a PyMiscast, but the mechanic exists to trigger a different result in the event that a spell fails. I am thinking the next version may focus on making use of that function.

    A unit trying to summon a Fireball might thus instead injure himself and become Vulnerable to Fire, a unit trying to dominate an enemy might instead change sides, a unit casting Loyalty might make units rebellious, etc.

    There is a iMiscastChance tag in CIV4SpellInfos.xml and CIV4UnitInfos.xml.

    I just tested and found that setting the tag to 100 for either the caster or the spell causes even xml-only spells to have no effect (save whatever is in PyMiscast).

    I'm thinking that I may give the lesser versions of spells a higher Miscast rate rather than giving weak to their summons etc. I may give Adepts a higher chance of Miscasting than Mages, Mages more than Wizards, Wizards more than Archmages, etc.

    I'd really rather let promotions modify the Miscating chance. Arcane, Caswallawn, Spell Staff, Metamagic 1-3 ,and Channeling 1-3 could make Miscasting less likely. Chaos promotions could make it more likely. Gaelan might instead of granting Heroic Strength give out a new promotion that makes spells stronger but less reliable.

    The Nullstone Citadel and Nullstone Golems might not block casting at all anymore, but instead give nearby units a promotion (which could be automatically removed when they move away) that increase the Miscasting chance by more than 100%, so no bonus could let magic work properly.

    I believe I will need lfgr to change the DLL to let promotions chance miscasting chances though.
     
  13. thegreekweegee

    thegreekweegee DEMON, ATHETOS SAY, KILL

    Joined:
    Mar 20, 2013
    Messages:
    291
    Location:
    Mar-Uru, Sudra
    Miscasting sounds like a great idea to have, though I can see it becoming annoying if implemented heavy-handedly. Miscasting chances being lowered for higher leveled units would also be a nice feature to have, something to denote experience leaving less room for mishaps.

    Speaking of which, in addition to a spell miscast chance, a spell failure chance would also be nice, where adjacent units with magic resistance, magic immunity, force magic proficiency, and force affinity could make spellcasters have their spells peter out and simply not work, but only if the adjacent units fulfilled those requirements (without those, spellcasters would never have spells peter out, for instance).

    I'll dive into some lore questions here for a moment, if you don't mind. When it comes to magic resistance/immunity, how much does Force as a precept have a play to this? Does Force magic immunity trump and stamp out Metamagic magic manipulation proficiency, given both aspects were at the same "power"? And those with natural affinity to the Force sphere, does their magic immunity extend to a bubble that also covers their surroundings with its radius depending on connection/strength, or they're simply a magically "immovable object", so to speak?

    And finally, what would a corrupt Force user, or worse, a fallen Dagda, mean to the sphere and its nature? From what I understand, Force as a sphere is a weird case compared to the other spheres, as while you normally have 2 spheres complementing and/or clashing with each other (fire and water, or earth and air, to use the most obvious examples), Force seems to be dual sided on its own. On one hand, it represents balance, compromise, consensus, agreements, and moderation (the libertarian side, from what you told us), while on the other, it also represents the immutable, authority, and judgement (the authoritarian side, from what Kael told us). If we go by the theory that gods lose a part of their sphere by creating their archangels, Dagda creating Cassiel shed a part of the libertarian side from him, pushing him to a more authoritarian bent where he didn't even hesitate to smack down his own archangel in delivering the harshest of judgements. Even Bhall wasn't cold-blooded enough to murder her own archangel (and I consider stripping one's sentience to be murder, btw; odio was pulled by kilmorph into the earth, but he's merely imprisoned, not destroyed and recreated into a beast).

    My personal theory on a corrupt Force sphere is it inverts the libertarian part of agreement and consensus into sheer utter rejection and bloody-mindedness (the polar opposite of moderation and moderate stances, hint hint), while the authoritarian part is used to violently enforce that rejection to everyone, naysayers be damned. As for a fallen Dagda? It'd probably be something best left to imagination and fevered nightmares. But that's my theory, and I sadly don't know as much as Magister, so I'd rather have him explain things more accurately.

    (EDIT: I should add, it also depends on the manner a fall happens; a fallen Force user could easily just isolate themselves from the world, wanting absolutely nothing to do with it in any way, shape, or form, kinda like the ultimate rage quit of sorts.)

    Though a nice title for Force affinity humans could be "Ciphers". One title for those Kael gave us is Judges, but considering their magic-nullifying nature, Ciphers would also be a cool title (taking from its archaic meaning of zero, as it reduces all magical forces to nothing).

    Back on topic though, +1 for the miscast mechanic, as long as it's implemented with the delicateness random mechanics need.
     
    Last edited: Aug 7, 2019
  14. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    I noticed in the Civilopedia that it mentions that Falamar and Rhoanna shared the Heron's Throne. Yet neither have it listed in their favorite Wonder. Actually, no leader has it listed as a favorite.
    http://kael.civfanatics.net/files/FallFromHeaven030_Manual_v010.pdf
    Not that I mind, because I usually build it.
    Aside from it not being fictionally accurate (yet), but a strong Law minded Naval Civ could have the Heron's Throne as it's favorite Wonder. :) It would make it more productive in it's focus on ship construction and anti-piracy efforts. :)
    Just a thought. :) :) :)
     
  15. Dominus the Mentat

    Dominus the Mentat Chieftain

    Joined:
    Oct 29, 2018
    Messages:
    61
    Flames could have more functions in game. They only destroy forests and jungles and make the tile impassable for some units, but they could make the tile temporally unusable for cities, like the Fallout. It’s unrealistic making cities use 2 food from grasslands, for example, if the same is burning with flames.

    In addition, they could turn the tile blocked for improvements, give the cities unhappiness, showing that the government is inefficient to stop the fire or is a curse from the gods (even more with civilizations that use Guardian of Nature civic). It could too have chances of changing the tile to plains or desert and even destroying a resource inside a jungle or forest tile, That can improve gameplay a bit and make flames a problem even more badly.

    As for smoke, it could turn the forest health bonus in unhealthy for cities and maybe eliminate 1 food, because cities cannot benefict in this condition of the forest services, like pure air, food and humidity.
     
    plasmacannon likes this.
  16. thegreekweegee

    thegreekweegee DEMON, ATHETOS SAY, KILL

    Joined:
    Mar 20, 2013
    Messages:
    291
    Location:
    Mar-Uru, Sudra
    Smoke is implemented as an Improvement, so it already destroys and blocks other Improvements from existing on the tile, and I'm sure you can't build anything in Flames, since unless you have a fire resistant unit, it's outright impassable. Implementing unhappiness from terrain features could be done with a phantom civic, unless lfgr adds that function as a more elegant solution, and improvements can only change happiness, not health, so again, lfgr needs to add it, but I'm pretty sure even someone with rudimentary dll knowledge could hack those in. Also, Flames acting as Fallout would need to be handled delicately, as some like the Infernals wouldn't care at all about its destructive effects, as they're not affected. IIRC Ashes of Erebus extends the civ terrain yield bonus to features too, and adding that in would help tons with future modability.

    Overall, I second your idea, I just feel it needs the improvements I mentioned above.
     
  17. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    In a game of mine yesterday, Elohim and the Clan of Embers started too close to each other again.
    Their Capitol's cultural radius 2 touched each other, so when Elohim hit radius 3, plus one Good, the other Evil, war was inevitable.
    The Clan attacked Elohim and defeated their Civilization. Yet, Elohim never used their World Spell to kick them out of their lands. Why?
    What triggers a civ to use it's World Spell?
    Using it could have saved the Elohim from destruction.
    If there is ever a time to use a World Spell, I would think that would be it.

    Also, Leaders that start with the Barbarian trait, any normal barbarian result can't harm their starting scout from robbing or exploring.
    Are they just suppose to have this advantage where they can basically rob graveyards freely with no repercussions? Or are there some random events that could kill off their scout?
    My nephew played Doviello last night and got 5 free techs and 2 Great people mostly from robbing graveyards. This makes them rather powerful in the beginning.
    He said that he started with Lucian, a str 6 unit from turn 1. He sent it out with 3 warriors and conquered 2 Civs very early.
    It is now Combat 5, Shock 2, Drill unit with 44 xp on turn 58.
    At the time, I still only had my Capitol city. This seems a bit OP.
     
    Last edited: Aug 10, 2019
  18. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,571
    Location:
    The cooler Germany
    I think most world spells in Magistermod now have tech prereqs, so in your situation the Elohim simply didn't have time to research the prereq for their world spell.

    How is multiplayer going for you in general, if you don't mind me asking? In my experience Magistermod tends to go out of sync more often than standard MNAI, which is a pity.
     
  19. plasmacannon

    plasmacannon Emperor

    Joined:
    May 5, 2010
    Messages:
    1,652
    Gender:
    Male
    Location:
    Orlando, Florida
    Well, it went OOS on turn 12 when my nephew playing as Doviello, tried out their challenge ability.
    We usually restart and avoid doing whatever caused the OOS the next time around.
     
  20. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,571
    Location:
    The cooler Germany
    Last time I played the Doviello the Challenge ability was bugged in singleplayer too, but it's been a while and many versions since then so I don't know if it was fixed in the meantime.
     

Share This Page