Denev's advanced rules mod

denev

Warlord
Joined
Jul 5, 2008
Messages
208
Location
Japan
For BtS3.19 and FfH2 0.41

Introduction
This mod changes rules of some basic game systems.
I intend to make rules more rationalized.​


Download Here:

List of changes
  • Denev's advanced rules modmod (will break savegames)
    This modmod includes...
    • Better BtS AI 1.02a (thanks for BBAI team!)
    • Unofficial Bug Fix
    • Single Afterlife
    • Tweaked Hyborem
    • Spell Interrupt Unit Cycling
    • Growing Forest On Improvement
    • Still Object
    • Refined Withdrawal
    • Refined Defensive Strikes
    • Self-assertive Guardsman
    • More Detailed Civilopedia
    • Detailed UnitInfo Tooltip
    Additional changes:
    • AI: Rewritten AI_techValue() (calculation for choosing a research tech).
      • AI puts emphasis on early improvement tech matching with resource tile he has already possessed.
      • (More detailed adjusting)
    • AI: Rewritten AI_foundValue() (calculation for city placement).
      • Kuriotates places their regular cities more carefully.
      • Irregular city radius is always considerd.
      • (More detailed adjusting)
    • AI: Rewritten AI_chooseProduction() and AI_buildingValueThreshold()
      (calculation for choosing a building. AI considers actual commerce value.)
    • AI: AI centralizes a great people farm. Specialists are valued heavily at only such the city.
    • AI: AI changes vessel crews.
    • AI: AI uses a galley for early settling and amphibious assaulting.
    • AI: Settlements don't disturb a working of regular cities (Kuriotates can show their true potential.)
