Super Forts

Awesome mod :) has anyone merged this with any of the Revolutions/DCM mods? or is this easy to merge to an existing one preferably LOR?

I don't know of any merge with RevDCM yet. I gave some guidance to someone merging it with Kmod, and it could be difficult if you are unfamiliar with merging. I think it would be easy for someone who has done a few merges except for some of the AI code for bombarding. In Kmod the AI_bombardCity function had been rewritten in such a way that it was even more dependent on the city you were bombarding. This was impossible to merge with my code which lets you bombard improvements (via their plot). I don't know if this is the case with other mods, and it could be overcome with some code writing.

I'm having a busy college semester, but I still plan on getting a "final" version of Super Forts out with some minor AI changes. No promises on when, but the semester ends in a few weeks if I don't get time earlier.
 
Hi Red Key,

I tried merging in your mod with my own I am working on right now and I*ve got two strange mistakes.

I get a mistake-message reading:
"File: CvPlot.cpp
Line: 7049
Expression: getVisibilityCount(eTeam) >= 0"

after a few turns of playing. I can ignore that, and the game still works, but still I think it must have to do with your mod, since I didnt do anything else in that area of the SDK.

And second thing, which is a lot more annoying - when I am building improvements (any -not just forts) then they do not show up after they are built. The workers are working and when they are finished the improvement doesnt show and I can built it again and again and again... Edit: After trying a bit more - it seems that only the improvements on bonuses arent built. and I believe the to mistakes are connected because they occure on the same time.

I just wantet to let you know, cause I cant be completely sure, if these things are because of the merges - but yesterday, before these changes my mod was running quite well. So I will now look into this, and if I find a mistake I *ll write that here...
 
Hi Red Key,

the problem i just described has to do with the new Tag "isUpgradeRequiresFortify". I took out the three places in cvplot where its mentioned and now it works for me. Maybe you could check if its only my problem or if someone else has that too... (since the tag isnt used for now anyway its not a big deal to turn it off again.)

thanks anyway for the great work otherwise! :)
 
I tried merging in your mod with my own I am working on right now and I*ve got two strange mistakes.

the problem i just described has to do with the new Tag "isUpgradeRequiresFortify". I took out the three places in cvplot where its mentioned and now it works for me. Maybe you could check if its only my problem or if someone else has that too... (since the tag isnt used for now anyway its not a big deal to turn it off again.)

Hi Inyah,

Did both of the two problems go away after you took out isUpgradeRequiresFortify? or was one of them due to something else?

I think I remember getting the first error you described before, but I thought I had fixed it in the past. I haven't experienced the second one you described. I'll take a look soon but please double check your merging if you haven't already.

Also, I'd be interested in hearing what other mods you are merging.
 
Since I did not merge the whole version of Super Forts and did not implement the tag "isUpgradeRequiresFortify", I've never experienced the strange error.

But the message "Expression: getVisibilityCount(eTeam) >= 0", I got it recently while running a debug dll. I don't think that it was a big problem though.
 
Hi Inyah,

Did both of the two problems go away after you took out isUpgradeRequiresFortify? or was one of them due to something else?

I think I remember getting the first error you described before, but I thought I had fixed it in the past. I haven't experienced the second one you described. I'll take a look soon but please double check your merging if you haven't already.

Also, I'd be interested in hearing what other mods you are merging.

Hi Red Key,
I stand corrected - it only solved the improvment-problem. The other one still exists... Edit: and that one does seem to me more severe. In my test-game there are some plots that are never really visible (As though there would be fog of war) even though they belong to a city. also plots just next to units of mine arent visible and in some cases the units arent even shown (see attached screenshot for an example...)

I have only merged your mod into one I am working on, but havent released yet.
 
Couldnt upload the screenshot while editing, so here it is...
 

Attachments

  • FrozenScreen.jpg
    FrozenScreen.jpg
    203.5 KB · Views: 233
What is that blue near the rivers on the screenshot?
It represents flooding?
 
no that it from my mod - its simulation a real river (with rivertiles) - I am not very good with graphics. I will release that in a few days, than you are more then welcome to try :)
 
Hi Red Key,
I stand corrected - it only solved the improvment-problem. The other one still exists... Edit: and that one does seem to me more severe. In my test-game there are some plots that are never really visible (As though there would be fog of war) even though they belong to a city. also plots just next to units of mine arent visible and in some cases the units arent even shown (see attached screenshot for an example...)

I have only merged your mod into one I am working on, but havent released yet.

That bug did occur in very early versions of Super Forts, but after I put in code in setImprovement in CvPlot.cpp to force a vision update it stopped. Double check setImprovement to make sure you got all my code. Are you using your own settings for <iVisibilityChange> and <iSeeFrom> in the XML? These should be 0 or a positive number. If you used a negative number for one of these tags you might also get that bug.

Does the bug only occur under certain circumstances? Such as when an improvement upgrades or when an improvement is built? or perhaps when improvements are placed using the worldbuilder?
 
That bug did occur in very early versions of Super Forts, but after I put in code in setImprovement in CvPlot.cpp to force a vision update it stopped. Double check setImprovement to make sure you got all my code. Are you using your own settings for <iVisibilityChange> and <iSeeFrom> in the XML? These should be 0 or a positive number. If you used a negative number for one of these tags you might also get that bug.

Does the bug only occur under certain circumstances? Such as when an improvement upgrades or when an improvement is built? or perhaps when improvements are placed using the worldbuilder?

