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

Ideas and brain storming for Europe map scenario

Discussion in 'Civ4Col - Medieval: Conquests' started by Fullerene, Aug 18, 2013.

  1. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Assets\Python\pyWB\CvWBDesc.py looks like the file you are looking for.
     
  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I updated develop to handle inventions as well. They are written like
    Code:
    Tech=MEDIEVAL_TECH_WHEELBARROW
    Tech=MEDIEVAL_TECH_ALPHABET
    It should be strait forward to use.

    Issues:
    The player will keep the default civics even if the scenario will not provide them.

    Caching have become an issue. I tried fixing it, but that task will not be complete until civics have been merged with traits.
    Workaround: cache is set correctly when a game is loaded. This mean you simply have to save the game when you start a new game (scenario only) and then load that savegame right away.

    Starting a scenario map asserts a number of times, particularly in prospecting code. I suspect that it is actually my code to disable prospecting, which is failing, not prospecting itself.
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, now that I think about it, why did we even touch the prospecting code? All, you had to do was turn off Ore/Luxury Food/Hides in the XML form being Prospecting/LimitedYields and just let them be normal yields. The Prospecting/LimitedYields code is 100% XML based, so if there are no XML values, there will be no Limited/Prospecting Yields. Even the Commands and Professions can be turned off in xml, make the Commands bNotShown (or whatever it is) and the Profession bGraphicalOnly.
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    To make it possible to turn prospecting on and off from within the game without touching XML. The concept of gamers all editing XML is messy and time consuming and will lead to bugs eventually.
     
  5. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Something seems to be wrong with my repo. The inventions in scenario file are not working and everytime I meet opponent a war is auto declared. Always war is not on.

    I thought I had messed with my files somehow so I cloned a clean repo. But no help.:confused:
     
  6. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    That's odd. It was working when I tested it. You did switch branch for M:C, python and DLL, right? You can select a branch for each and all of them need to be set to develop for this to work.

    Granted my testing was brief and I may have to do some serious ingame testing.
     
  7. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Yeah the branches weren't correct it seems. My bad.

    It was weird however that I couldn't set branches before clean cloning. But I guess I had managed to mess my local files or commits somehow.

    All good now.
     
  8. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Ah, I remember now why I gave up building the scenario few years ago... May there be better luck this time!

    Building scenario with text editor is just :wallbash: It just crashes in the exe and visual studio call stack doesn't even show any DLL calls... hard to locate errors.
    But I guess I can work around it with python and world builder.

    *

    Anyway been thinking the Crusades scenario. I guess there should be some reason or prize to capture Holy land (Jerusalem) if you play catholic nations? And how does AI react to war between distant nations? For example, would the Frankish empire send units to Middle East if it has war with turks or arabs?

    *

    I found nice map that has good list of nations:
    Spoiler :

    France (Franks)
    England (Anglo-Saxons)
    Normandy (Normans)
    Holy Roman Empire (Franks?)
    Spanish Kingdoms (Visigoths)
    Russians (Kievan Rus)
    Hungary (Magyars)
    Scandinavia (Scandinavia)
    Byzantine Empire (Byzantines)
    Almoravids (Berbers?)
    Caliphate of Cairo (Arabs)
    Seljuk Turks (Turks)
    States of Church (Papacy)
    Poland (Maybe needed new leaderhead)
    +
    Croatia,Serbia,Ireland,Scotland,Balts,Finns,Khazars etc
    +
    And since the time line of scenario would be around 1000-1500 AD there could be somekind of Mongol invasion event.

    Not sure which civs should be barbarians or should there be any.

    *

    Which gave me idea that maybe Byzantines could be a some sort of advanced natives? You could learn new technologies from them and learn skills that you can't learn in normal barbarian villages. And possibly you could send units to Imperial guard and gain some bonus (gold and promotions etc).

    Another idea for Byzantines is that they would work like the Papacy for the non-catholic nations. For example arabs would win the game if they capture Constantinople.

    Maybe something like this could be considered to the main game too (in the future)? Down side of course is that player couldn't play Byzantines.
     
  9. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    The problem is that the file is read by python, not the DLL meaning when something goes wrong, it is the exe and python, which crashes. If you provide a crashing file, I will see if I can manage to get python to tell which line it fails to read.

    Once the natives declared war on me (I think it was AoD, not sure). I didn't care as they were far away. Around 50 turns later all their braves showed up at my colony closest to them and attacked. Sure enough units with one move would take around 50 turns to walk that distance meaning once they declared war, they send off all their spare braves to attack the nearest city, regardless of distance.

    I suspect (and hope) that was vanilla AI behaviour meaning M:C would do the same.
     
  10. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Hah, I forgot to put profile configuration on to catch the errors.:rolleyes: (For some reason I can't compile debug.)

    The crash happened in between turns in CvPlayer::doTurn method.
    I managed to fix error by adding plot is not NULL check
    Code:
    ///TKs Med
        bool bStartOnWater = GC.getCivilizationInfo(getCivilizationType()).isWaterStart();
    
    	if (!bStartOnWater && !isHuman() && !isNative() && !isEurope())
    	{
    	    CvPlot* pStartingPlot = getStartingPlot();
    	    if ([B]pStartingPlot != NULL &&[/B] !pStartingPlot->isEurope())
    	    {
    	        setStartingPlot(NULL, false);
    	        CvPlot* pNewStating = findStartingPlot();
    	        if (pNewStating != NULL)
    	        {
    	            setStartingPlot(pNewStating, true);
    	        }
    	    }
    	    FAssert(getStartingPlot() != NULL)
    	    FAssert(getStartingPlot()->isEurope())
    	}
    
    	///TKe
    Without that check my scenario file will cause crash cause plot on pStartingPlot->isEurope() is NULL for some reason. I wonder is this fix has side effects, but at least the crash to desktop is gone.
     
  11. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Strange. I can't think of a reason why you should be able to compile profile and not debug :confused:

    Maybe you are missing some libraries. Did you install everything modiki told you to install?

    Most likely. There might be a reason why it is set to assert if the plot is missing.

    Besides I think you need a starting plot even if the units start in Europe. The game will have to know which plot they arrive on when entering the map.

    Also if I recall correctly, ships in Europe are still on the plot they left from (hence they remember which one to return to) and they are just hidden by travel state.
     
  12. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Apparently, your civs are not being assigned a starting plot. I changed much of how starting plots are assigned. But yeah, civs need a starting plot so they can know exactly where to place Immigrants and ships they buy. I think there is code that will calculate a new starting plot if there isn't one at some point. Can't rememeber.

    Anyway, how are you setting up the Civs? For scenarios we could have it so that when you first place a City or Unit and the Civ has no starting plot it will assign that plot as the starting plot.

    PS keep letting us know what your issues are and we will resolve them
     
  13. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    Ok, if you start random map game, open world builder, save game as scenario file and then restart game using play a scenario option, it will crash next turn (same error, pStartingPlot is NULL).

    So obviously something needs to be fixed about finding startingplots to get the support for scenarios.

    The scenario files have StartingX=xx, StartingY=yy parameters for a setting a starting plot I think. Maybe that messes with the current code somehow.
     
  14. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, I don't have time to check into this now, later this evening perhaps. Starting plots are tied to players, so what player(s) are the ones not being assigned a starting plot? Unless starting plots are simply not being saved to scenarios... anyway, this can be fixed.
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I forgot to answer this. I've added several of the Military AI improvements from TAC, but I am not sure how well they even improved it as I have yet to test things out. But, this type of improvement is what we can be working on next release as well if need be.
     
  16. Fullerene

    Fullerene Chieftain

    Joined:
    Aug 26, 2009
    Messages:
    228
    Gender:
    Male
    I was just thinking that for this scenario it would be nice to have the actual crusade wars to happen. Not sure how desirable it is to have AI fight battles in distant lands in normal games.

    But more important would be to get scenarios working at the first place. I could maybe work around it with creating scenario with python but it isn't as pretty and takes more work.
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, so I guess you are working with development branch, I'll pull it and see what I can do. I may have some time to look at it this evening but for sure next week.
     
  18. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Perhaps instead of trying to be 100% accurate to history, instead replicate the feeling and environment after the first crusades.

    So give every major european power a stake in the Holy Land, places like Jerusalem, Krak De Chivalier (Ugh can't remember how to spell chevalier? ChefAlleyWay? anyway...), etc.

    Place a shrine in each and give every major nation a vassal and mission at home to generate pilgrims that you have to protect to the holy lands, maybe add a home Market at each capital, and an Eastern Market close to the arab nations, so you also have to protect trade caravans to and from the coast to generate money, etc.

    Or
    Maybe instead of playing as Nations, you play as a Knight's Order (Templar, Hospitalier, etc.)
    and it is your job to protect the pilgrims and trade. Build Missions/Chapter Houses in European cities to make Convert/Recruits to swell the ranks of your chapter and fight the wars to increase your holdings, as well as trading all the spoils and riches of the east back home to swell your coffers.

    The Knights Templar were like the first international Bank/Corporation, providing money transfers, trade lanes, pilgrimage, and running major armed forces.
    Even owning land and businesses across large parts of Europe.

    That would be a fun use of all the systems in M:C.

    Planting Chapter houses in Europe, that can grow to envelope the european cities, and make them 'beholden' to your Order. (As far as I remember, many kingdoms had substantial loans from the Templars, who were happy to take gold, land, property, businesses, in place of payment.)

    And of course if you become too powerful, Rome may decide it is time to decry your Order as Heretic and try to wipe you off the face of Christendom and the Holy Lands!
     
  19. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Those are some good ideas, also how about new Civics added to Unique Units, if you control it you gain that very beneficial Civic. Of course everyone will want to take it form you:ar15:

    Night and I just double teamed the Scenario bugs and knocked out a the missing starting plots bug and prospecting failed asserts. The Scenario was creating duplicate Popes and Barbarians and for what ever reason they couldn't find a starting plot. Anyway, now they are not duplicated in Scenarios. Changes pushed to develop.
     
  20. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK

Share This Page