Results 1 to 22 of 22

Thread: Free Upkeep in Castles

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Free Upkeep in Castles

    Anyone know what it would take to have castles accept the free upkeep attribute?

    I am trying to have some free upkeep units in cities and others in castles. Any thoughts?

    Thanks

  2. #2
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Free Upkeep in Castles

    Well for the unit portion of things, I don't think it's possible to differentiate between units that can be free in a castle versus ones that can be free in a city - there's just the one attribute, free_upkeep_unit. However, units do not become free upkeep unless the particular settlement can actually build the given unit, so this will in fact give you a way to differentiate between city-free and castle-free units, as almost nothing is able to be built in both. Thus in the case of say the English, town militia would never be free upkeep in a castle as they can never be recruited there, and likewise units like dismounted english knights would never become free in a city as the city will never be able to recruit them. So really, that fact should be perfect for your purposes.

    As for the castles giving free upkeep, this should be as simple as adding a line like "free_upkeep bonus 3" to the "capability" section of each level of castle wall in the file, of course substituting in the number of free upkeep slots you intend that castle level to give. The castle and city walls are the first few things that appear in the export_descr_buildings.txt file, and so should be easy to locate.


    See my Sig+ below! (Don't see it? Get info here)

  3. #3
    Clan Takiyama Senior Member R'as al Ghul's Avatar
    Join Date
    Jan 2003
    Location
    ignores routers who aren't elite
    Posts
    2,554

    Default Re: Free Upkeep in Castles

    Quote Originally Posted by Foz
    However, units do not become free upkeep unless the particular settlement can actually build the given unit, so this will in fact give you a way to differentiate between city-free and castle-free units, as almost nothing is able to be built in both. Thus in the case of say the English, town militia would never be free upkeep in a castle as they can never be recruited there, and likewise units like dismounted english knights would never become free in a city as the city will never be able to recruit them.
    Yes, but what if you move a city-recruited unit into the castle?
    As you've said, the attribute "free_upkeep" is connected to each unit. Once you mod a free upkeep slot for castles I don't see how you want to prevent city-units to hang out in castles for free.
    I'm not saying that's a bad thing but it won't work as you suggest!?

    R'as

    Singleplayer: Download beta_8
    Multiplayer: Download beta_5.All.in.1
    I'll build a mountain of corpses - Ogami Itto, Lone Wolf & Cub
    Sometimes standing up for your friends means killing a whole lot of people - Sin City, by Frank Miller

  4. #4
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Free Upkeep in Castles

    jousting lists and training grounds are supposed to give castles the free_upkeep capability but so far moving any unit into the castle or building any unit type didn't actually trigger that capability.
    Does that mean that it is inherently bugged?
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  5. #5
    Clan Takiyama Senior Member R'as al Ghul's Avatar
    Join Date
    Jan 2003
    Location
    ignores routers who aren't elite
    Posts
    2,554

    Default Re: Free Upkeep in Castles

    Does that mean that it is inherently bugged?
    In the vanilla game (and LtC) there's an entry "free upkeep bonus 1" at the wooden castle level. All other castle levels don't have that line.
    Without testing I'd assume that if you add those lines to the other castle line structures like motte_and_bailey, castle, etc. it should work. Judging by the edu file it was intended for castles to have free upkeep slots.

    R'as

    Singleplayer: Download beta_8
    Multiplayer: Download beta_5.All.in.1
    I'll build a mountain of corpses - Ogami Itto, Lone Wolf & Cub
    Sometimes standing up for your friends means killing a whole lot of people - Sin City, by Frank Miller

  6. #6
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Free Upkeep in Castles

    Quote Originally Posted by R'as al Ghul
    Yes, but what if you move a city-recruited unit into the castle?
    As you've said, the attribute "free_upkeep" is connected to each unit. Once you mod a free upkeep slot for castles I don't see how you want to prevent city-units to hang out in castles for free.
    I'm not saying that's a bad thing but it won't work as you suggest!?

    R'as
    You missed what I said earlier, and that is that the unit only becomes free upkeep if it can be recruited at the current location (we know this is the case because spear militia do not become free upkeep in a town until you build the building that lets the town recruit them). No city units are castle recruitable, ergo they can never be free upkeep there.

    Quote Originally Posted by FactionHeir
    jousting lists and training grounds are supposed to give castles the free_upkeep capability but so far moving any unit into the castle or building any unit type didn't actually trigger that capability.
    Does that mean that it is inherently bugged?
    See what I posted as reply in the bug thread. The gist is that they don't work because none of the castle-recruited units can be free upkeep (in the EDU this is set) so you get the free upkeep slot, but it's useless since no unit that is produced in a castle is also allowed to be free upkeep.

    Quote Originally Posted by R'as al Ghul
    In the vanilla game (and LtC) there's an entry "free upkeep bonus 1" at the wooden castle level. All other castle levels don't have that line.
    Without testing I'd assume that if you add those lines to the other castle line structures like motte_and_bailey, castle, etc. it should work. Judging by the edu file it was intended for castles to have free upkeep slots.

    R'as
    Yup they'll have free upkeep slots then, but they won't do anything until you designate some castle-recruited units as free upkeep capable. The actual attribute is free_upkeep_unit, and you'll need to add it to anything that you want to allow to be free upkeep in a castle (again, the unit has to be able to be produced at that castle to become free upkeep).

    Hope that helps everyone.


    See my Sig+ below! (Don't see it? Get info here)

  7. #7

    Default Re: Free Upkeep in Castles

    Thanks, worked like a charm.

    Im trying to force the campaign AI to build up armies for war but disband them afterwards. To that end im significantly increasing the maintenance cost of armies and hoping it will be smart enough to know it has to disband units if it wants to build. With luck this will be all it takes and i wont have to poke around the "I" aspect of the AI to make this work. In all likelihood it wont be that easy.

    thanks for your help

  8. #8

    Default Re: Free Upkeep in Castles

    In case anyone is curious. It doesn't appear that the AI is willing to disband a unit for any reason.

    Any guesses as to where this behavior may be changed?

    Thanks

  9. #9
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Free Upkeep in Castles

    Quote Originally Posted by Fat Buddha
    In case anyone is curious. It doesn't appear that the AI is willing to disband a unit for any reason.

    Any guesses as to where this behavior may be changed?

    Thanks
    Probably not at all. Such stuff is usually hardcoded.

  10. #10

    Default Re: Free Upkeep in Castles

    Quote Originally Posted by alpaca
    Probably not at all. Such stuff is usually hardcoded.
    Unfortunate. Oh well.

    Thanks

  11. #11

    Default Re: Free Upkeep in Castles

    Quote Originally Posted by Fat Buddha
    Unfortunate. Oh well.

    Thanks
    I believe this is one of the areas where the computer's psycho-aggression in the vanilla diplomacy works to its own interests. It ensures that old units get killed off and will be replaced with higher quality units. Unfortunately, it also ensures the AI gets into half a dozen wars and gets torn to pieces and is impossible to reason with, so I'd call it a net loss.

  12. #12
    Member Member SilentResident's Avatar
    Join Date
    Dec 2006
    Location
    Macedonia, Greece
    Posts
    48

    Default Re: Free Upkeep in Castles

    An way is to mod the export_descr_buildings.txt file.

    Simply, add the (without the "")
    " free_upkeep bonus 9 requires factions { byzantium, } "

    in the capability of all the Core Buildings / Walls and you will get free Upkeep for more units per settlement.
    Macedon or Macedonia (from Greek Μακεδονία) was the name of the ancient Greek kingdom in the northern-most part of ancient Greece. For a brief period it became the most powerful state in the ancient Near East after Alexander the Great conquered most of the known world, inaugurating the Hellenistic period of Greek history...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO