• Civ7 is already available! Happy playing :).

[BtS] JImprovementLimit: Tighter Control

Jeckel

Great Reverend
Joined
Nov 16, 2005
Messages
1,637
Location
Peoria, IL
!! RELEASED !! - August 12, 2008

Requires: Civilization 4: Beyond the Sword v3.17

This mod addes several new tags to the ImprovementInfos XML file, allowing much more control over where Improvements can be built. To demonstrate the use of these tags, I have added two new Improvements and modified Forts a bit. The two added Improvments, Castle and Citadel, are copied, in name atleast, from Fall from Heavon 2.

First, a new tag now allows you to set the minimum number of Tiles that must be between the same types of Improvements. This works similar to the way Cities must have atleast 2 Tiles between them.

Second, a new tag allows to limit Improvements from being built inside of Culture Borders. This is ment to be used inconjunction with the bOutsideBorders tag.

Third, a new tag allows you to set a Required Improvement for the building of another Improvement. For example, in the mod, you can only build a Castle Improvement on a Tile that already has a Fort Improvement built on it.

Requires: Beyond the Sword v3.17
Changes: XML, SDK
Version: 1.000 - August 12, 2008
Download: JImprovementLimitMod
Sources: http://forums.civfanatics.com/downloads.php?do=file&id=10347
 
Some Screen Shots of the Pedia Pages for the Fort, Castle, and Citadel.
 

Attachments

  • JImprovementLimit_Pedia_Fort.JPG
    JImprovementLimit_Pedia_Fort.JPG
    77.3 KB · Views: 411
  • JImprovementLimit_Pedia_Castle.JPG
    JImprovementLimit_Pedia_Castle.JPG
    81.4 KB · Views: 415
  • JImprovementLimit_Pedia_Citadel.JPG
    JImprovementLimit_Pedia_Citadel.JPG
    80.5 KB · Views: 305
I am basicly done with this mod. I just have to finish up the Readme and API PDFs. I am planning to release some time in the next few days.

Planned Future Changes:

When I started this mod, my intentions were to clone the iMaxGlobalInstances, iMaxTeamInstances, and iMaxPlayerInstances tags from CvUnitClassInfo to CvImprovementInfo. The code has been cloned into the CvImprovementInfo, but at the moment it is all commented out. The problem is that in default Civ4, Improvements don't store who built them, so there is no way to count how many of an Improvement each Team or Player has.

I am not going to end up including this functionality in this mod. Instead, I am planning to combine this mod with my JCultureControl mod, which directly addresses the issue of giving Ownership of Improvements to the Player that built it.

I am playing around with one other idea for this mod, some way to limit Improvements to inside and/or outside Cities Working Radiuses (.. Radii??). I haven't got it working the way I want it to, so I haven't added it into the released mod, but its something I'm toying with.
 
Suggestion: Instead of having it show "Can be built outside Cultural Borders" and "Cannot be built inside Cultural Borders", how about changing it so that if you have these two tags it'll read "Must be built outside Cultural Borders"... just to make it a little cleaner :)

Looks great though. Some of this is stuff I was looking to implement myself.
 
Not bad. Not bad at all.


I was wondering, would it be possible to seperate the <bActsAsCity> tag into 3 seperate tags? One for connecting resources, one for combat purposes, and a third that makes it passable to both land and water units?


Also, could it be made so that building an improvement could require one of a list of improvements? (e.g., you could build a Town over either a Village or a Fort.) Or so that existing improvements could modify the number of turns needed to build specific other improvements? (E.g., building a fort in a town would be faster than usual since you could use some for the existing infrastructure, but turning a citadel into a farm would involve demolishing a lot of buildings.)


I'd also like to see improvements, features, and terrains have more tags in common. (Most of my specific examples of how I'd like to use these are strictly FfH though.)
 
I was wondering, would it be possible to seperate the <bActsAsCity> tag into 3 seperate tags? One for connecting resources, one for combat purposes, and a third that makes it passable to both land and water units?

Since we are making a wish-list here, a 4th tag would be ability to host air units!
 
Suggestion: Instead of having it show "Can be built outside Cultural Borders" and "Cannot be built inside Cultural Borders", how about changing it so that if you have these two tags it'll read "Must be built outside Cultural Borders"... just to make it a little cleaner :)

Looks great though. Some of this is stuff I was looking to implement myself.

Yea, I had thought that myself, but hadn't ended up doing it. Since you mentioned it I will be sure to do it. :cool:
 
Not bad. Not bad at all.
Thanx. :king:


