[MODCOM]Improvements Outside Borders

TheLopez, I made the necessary changes and I can now build outside the cultural boundary. Works like a charm. One comment at this point though: I was hoping that your civ would be awarded the bonus if you developed the land. If you build a Quarry on Stone, you should get access to the Stone, but that's not the case.

Any ideas what changes would be required to award the resources to the civ that improves land outside their boundary?

Thoughts?
 
Well, the way I would do it would be to use the improvement built event and add some culture belonging to the civ that built the improvement to the plot where the improvement was built. That should effectively make the plot owned by that civilization, but I could be wrong.
 
That dos'nt sound very hard to do, a <CultureOnBuild> with an int value that gets put on the tile, the tricky part is determining which player the culture should be of as I dont think the function takes it as an argument.

It should also check to make shure your not adding culture just for building a road, that would be way too much. Personaly I dont even think its advisable to have resorces gained in this mannor, as soon as somone planted a city the land would change hands leading to a resorce stealing strategy that would be kind of lame in my opinion. I will be experimenting with a new Trait Tag which will allow a player to Build all imporvments outside their borders regardless of the improvments individual boolean. Code would basicaly just OR together everything

If ( Inside-my-borders OR Improvment-build-outside-borders OR Player-build-outside-borders )

It will be an ability added to Expansive in my Traits Mod.
 
Updated with link to Warlords compatible version!!!
 
This is very useful. I could use this soon. Tag

Only problem is the plot widget still says "Must be within our Cultural Borders". easy change tho. in CvDLLWidgetData.cpp, look for TXT_KEY_ACTION_NEEDS_CULTURE_BORDER. surround that line with a condition, that is

Code:
if (!GC.getImprovementInfo(eImprovement).canBuildOutsideBorder())
                            {
                                szBuffer += NEWLINE + gDLL->getText("TXT_KEY_ACTION_NEEDS_CULTURE_BORDER");
                            }
 
Does this allow building roads and improvements in enemy territory?
(really need that for Interstellar colonization) I could possibly check it out myself in your SDK changes or the regular SDK, but better to let someone more able to do it. ;)
 
Grey Fox said:
Does this allow building roads and improvements in enemy territory?
(really need that for Interstellar colonization) I could possibly check it out myself in your SDK changes or the regular SDK, but better to let someone more able to do it. ;)

It will only allow the building of improvements not roads outside your cultural borders. That is of course if you have enabled those improvements through the appropriate XML tag.
 
Chinese American said:
This is very useful. I could use this soon. Tag

Only problem is the plot widget still says "Must be within our Cultural Borders". easy change tho. in CvDLLWidgetData.cpp, look for TXT_KEY_ACTION_NEEDS_CULTURE_BORDER. surround that line with a condition, that is

Code:
if (!GC.getImprovementInfo(eImprovement).canBuildOutsideBorder())
                            {
                                szBuffer += NEWLINE + gDLL->getText("TXT_KEY_ACTION_NEEDS_CULTURE_BORDER");
                            }


Good catch, I'll update the mod both vanilla and Warlords versions and post new versions in a bit.
 
TheLopez said:
It will only allow the building of improvements not roads outside your cultural borders. That is of course if you have enabled those improvements through the appropriate XML tag.

Yes, but does that mean you can build improvements inside enemy territory?
 
Grey Fox said:
Yes, but does that mean you can build improvements inside enemy territory?

Yes, you can.
 
Grey Fox said:
Does this allow building roads and improvements in enemy territory?
(really need that for Interstellar colonization) I could possibly check it out myself in your SDK changes or the regular SDK, but better to let someone more able to do it.

You've always been able to build roads both outside you culture boarder and inside enemy teritory. :)
 
another Civilopedia omission is it doesn't say that this improvement can be built outside borders. somewhere in CvGameTextMgr::setImprovementHelp, add this:

PHP:
    if (GC.getImprovementInfo(eImprovement).canBuildOutsideBorder())
    {
        szBuffer += NEWLINE + gDLL->getText("TXT_KEY_IMPROVEMENT_CAN_BUILD_OUTSIDE_BORDER");
    }

where the text XML is something like this

PHP:
	<TEXT>
	<Tag>TXT_KEY_IMPROVEMENT_CAN_BUILD_OUTSIDE_BORDER</Tag>
	<English>[ICON_BULLET]Can be built outside own border</English>	
</TEXT>
 
Why would I want to add that? There isn't anything in the vanilla civilopedia that says that can't be built outside of a players cultural border...
 
Good point, Spartan...

Also, will automated Workers build improvements in other people's territory or neutral territory if you can build outside the borders?
 
TheLopez,
You can make so that by means of Forts it was possible to expand borders on such range - as city with culture 1000, 100, 10 points.

Annexation, Occupation? with SDK?
 
Hi TheLopez I have spent the evening downloading and reading a lot of your mods unfortunately got to this one and got this message from the server

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404

As it says inform you so that task done.

The good news is I think your Mods are fantastic I have a few ideas of mine own which I'll pass on later when better formed. Keep up the good work and Thanks
 
Thanks for reporting the error. The link is fixed now.
 
Thank you for fixing this so fast.

On getting access to a resource isn't a road required to it. Same for a fort from a strategic point of view. The idea of a fort gaining some culture sounds very interesting too. Maybe at a later date these places could be developed by specialist settlers eg Miner/Settler, Engineer/Settler etc whereby after a certain amount of time a city springs up adjacent the resort tile provided optimum city spacing is met and those pesky immigrants may migrate to this wild west town to populate it.

Again Thanks
 
Back
Top Bottom