Cammagno
King
Yes, I like that a lot.
Me too!
Yes, I like that a lot.
Me too!
We're doing exactly that with one difference, and I like your suggestion. When you know they don't have the resource, we hide the unit, but I agree that we should show it after the ? icon so the player knows they have the tech but not some other aspect (like a saltwater port city for ships or iron for Swordsman). I'll make that addition as I think it lines up with our current methodology.
Edit: How convenient. Though I didn't intend to, this is how I already coded it.
Regarding the presentation, we wanted to gray out the icons that couldn't be built (or were unknown due to war), but we simply cannot get it to work. This is why we put them after the ?. If anyone can figure out how to get it to work using IconGrid, I'm all ears. We've tried the code from CvMainInterface that grays out the icons of units you cannot train due to lack of resources, and while we don't get an error or exception, the icons simply don't become gray or disabled.
And what about putting a trasparent layer over it with only a question mark in the corner?
We tried that as well. The problem is that we're using IconGrid that was part of EFA, and it uses a Multilist Button control. This provides scrolling (which we need) and multiple rows of buttons. We have not been able to figure out why disabling buttons works fine on the main interface but not on our screen.
Unfortunately, this is part of the UI code which a) has no documentation whatsoever and b) isn't part of the DLL/SDK, so I can't look at the source code to figure out what's going on.
Another option, though it would only work on wide screens, is to have multiple columns. Both sides would have two columns: known and possible advantages. But once you have DefPacts or Vassals or Wars, space gets tight on 1024x768.
My take on this is that we should show Cataphract / Cuirasier unless we know that he knows Military Tradition (ie we can research it or we know it). However, if we can build the same units, then it isn't an advantage and it shouldn't be shown on either side. As soon as we find that we can research MT, then Cav will pop up on his side and we find that we have been living in a fools paradise. I think that this is correct.Speaking of current MA work, I am 99% of the way done with the Strategic Advantages stuff. There is one issue remaining regarding upgrades and unique units.
Here's an example from a recent game: I don't have Military Tradition, but my rival does (along with horses and Rifling which I do have). It shows Cavalry (correct), but it also shows Cataphract and Cuirasier (both incorrect).
The reason is that Cataphract -> Cuirasier and Cuirasier -> Cavalry, but we leave the older units in in case I cannot see Cavalry because I don't know and cannot research Rifling or Military Tradition. But I need to have it remove those older units since I can see that he can build Cavalry.
I think part of the problem is UUs, so I just need to make the code to detect upgrades more generic.
However, before I do that I want to make sure that in the above case we really do want Cataphract and Cuirasier hidden. He certainly cannot build them anymore, and we know that, so it seems wrong to show them as advantages when he has a far better advantage available.
Rival: | T- | T r | T R | T R- | T R? |
You: | | | | | |
T- | - | R | R | R! | R? |
T r | Y | - | - | Y R! | Y? |
T R | Y | - | - | Y R! | Y? |
T R- | Y! | Y! R | Y! R | Y! R! | Y! R? |
Lets work backwards. It cannot be a possible adv for opponent as you can build the unit. It is potentially an advantage to you so I would put it after the '?' on our side.And what about that last question: You have tech and resource, rival has tech but you are at war (don't know resources), show as ? advantage for you or full for you and ? for rival?
Lets work backwards. It cannot be a possible adv for opponent as you can build the unit. It is potentially an advantage to you so I would put it after the '?' on our side.
If the AI doesn't have the tech and we know it, then I would think that this unit is a clear advantage to us and goes before both '?' and '!'.
oh - missed that part. Hmm - they lack the tech, we lack the resource - honours (or lack there of) are split. Does anyone have the advantage?Even though we can't actually build the unit because we lack the resources?
oh - missed that part. Hmm - they lack the tech, we lack the resource - honours (or lack there of) are split. Does anyone have the advantage?