I was wondering, would it be possible to seperate the <bActsAsCity> tag into 3 seperate tags? One for connecting resources, one for combat purposes, and a third that makes it passable to both land and water units?
Sorry, but that falls outside the scope I intended for this mod.


Also, could it be made so that building an improvement could require one of a list of improvements? (e.g., you could build a Town over either a Village or a Fort.) Or so that existing improvements could modify the number of turns needed to build specific other improvements? (E.g., building a fort in a town would be faster than usual since you could use some for the existing infrastructure, but turning a citadel into a farm would involve demolishing a lot of buildings.)
I am thinking about this, but I don't like the idea of having to loop through all the improvements for each build. canBuild is called alot and would cause that loop to be run alot and I don't know if it would be effecient. I will look into it though and see what I can come up with.
 
Since we are making a wish-list here, a 4th tag would be ability to host air units!

I was surprised they didn't add a tag for this. It wouldn't be in this mod, but I may address that at some point in another modcomp.
 
An Update.

I've done a little more research and it seems the CvPlayer.changeImprovementCount() function is used after all. It keeps count of Improvements that are inside your Culture Borders. This will not apply to forts and whatnot that are outside your Borders, but that is way default Civ works.

Seeing as that is the case, I am going to do as I origionally intended and clone the CvUnit iMax*Instances stuff to Improvements. This will be included when I release the mod later this week. :D
 
Why can't the fort be built inside your border? :confused:
 
Awesome, Jeckel. st. of that kind I searched for a long time :)

primarily I've been thinking about limit of specific improvements on city plot.

many thanks for your work
 
An Update.

I've done a little more research and it seems the CvPlayer.changeImprovementCount() function is used after all. It keeps count of Improvements that are inside your Culture Borders. This will not apply to forts and whatnot that are outside your Borders, but that is way default Civ works.

Seeing as that is the case, I am going to do as I origionally intended and clone the CvUnit iMax*Instances stuff to Improvements. This will be included when I release the mod later this week. :D

You didn't know the game already kept track of # of improvements per player?

Yeah, I was going to use this to implement an upkeep system for improvements and later routes.

Also, have you tried using this mod in conjunction with your other recent releases?
 
So, when will this actually be available for download? Will it be here, or just in JCultureControl?
 
You didn't know the game already kept track of # of improvements per player?

Yeah, I was going to use this to implement an upkeep system for improvements and later routes.

Also, have you tried using this mod in conjunction with your other recent releases?

Hehe, I guess you learn something new every day.. and it helps if you look in the right files for the accual calls to the function.. ;)

Wow, have you been sneaking into my house and reading my todo plans? I am half done adding a cost for building Improvements and a turn upkeep for them.

Yep, when all these modcomps are done, I will be combineding them all and release it. :king:
 
So, when will this actually be available for download? Will it be here, or just in JCultureControl?

I'm looking to release this modcomp this weekend, probably tomorrow.
 
Umm, sorry yall, but no release today. RL has requasitioned my time today, got to help cut down a few trees so I can get high speed sattelite internet.

I have the Build Cost and Turn Upkeep Cost coded in. I still have to add a few lines of code to make it accually charge you the Turn Upkeep, but that will be easy. I have the Max Global Instance and the Max Player Instance down, but I still need to finish the Max Team Instance stuff.

Once that is done I will release. Look for it tomorrow or monday night. :band:
 
Ok, now that I got JCityLimit and JRouteNative Mods out of the way for the moment...

I'm back to work on this mod. I finally decided to forgo limiting the number Improvements as I can't get it working just the way I want and it isn't that intragral to what I want to use the comp for.

Anyway, I'm just trying to get all the Flying Help Texts displaying correctly. Once that is done I'll post this mod. When I release this mod it will have all the functionality that I'm going to add. I need to get this modcomp done so I can get to finishing JCultureControl, so I'm going to be hard at work getting this finished. :king:
 
This is an example of real-life chopping for hammers.... :lol:

Hehe, I must of missed this last time I posted.. :crazyeye:
Now I just have to research Sattelites so I can get Hughes Network to install their dish. :lol:



GOOD NEWS!!

The mod has been released at long last!

In the end I kept it simple. I have a few other functions I would like to add for me and a few others have suggested that should go in there.. but.. the bottom line is this is just one mod comp of many I'm trying to get done. So, as of right now, unless there are glitches that pop up, this mod comp is done and there will be no further releases.

Now I can get back to finalizing my JCultureControl Mod. :king:
 
Top Bottom