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

RealFort Mod

Discussion in 'Civ4 - Mod Components' started by Bhruic, Nov 15, 2005.

  1. hIdDeN_eViL

    hIdDeN_eViL {кοтоя дѕѕαѕѕїй}²

    Joined:
    Sep 18, 2004
    Messages:
    458
    Location:
    sydney,down under
    i have a problem combining this mod with the random events mod, as both edit the file CvEventInterface in python\entrypoints\

    the random events mod has the following code:

    import CvRandomEventsEventManager
    from CvPythonExtensions import *

    normalEventManager = CvRandomEventsEventManager.CvRandomEventsEventManager()

    def getEventManager():
    return normalEventManager

    def onEvent(argsList):
    'Called when a game event happens - return 1 if the event was consumed'
    return getEventManager().handleEvent(argsList)
    <snip>



    whilst the realfort mod has the following:

    import CvCustomEventManager
    from CvPythonExtensions import *

    normalEventManager = CvCustomEventManager.CvCustomEventManager()

    def getEventManager():
    return normalEventManager

    def onEvent(argsList):
    'Called when a game event happens - return 1 if the event was consumed'
    return getEventManager().handleEvent(argsList)
    <snip>





    how can i combine these mods!?!??! HELP!!!
     
  2. hIdDeN_eViL

    hIdDeN_eViL {кοтоя дѕѕαѕѕїй}²

    Joined:
    Sep 18, 2004
    Messages:
    458
    Location:
    sydney,down under
    Please!!! Help!!!!!!!!!!!
     
  3. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    I thought I'd share a modification I made to this mod.

    The following changes (in bold) to the CustomAssets\xml\units\CIV4PromotionInfos.xml file will allow units to move back into Fort after an attack - without requiring any roads and regardless of terrain they attacked enemy on. This can also be used to reach deeper into enemy territory from Forts located on a common border - making Forts usefull not only for defence but also for launching attacks.

    <PromotionInfo>
    <Type>PROMOTION_FORT1</Type>
    <Description>TXT_KEY_PROMOTION_FORT1</Description>
    <Sound>AS2D_IF_LEVELUP</Sound>
    <PromotionPrereqOr1>NONE</PromotionPrereqOr1>
    <PromotionPrereqOr2>NONE</PromotionPrereqOr2>
    <TechPrereq>NONE</TechPrereq>
    <bBlitz>0</bBlitz>
    <bAmphib>0</bAmphib>
    <bRiver>0</bRiver>
    <bEnemyRoute>0</bEnemyRoute>
    <bAlwaysHeal>0</bAlwaysHeal>
    <bHillsDoubleMove>1</bHillsDoubleMove>
    <bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
    <iVisibilityChange>0</iVisibilityChange>
    <iMovesChange>0</iMovesChange>
    <iMoveDiscountChange>1</iMoveDiscountChange>
    <iWithdrawalChange>0</iWithdrawalChange>
    <iCollateralDamageChange>0</iCollateralDamageChange>
    <iBombardRateChange>0</iBombardRateChange>
    <iFirstStrikesChange>0</iFirstStrikesChange>
    <iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
    <iEnemyHealChange>0</iEnemyHealChange>
    <iNeutralHealChange>0</iNeutralHealChange>
    <iFriendlyHealChange>10</iFriendlyHealChange>
    <iSameTileHealChange>0</iSameTileHealChange>
    <iAdjacentTileHealChange>0</iAdjacentTileHealChange>
    <iCombatPercent>10</iCombatPercent>
    <iCityAttack>0</iCityAttack>
    <iCityDefense>0</iCityDefense>
    <iHillsDefense>0</iHillsDefense>
    <TerrainDefenses/>
    <FeatureDefenses/>
    <UnitCombatMods/>
    <DomainMods/>
    <TerrainDoubleMoves>
    <TerrainDoubleMove>
    <TerrainType>TERRAIN_GRASS</TerrainType>
    <bTerrainDoubleMove>1</bTerrainDoubleMove>
    </TerrainDoubleMove>
    <TerrainDoubleMove>
    <TerrainType>TERRAIN_PLAINS</TerrainType>
    <bTerrainDoubleMove>1</bTerrainDoubleMove>
    </TerrainDoubleMove>
    <TerrainDoubleMove>
    <TerrainType>TERRAIN_DESERT</TerrainType>
    <bTerrainDoubleMove>1</bTerrainDoubleMove>
    </TerrainDoubleMove>
    <TerrainDoubleMove>
    <TerrainType>TERRAIN_SNOW</TerrainType>
    <bTerrainDoubleMove>1</bTerrainDoubleMove>
    </TerrainDoubleMove>
    <TerrainDoubleMove>
    <TerrainType>TERRAIN_TUNDRA</TerrainType>
    <bTerrainDoubleMove>1</bTerrainDoubleMove>
    </TerrainDoubleMove>
    </TerrainDoubleMoves>
    <FeatureDoubleMoves>
    <FeatureDoubleMove>
    <FeatureType>FEATURE_JUNGLE</FeatureType>
    <bFeatureDoubleMove>1</bFeatureDoubleMove>
    </FeatureDoubleMove>
    <FeatureDoubleMove>
    <FeatureType>FEATURE_FOREST</FeatureType>
    <bFeatureDoubleMove>1</bFeatureDoubleMove>
    </FeatureDoubleMove>
    </FeatureDoubleMoves>

    <UnitCombats/>
    <HotKey/>
    <bAltDown>0</bAltDown>
    <bShiftDown>0</bShiftDown>
    <bCtrlDown>0</bCtrlDown>
    <iHotKeyPriority>0</iHotKeyPriority>
    <Button>,Art/Interface/Buttons/Promotions/CityGarrison1.dds,Art/Interface/Buttons/Promotions_Atlas.dds,2,2</Button>
    </PromotionInfo>
     
  4. JohnSearle

    JohnSearle Chieftain

    Joined:
    Nov 21, 2005
    Messages:
    88
    @Bhruic

    Off topic I know... but are you the Bhruic from ISONews?
     
  5. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Unfortunately I have to strongly disagree with this modification. The problem with it (and the reason I didn't choose to add it myself) is that it's too open to exploitation. Simply 'chain' a line of forts across your terrain and you can move across it in a single turn. While that certainly makes forts useful, it's not the sort of 'useful' that I had in mind. Which isn't to say that you shouldn't use it, but I don't recommend it. ;)

    Bh
     
  6. Otterbear

    Otterbear Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    58
    Location:
    Southgate, MI
    Q. I know that mathmatics is the prereq for forts and I want to change that what file/s do I need to change. I have looked at all the xml files and although you can change the prereqs for just about anything else I cannot find a single line anywhere that give mathmatics as a prerequisite for forts.
    Any help would be greatly apreciated -
     
  7. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    Wrong, it doesn't give zero movement cost, it will merely act as were there roads on all terrain - just like an Explorer with Woodsman2 or Guerilla2.

    EDIT: While a chain of Forts will essentially work like roads (without roads having to be present) then once you get Engineering(+1 move on roads) roads will offer better movement - and allow for plot improvements also. :)
     
  8. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    You need to look in the "xml\units\CIV4BuildInfos.xml" file.
     
  9. Exavier

    Exavier Destroyer of Worlds

    Joined:
    Nov 14, 2005
    Messages:
    906
    Location:
    Phoenix, Arizona, USA
    I want to merge this into my Composite Mod but with the way it seems to be written I don't know if i can... Looks like it seems to go into a folder other then \Mod\ so I am unsure how to merge it with a normal mod. Any Ideas?

    Also is there any way to make the forts like a road where they can be built without interupting any other improvements on that square?
     
  10. Willowmound

    Willowmound Wordbug

    Joined:
    Sep 10, 2005
    Messages:
    2,228
    Location:
    Afloat
    You can put it into mods/YourMod/assets/.... and the rest of the path. No problems there.
     
  11. Exavier

    Exavier Destroyer of Worlds

    Joined:
    Nov 14, 2005
    Messages:
    906
    Location:
    Phoenix, Arizona, USA
    do you need to change any of the files cause alot of them look like normal files but have "custom" or something like that in the filename... thats whats throwing me off lol
     
  12. Otterbear

    Otterbear Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    58
    Location:
    Southgate, MI
    Thanks bunches CyberChrist, I was starting to see files I know Id checked before..:)
     
  13. Willowmound

    Willowmound Wordbug

    Joined:
    Sep 10, 2005
    Messages:
    2,228
    Location:
    Afloat
    As far as I can see there's only the customEventManager-something file. I installed this a long time ago, I didn't do anything to anything and it works for me. That really is all I can tell you!
     
  14. Exavier

    Exavier Destroyer of Worlds

    Joined:
    Nov 14, 2005
    Messages:
    906
    Location:
    Phoenix, Arizona, USA
    LMAO about 2min 2 late but thanx :p

    I got it working and just uploaded a new version of my mod... I am up to 5 mods + my own changes all rolled up into one. and i have only been working on it 2 days :p
     
  15. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    A small note: I changed the icon from City Garrison to Commando. It results in less confusion when glancing at promotions (since it's less common), and is more pictographically representative of a fort (star with a "roof" over it). :)

    As he said, having a forest around your fort would actually make it easier to attack; in real life you would almost always clear out all the vegetation around the walls for several hundred feet (if not more).

    I also moved the Fort II tech to Engineering (which is on an equal level with Optics), and added the Amphibious promotion to Fort II as well. While it may not be realistic from an offensive standpoint, it improves the benefit of placing forts next to water, which was a big advantage in the real world.

    On another note, I've been experimenting with giving the attack bonus solely to Archers and Gunpowder. Instead of immunity to first strikes or strength bonuses, they receive a guaranteed withdraw chance while attacking from a fort's walls. This way they can attack, and be shot back at, but can always pull their heads back down when the losses get too high. This is somewhat like the Bombard or Zone of Control abilities in previous Civs, but the attacker can be severely damaged by counter-fire since withdraws occur on the losing round of combat (near 0 health).
     
  16. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    Does this allow land units to attack ships or is it just for the 'ignore river defence bonus'?
     
  17. Exavier

    Exavier Destroyer of Worlds

    Joined:
    Nov 14, 2005
    Messages:
    906
    Location:
    Phoenix, Arizona, USA
    Has anyone figured out how to make it so Forts don't destroy improvements they are build over.
     
  18. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    It just removes the river defense penalty.

    I'm now using the following, and it seems to be working very well:

    +10% healing (Default)
    +1 sight range (Optics)
    +10% Strength (Steel)
    - Archers and Gunpowder units now withdraw from combat if losing while attacking from the walls of a fort

    I tried it with a bonus move after attacking or moving from a fort, but it just added too much of a new gameplay dynamic (the free moves also taking place when you don't attack). Besides, when you attack a stack of units next to a fort, all your units but the last will stay put, like in in real life. If you really want to clear out all the besiegers around a castle you have to come out and fight them hand to hand :)
     
  19. Great mod Bhruic, forts indeed needed a boost. :cool:

    Anyway, I noticed a small bug with it - in the start up screen (when you creat a new game), the gamespeed Marathon is titled instead as TXT_KEY_GAMESPEED_MARATHON. Apparently something got messed up in the CIV4GameTextInfos_Objects.xml file. I took a quick look and noticed there were a lot of changes in the default file over the one you had, in particular it seemed they added a bunch of new languages (you probably were working with the 1.09 version, and I have 1.52).
    Anyway, I merged your changes into the new file and did a quick test, everything seems to work fine. I've attached the new xml file if anyone's interested.

    Also, may I suggest adding a bit more info in the Civilopedia screens. For example in the techs (Optics, Steel), it specifies the bonus but doesn't say that this is done/used by forts. I would also add that info to Fort bonuses, something like "+1 Sight Range with Optics".

    @Thalassicus: I like the idea of some units having 100% chance to retreat (it's certainly realistic) but seems to me like it might make them a bit overpowered - put several Infantry in there, one with the Heal promotion and nothing but tanks or a "zerg rush" will be able to take them (or at least that's my initial impression ).
     

    Attached Files:

  20. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    Yeah, the thing is, after units retreat they've only got about 2 strength remaining! So when the attacker comes in with 10-20 units, I've found it actually isn't as useful as first glance, until you reach mech infantry (which can withdraw and move). I wish there was a way I could think of to give ranged units in a fort the equivilant of Civ3 bombardment -- that way you could take potshots from the walls. Right now I'm trying it with an 80% withdraw chance and one first strike. When everything gets the bonus it ends up that mounted units are always the best to station in forts, since they can attack and then move (or attack multiple times with blitz). Limiting it to (primarily) defensive ranged units actually is somewhat of a lesser advantage.
     

Share This Page