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 Victory Conditions

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Dec 18, 2013.

  1. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    From my limited skills that seems like a huge goal as there are so many things that break saved games.

    Anyway, updating my progress... I like to do this so if I forget where I am at I can always come back here to find out, plus its like sending a little love letter to you guys letting you know how things are going :love:

    I discovered a few things about the Diplomacy and I need to write more in the Wiki to keep up with it for next time.

    If a TradeableItems is set as Dual, both teams have a copy of the Trade, like for Open Borders. If you add it, both sides are added.

    If it is not Dual, then one side could have it, or both can have it.

    If it is set as isAnnual then it is reoccurring each turn and there are things that could automatically cancel it.

    For Imperial Support I made this single trade so that it is easier to manage. In Civ4 and Col there isn't much actual talking going on between the two Diplomats because items in the list have Denial Types. Each item is checked for a Denial, if it is Denied then it shows up in Red and when you mouse over it they "talk" in text and tell you why they will not agree to this. I'm not sure how I like this but it's what we got :crazyeye:

    So, for Imperial Support the Player will be able to mouse over this text and get a hint or idea of what they need to do in order to gain that players support.

    For Natives they check several things against other potentials like attitude, land mass, population, and power. I need to add in Fealty also.

    For other Players it will be about the same as Natives except they check if they have a chance to win, if they do they will always deny you saying they want to win.

    For the Pope, he uses different calculations. Besides your Power Ratings (he doesn't want a wimpy Emperor) He checks for YIELD_CROSSES output as well as your Accumulated Religious FF points. For Civs that seek to gain favor with the Pope, his attitude towards you will (eventually, not coded yet) also add to your favor. This will probably be huge and I will make a new Denial type, like DENIAL_PIOUS "You are not pious enough in our faith."

    In my current game the Pope favors no one, not even me. He really didn't like me until I figured out that the Tax Rate has a huge negative effect on his attitude. So, I turned this off for none Independence victory games. He should be happy that you are paying so much in Taxes:p Anyway, I failed to do some military request and didn't kiss his ring once, and so I don't have his support, good thing no one else does either.

    I am actually excited about this Victory Condition as it seems to be shaping up to be something very strategic Diplomatically. I still need to add what happens when you gain someones support as well as what happens when you finally proclaim to be Emperor. What happens if the Pope supports no one? Its going to get interesting :cool:
     
  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    It is and for all we know it might be impossible. However that will not stop me from trying and by trying I will add scenarios, which I predict can break savegames. Even if I fail to always preserve savegames, the risk of breaking savegames is reduced.

    Right now if we add a new game option, savegames will die. That's one thing I want to fix. Say that I already did that before we added prospecting. CvGame::read() will then set prospecting to false, then read game options as a JIT array. If the savegame contains prospecting, that value will overwrite the default. It it isn't present, it will stay with prospecting being off and the savegame works just fine even though all the new prospecting variables are stuck at default values.

    The major problem with diplomacy is the fact that the exe handles the window and delayed response has already uncovered one bug we can't fix. Having some options in red might be fixable from the DLL, but it isn't trivial as we would have to debug a lot to figure out how it would appear that it sets up the data (we will never be 100% sure).

    The only good solution is to write a python file to handle the diplomatic window and avoid calling the exe entirely. However I can't think of anybody, who will do that task, at least not in the near future. It's far from trivial.

    If we make our own, there is the problem with music. For some reason sounds and music appears to be hidden inside the exe and it will not allow us to send a message like "play theme for civ 8" or anything like that.
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    We can play sounds on demand and animations on demand as well, for example when the birds scatter sometimes when you enter a plot...


    Code:
    //spawn birds if trees present - JW
    if (featureType != NO_FEATURE)
    {
    	if (GC.getASyncRand().get(100) < GC.getFeatureInfo(featureType).getEffectProbability())
    	{
    		EffectTypes eEffect = (EffectTypes)GC.getInfoTypeForString(GC.getFeatureInfo(featureType).getEffectType());
    		gDLL->getEngineIFace()->TriggerEffect(eEffect, pPlot->getPoint(), (float)(GC.getASyncRand().get(360)));
    		gDLL->getInterfaceIFace()->playGeneralSound("AS3D_UN_BIRDS_SCATTER", pPlot->getPoint());
    	}
    }
    You don't have to have a pPlot->getPoint() either.

    So, we could probably could fix this up for Diplomacy Screens as well. And I imagine Python has ways to play sounds as well.

    The Question is, how would ours differ from vanilla? As you say, this won't be started any time soon if ever, but it don't hurt to talk about it. What would we do different than vanilla's Denial system?
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    Ok, we do have sound effects, but the exe appears to handle all music.

    Having our own python file would mean we can add whatever we want and we can fix all bugs.

    If we don't like it, we can just change it if it is our own python file.

    Perhaps we should list the stuff we want to do regarding the diplomatic screen and once the list gets long enough we might actually look into making our own if the tasks on the list can't be done due to exe issues. Perhaps the best place would be a wiki page as we can all edit that one.
     
  5. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    If we ever did make our own Diplomacy Screen, one thing I would want is Diplomacy Types setup in the XML. We would have xml settings for isMapTrade, isAnnual, isDual, and such. Also, we could have CivEffects as one of the effects of the Deal.
     
  6. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I think we can add most of that with the existing system. We have the ability to add variables to the diploevent. Even if that fails, we could add a map trade event in XML for each combo. But yeah it would likely be easier if we have our own screen, possibly with subscreens.

    I'm not sure CivEffects fits well here though. Then again we could make give each Civ or LeaderHead a CivEffect, which allows more uniqueness to the different players. Gaining that player as a vassal will give that CivEffect to you as well. Something like BTS has civ specific units, but still different as it will be additions instead of replacements and that you can really benefit from making lots of vassals this way.

    We can make a unit, which by default has -3 allow and all civ CivEffects has +1. That way the only way to gain that unit is to get 3 vassals. That could certainly make unique setups.
     
  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    If you are referring to the DiplomacyInfos they do not cover all Diplomacy Types, things on the Trade Table are not in DiplomacyInfos, like Maps, Gold, Open Borders. Those things are hard coded in the DLL and use a different system. This is what I would like to have as XML.

    Right, at first thought there doesn't seem like much you could do, but with the right set up we could have all kinds of new CivEffects added for Diplomacy plus use the ones we already have. We could set up Shared Effects where you could share certain Yield Outputs, FF Points, or other aspects to your Empire, such as Vision, unit Training (agree to train some units), etc. We could hard code all this now, but with XML we could set up UnitTypes, YieldsTypes, FFs etc. with ease.
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    For the Final Battle I think I will go back to having a REF for each player, and you must defeat your REF. The question is who is in Control of the REF. Most Kingdoms of the age had at some point some invaders knocking at their door, but for game play we need to have a Generic Invader. Looking through history there are a few candidates...

    One really good candidate would be the Mongols. The only thing about the Mongols is they came by land and it just seems wrong to have them come by sea. They where never even known for being ship builders. We could set it up for them to come by land, but the maps are so random that this could set up some unrealistic and game breaking situations where the Mongols would need to cross much terrain to reach you, by passing other players. Perhaps, when they show the Players who oppose your Imperial-ship would join forces with the Mongols. It could lead to some really cool scenarios as hordes of Mongols begin to pour over the steppes making their way to your Realm, suppressing or conquering all in their path. During play you would get messages saying that, "You hear word that the Mongol Horde has conquered yet another providence, gaining in strength!"

    Another good candidate would be the Ottoman Turks. They also came by land to conquer Constantinople but they did expand to reach the sea in the 14th century and began to build a navy. As with the Mongols as the REF grows you would begin to hear word of their exploits.

    Also, for a force that would appose none Catholic states, the Teutonic Knights seems like a good candidate. In 1410 they attempted to wipe out the Polish and Lithuanian forces in a Crusade. We could also have some Generic Crusaders that the Pope calls upon to invade your lands.

    Any thoughts or ideas on a REF?
     
  9. Trade Winds

    Trade Winds Chieftain

    Joined:
    Nov 21, 2013
    Messages:
    235
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yes, I was going to research them as well, but you beat me to it :) They would be the best choice for the current map setup and you are sided with the Pope. And even not sided with the Pope, the Muslims would not have cared:)

    What about the Teutonic idea for some alternative scenarios?

    I really want to design a map where the Eastern half (or Western) is mostly land with the Ocean on the West side, with perhaps some small and large Islands. That way we could better design a Mongol, or Land Based Invasions.
     
  11. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, I've added a new InvaderCivs tag to LeaderHeadInfos. Here you place what ever Civs that you want to included as the REF. I am thinking changing bAvailability to an int as well that you can set the Percent chance for that Civ so we can have random Invaders. Each Civ will also then be able to have more than one Leader so you can have random leaders as well. Civs and Leaders could also perhaps be tied in with Difficulty and there being more advanced Civs to conquer at higher difficulties.
    Code:
    <InvaderCivs>
    	<Civilizations>
    		<CivilizationName>CIVILIZATION_INVADER_TURK</CivilizationName>
    		<bAvailability>1</bAvailability>
    	</Civilizations>
    </InvaderCivs>
    Also, I would like to have the ability to set if the Civs are Allied with the Pope or Not. So, perhaps the Percent could be set to negative if they are not allied with the pope (then converted to absolute value in the dll). That way you would have two sets of Civs, one for the Pope supporting you as Emperor and one for not.

    In my initial tests I was able to add Tamerlane of the Turk-Mongol Civ as the Commander of the REF, which he set about sending them in for the attack. So, it seems I am off to a good start.

    I am thinking Difficulty will also adjust how many players will declare war on you. Right now the Pope is checked first, if he doesn't support you he declares war. That will adjust everyone's attitude who is either in favor of the Pope or not. Then the rest are checked, and depending on how much they like you they may declare war or not.
     
  12. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
  13. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    That's how it can be written with InfoArrays. However they are still only in the CivEffect branch.

    However bAvailability could be replaced with an int, which can then be used to figure out if they go to war against you or not. Something like class 2 will always declare war and class 1 might declare war based on relations, difficulty and possibly other factors, such as randomness. Maybe this score should be more advanced than simply 1 or 2 (or 0 as in not declaring war).

    I kind of like the setup where I know the difficulty level states that two class 1 players will declare war on me. However there are 5 and it will pick two at random meaning that even with the knowledge of the number, I can't predict the direction of the attacks. At the same time it's not all of them, which could make combat rather difficult. Your idea with a percentage is good too.

    However we have to be a bit careful regarding this setup. I prefer a fair amount of randomness and while such a list could be useful, it will also be a tool to make the game predictable.

    We might also consider using traits yo pick which players might go against you. If you attack the pope, players with TRAIT_POPE_FOLLOWER would be likely to defend the pope. That way you set up factions with traits rather than setting them up in each LH, which could be a lot of copy pasting and a bunch of copy paste errors.
     
  14. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yes, I am excited about the info arrays. The vanilla way with booleans is a pain. Vanilla also did the array thing too but it took tons more code to get it from XML to DLL. For the booleans it just took one line.

    This is somewhat in the game already with the LiberationPlayerAttitude in LeaderHeadInfos. The AI checks this to tell if they will follow the Pope's decrees and how well they like you based on yours and theirs relationship with the "RelgiousLeader". I need to be more consistent in my naming scheme as always as I switch from Liberation to Religious.
     
  15. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    LiberationPlayerAttitude is just one setting. Traits on the other hand can be used to set "holy civ", which mean we can have multiple factions. Also we have combat bonus vs Civic. Somebody (me?) proposed expanding that to cover traits as well, which is yet another reason for having factions in traits.
     
  16. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Moving this topic here as it fits better.

    I have the basics working for the new Conquest Screen. The Units do not show until you have sent spies. The Spy popup screen asks you for how much gold you want to spend; min 100 and max is your max Gold. Right now it doesn't factor gold spent and you always discover all units. So, we just need a formula as to what happens with your gold. We set a counter that counts down the number of turns it takes for the spies to return. When the counter is up we can then do our calculations.

    We can add a chance for mission success, which if it fails you get a message like, "Your spies haven't been heard from, we fear the worst."

    If it succeeds we then need a formula that determines how many of the Units are discovered, based on how much gold you spend, so if you have any ideas please share.

    I also need some Spy Art to add to the Popup so keep that in mind as well.

    While looking for Spy Art I discovered this movie: Conquest 1453, its like the end game of M:C and looks cool, you have to turn on captioning to read it in English though.

    https://www.youtube.com/watch?v=Ien-vXBYttg
     
  17. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    What if we do something like

    100 gold = 1 Spy
    1 Spy = 1% chance of success (overall success and per unit discovery success chance)
    1 Spy = 1 Unit Chance to Discover

    we then add in something like a -10% Chance so that it will never be 100%, with perhaps a random 1-9% Chance.

    So 1 spy would have a 1-10% chance to discover 1 Unit.

    100 Spies would have a 90-99% Chance of discovering up to 100 Units.

    That would more of less put an upper limit of 10,000 gold.

    We could change variables if it needs to be bigger or smaller.
     
  18. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I think chance to discover a unit should also be affected by CivEffects and other stuff, like diplomatic relations and possibly eras. Add modifiers both on your own actions and as defense against other players and it could grow into an interesting system.

    However more importantly I have been thinking about a good system for using spies on another player to detect their army level. It would be fairly easy in BTS because well a unit is a unit. However most of our military units are actually professions. This mean that we can detect armed peasants and the next turn it's heavy cavalry and then it switches back. To be honest I'm really stuck at finding a decent system for spying on professions. We really need to figure out how to solve this issue before it makes sense to dig into the actual price or success rate of spying.

    Also another issue: how are we going to make the AI figure out this? If it ends up being something expensive, which only applies to human players, them I'm not really happy about it.
     
  19. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    right now this is the system that only applies to the REF, not a full blown espionage system.

    That system will come later in its own build.

    Right now we are talking about the end gme invasion only.
     
  20. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    Both yes and no. If we figure out a full espionage system, it will apply to REF too since that is units owned by a player as well. However doing REF will not allow the same solution to be used on other players, which mean it would end up being double work. In the interest of spending as little coding time as possible, figuring out a system, which works for all players would be best. If we decide to do it for REF only, then it would be because we more or less have given up on spying on other players, at least when it comes to getting the military size.
     

Share This Page