ruff_hi
Sep 14, 2008, 08:24 PM
yeah - all good questions. Something is logically wrong with this. I'll dig into it.
|
View Full Version : Military Advisor Pages :
1
[2]
ruff_hi Sep 14, 2008, 08:24 PM yeah - all good questions. Something is logically wrong with this. I'll dig into it. EmperorFool Sep 15, 2008, 12:16 AM 1. Why can you build Maceman, UU Pikeman, and Crossbowman now that you have Rifling? Because you can. You'd think I would get used to the idea, but I think what happens is that once I get Rifling I never consider building these other units. It's only in the early game when I want to build Warrior instead of Axeman or Spearman, but then of course I cannot. :crazyeye: I guess that since these units can upgrade to Grenadier you can continue to build them. Cybah Sep 15, 2008, 10:20 AM since these units can upgrade to Grenadier you can continue to build them this is correct. ruff_hi Sep 15, 2008, 04:57 PM Issues to be investigated ... 1) where did the elephant come from? 2) our riflemen v Zaya's infantry. Mr Magic Elephant Well, this is an easy one. I made a mistake with the 'canTrain' function - got the true / false conditions around the wrong way. Here is Asoka's units that he can train ... MA SitRep Unit List - Indian Empire (with the non unique units crossed out) Maceman Knight Pikeman - upgrades to rifleman Caravel Musketman Catapult Trebuchet Trireme Longbowman - upgrades to rifleman Crossbowman Galleon And the list that the player can train ... MA SitRep Unit List (Human) - Holy Roman Empire (with the non unique units crossed out) Maceman Knight Landsknecht War Elephant Rifleman Catapult Trebuchet Trireme Caravel Crossbowman Galleon The actual picture shows Landsknecht, War Elephant, Rifleman for the human and nothing for Asoka. Now - if I declare war, I lose my trade information about Asoka. Thus, I don't know that he cannot build a War Elephant and I should lose that as a strategic advantage. I don't think that this is correct. If resource trading is available, then the current situation works. If resource trading is not available then it doesn't. I think that all units that require a resource should be placed after the '?' sign regardless of which strat adv (ours or theirs) it is. In this way, the war elephant would be moved after the '?', Asoka would also gain a war elephant icon after the '?' - indicating that both leaders have the technology, but the resource situation is unknown. ruff_hi Sep 15, 2008, 06:12 PM If resource trading is not available then it doesn't. I think that all units that require a resource should be placed after the '?' sign regardless of which strat adv (ours or theirs) it is.That isn't going to work as there is no way that I can easily tell if a unit requires a resource. In the case of the elephant, I've changed to code to just remove the icon - you know that the AI has the tech to build the war elephant - you just don't know if he has the resources - thus this unit might or might not be a strategic advantage to you. Fixed the rifleman / infantry issue. We were removing all units where the player didn't know (or couldn't research) the required tech - thus causing the problem. I removed that code and left those units in. Now, when we are looping through the AIs advantage, we check if the human knows the tech (or can research) before displaying the unit icon. EmperorFool Sep 17, 2008, 09:15 PM I've recoded how Strategic Advantages are chosen, and I'm almost done with the last piece: using rival cities to choose whether or not the player can tell for sure that a rival unit can build the unit. I had to code my own implementation of CyCity's canTrain() function, and it's working fine so far. I just need some input on how exact to make it. Also, does anyone know how much information is revealed about cities that you have seen at some point but remain in the fog of war? For example, if you see Thebes once, will it update to show you the religions and corporations that get spread to it even when it remains in the fog of war? I seem to recall that this is what happens, but I do not know for sure. Does anyone know the actual rule or has looked at the code? Another issue is with training ships. I can check if you have seen a city. I can check if the city should be able to build ships. I cannot easily check if you should be able to tell yourself if the city should be able to build ships. The game rule is that it has access to a water area of at least X units large (depends on the unit, but typically 20). As humans we can scan the tiles around the city and figure it out, but I'd rather not code up that logic. So the easy way out is that if you can see at least one water tile adjacent to the city, allow you to know if that city can build ships or not. Another easy option is to assume the city can build ships if it has at least one adjacent water tile, even if it's too small. The last option is to always show ships as "possible" Strat. Adv. (after the ? icon). Let's summarize: Use code to check when water visible: possible spoiler, perfect UI Assume buildability when water visible: no spoiler, possibly incorrect UI for maps with lots of lakes and no ocean Assume no ship building ever: no spoiler, likely incorrect UI Those are the only cases where I need to make a decision whether or not to use the API to get the actual information about a city: Religions Corporations Water Once we decide these issues, it's as good as done. :D Dresden Sep 17, 2008, 09:52 PM Also, does anyone know how much information is revealed about cities that you have seen at some point but remain in the fog of war? For example, if you see Thebes once, will it update to show you the religions and corporations that get spread to it even when it remains in the fog of war? I seem to recall that this is what happens, but I do not know for sure. Does anyone know the actual rule or has looked at the code? I haven't looked at the code (and am not even sure if I can since the graphics and citybar appear to be handled almost exclusively by the engine) but from testing by giving free missionaries and corp execs to an AI whose cities are in the fog, the religious and corp icons do indeed update. The pop number and buildings are also accurate. EmperorFool Sep 17, 2008, 09:57 PM The pop number and buildings are also accurate. Oh, I hadn't even considered allowing you to know about the buildings. I can spot some of the larger buildings, but many escape me. Are all of the buildings visible, or do some not get drawn (even in your cities) due to space requirements? Thanks for the confirmation of the religion and corps. This is my recollection as well, so I'll code it that way. What about the water units? That's the only one that really needs input from others as we need to make an information leak versus UI correctness decision. Dresden Sep 17, 2008, 10:33 PM My understanding is that they are supposed to be there. At least every time I've zoomed in on one of my large cities and tried to locate a certain building, I've been able to find it. Sometimes they can be hard to actually see if they are behind larger buildings or blocked by terrain though. However, after doing some testing it looks like population also seems to play a role. If I WB a size 1 city with a crapload of stuff, not all of it seems to show, but if I crank the pop to 20 all the missing stuff miraculously appears. So perhaps we should assume buildings are not reliable enough to be known. As for water units, we can tell whether the visible water tile is fresh or salt water, right? How about if there's an adjacent tile that satisfies pPlot.isWater() and not pPlot.isLake() then we assume ships can be built? Could still be potentially incorrect but if I had to eyeball a city on a map, that would probably be my test. EmperorFool Sep 17, 2008, 10:43 PM As for water units, we can tell whether the visible water tile is fresh or salt water, right? How about if there's an adjacent tile that satisfies pPlot.isWater() and not pPlot.isLake() then we assume ships can be built? Could still be potentially incorrect but if I had to eyeball a city on a map, that would probably be my test. Yes, I like that a lot. :goodjob: Without checking the code, I seem to recall that a body of water is a lake if the number of tiles it contains is 10 or less (or less than 10, whatever). Given that most ships (eyeball test) have 20 as the minimum area size, we'll show incorrect information occasionally still. However, this is a much smaller error than above. Cammagno Sep 18, 2008, 12:47 AM [QUOTE=EmperorFool;7255458]Yes, I like that a lot. :goodjob: [QUOTE] Me too! :) Cammagno Sep 18, 2008, 12:59 AM But I have to say that I'd like a better handling for strategic advantages... I'd like to know if the AI can built a unit which is a SA even if they don't have the resources to do it, because this is an aspect that can change in each moment, while this isn't the case of the needed technologies (once the AI has them, it will be forever)... the same for the player. So my idea is to show the icons of all the SA available due to the technologies, but marking somehow (grayed out, or with an icon in a corner) the icons of the SA that are not actually available due to unavailability of resources). And accordingly for war periods, I'll mark these type of SA icons with a question mark in the corner (much better than putting them after a big question mark, IMHO, but I don't know if my solution is technically possible). In this way, I can tell if a guy can aquire a strategic advantage over me simply by getting a needed resource. EmperorFool Sep 18, 2008, 01:10 AM 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. :blush: 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. :mad: Cammagno Sep 18, 2008, 04:45 AM 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. :blush: Good! :D 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. :mad: And what about putting a trasparent layer over it with only a question mark in the corner? EmperorFool Sep 18, 2008, 05:10 AM 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. Cammagno Sep 18, 2008, 06:21 AM 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. Ok, I think as it is is the best possible solution ruff_hi Sep 18, 2008, 09:09 AM 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.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. EmperorFool Sep 18, 2008, 11:55 AM Yes, I am only talking about the case where you can research MT and can see that he has Cavalry. In that case, it should hide his CuiCat. EmperorFool Sep 20, 2008, 03:15 AM Round and round we go . . . The possibilities of units that can be built is getting more complicated. The cases for the player are pretty straight-forward: No tech Tech, no resource required Tech, have resource Tech, don't have resource We were originally hiding #4, but we're changing this to put units in this case after a ! so you can see that you can build them if you can acquire the resource. The situation for rival players is more complex: [list=1] No tech Tech, no resource required Tech, has resource (trade network) Tech, doesn't have resource (trade network) Tech, don't know if has resource (no trade network, e.g. war) [list] Here are all the combinations and how I'm thinking to display the icon in each case. 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? | [list] Headings: [list] T-: don't have the tech r: unit doesn't require any resources R-: don't have the resource(s) Cells: -: neither gets the icon R!, Y!: shown on their/your side after ! icon R?, Y?: shown on their/your side after ? icon The last column is where I'm really not decided. If you can build a unit and they cannot because they lack the tech, it shows the unit's icon on your side, and if they can't build it because they lack the resource, it shows it on both sides (after ! on their side), but when you aren't sure if they have the resource or not (no trading), it moves it after the ? on your side and doesn't show it on their side. The reason for this is that for the most part the icon should be on the side who has it as an advantage. If it might be an advantage for you due to their resource availability, it seems a little odd to put it after a ? on your side (because you can definitely build it). So the other option is to show the icon on both sides if both sides have the tech, except in the one case where you know that both sides can build it now. In that case the icon would be hidden from both sides because it's no longer an advantage. All other cases show the icon normally, after a ? or after a ! depending on that sides ability to build it and your knowledge about it. In that case, the 3rd and 4th values in the last column change from "Y?" to "Y R?" This changes the meaning of ? from "this might be an advantage for you or them depending on their resource access" to "we don't know if they can build this or not due to resource access". The key is that ? would never appear on your side. I'm sure I'm not explaining this clearly. My main concern is that there's no way users will understand this -- even after reading the help file. I could add a simple mode that shows only the icons of units that are known to be an advantage, skipping the ? and ! icons, or it could put even units you're unsure about as advantages. If you can't trade, it assumes they cannot build Swordsman entirely and shows it as an advantage for you if you can build them. I'm talking around in circles now, so I'm going to stop before I fall down. Does anyone have any suggestions about this? ruff_hi Sep 20, 2008, 06:13 AM I think optionally showing the 'implied' advantage is the way to go. You have a 'simple' setting that only shows clear (known) advantage and an 'advanced' setting that shows all of the '!' and '?' units. EmperorFool Sep 20, 2008, 06:16 AM 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? ruff_hi Sep 20, 2008, 09:01 AM 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. EmperorFool Sep 20, 2008, 09:07 AM 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. That's how I arrived at the same conclusion. But does the same logic apply once we sign peace and learn that they do not have the resources needed for the unit? Does the icon stay in our column but go after the ! icon? If so, how does the player differentiate between this case and the case where the rival doesn't have the tech while the player has it but not the resource? ruff_hi Sep 20, 2008, 09:20 AM 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 '!'. EmperorFool Sep 20, 2008, 12:05 PM 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 '!'. Even though we can't actually build the unit because we lack the resources? ruff_hi Sep 20, 2008, 06:18 PM 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? EmperorFool Sep 20, 2008, 06:38 PM 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? It depends on the rarity of the resource and the distance away from the tech. It's really a human decision at that point. Alerum suggested splitting out these columns to a third page. I'd probably leave the absolute advantages on this page and add a new page with all the gory details. This would allow description column headings and splitting apart the various unit states (tech, resource, religion, etc -- there are others in the code, but I doubt we'll ever see them). EmperorFool Sep 23, 2008, 12:19 PM I'm working on a new tab for the expanded view of the strategic advantages. The Sit Rep page will show only units known to be buildable on either side as advantages. When resources are missing or unknown, the unit will be considered unbuildable. This may cause units on either side to appear and disappear when resource viewability changes. The new Strat Adv page will have two resource columns showing which strategic resources you have that they do not and vice versa. It will then have columns for the units: Your Advantages Units you have the tech and resources for that they cannot build Units you have the tech for but not the resource Their Advantages Units they have the tech and resources for that you cannot build Units they have the tech for but not the resource, or you do not know if they have the resources I'm wondering if I should split the last column into two columns: know they do not have the resources and don't know about the resources. I'm leaning against it because no single rival will ever have units in both columns, and they pretty much result in the same thing: an advantage for you. Does anyone have any suggestions for other columns on this page? ruff_hi Sep 23, 2008, 12:27 PM How are you defining strategic resources? Are you doing it manually or letting Civ4 decide that? I know that when you go into globe view, you get the option to toggle food resources, lux resources, general resources or all. If you use the general resource filter - it will include stone and marble too. Actually, we could do a similar thing for wonder building - so that you can take a guess at who is your major challenge for landing a wonder (... or a tech!). EmperorFool Sep 23, 2008, 02:58 PM My plan was to limit the set of strategic resources to any resource required to build at least one unit. Therefore, Stone and Marble would not be shown, unless you were playing a mod that had Stone Giants. ;) I did write up an idea for a full resource comparison chart when chatting with Alerum a few months back. I think I put it into the tracker, too. EmperorFool Oct 04, 2008, 10:52 AM I'm working on completing this screen today (hopefully), but I added something quick last night (I majored in procrastination at UCLA): a new Orders grouping so you can group units by their orders (heal, sleep, fortify, patrol, blockade, intercept, automation, etc). It's available now in SVN. One thing that is missing is that if you give a unit multiple orders (e.g. go to plot X and then pillage), it is put into the Go To group. I will eventually add all those extra actions. The Doc Oct 04, 2008, 11:51 AM I think, blockade is missing. Or does it count to patrol? EmperorFool Oct 04, 2008, 01:06 PM I think, blockade is missing. Or does it count to patrol? It's Plunder in the Civ code, so that's what I call it in code to match. However, it should be Blockade when displayed to the player (fixed in XML now). EmperorFool Oct 05, 2008, 10:02 PM Status update: Selecting a second-level group that shows up in multiple 1st level grouping items selects it under that 1st level grouping item only. Groups are no longer confused with each other, e.g. selecting Domestic City no longer selects Swordsman. Strategic Advantages tab is mostly done: layout, bonuses and units, though I am working on the units as we changed the columns earlier. I still need to remove the ? units from the Sit Rep tab. It will now only show units that either your or the AI can build that the other cannot for sure. The cases where you aren't sure due to trade network disconnection are assumed to be unbuildable by the AI. The new third tab will show the gory details. I was hoping to have this done last night, then today, but that was not to be. :cry: The night's still young, however. EmperorFool Oct 06, 2008, 12:56 AM I know we've hashed this over many times, but I'm just not entirely happy with the results. In the screenshot below, notice a few things: The set of units that I cannot build due to resources or access to coast is always the same. Should this be shown once at the top? Should I omit the boats on my side instead of treating coastal access as a missing resource? Note that for the two rivals that have access to Horse, Chariot is listed in their Can Build column and still in our Need Resource column. Is this still what we want? It's hard to tell that I know I have a metal advantage over Qin by looking at the units. The fact that I know he cannot build Swordsman is obscured since it's listed in the Needs Resource column for every rival. Should I split the last column into two columns (Maybe and Cannot) like I originally planned? http://i222.photobucket.com/albums/dd275/EmperorFool/New%20Features/Advisors/StrategicAdvantages.pngGenerally, does this look useful or too cluttered? I find it a bit cluttered and am trying to devise ways to clean it up and still present the full picture. I'm leaning back toward changing the columns to "Advantage" and "Possible Advantage". For example, the only place that Chariot would be listed is as an Advantage for Qin and Jaio II. Swordsman and the other metal-needing units would show as a Possible Advantage for me against every rival except Qin where they would show in the Advantage column and against Jaio II where they wouldn't show. Cybah Oct 06, 2008, 06:26 AM one question to the ressources: which ressources are shown? all strategic right? iron, copper, ivory, horse, oil, uranum, aluminum? or simply all ressources any unit need? is there a mechanism? I'm leaning back toward changing the columns to "Advantage" and "Possible Advantage". For example, the only place that Chariot would be listed is as an Advantage for Qin and Jaio II. Swordsman and the other metal-needing units would show as a Possible Advantage for me against every rival except Qin where they would show in the Advantage column and against Jaio II where they wouldn't show. Sounds goood. CellKu Oct 06, 2008, 07:04 AM The set of units that I cannot build due to resources or access to coast is always the same. Should this be shown once at the top? Should I omit the boats on my side instead of treating coastal access as a missing resource? Note that for the two rivals that have access to Horse, Chariot is listed in their Can Build column and still in our Need Resource column. Is this still what we want? It's hard to tell that I know I have a metal advantage over Qin by looking at the units. The fact that I know he cannot build Swordsman is obscured since it's listed in the Needs Resource column for every rival. Should I split the last column into two columns (Maybe and Cannot) like I originally planned? ad 1. I think if you rework your approach as you suggested (your advantage/possible advantage-approach below) that might not be an issue anymore. I think the advantage is what is interesting, so I see no need to tell me what I can't build (this information is already (indirectly) included in the advantage column). ad 2. Yeah, omit them. Makes it less cluttered. ad 3. as above ad 1. ad 4. I think that is a good idea. However, do you account for trading? What if Qin who has no iron later trades for iron and builds swordsmen? One question to better understand your approach to "need resource": How do you treat the situation when the player has briefly seen that the AI has a certain unit (let's say a swordsman), but has not seen whether the AI has the necessary resource (e.g. iron)? For example while moving my boat along the coast (of an otherwise unknown island) I have briefly got a glimpse of an AI swordsman. Will that information be available in your screen as "can build"? What if I saw a mined iron while floating along, but have no trade connections as of yet? Generally, does this look useful or too cluttered? I find it a bit cluttered and am trying to devise ways to clean it up and still present the full picture. I'm leaning back toward changing the columns to "Advantage" and "Possible Advantage". For example, the only place that Chariot would be listed is as an Advantage for Qin and Jaio II. Swordsman and the other metal-needing units would show as a Possible Advantage for me against every rival except Qin where they would show in the Advantage column and against Jaio II where they wouldn't show. I think that is a good idea. In the end what I want to know is whether I have an advantage (a possible advantage) over another civ or not. As it is now, that information is a bit obscure. So, I support your advantage/possible advantage approach. Cammagno Oct 06, 2008, 09:12 AM I think that is a good idea. In the end what I want to know is whether I have an advantage (a possible advantage) over another civ or not. As it is now, that information is a bit obscure. So, I support your advantage/possible advantage approach. +1 :) abcdef ruff_hi Oct 06, 2008, 10:48 AM I know we've hashed this over many times, but I'm just not entirely happy with the results. In the screenshot below, notice a few things: The set of units that I cannot build due to resources or access to coast is always the same. Should this be shown once at the top? Should I omit the boats on my side instead of treating coastal access as a missing resource? Note that for the two rivals that have access to Horse, Chariot is listed in their Can Build column and still in our Need Resource column. Is this still what we want? It's hard to tell that I know I have a metal advantage over Qin by looking at the units. The fact that I know he cannot build Swordsman is obscured since it's listed in the Needs Resource column for every rival. Should I split the last column into two columns (Maybe and Cannot) like I originally planned? I ... am trying to devise ways to clean it up and still present the full picture. I'm leaning back toward changing the columns to "Advantage" and "Possible Advantage". I've been thinking about this after looking at your screenshot. I would also support a return to ... Advantage Disadvantage Definite Maybe Definite Maybe That was, if we have metal and they don't - we see a sword definite advantage. If they have horses and we don't - we would see a definite chariot disadvantage. If we lose trade access, that chariot becomes 'maybe' while our sword also becomes a 'maybe'. I think that is much clearer regarding what is an advantage and what is a disadvantage. Re boats: I would only show boats if parties have access to the coast. Who cares if they have boats and all of your cities are land locked! Hmmn - actually - that might be a huge disadvantage if you were playing on a water heavy map ... they could expand while you couldn't. Ok, show boats. The Doc Oct 06, 2008, 12:19 PM btw: Is it possible to extend the rows for each leader to the left and the right so that they make full use of the blue box they are in? That would give the stuff at the sit-rep and the strat. res. tab more space and it would also look less cluttered, IMHO. EmperorFool Oct 06, 2008, 05:08 PM Which ressources are shown? . . . All ressources any unit need? This is exactly what I do. Any resource that is required by at least one unit is added to the set of "strategic resources" in UnitUtil. However, do you account for trading? What if Qin who has no iron later trades for iron and builds swordsmen? . . . How do you treat the situation when the player has briefly seen that the AI has a certain unit (let's say a swordsman), but has not seen whether the AI has the necessary resource (e.g. iron)? The approach I take is very naive, unfortunately. Here's what I do: If you are connected to their trade network, I check if they have access to at least 1 of the resource. This ignores the source of that resource (not that I can find that out anyway), whether it be from their own territory or a trade with another civ. If you are not connected, I assume they have no resources. Every unit that requires at least one resource gets put into the "Needs Resource" column. The problems with being trickier include If you see a Swordsman, maybe it was a gift from another civ. If you see an Iron mine with a road, maybe it's not hooked up to their trade network. If you saw an Iron mine that is now in the fog of war, maybe it's been pillaged since you last saw it. Ideally the player would be able to select the resources that they believe each rival has and have the screen use that information to determine which units are available. For example, you might say that Qin has Iron and then deselect it once you've pillaged his mine. Sure, he might have another Iron mine you don't know about, but when you saw him sending more and more Swordsman to the front line as reinforcements, you could again select Iron for him. One thing I might at least be able to do is check the known deals (visible when hovering over an attitude cell on the Glance tab) to see if Qin is getting Iron via a trade. Does anyone know if this information is always available regardless of the war situation? btw: Is it possible to extend the rows for each leader to the left and the right so that they make full use of the blue box they are in? I'm waiting to complete the functionality of the screen before making it pretty, otherwise I'd have to make it pretty several times. The problem with the Sit Rep tab is that the number of columns varies, and doing auto-expand is a PITA. This Strat Adv tab should be easier since the set of columns is static. BTW, what should I show then on the Sit Rep tab for the Strat Adv columns? Just the Definite columns for Us and Them? Or should we remove them entirely from that tab and add things like Attitude, possible DP/PA, possible embargo? EmperorFool Oct 06, 2008, 06:44 PM Here's how the screen looks now that I've changed it around to Known/Possible advantages. http://i222.photobucket.com/albums/dd275/EmperorFool/New%20Features/Advisors/StrategicAdvantages-1.png ruff_hi Oct 06, 2008, 08:11 PM EF - want to tackle something hard? I would love the ability to click on an AXE icon when I see one of their axes wandering around and put a great big X over the top - just so I know that it isn't possible anymore. EmperorFool Oct 06, 2008, 08:36 PM I would love the ability to click on an AXE icon when I see one of their axes wandering around and put a great big X over the top - just so I know that it isn't possible anymore. Do you mean click on the unit on the map? And when you do, it moves it from the Possible column to the Known column (or removes it if you can build them as well)? And where does the big X go? This is similar to my idea above of being able to select resources that the screen will assume they have access to, except for units instead of resources. This would be awesome, but I don't see it happening before the release given how much work that would be. I suppose if I made it one-way with no way to remove units from the assumed list, it wouldn't require as much effort. Cammagno Oct 07, 2008, 01:41 AM Ideally the player would be able to select the resources that they believe each rival has and have the screen use that information to determine which units are available. For example, you might say that Qin has Iron and then deselect it once you've pillaged his mine. Sure, he might have another Iron mine you don't know about, but when you saw him sending more and more Swordsman to the front line as reinforcements, you could again select Iron for him. I really like this! :) BTW, what should I show then on the Sit Rep tab for the Strat Adv columns? Just the Definite columns for Us and Them? Or should we remove them entirely from that tab and add things like Attitude, possible DP/PA, possible embargo? I'm for removing, no need of the same info in two tabs of the same screen Cammagno Oct 07, 2008, 01:42 AM Here's how the screen looks now that I've changed it around to Known/Possible advantages. http://i222.photobucket.com/albums/dd275/EmperorFool/New%20Features/Advisors/StrategicAdvantages-1.png Good, much clearer now! :goodjob: Cammagno Oct 07, 2008, 01:50 AM Do you mean click on the unit on the map? Better on the unit icon in the tab And when you do, it moves it from the Possible column to the Known column (or removes it if you can build them as well)? Uhm... I don't know, maybe the unit was a gift, and in any case what happens if then the resource allowing it is lost? IMHO this is ok only if you can provide also a rest button which deletes these user changes. EmperorFool Oct 08, 2008, 03:11 AM Woot, I think it's done. I've committed the following fixes/changes: Fixed group selection on Deployment tab. The Swordsman group in Friendly Territory is not a different group from the Swordsman in Enemy Territory, and it's also different from the Woodsman II promotion group. Moved Strategic Advantages to its own tab. Shows advantages versus units that can and cannot be built. Also shows the resource advantages. Added Possible Embargos to the SitRep tab. Sit Rep always shows Vassals and DefPacts columns, even when empty. Should hide the vassals column when they are not allowed due to game settings, probably. This tab still doesn't show teams (PAs). Fixed problem with clicking in header causing a redraw problem. Also fixes redraw problem after opening and closing Civilopedia by clicking units. Here are the latest views. I'd still like to add the attitude to the Situation Report in the future, but I'll hold off until after release just to be safe. http://i222.photobucket.com/albums/dd275/EmperorFool/New%20Features/Advisors/SitRep.pnghttp://i222.photobucket.com/albums/dd275/EmperorFool/New%20Features/Advisors/StratAdv.pngPlease, please test this screen thoroughly over the next couple days so we can release in confidence. :D Cybah Oct 08, 2008, 05:32 AM one question to the ressources: which ressources are shown/listed? all strategic right? iron, copper, ivory, horse, oil, uranum, aluminum? or simply all ressources any unit need? is there a mechanism? good work btw. :) Cammagno Oct 08, 2008, 05:47 AM one question to the ressources: which ressources are shown/listed? all strategic right? iron, copper, ivory, horse, oil, uranum, aluminum? or simply all ressources any unit need? is there a mechanism? good work btw. :) I think that your question already received an answer, look here: http://forums.civfanatics.com/showpost.php?p=7319880&postcount=291 If not, please tell us in more details what you'd like to know. Cybah Oct 08, 2008, 06:00 AM oh thanks. did not see that. CellKu Oct 08, 2008, 11:55 AM I like the new version! :goodjob: The resources tab is much less cluttered. And thanks for answering my questions. One more question though: Why do you list only "possible embargos" in the sit-rep? Wouldn't it be more important to list "actual" embargos here? Probably, I missed it, but how do you determine whether there is a "possible embargo"? EmperorFool Oct 08, 2008, 12:05 PM Why do you list only "possible embargos" in the sit-rep? Wouldn't it be more important to list "actual" embargos here? The game has no concept of an actual embargo in its data structures. You and the AIs can only ask one civ to stop trading (cancel all trade deals, including Open Borders) with another. Once you say yes, it's not like a DoW where you are now "at war" with another civ. This state looks no different than any other civ you aren't trading with. The one thing we might be able to key off of is that civs you do this to will refuse to talk to you for a while, just like those you DoW on. But this only tells you who you have stopped trading with. Note that AIs will only ask you to stop trading with their Worst Enemy. It's not really a trade embargo, but it's called that in the Civ4 code. How do you determine whether there is a "possible embargo"? Open the diplomacy window with an AI and look at the civs under the "Stop Trading With" heading. I'm thinking this column belongs more on the Strategic Advantages tab, but there's no room for it given that I want to add more columns to that tab already. CellKu Oct 08, 2008, 04:39 PM Sorry, I think I confused things here. I thought you meant the blockade of a coastal city with ships. Thanks for clarifying that. Dresden Oct 10, 2008, 10:45 PM The Military Advisor is having a problem figuring out the strategic advantages of my naval units. Here is a screenshot (thumbnail links to full-size) showing that I can in fact build triremes, galleys, and caravels (there's one of each building respectively in the 3 coastal cities) http://www.isarapix.org/pix78/sm/1223696476.jpg (http://www.isarapix.org/pix78/1223696476.jpg) But the MA shows those as advantages for everyone else: http://www.isarapix.org/pix88/sm/1223696417.jpg (http://www.isarapix.org/pix88/1223696417.jpg) And according to the log, it's because the MA doesn't think I can build them: 14 SCREEN TURNED ON 23:39:33 DEBUG: Lonely Cyrus ========= 23:39:33 DEBUG: Warrior 23:39:33 DEBUG: Swordsman 23:39:33 DEBUG: Axeman 23:39:33 DEBUG: Maceman 23:39:33 DEBUG: Spearman 23:39:33 DEBUG: Pikeman 23:39:33 DEBUG: Musketman -> doesn't know Gunpowder 23:39:33 DEBUG: Archer 23:39:33 DEBUG: Longbowman 23:39:33 DEBUG: Crossbowman 23:39:33 DEBUG: Immortal 23:39:33 DEBUG: Horse Archer 23:39:33 DEBUG: Knight 23:39:33 DEBUG: War Elephant -> no city can train unit 23:39:33 DEBUG: Catapult 23:39:33 DEBUG: Trebuchet 23:39:33 DEBUG: Galley -> no city can train unit 23:39:33 DEBUG: Trireme -> no city can train unit 23:39:33 DEBUG: Caravel -> no city can train unit 23:39:33 DEBUG: Galleon -> doesn't know Astronomy 23:39:33 DEBUG: ----------------------- fillStratAdvGrid start The save's 3.17 and I can post the rest of the log if necessary EmperorFool Oct 10, 2008, 11:15 PM There's very little involved in checking if a city can build a water unit. Can you please take a look at PlayerUtil.isSaltWaterPort(). It's pretty straight-forward, but I'm still using 3.13 and can't test it myself. :( Clearly the function works for other players, but not you. Dresden Oct 10, 2008, 11:37 PM OK, when it was checking me, the eAskingTeam variable was always -1 because the askingTeamOrID parameter passed to the function is not an ID. Instead it's the value "True": 00:28:38 DEBUG: Calling isSaltWaterPort(city=Persepolis, askingTeamOrID=True While when checking on other players, the passed value is the correct "0": 00:28:39 DEBUG: Calling isSaltWaterPort(city=Moscow, askingTeamOrID=0 Is that enough for you to track it down or should I keep searching to see how askingTeamOrID is getting set to True? Dresden Oct 10, 2008, 11:56 PM Further isolation: it all comes down to this call in UnitUtil.py (line 324): # cities if cities and not canAnyCityBuildUnit(eUnit, cities, True): That's passing the True in the wrong spot: def canAnyCityBuildUnit(eUnit, cities=None, askingTeamOrID=-1, checkBonuses=True): So I think adding a -1 as a third parameter will fix it. It seems to when I tried it, but I'm not really familiar with the UnitUtil functions and don't want to commit it without running it by somebody first. ;) EmperorFool Oct 11, 2008, 12:00 AM That looks right; I'll take a look at it now. It should pass in 0, though since it's checking your cities, all the tiles around your cities will be revealed to you, and thus -1 will have the same effect. EmperorFool Oct 11, 2008, 12:16 AM Well, it doesn't break it for me, so if it fixes it for you, great. Strange that it works for me and not for you. Team #1 (True) must not have seen the map around your cities yet. This did make me aware of another problem: it's not treating access to water as a resource. If you can build boats but cannot see a coastal city for a rival, it should show in your Possible column, not Known, because they might have an unseen coastal city. I probably don't address that before the release, however, as it would change the APIs for some of the functions. Dresden Oct 11, 2008, 12:21 AM There's a real good chance team 1 hasn't seen me in that game. It was a Lonely Hearts Club game (isolated start) and because nobody much likes me I haven't done much map trading (if any) and Optics is still fairly new so I haven't had any visitors. The Doc Nov 20, 2008, 01:03 PM Just some minor cosmetic issues: http://www.abload.de/thumb/civ4screenshot0003di5q.jpg (http://www.abload.de/image.php?img=civ4screenshot0003di5q.jpg) Is it possible to make the columns for "Wars" a bit wider? Maybe the same size the as the similar columns at the strategic advantages tab? Would be great if the label for defensive pacts could be fitted into two lines instead of one, like the worst enemy label. Then we could get rid of the abbreviation in all languages. :D The space at the left and right: Is this necessary or could the lines be extended to make use of the whole blue box? Same for the strategic advantages tab. EmperorFool Nov 20, 2008, 04:46 PM We don't actually specify the size of any columns. We tell it to use its preferred spacing. I would guess that we can specify out own but need to check. We can definitely split the other labels. |
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.