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

Fortress Borders Mod Overhaul! Outposts

Discussion in 'Civ5 - Mod Components' started by Serp, May 29, 2015.

  1. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    Hi,

    I did an overhaul of the existing mod "Fortress Borders" from preffect, here the Original:
    http://forums.civfanatics.com/showthread.php?t=509898
    http://steamcommunity.com/sharedfiles/filedetails/?id=178571997
    If you don't know the fortress borders mod, just read the short description from the original :)


    What I did:

    - Added a new improvement called Outpost. You can build it after you researched mathematics. This Outpost gets the abiltiy of cultural borders. So you can use the unchanged forts.

    - I made it multiplayer compatible.

    - I wrote a complex script for the border adding.
    The orignal mod is not balanced and you can exploit it in many ways. For example you can build forts near to your town and remove them. The result would be land for free. Or you could build the fort next to your enemy borders. That way you could steal him his land.
    In my version, these exploits are not possible:
    1) Tiles in a radius of 3 around any city will never be affect by Outposts.
    2) Tiles at range 4 or 5 from a city will be only affected, if they do not belong to a player already.
    3) If tiles in 4/5 range belong already to someone, the Outpost will notice and remember this. So when the Outpost loose his borders or is captured, these tiles which already belongs to a city, do not change! So you can't loose any tiles, which you got by city expanding.
    4) Outposts do not steal borders from anyone! So if you build a Outpost next to an enemy Outpost, you are not able to steal his borders this way. The only moment, were an Outpost "steals" borders, is when you captured the Outpost.
    5) If a new city is founded, all Outposts check, if they are in 3 radius to it. If so, these tiles will go back to nature (except they belong already to another city). That way a city is prior to a Outpost.
    6) If a Outpost is not able to gain control about any of the surrounding tiles (because all of them are in 3 radius to a city), the Outpost will be removed and you get a notification about it.

    All in all I think my version is really balanced and could be part of a fair game.

    The artworks of the improvement Outpost are done by Artisanix and Deliverator, taken from the "Improvement - Lookout Towers" Mod.
    Also thanks to conan.morris, for his PlotMath.lua.

    I already tested the most possibilities of building a Outpost and fixed all bugs I was able to find.
    But please also test this in all ways you can imagine, especially in mutliplayer and report any bugs you can find! :)

    You can download the normal mod version, or the Multiplayer version (MP is made like a DLC with MPMPM, you have to unpack the zip to your Assets/DLC folder. Only one MP DLC can be active at a time and the only way to deactivate it, is to remove it from the DLC folder).
    "Vorposten" is german for Outpost ;)

    Download Section for normal mod:
    http://forums.civfanatics.com/downloads.php?do=file&id=23986


    Changelog:
    31.May 2015
    - I forgot to delete an obsolete function, when an enemy player capture the fort, which causes an error. - Fixed
    - fixed several bugs I discovered in multiplayer testing. I think everything is fine now, but please report any bugs.
    8.June 2015 version 2
    - previous versions were not able to deal with Outposts build at the side of the map (because one of the tiles you should get does not exist). It's fixed in v2.
    - Added a part of "Lion King"'s idea: Citadels are no longer buildable next to eachother. (no other changes to citadels) - does not work, fixed in v4
    Update 15.June 2015 version 3
    -With previous versions active, the game took very long to load, because my mod saved every single tile with a save command. I fixed this by saving just one time a list of all tiles.
    - Increased gold costs from 3 to 5.
    Update 18th june 2015 v 4
    - Citadels now not buildable next to eachother, does not work in previous versions.
    Update 31 august 2015 v 5
    - Added the strategic view reload. Without it all icons at strategic view were different from the ones at the map.
    Update 7 October 2015 v 6
    - Fixed a small bug. Bug was: When an allied unit stands on a outpost from you and the timer expired, an error accured. The result was, that the outpost lost borders, but did not change owner to the owner of the unit. So the bug did not have a huge impact on gameplay.
     
    JohannesWasHere likes this.
  2. meRlinX_AT

    meRlinX_AT JustMe

    Joined:
    Jan 19, 2015
    Messages:
    161
    Location:
    Earth
    hi serp

    reads very nice.
    had the old mod on my "watchlist".

    it would be great, if the vorpfosten... ah vorposten would also extract resources.

    did the AI now know, how to use it?
     
  3. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    Hi :)

    Hm.. I think it would be neither logical nor balanced, if the outpost is able to extract ressources. If you want to extract ressources, simply build an improvement on a tile you got with help of the Outpost ;) (so do it like I did in the screenshot in the download section. I build a mine and got copper)

    Unfortunately the AI does not know how to use it. For the AI it is just an improvement providing 35% defense but costs 3 gold to maintain, so I think the AI will never build it.
    I have no knowledge, how to mod the AI ... and I'm sure it would be quite difficult to teach the AI all advantages of the Outpost.
     
  4. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    updated the files, important bugfixes.
     
  5. Lion King

    Lion King Chieftain

    Joined:
    May 24, 2015
    Messages:
    57
    Gender:
    Male
    Location:
    Russia / UK
    Hi Serp,
    I like your mod idea about creating outposts and the idea in general. In terms of forts grabbing lands - that's great you removed it because it would create a situation of constant fort constructing to increase borders.
    However, there is one point, which I would appreciate to have fixed - that is citadel rush. I really don't like civ mechanics of constructing citadel. While citadel construction in 1 turn is a bit unbalanced, it is the smaller issue. The main problem starts when people are rushing with citadels to city or starts citadel spam across the border. It looks especially stupid, when you build a citadel (i.e. strongly defended fortress) and put units and then next turn your opponent used GG on the adjacent tile and your defense line was put to nothing. I've seen 6-7 adjacent citadels, making battlefield ugly. Same issue with citadel damaging units inside the city - how come that be?
    Therefore, I have several suggestions about citadels:
    - make them non-adjacent to each other (i tried to use for this changed mod for forts not being adjacent but as I am complete noob in modding it didn't work for me). So you can't steal enemy citadel, you need to conquer it.
    - set aminimum distance from enemy city - i.e. you can't construct it adjacent to the city
    - Make the function: if citadel is destroyed, then return land within 3-4 tiles to the city to its initial owner. I like your idea about fort and citadels changing ownership depending on the unit in the tile. But this may lead to citadels not being destroyed at all in the game and in latest eras it will result in citadels constructed across borders due to significant number of GGs made during the game.

    Let me know your thoughts about it and how difficult it is to implement. I would be glad to implement these changes as they might really change the way wars in multiplayer go.
     
  6. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    good that you like my version :) (the original mod is not from me)

    Your suggestions only refer to citadels (my mod does not change citadels), so if I would do those changes, I would not implement them in this mod, but make a new mod for this.

    - To make them not buildable next to eachother, you could simply make a sql file with:
    Code:
    UPDATE Improvements SET NoTwoAdjacent = true WHERE type = "IMPROVEMENT_CITADEL";
    - A minimum distance to a city is not possible =/ You can only write lua functions, which check for the distance to cities. E.g. you could remove citadels directly next to cities instant after building. But I don't like those "delete solutions". Because the AI don't know about those restrictions and would build them everywhere, where it is possible. In case of citadel I think it wouldn't be a big problem, but with normal improvements it is.
    So if you are okay with this "delete solution" I could create such a lua file.

    - I think here we don't need a specific range to cities. We could simply save the owner of the plots around the citadel and when it is destroyed, give them back to the saved owner (but this could lead to problems, if two citadels have the same tile in range... so maybe it's not that easy as it looks like)
    I don't know when the borders of a citadel spreads.. if they spread before we have a chance to save the previous owner, it could be difficult..

    At the moment I'm working at my multiplayer modpack and I have some other things to do... so I'm not able to say, if or when I'm able to make such a mod.
     
  7. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    New version avaible:

    8.June 2015 version 2
    - previous versions were not able to deal with Outposts build at the side of the map (because one of the tiles you should get does not exist). It's fixed in v2.
    - Added a part of "Lion King"'s idea: Citadels are no longer buildable next to eachother. (no other changes to citadels)

    If you don't like the change to citadels, just delete the "CitadelNoTwoAdjacent.sql" file.
     
  8. Makenshi

    Makenshi Ahoy, ye salty dogs!

    Joined:
    Nov 20, 2013
    Messages:
    297
    Location:
    Brasil
    If I get this mod and delete everything but this sql, will it work alone? It is the part I'm most interested in, no offense. Citadel spam is fuglybar, nice job on removing it :goodjob:
     
  9. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    I think it should work, if you remove everything except the sql and modinfo file.
    You could also edit the modinfo itself. At least the Teaser you should edit, so that you know what this mod does :D

    But just try it out ;)

    edit:
    of course you can't play a normal mod in multiplayer.
    So if you want to play with CitadelNoTwoAdjacent in multiplayer, you have to make a MPMPM pack with this mod active.
     
  10. manekk

    manekk Chieftain

    Joined:
    Mar 18, 2015
    Messages:
    59
    Hi Serp

    A few comments, unfortunately basing on reading description only, as I recently have barely any time to test new mods...

    1. I like the idea of the original mod, and your improvements make it so much more polished. It kinda satisfies my hunger for colonies - mini cities that would give you temporary control of a 1 ring settlement, which you have to protect and pay the cost for, but also use for your benefit (getting resources without the pain of founding a new city). The concept of incorporating them in cities - when they are build nearby - makes a lot of sense (cities absorbing nearby small settlements). If you could actually use some small settlement graphics and call it a colony, it could be such a cool add-on to the game's concept - but probably it's just my fetish :p

    2. What is not balanced here is the cost. These outposts give you a massive advantage. You gain territory, access to resources, block other civs, for a minor cost of building an improvement. Citadels, which are comparably strong, require sacrificing a general. You could consider as minimum making it buildable by Great Generals and consuming them in the process, or using an already existing mod unit (like Explorers), making them really expensive to buy, and make them disappear after building an outpost.

    3. The fact that AI cannot use is a problem. Due to the huge benefits of the outposts it feels like cheating when humans can just grab this territory for themselves and AI watches. I went through all the games .xml files looking for anything that would give the AI any logic of building it like a citadel, but outside borders. I was looking for some flavours, whatever, but there is literally nothing, then I went through AI mods and also found nothing, so it has to be in dll.
    Then I thought that maybe if you would make a rule of not being able to build it up to 5 tiles from a city, and Great Generals were able to build it, maybe AI would somehow guess that they use it as a citadel, but outside of borders, but the chances are probably slim to none...
    Hopefully with your growing skills you'll be able to implement it one day :)
     
  11. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    Thanks for your suggestions! =)

    1) If you have such graphic files, or know which mod uses good ones, let me know :)
    I only know the vanilla graphics from a town and other vanilla improvements. But I guess they are all already used in the new improvements from my multiplayer modpack (e.g suburbs and trading company).

    2) The outpost costs 3 gold to maintain. But you are right, consuming the building unit in addition to that would be an idea. I think I can edit it this way, that the normal worker is consumed after it. I think this would be expensive enough, wouldn't it?
    But... if you think about it, that any enemy can take the outpost or it looses his borders if a town is build near to it... then I think sacrifice a worker is too expensive... because you could loose the outpost very fast.
    So I don't know if it is really that good... Maybe more gold costs to maintain or simular? Because when the outpost goes over to enemy or is destructed, you also don't pay the gold costs anymore.

    3) Maybe you could ask some of the AI modders here at the forum, if it is possible to teach the AI how to use it, without modding dll?
    Unfortunately you can't make improvements "only buildable x tiles away from a city".
    Did you ever see an AI using citadels or even forts? I did not, but maybe bad luck?
    So I really have no idea, how to teach AI how to use it =/ (hostile AIs will plunder the outpost, which destroy it.)
     
  12. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    Update 15.June 2015 version 3
    -With previous versions active, the game took very long to load, because my mod saved every single tile with a save command. I fixed this by saving just one time a list of all tiles.
    - Increased gold costs from 3 to 5.
     
  13. Bullfinch

    Bullfinch Chieftain

    Joined:
    Jun 16, 2015
    Messages:
    3
    Very nice mod! Could you please add it to Steam?
     
  14. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    Thanks :)

    I'm not sure about steams terms of use.
    I fear to get problems about copyright or something, because I did not ask the original authors.

    Do you know more about it?
     
  15. Lion King

    Lion King Chieftain

    Joined:
    May 24, 2015
    Messages:
    57
    Gender:
    Male
    Location:
    Russia / UK
    Hey Serp,
    thank you for adding this feature with citadels to the mod! However, I was testing it and I still can build citadels on tiles adjacent to another one. Is this because citadel is a special improvement (i.e. not build by workers) or am I doing something wrong?
     
  16. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    thanks for reporting it. I will check if it works here ;)
     
  17. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    I fixed the bug in v4. It was an issue in "CitadelNoTwoAdjacent.sql". (I wrote: true but it should be "true" , with marks )
    Thanks for reporting it :)
     
  18. Lion King

    Lion King Chieftain

    Joined:
    May 24, 2015
    Messages:
    57
    Gender:
    Male
    Location:
    Russia / UK
    Yes, finally it works. Thank you Serp! Now I clearly cannot construct citadel on the adjacent tiles. Will check if it is possible to do so after first citadel is razed.
     
  19. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580
    This should be possible.
    I did not programmed this on my own, this is a thing that already exist in the Civ game and is e.g used by the building chateu ;)
     
  20. Serp

    Serp Prince

    Joined:
    Apr 1, 2015
    Messages:
    580

Share This Page