AAAH. OK Sorry, I did forget the second code you put in setImprovement (probably because it looks so similar). It seems to work now - just played about 50 turns without a mistake. I will have to leave for a sec, but when I come back I*ll check if the other mistake I posted about the needfortify-Tag is also fixed by this. Then I*ll post it here. Sorry for the stupidity :o

Edit: I am sorry, but the other problem still exists, when I take the codes of "needfortifytoupgrade" back in.
 
AAAH. OK Sorry, I did forget the second code you put in setImprovement (probably because it looks so similar). It seems to work now - just played about 50 turns without a mistake. I will have to leave for a sec, but when I come back I*ll check if the other mistake I posted about the needfortify-Tag is also fixed by this. Then I*ll post it here. Sorry for the stupidity :o

Edit: I am sorry, but the other problem still exists, when I take the codes of "needfortifytoupgrade" back in.

Good to hear that one mistake has been fixed. :)

I'll look into the fortify to upgrade stuff in the coming week. You don't really need that part unless you wanted an improvement that requires fortified units for it to upgrade into another improvement.
 
Nice!

Only misses the upgrade of boni like the forts in FfH.

On another note: Subscribed. ;)
 
Update v1.11

It has been a while but for the next few months I have a little more free time for modding.

Here is the new stuff for this version of Super Forts:
  • AI adjusted so forts won't be so over-defended in the late game
  • Logic for AI/automated workers improved so they will put in less effort to build forts outside borders on resources the player already has (and some other minor improvements)
  • Rewrote some of my AI bombarding code so it would be much easier to merge
  • Added keywords in my code comments to help mergers quickly identify the purpose of different parts of the code (for example code that deals with bombarding should be marked with *bombard* - no guarantees that I got all of it)

This update is compatible with saved games from the previous version if anyone cares about that.
 
Hi, Red Key!
First of all, I'd like to say: congratulations on an excellent mod!
I'm making a mod for myself (don't intend to release it), incorporating all of the things that make the game "the way it should have been", and your mod is one of them. I've made a lot of modifications to the graphics, the 3d models, the XML and even a little Python, but I can't mod the SDK. So, I'm using your CvGameCoreDLL.dll just the way it is. Now, I wanted to ask you something: I had the idea of, using your awesome "Super Forts" XML features, to make garrisoned Forts upgrade after a few turns to "Fortresses" (or whatever) that are basically Forts but with better defenses and a larger area of cultural influence. Would the AI, the way you've modded it, treat these "Upgraded Forts" in the same way as forts?

Cheers!
-Khar Loz
 
Hi, Red Key!
First of all, I'd like to say: congratulations on an excellent mod!
I'm making a mod for myself (don't intend to release it), incorporating all of the things that make the game "the way it should have been", and your mod is one of them. I've made a lot of modifications to the graphics, the 3d models, the XML and even a little Python, but I can't mod the SDK. So, I'm using your CvGameCoreDLL.dll just the way it is. Now, I wanted to ask you something: I had the idea of, using your awesome "Super Forts" XML features, to make garrisoned Forts upgrade after a few turns to "Fortresses" (or whatever) that are basically Forts but with better defenses and a larger area of cultural influence. Would the AI, the way you've modded it, treat these "Upgraded Forts" in the same way as forts?

Cheers!
-Khar Loz

Thanks Khar! Good to hear you consider this part of how the game should have been.

The AI will treat the "upgraded forts" the same as forts. I have not "hardcoded" anything as they say. Anything using the <bActsAsCity> tag will be treated the same, and this tag is what allows forts to extend cultural influence. So I don't think you should have any problems.

FYI, I recently realized my <iUnique> tag does not check upgrades of an improvement. I intend to fix this soon and release an update. I don't know if you were planning on using that tag to restrict how close forts could be built to each other. If you were I would wait for the updated version.
 
Thank you so much for your reply, Red Key!
As for the <iUnique> tag, I can see why you've added it, but I'm not really using it myself, because two contiguous Forts can act as a "canal" for sea units crossing land two tiles wide, and I do make use of that sometimes. To compensate, I did make Forts cost a good bit of gold so players can't just build a "wall" of Super Forts around their entire civilization.
Anyway, thank you so much for your excellent contribution to this already great game!!

Cheers!
-Khar Loz
 
Small Update

I made a small change so that the <iUnique> tag would work with improvements that upgrade. Only a few lines of code in CvPlot.cpp were changed.

If you aren't a modder who is using that tag then this change does not affect you.

edit: If you are wondering what I am up to now... I have been helping with Tholal's More Naval AI mod for FFH2.
 
I have a feature suggestion to use a cost/turn tag for occupied forts as an alternative to the <iUnique> tag. This would be realistic in game turns as maintaining a fort should incur a cost and, at least in the early game, prevent people creating a wall of forts. It would continue to allow forts to be used as canals across pinch points whilst adding a penalty for doing so.
 
I have a feature suggestion to use a cost/turn tag for occupied forts as an alternative to the <iUnique> tag. This would be realistic in game turns as maintaining a fort should incur a cost and, at least in the early game, prevent people creating a wall of forts. It would continue to allow forts to be used as canals across pinch points whilst adding a penalty for doing so.

I'll look into how easy that would be to add in. Even if it is easy, it might be a while because when I have time for modding I am mostly working on More Naval AI now.

IMO, using the <bKill> in BuildInfos.xml is the best way to prevent fort spamming because it makes so the worker is used up when the fort is built. This is how building fishing or whaling boats uses up a workboat. I have made some improvements to what the AI does when <bKill> is used.
 
Top Bottom