Discussion in 'Civ4 - Caveman 2 Cosmos' started by Thunderbrd, Nov 15, 2015.
Ok, will investigate.
No rush though, hide and seek is quite playable already. ^^
I'm wondering if the base invisibility visibility count that I'm using to indicate whether a unit should need to make an invisibility check at all is getting a bit skewed by multiple intensity calls. That might be the problem with some of this so I'll work on it from that angle. Otherwise I'm beginning to suspect that the graphic engine is not being a friend here and calling on information where I assume it would be. I'm hoping this won't require that I enact a visibility recalc at the start of every round.
Are you sure? I'm seeing it in the pedia for Ice on Penguins. As for on a unit itself ingame I did not include these modifiers in the display for the unit hover because it would overwhelm the hover info. Perhaps at some point I could include it if I can make the whole visibility/invisibility thing expressed more by symbols than long-winded words.
I've done some things to address the first portion of your report. It may also have an impact on the last portion of your report. But there's also a question I'm shooting over to Alberts2 to make sure I'm doing something right here. Let me know if after the next version you continue to see odd stuff taking place like that.
kk, And I'm not entirely sure if there were anything wrong with terrain/feature modifiers, might have been something else.
I'm still seeing odd stuff with this module.
-Very often units are visible 2-3 tiles away but invisible when my units get closer to them, this happens no matter if my cultural border is close or not. So we can probably rule out any cultural border visibility influence.
-Units that should be invisible but are not, and the opposite, is also happening a lot. (This usually get fixed by recalc but it does not fix units that are visible, because they are far away, invisible as they should be)
I'll check into a few things further with this. Thanks for reporting. There may be some points where visibility is being added but never removed somehow. That doesn't explain the visibility after recalc though... that's a more insidious problem.
I get the feeling that this is happening too. Also, promo given visibility doesn't take effect before the next round, at least I assume it takes effect the next round.
Yeah and it only fails for units that are more than 1 tile away from any of your units. Also, units that have more invisibility than any of my unit are capable of seeing even up close; are visible if they are far (2-3 tiles) away from the observer.
Hmm... it SHOULD take effect immediately as it is recalculating the unit's visibility whenever a change is made to its extra vis values.
I may need to review some things regarding the invisibility check itself on this. It sounds like the unit is only invisible if there is some visibility but not enough.
This is definitely happening, I just didn't find the right words to describe it. ^^
By putting it this way and reviewing the code, I was able to find the problem here. This should be fixed after the next update. However, the problem with an off number of visibility updates will have to wait for some further analysis. However, I'll be building IN the ability to analyze this so that's something.
EDIT: Will need further analysis but for now I'm seeing if a turn by turn visibility recalc will delay things much. Shouldn't be noticeable and if it is, it at least buys me time to see how things are getting 'off kilter'.
Well... all I have to say is that you've been spot on with a lot of your bug assessments Toffer. Big problems did in fact exist in the save/load segments with the Hide and Seek tags and it was causing problems with any tags developed afterwards as well... Took me nearly all day to sort it out but I've GOT IT now! I'm not sure that this means all will be repaired but it will certainly help.
Additionally, the plot specific tags were NOT working to load the data onto the unit in the game. You were right about that as well.
Furthermore, you pointed out that you were having trouble with the bBlendIntoCity tag allowing for all units with the tag to safely blend into the city without capturing it and indeed, there was a big problem there as well I'm working on resolving now.
You've been the best spotter I could hope for and I do hope you haven't gotten too frustrated with me. I may resist at first but when I start to see what's taking place myself, having what you've found for reflection has greatly improved my ability to address the issue since I'm not facing immediate confusion since I know I've 'heard about this'.
The next commit should clean up a lot (but sadly units in current H&S games won't be quite right until they've upgraded, split/merged, or simply replaced.)
@Frustration: Far from it, I have a good understanding about the complexity of programming, and you react better and faster than I generally expect. I have the utmost respect and admiration for your abilities, so don't worry about it.
I will continue to patiently point at stuff I think/know is wrong; especially when you are the attack dog I'm pointing for. ^^
Edit: btw does this mean bBlendIntoCity will now make a unit unable to capture/raze cities?
After 500 turns on snail I haven't seen anything odd yet; maybe it's finally flawless.
I have to applaud both of you. Your cooperation and detailed feedback is great. Far far better than I could ever do. Now if only alberts2 had more time to collaborate.....how much better could this Mod's workings and AI become?!
Thank you both.
It should, yes, but let me know if you see it doing anything else.
The next test would be to remove the round by round recalculation and see how it performs. I have some doubts it would still go perfectly and it doesn't seem to be impacting turn times noticeably. However, I think with more cities and units in play it could and this is just a stickytape patch for missing SOMETHING. But for now we'll let it ride. I have a feeling I've resolved the reason I need one at load at least. But I'm pretty sure removing it won't show much until the round by round one is removed as well. I'll do that soon and let you know when I have so I can start looking for the real issue there if there is one.
I've taken out the round by round visibility recalculation so be on the lookout for more odd stuff. I've added some tracking to assist me if something is going amiss.
It seems to be working fine still.
Not sure if this is a bug, or I am missing something:
I usually escort my workers with an explorer type unit to protect them from rogues & wild animals, but several times now I have been attacked by birds who destroy the workers but leave the escort unharmed, and the attacker ends up in the same tile as the escort. Is this because my escort units are hiding from the birds but my workers aren't? And if that's the case, I can fix it by using the stand-out status; but does the AI know to do this with it's escort units? Just wanted to ask since this would be a pretty big change to vanilla behavior.
Yes. Hunters alone are fairly stealthy. Scouts shouldn't be quite as likely to be invisible but with Size Matters I suppose their group size could mean they could go overlooked by some.
At the moment it would not. I suppose for games without subdued animals being teleported back this would be a problem. I'll try to consider some ways to resolve this in the AI so that they use the status if they need to and don't if they don't.
In the meantime, I suppose the teleport back option is advised when playing H&S.
Separate names with a comma.