Spoiler :

  • FfH2 Unofficial Bug Fix (will break savegames, but you can choose not to break as an optional)
    • Fixed a CtD related co-existing with enemy unit in the same tile (Enslaved unit by invisible Shadow, etc).
      Now invisible caster can summon units on the top of enemy unit.
      Now worldbuilder can place a new unit on the top of enemy unit.
    • Fixed AI state religion frequent flipping (probably...:()
    • Mercurians can receive free forge from teammate's Guild of Hammers which is built before summoning.
    • Disciple of Acheron and Son of the Inferno can not be converted with For the Horde! spell.
    • Demagog can not spawn when enemy unit exists on the Town improvement.
    • When current researching tech loses religion requirement condition, the research is canceled. For example, when you research Infernal Pact, if you convert state religion, researching of Infernal Pact is canceled.
    • Now Adventurer unit has UNITAI_HERO as default AI.
    • Now Warrens duplicates unit completely. For example, the duplicated unit can receive XP from Brewery, Ancestral Cave or Demon's Alter.
    • A hired mercenary by Magnadine no longer have multiple weapons.
    • Now elvish civilization can see the amount of chopping production with chopping action tooltip.
    • Civilization leader unit (Hyborem, Basium or Auric) causes losing leader's trait when not only they are killed but also they are deleted by owner player.
    • Duplicated illusion unit by Hall of Mirror no longer causes losing leader's trait.
    • Now Hall of Mirror copies not only unit type but also unit artstyle.
    • Ira or Repentant Angel with Orthus's Axe changes their combat strength correctly after combat.
    • Dain doesn't like Desert Shrine.
    • Negative tile defense applies mounted unit or other unfortifiable units.
    • Fixed doubled spell resisting modifier.
    • Founded city doesn't wipe out flood plain correctly.
    • Now pre-required civilization of each unique building is available.
    • Ctrl + Num key function for registering units is available again.
    • Civilization unique buildings (not replaced buildings) no longer can be kept after city owner changes.
    • Fixed issue about Mirror of Heaven with no Sun Mana.
    • EVENTTRIGGER_TOXCATL event can occur correctly.
    • From jdog5000's Unofficial Patch
      • Overflowed production is carried over correctly.
      • AI does hurry production with whipping only when he can do it actually.
      • and many issues.
  • Single Afterlife
    • Defeated unit can have only single afterlife.
      • Captured unit doesn't be killed. Doesn't trigger onUnitKilled event, doesn't provide edible corpse for carnivorous unit and can not reborn at the capital even if he has immortal.
      • Captured soul by soul forge can not rise to Mercurians nor fall to Infernals.
      • Carnivorous unit (e.g. All Werewolves, mortal Losha, Beast of Agares vs. Paladin, etc.) consumes loser's corpse. Consumed body can not use for Mokka's cauldron.
    • Displays message when defeated unit is captured, enslaved or consumed by combat opponent.
    • Captured unit, upgraded or spawned unit from combat is placed in correct tile after combat. (Always placed at the tile which winner exists.)
    • Scorpion Clan Goblin upgrades to Scorpion Clan Wolf Rider instead of normal Wolf Rider.
    • Bug Fix: Disease promotion infects to all units in the same tile with defender unit.
    • Bug Fix: When Boarding Party captures a vassal with attacking from land tile, captured vassal is placed at the adjacent water tile.
    • Bug Fix: One-shot promotion (e.g. Bless, etc) is removed after combat even if either units succeed to withdraw from combat.
  • More Detailed UnitInfo Tooltip
    • Unit info tooltip shows new features of FfH2. (Patch "m" includes older version. This mod-component updates it.)
  • Growing Forest On Improvement
    • Forest (or other growing feature) can grow to the plot with valid improvement. For example, a Forest can grow to the tile with Camp improvement, or other elven improvement.
    • Defeated Treant can create New Forest on the tile with valid improvement (Similar to above).
    • Genesis ritual wipes out temporary terrain and restores real terrain.
    • Genesis ritual extinguishes Smoke improvement.
    • Bug Fix: Genesis ritual no longer wipes out Forest or Volcano on the Snow tile (You can create them with Snowfall spell).
    • Bug Fix: Genesis ritual removes all hell terrain.
  • Tweaked Hyborem (only Python and XML)
    • Tweaked Hyborem's Whisper spell. You can investigate target cities before picking up.
      Civ4ScreenShot0025.JPG
    • Hyborm starts with not only summoning civilization's tech, but also summoning civilization's revealed map.
    • Hyborm starts open border with summoning civilization.
    • Hyborem declares war to the civilization which is at war with summoning civilization.
    (Last 2 tweaking points are not my idea. These have been coded in CvEventManager.py by Kael. I just reordered them and made to work fine.)
  • Still Object
    • Equipment or Treasure box have only self-tile visibility.
    • Equipment or Treasure box doesn't cause first contact with other leaders.
    • Treasure box can't cast a worldspell and can't be deleted.
    • Now Treasure box is always invisible. Unit with stealth sight can no longer see other leader's treasure box.
    • New XML Tags
      • CIV4UnitInfos.xml:
        <bStillObject>: Boolean. True (1) means this unit is still object. A still object has no visibility, no casting spell and no movement. default is 0.
  • Refined Withdrawal
    • Unit or promotion definition can have negative withdrawal chance. Negative value means opponent withdrawal chance is increased.
      This idea from MongooseSDK.
    • Extra withdrawal chance from promotion works only when unit have some movement point remaining.
    • When a defending unit succeeds to withdraw from defensive combat, he loses proper amount of movement point that equal to normal movement (Minimum lost is 1, this is equal to attacking rules).
    • Deleted a limit of withdrawal chance that works when unit promotes. Instead, the limit works when actual combat.
      This means Magnadine can promote Flanking III.
    • Sea pillage interceptor can withdraw now (because defender can withdraw in FfH).
    • New XML Tags
      • CIV4UnitInfos.xml:
        <iEnemyWithdrawalModify>: Modifies withdrawal chance of combat opponent. Positive value assists enemy. Negative value blocks enemy. default is 0.
      • CIV4PromotionInfos.xml:
        <iEnemyWithdrawalChange>: Modifies unit ability that modifies withdrawal chance of combat opponent. Positive value weaken the unit. Negative value enhances the unit. default is 0.
  • Self-assertive Guardsman
    • Now Guardsman promotion is applied only the unit itself. When marksman unit attacks your stack, only unit with guardsman promotion can stand blocking your weak unit. If you want to guard spellcaster from enemy assassins really, you should place proper amount of guardsmen in the stack. This means Guardsman promotion becomes weaker than regular rules, then it's required condition is reduced from Combat IV to Combat III.
  • Refined Defensive Strikes
    • Now defensive strike depends on combat strength of unit. Hit rate and damage amount of defensive strike is calculated with defensive striker's attack strength and attacker's defense strength. Calculating formula is similar to regular combat (Civilopedia describes more details).
    • Drill I-IV promotions don't enhance defensive strikes directly, but first strike itself enhances it instead.
    • Unit with Blitz promotion no longer can make defensive strikes infinitely. The number of first strikes is ceiling.
    • Defending unit itself can not make defensive strikes.
  • Spell Interrupt Unit Cycling
    • Unit cycling considers a castable spell.
      (Active unit focus doesn't cycle to the next unit even if movement is finished when the unit (or unit group) has an available spell. For example, your scout moves on the explorable lair, unit focus remains the scout even if he finishes movement. Focus will cycle to the next unit after Scout explores the lair or skip his turn.
      Some spells (e.g. all world spells, etc) are exception because all unit can cast them and always interrupting is annoying.)

    [*]Advanced Rules

    Spoiler :
    1. Expanded spell engine
      • Dynamic spell availability display
        • When you drug mouse cursor from caster's tile to other tile, spell availability changes dynamically.
      • Spell requirement guide
        • When unit can not cast a spell, tooltip shows reason of uncastable.
      • Simple spell resist
        • Resist roll against spell is only once per spell. If resist roll fails, unit is affected all effects of spell. If resist roll succeeds, target unit is not affected at all.
      • Simple spell result message
        • When "Simple spell message" option is checked, result message of spell effect is shown per tiles, not per units.
      • More strict confirming to declare war
        • Confirming window to declare war pops up more strictly.
        • It is confirmed when not only attacking units, but also attacking tiles (Scorch, Tsunami or etc).
      • Ranged spell considers caster's visibility
        • Crush and Pillar of Fire spell can no longer cast for searching enemy unit.
        • Confirming window to declare war doesn't pop up when you cast area damage spell reaching to neutral unit that is your out-of-sight.
        • When AI suffers damage from enemy of out-of-sight, it doesn't cause declaring war because AI can not recognize that who attacked.
      • Player no longer has limitation of permanently summoned units. Instead, each caster unit has limitation. One caster can control only one same type creature at a time. (Different type creatures can be controlled at a time.)
    2. Most features consider game speed (refers each property at CIV4GameSpeedInfo.xml).
      • Period of continuous spell effect (some world spells, etc.)
      • Period of delayed spell
      • Period of unit duration (Treant from ancient forest, illusion from hall of mirrors or etc).
      • Culture amount (Legend spell, Mercurians's initial culture, or etc.)
      • Period and amount of city anger (Disrupt, Feasting or etc.)
      • Period of grace turns (exploring lairs, Guardian of Pristinus pass)
    3. Additional game options (you can select at option screen.)
      • Enable Combat Log
      • Simple Spell Message
      • Simple Spell Effect
        • Graphical effect of some spells become more simple. For example, effect of Tsunami spell only appears at tiles with target unit or improvement.
    4. Arranged Invisibility
      • Promotions can not only grant default invisible type, but also all invisible types.
      • Unit can have multiple "see invisible" types. "Can see stealth" ability from Perfect Sight promotion does not override "Can see hidden animal" ability of recon units.
      • Invisible unit no longer pushes out enemy units from his tile, and vice versa. World builder can place your unit on invisible enemy unit, vice versa.
    5. Great Commander like a Warlord
      • Unit graphic and unit name are changed when great commander joins.
      • When a unit with great commander dies, it is announced as a world information.
    6. Guardsman promotion
    7. Refined Defensive Strikes
    8. Multiple Unit Built-in Spell
    9. Spell Interrupt Unit Cycling


Change Log
  • Denev's advanced rules modmod
    ver 0.16 (will break savegames)
    • Now Editing...
    ver 0.12 (will break savegames)
    • New Interface: Naval units with cargo space can pick up land units directly when trying to move into plot with land units.
    • New Interface: When you command landing to vessels with cargo units, if cargo units already finished their movement, landing action occurs at next turn.
      (Command stacks queue.)
    • New Interface: Merged with New blockade action for naval units (Sea blockade doesn't finish unit movement.)
    • Fixed Interface: You can now command correctly to a unit which already finished his movement. (Your command is no longer canceled. Skip*5 and moving is good.)
    • Fixed an issue that March promotion doesn't work.
    • Fixed an issue that Civ4lerts doesn't work.
    • Fixed an issue that a Jade Tork doesn't prevent a poison promotion.
    • Elven forest can no longer be chopped by rival player.
    • Illusioal great person can no longer start a golden age. (black mirror exploit)
    • Perfect sight promotion doesn't kill a sight of recon units.
    • Hidden animals are revealed in cultural border. (A mine spider blocks his mine from city working.)
    • Your invisible units are not pushed out from enemy land when you declare war.
    • An isolated area by impassable terrain or feature is now different area from main area. (Some AI decisions depend on it.)Ice feature on the sea plot is now different area from sea area. (Idea from BBAI)
    • Combat log is available again. (You can choose on option screen.)
    ver 0.11 (will break savegames)
    • Fixed an python error that is caused when a worker is placed on the tile that isn't belonging to any city. (thanks maglock!)
    • Fixed a pink building icon at city bar info.
    ver 0.10 (will break savegames)
    • Converted to patch "o"
    • Merged with BUG 4.4 and BULL 1.2
    • Incorporated some codes from Fuyu's Better BUG AI
    • A unit with a Golden Hammer can cast a "Give a Hammer to Craftman" spell directly.
    ver 0.09 (will break savegames)
    • AI: Some leaders become to aim an altar victory.
    • AI: Settlements don't disturb a working of regular cities.
    • AI: Missionary units will also look for cities in disorder to pacify (from More Naval AI modmod)
    • Fixed issue that Hyborem's whisper choose poor cities.
    • Fixed issue that Hyborem's whisper takes no city when AI uses.
    • Rule change: Calculation of city defense is restored to normal BtS formula. (Sum of building defense and cultural defense. Walls or Defender trait are more valuable.)
    • Rule change: Cultural defense is halves. (Quarter of normal BtS)
    ver 0.08 (will break savegames)
    • Included Multiple Production Mod
    • Merged with jdog's BBAI 1.01
    • A Great Commander can be seen with joined unit.
    ver 0.07 (will break savegames)
    • Converted to patch "n"
    • AI: Rewrote AI city placing function.
    • Fixed a CtD when you choose "Raging Barbarians" game option.
    • Fixed an issue that wild animal doesn't attack.
    • Fixed an issue that any unique buildings can not be built.
    • Fixed a CtD when withdrawing unit from combat can not find a safe tile.
    • Fixed an issue that Infernal doesn't have any initial buildings.
    • Fixed an issue that hell terrain doesn't appear.
    • Fixed an issue that the Orthus doesn't appear.
Spoiler :

  • FfH2 Unofficial Bug Fix
    ver 0.04
    • Upgrade restriction of alignment depends on not only a city owner's, but also a unit owner's.
    ver 0.03
    • Now pre-required civilization of each unique building is available.
    • Ctrl + Num key function is available again.
    • Civilization unique buildings (not replaced buildings) no longer can be kept after city owner changes.
    • EVENTTRIGGER_TOXCATL event can occur correctly.
    ver 0.02
    • Alternative DLL is included. It will not break save games from unmodded FfH2 patch "m".
  • Tweaked Hyborem mini-modmod
    ver 0.04
    • Summoned Hyborem starts with more conditions (Revealed map, Open border and War condition).
    ver 0.03
    • Converted for patch "m"
    ver0.02
    • Converted to patch "k"
  • Still Object mini-modmod
  • Refined Withdrawal modomod
    ver0.03
    • Fixed issue that negative withdrawal rate was increased to 0 when unit was immobile.
  • Advanced rules modmod
    ver0.11(beta)
    • Spell cost considers game speed.
    ver0.10(beta)
    • add Expanded spell engine, consider game speed, Additional game options, Arranged Invisibility.
    • Misc.
      Spoiler :
      1. Whirlwind spell (<bPush> element is true) pushes target unit only one tile always.
      2. Barbarian no longer cast Peace spell of Seven Pines.
      3. Contagion spell can not damage to unit with immune to disease.
      4. Earthquake or Tsunami spell downgrade Town improvement to Village, Village to Hamlet, Hamlet to Cottage instead destroy directly.
      5. When revelation spell removes promotion that grants invisibility, target unit appears immediately without refresh screen. (This doesn't mean rule change, only visual effect.)
      6. Fix limit of Lich unit. Now Lich is team unit correctly.
      7. Fix mass opening chest and mass eating bloodpet cheat. When you try to open two chests with ten units, chest is opened twice correctly.
      8. Summoned unit with Wonder spell receives starting promotions from caster's promotions.
      9. Second unit from Warrens can receives effect of Brewery, Asylum or Demon's Alter.
      10. Disrupt and Entertain spells can not cast at a city in occupation.
      11. For the Horde! spell no longer pushed out enemy unit from his tile. When you are at war with barbarian trait leader and a barbarian unit is at your enemy city, if the barbarian unit join your cause by For the Horde! spell, he doesn't pushed out enemy unit from his city.
      12. Hastor's razor keeps total amount of damage.
      13. Hidden nationality unit can not cast Domination and Mezmerize Animal spell. Because hidden nationality unit can not capture defeated unit in combat.
      14. Temple of Leaves increases probability of appearing Treant at not only tiles with citizen working, but also all tiles within fat cross. (If more than one fat cross includes one tile, the tile is affected by only one city.)
      15. Recruitee from Recruit ability may have some starting promotions. If recruitee is golem, it receives starting promotions from city buildings.
      16. When state religion is Council of Esus, Religious Fervor spell may create Nightwatch unit.
      17. When defending withdrawl is failed because there is no clear tile, it shows message. This means you can notice killing of Loki. Scattering effect by fear is same.
      18. When unit is defeated in combat, he no longer has multiple afterlife. Afterlife priority is Mokka's Cauldron > Soul Forge > Manes reborn > Angel reborn. Spirit Guide effect is canceled by Cauldron and Forge.
      19. When defeated unit is captured, it always locates on attacker's tile after combat.
      20. Convert probability of Command promotion cumulates by adding, not multiplication.
      21. Building restriction of Agnostic trait moves from Python to DLL.
      22. Wounded unit can not fortify because he apply himself to heal. Casting spell blocks healing and fortification at next turn.
      23. Forest can grow to an adjacent tile with camp improvement. If you are elven civilization, all improvements don't block forest growing. New forest after defeated Treant is same.
      24. Fixed issue that Ira or Repentant Angel don't change their strength correctly when they have orthus's axe. (Axe increases fire strength.)
      25. Basium or Hyborem loses their traits when not only killed, but also deleted by the player himself.
      26. Scorpion clan goblin upgrades to scorpion wolf rider when he defeats a wolf unit.
      27. When Infernal or Mercurians civilization exists more than one faction, reborned manes or angel is no longer monopolized by first civilization.
      28. Refined Fund Dissidents. It was too weak.
      29. Herald's call reduces supply cost of target units immediately.
      30. Hall of Mirrors copies also unit artstyle from original unit.
      31. Now Demonic citizen is free building from Infernal Palace.
      32. Fix issue of Erebus.py


SDK

Known Issue
  • Stack attack causes CtD when defending unit enslaves attacking unit.(fixed)

Obsoleted files
 

Attachments

  • Denevs_modmod_010b.zip
    6.3 MB · Views: 254
  • CvGameCoreDLL.zip
    1.6 MB · Views: 472
  1. Guardsman promotion
    • Now Guardsman promotion is applied only the unit itself. If you want to guard spellcaster from enemy assassins really, you should place proper amount of guardsmen in the stack.

I don't quite understand what the change is here. Could you clarify?
 
Tholal: In base FfH, if you have ANY unit in the stack which possesses Guardsman, then instead of that unit volunteering to defend against a Marksman, you turn off the marksman ability completely for all people attacking your stack. denev's change makes it so that the attacking Marksman will target the best defender from all units on the tile with Guardsman capability, but if no such units are present, will instead attack the weakest unit in the tile. Before the change, if the unit with Guardsman wasn't the best defender in the tile, then a non-guardsman unit would defend against the incoming Marksman.
 
Tholal:
See the post of xienwolf. He explained strictly in detail more than I can do so.​

[to_xp]Gekko:
I feel so too. Well promoted Gilden makes iron-clad defense. :D

xienwolf:
Thank you for detailed explanation instead of me. It is hard to describe something strictly with non-native language. hehe. :lol:
 
I would have proposed a different or additional change to the withdrawal.

There should be a promotion that reduces your enemies withdraw rate. Some units may be better at chasing them down for instance.

And/or Movement should be a factor. +X% for every movement you have more than your opponent, -X% for every movement your opponent has more than you.
 
There should be a promotion that reduces your enemies withdraw rate. Some units may be better at chasing them down for instance.

That's cool idea. I think so indeed, because this modmod already included your idea. :lol:
I forgot to describe such feature.
Flurry reduces 25% opponent withdrawal chance. Marksman reduces 90%. Precision promotion reduces 10%.

And/or Movement should be a factor. +X% for every movement you have more than your opponent, -X% for every movement your opponent has more than you.

Very interesting. In fact, I have made withdrawal chance to be proportional to remaining movement.
But I thought it's too complexity rule, and deleted it.
 
That's cool idea. I think so indeed, because this modmod already included your idea. :lol:
I forgot to describe such feature.
Flurry reduces 25% opponent withdrawal chance. Marksman reduces 90%. Precision promotion reduces 10%.

Is this done via a tag, or hardcoding? Hoping it's the first, as if it is I'll steal it. :mischief:
 
I'm confused, which one of the three should be used because they share some files and clearly can't be used together?

Thanks for your interesting to my modmod.:)

You can not use these files together.
I intended to make just "mod component", not stable and balanced full mod.

So, I forgot the case that someone who is not modder may use this modcomp.
If someone want to use these modcomps together, I may consider to merge them.
 
I intended to make just "mod component", not stable and balanced full mod.

Ah, somehow I've missed that point. The three major modmods have pretty much reached the point where they have more features that I dislike so I've started looking for small tweaks once again.
 
whoa! I had missed a couple of these, the still object tweaks are spot on! also the Guarsman tweaks, since Guardsman in FFH works very very weird. nice job as usual denev. time to flash the


SEPHI BEACON!!!


:lol:
 
I have come across this from the download announcement for "Growing Forest On Improvement ". In your original post I see:

Growing Forest On Improvement: Forest (or other growing feature) can grow to the plot with valid improvement. For example, a Forest can grow to the tile with Camp improvement, or other elven improvement.

Does this mean you have solved the problem of tree cutting on improvements? I thought the graphics engine prevented this. Can you say a little more about how this works, perhaps with two screenshots showing the difference?
 
So, what should I do to include Tweaked Hyborem into my 0.41 L? Should I just copy the files into respective folders?

Thanks!
Thank you for your interesting! :D
It is my best pleasure that other modder adopt my works.

You should just overwrite "Assets" folder. (Of course, you should back up original files.)
Oops, patch "m" is coming! Please wait I update Tweaked Hyborem for patch "m".

[to_xp]Gekko;8850178 said:
whoa! I had missed a couple of these, the still object tweaks are spot on! also the Guarsman tweaks, since Guardsman in FFH works very very weird. nice job as usual denev. time to flash the


SEPHI BEACON!!!


:lol:
Hi, mate. :)
Well, there is another approach for modders. Fall Further deletes all visibility from treasure box. That is stable and complete resolve.
I felt that I wanted more convenience.&#12288;Now you can check treasure existence and position on mini map or military advisor.


Does this mean you have solved the problem of tree cutting on improvements? I thought the graphics engine prevented this. Can you say a little more about how this works, perhaps with two screenshots showing the difference?

This is not a graphical modmod. ;)
"Build a Camp" command doesn't chop down a Forest, then Forest can grow to adjacent tile with Camp improvement.
Elven "Build a anything" command is too, then Forest can grow all valid elven lands ignoring improvements.

I feel sorry if I give you false hope. I have no idea about graphical modding. :cringe:
 
This keeps getting sexier. I really like the Hyborem additions.
 
Top Bottom