1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

New Diplomacy Options

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Jun 20, 2014.

  1. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Not precisely. You proposed changing the LH info class, while I propose changing which LH the exe will see the player using. Fundamentally speaking, I'm against setting anything in the info classes. Ideally speaking, once the XML files have been loaded, they should be read only. If you quit the game to main menu and start a new game, you clear all player data, but the info data is kept.

    I don't think it's an issue to add more LHs. If it is, then we need to make tags optional. Most of the tags are for a player leader only (like traits) and the non-leader should not have to fill in those.
     
  2. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well I just tried a simple test in getLeaderType()

    Code:
    LeaderHeadTypes CvPlayer::getLeaderType() const
    {
    	if (getID() == 31)
    	{
    		LeaderHeadTypes eLeaderHead = (LeaderHeadTypes)25;
    		return (eLeaderHead);
    	}
    	return GC.getInitCore().getLeader(getID());
    }
    
    31 is the Pope, and when the Pope gets his leaderhead the game crashes. I tried this as a saved game and a new game. Not sure what causes the crash either as it slows down my debugger and the last call is in CvInitCore::getCiv(PlayerTypes eID). I think it may have something to do with the Leader chosen not being in the Civilization XML. In my new game, in the log file it shows the Pope as being the Caliph (Leader 25) but as soon as I make contact with him the game crashes. This may not be worth the head act to attempt to fix.
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    What I sad about it was, "Or we can add a new LeaderHeadType for Envoys. Then we add code to the CvPlayer::getLeaderType() to get the Envoy Leader instead when we setup the Diplomacy."

    Anyway, this seems to be more a pain than it is worth at the moment. I'll just drop this idea and just let the Invading Player introduce himself from time to time.
     
  4. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    I was about to say, this seems like a lot of work for a graphics gimmick that kind of throws the rest of the diplomacy 'concept' out of the window.

    Technically you would always be 'contacted' by an envoy, as a king (generally) would not travel to make a request, unless it was some kind of special meeting, and you would always send an envoy to see them.

    So really you would never see a king in a ' diplomatic meeting' as generally you or he would not be there.

    Unless it is the idea that your 'REF Enemy' is not the same as your 'King' (So a mongol horde and the Pope for example) if that is the case, then perhaps it would just be easier to have your 'Pope' contact you with messages such as:

    Terrible rumours have been making their way to my ear, a terrible force laying waste to the outlying villages of Christendom.

    A Villager arrived at our court, broken and bloodied, he spoke of demons murdering and burning his village.. We fear the man is insane, but these tidings hold troubling consequences.

    Our Scouts have reported a vast army marching upon us, it would seem the rumours were true and we face a threat like no other we have ever faced.

    Then depending on how you react to the NEws different things might happen.

    Like ignore it (enemy expands)
    Pay to send scouts to investigate (-money, REF decrease)
    Prepare defenses/Fund Army (lose more money gain special units)

    Or whatever else might be a desirable choice and outcome of the proposed 'meetings'
     
  5. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yeah, I like the Envoy idea a whole lot for certain situations, so unless we want to program a gimmick for it we would need to make our own screen. Which would be kinda fun to do.

    Remember the REF reports you got, "The King is wary of your rebel sentiment and has added 6 units to the REF"? This is where I was thinking of having the Envoy appear from time to time. I am just going with an Invasion of Turkish-Mongols for now no matter if the Pope endorses you or not. At some point I we can add different types of Invaders but it will take more work to get it right so just going with a simpler approach. The "messages" you gave are great examples and I'll do something to that effect. We could add a Popup window with a nice Graphic, which makes me wonder if we can add nif files to Popup windows. The graphic code I use is specifically for .dds files so not sure.

    Anyway, I am ready to get this part done as I have been really busy lately with other things and haven't had the chance to work on it much, and when I do it is always this final Conquest/Leader stuff and who is going to war with who, etc. So, I am just going to do what is simple for now.
     
  6. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    To be honest I wondered if it would be worth the time to code right from the start, but since you would like to have it, I investigated anyway. I would rather aim to finish everything we planned for next release rather than adding new stuff to the list.
     
  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I agree, some additions only take 30 min or less sometimes, I was hoping this was one of them but it is not :( If we had control of the Exe Diplomacy, it would be a simple fix.

    The Final Conquest was unfinished so I am having to finish it and it is nice to get things as close to as what you had envisioned, but somethings can wait till you have more time plus more time invested in play testing.
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, the REF, in Vanilla we get to see what it is at all times, but I am thinking that for M:C we can have it hidden at the start. Then the player will eventually get a Popup that states something like, "Rumors abound of a threat growing in the east." Then you have an option to "Send spies to investigate" or "Ignore the rumors for now". If you send spies you get another Popup where you enter how much money you want to spend on the mission, say 100 to 1000 gold. The more you spend the higher chance of success. If you succeed you get to see the size of the REF in the Conquest Screen. Early on the missions have a better chance to succeed, but latter in the game you'll a have to spend more money. Perhaps, at some point, there can be missions that allow you to reduce or slow down the rate at which the REF grows.

    This wouldn't be a time consuming addition at all and I think it would make more sense for M:C.

    Edit: We could add "threat level" text to LeaderHeads, then have a counter that keeps up with which Threat Text is ready to be used the next time the Popup message displays.
     
  9. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
  10. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    We could add a UnitArray of known REF forces which shows the number of units of each type, which is then used for the GUI. Having the array and the units separate allows the display and the actual number of units to be different. This will allow something like the spy screen in Master of Orion where you can examine a different race, it tells which techs the race has and how many years (turns) the report is. If you had poor luck or low/no spy funding, you can get a display of how it was say 30 turns ago.

    We could also add a percentage chance of discovering each unit. This mean the conquest screen could display a number of units and add the text that you have say 70% chance of knowing all units like they were 2 turns ago. Your spies might have missed some units and they might know all of them.

    Not spotting all units is mor realistic than you might think. Just before WW2, Japan launched a ship called Yamato. The Americans learned about it by decrypting Japanese radio messages, but they had no idea what the ship was like until 1945, despite the fact that it was present both at Pearl Harbor and Midland :crazyeye:
    The ship turned out to be the biggest battleship ever built. The size was the minimum size to handle the cannons and the weight of the ship was 3 times the weight of the second largest battleship (which was the Bismarck class. The allies were really behind the race in ship size). To make this even more impressive feat at hiding the ship, the Japanese built two of them without the American realizing it. If hiding something this big is possible despite the introduction of radar and stuff like that, then I guess it would be possible to hide any kind of unit from spies.
     
  11. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Already added this :) I also had to add readWriteVectors(bRead, pStream, uiFlag); uiFlag to vectors in order to keep my saved game alive. We can add to the Conquest screen how many years old the info is, good idea there.

    Not sure if I am following you 100% on this, but it sounds like a cool idea:lol: I understand the "percentage chance of discovering each unit", which sounds like a fun idea. But would we need also to mark each unit that is discovered because next time we send spies they will already know about that one? Or, in real life Armies moved about, gained troops, perhaps lost troops as well, so each time the results could be different, even if the army size is the exact same.

    When we add the actual Spy Profession we can turn this into a mission for them.

    True that. Sometimes Armies where right on top of each other before they even realized it, like at the Battle of Barnet during the War of Roses, because of the thick fog and cannon fire smoke the armies came within earshot of each other. Edward IV leading the Yorkist army realized this first, and he made his men remain quite all night to avoid cannon fire. Anyway, it would be neat if there was someway that units could "hide" and perhaps Ambush or get a free first strike, but that's another subject.

    I am currently working up the Popup interface for this. We could add a button to the Conquest screen that appears perhaps when the first report of the REF is made. You can then click this button to send spies any turn perhaps. Spy reports could take a few turns to appear.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    When you write a vector, doesn't it call CvUnit::readWrite() or similar, which itself has uiFlag?

    I'm wondering about that as well. To be honest I haven't figured out if I think it is a good idea or not to add bDiscovered. Also I wonder if we should have screens like that for all players and you can spy on other players to reveal that they have say 10 of a specific type of unit even though they are all hidden by fog of war, meaning you don't know where they are right now, just that they had those a few turns ago. Maybe bDiscovered should actually be a bool array of length MAX_PLAYERS.

    If we have a bool to check if we know the units, we will not actually need an array. We just loop and check this bool. If this bool is set whenever a unit comes into your vision (out of fog of war), then it is just a helpful memory to see what you have seen.

    Thinking about this, we may need the array after all because if the unit dies outside your field of vision, then you will not know that unless your spies discovers this. Maybe the array should store "dead, but assumed alive" units.
    On the other hand, this could get very complex since the AI change professions and some of the units are actually the same unit, but different professions.

    For the record, I did at some point add a variable where there is one bit for each player. If MAX_PLAYERS increase to more than 32, this variable becomes a 64 bit unsigned int, which makes the 32 bit code switch to 64 without modifying the individual places the variable type is used.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Not sure about that, I just know my save would crash until I added that extra code.

    Being able to tell the strength of your rivals would be a great addition for the Spy mod. Makes me excited to start on that part, ugh, so much to do:blush:
     

Share This Page