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

Trade Route Screens, Tutorials, Questions, etc.

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Jan 4, 2014.

  1. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    M:C has a "tech tree", just click the Research Adviser button? Is that what you are referring too?

    I have pushed the latest changes to git. Routes can be Land, Sea, or Both. I have also added code to the Trade Screens to auto fill in the quick link buttons. At the moment the button graphics are the Trade Route command buttons instead of the Trade Screen buttons because the command buttons are the only ones saved in the EuropeInfos.xml. I'll have to add in the other, better looking, buttons at a later date.
     
  2. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    ight! yes, I just wasn't sure if it was madein MC

    I will go and play with that soon :D
     
  3. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    Thanks Kailric and Nightingale for the DLL updates :cool: you are producing research points at an impressive rate! :science::scan:
    Can you explain a bit how the civ starting criteria and starting Europe screen are set up? eg in leaderheadinfos:
    I'm trying to let the 2071 civs use normal immigration where they pick up immigrants from Earth, but not sure if that's possible if some of these tags combine many different behaviors.
    The tech screen isn't currently displaying in the 2071 branch after the update, could this have something to do with the DLL change about CIVICOPTION_INVENTIONS? Lastly, is it now safe to remove XML entries that were previously hardcoded with DLL, like SPICEROUTE, TRADE_FAIR, GUILDS etc?
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    CIVICOPTION_INVENTIONS is hardcoded in the DLL, but it needs to be in XML as well. This is because the hardcoding is made in a way that whenever the code looked up the string "CIVICOPTION_INVENTIONS" to get the index, it now assumes the index to be 0 (numbers known at compile time are way faster). However anything else related to CIVICOPTION_INVENTIONS is unchanged and as such it still needs the XML to get it allocated in the civic option vector etc.

    As for the missing tech screen: the only thing I can think of is that CIVICOPTION_INVENTIONS is now 0 instead of 4. Maybe there is some code somewhere, which uses 4 instead of looking up CIVICOPTION_INVENTIONS. It shouldn't matter at all if the code is written generic enough, but obviously that isn't the case here. I have a hunch that the issue is in python somewhere, though I'm not 100% certain.
     
  5. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Open up your CvTechnologyAdvisor.py and make sure all your gc.getCivicInfo(iListCivic).getCivicOptionType() == 0. They must == to zero now instead of the 4 or 5 like Nightinggale mentioned.

    My next goal is to set up the Vikings to use the Europe screen as normal, so this with some other changes should fix your issue with the Europe screen.

    Ok, on the types, I plan to adjust the code at some point to better tell whats happening but for the moment I just use numbers so things can easily be changed.

    VictoryType is as follows:
    • 0 = Kill King
    • 1 = Pope
    • 2 = Crusaders
    • 3 = Ottomans
    • 4 = Retribution Force

    This effects things like how your "King" makes demands, his consequences(Pope only does Censures), and the text for the Continental Army, as well as the type of army the player must fight to win his Conquest.

    EconomyTypes:
    • 2 = Means all Trade Screens must be discovered. Prices will not change until the first trade screen is discovered
    • 3 = Inflatioin; taxes are called inflation, currently used for vikings but this will change

    TravelCommandType
    • 1 = The Civ uses the new Immigration Screen instead of the standard Europe Screen
    At the moment the All Civs that do not start on Water can get Immigrants from nearby villages. I plan to change this so that Civs with TravelCommandType > = 1 can get Immigrants this way, whether they start on water or not.

    All this options, when fully implemented, will allow us to set up LeaderHeads to have different play styles and or objectives.
     
  6. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Haha turns out it was the candle that threw me off the scent of the tech tree in my last glance at it :D

    I have now made a quick sketch of it, next step is to put it into a table and then start thinking about filling out the other eras to a similar size. Then working out where to put all the unlocks and abilities from techs!

    "Monkey swaps hammer for pen!"
     
  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ah, sounds like you need some training in sleuthing, you should head on over to the Spies and Espionage thread for some incite :)
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    The Vikings are once again playable, but they need testing for all interaction with the Viking King. At the moment my goal is to make sure the Vikings are bug free, get familiar with the new subprofession system, as well as work on the Building and unit demands.
     
  9. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    Hi Kailric,

    I'm trying to update the 2071 branch to use the current M:C interface version with your updated trade screen logic etc. I merged the current Assets/Python contents and the current CIV4ArtDefines_Interface.xml from github M:C master branch, and updated the dds files for top buttons to what they point to. It loads ok, but on starting a new game I get the following callback and no top buttons on the interface.

    Also, my goal is to let the "Earthling" civs use a standard "Earth" Europe screen to trade with and pick up colonists from (which I guess is what Vikings will eventually do in M:C?); and then maybe use your system to add a few "special" trade screens like Mars Combine, Luna, and Progenitor Homeworld that players can unlock later in the game, which can be accessed through normal "wormhole" Sail-to-Europe plots. I'm now setting the civs to:

    <iVictoryType>1</iVictoryType>
    <iTravelCommandType>0</iTravelCommandType>
    <iEconomyType>2</iEconomyType>

    in leaderheadinfos, is this the correct approach or should I use a different Viking-specific option, or is this still under development?
     
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I am not sure about your errors, Nightinggale may can help you there. The "Earthling"s should work just like the Vikings then, they are pretty much done, but you never know if there are still some lingering errors.

    The settings for Vanilla like trade screens should be...
    Code:
    <iVictoryType>0</iVictoryType>
    <iTravelCommandType>2</iTravelCommandType>
    <iEconomyType>1</iEconomyType>
    Edit: In the Current M:C mod the Vikings start with access to The Motherland (aka Vanilla Europe). However, I modified the Yields that can be bought there in the Yields xml so they are quite limited at the start, until they unlock the spice route. Each trade screens yields price and ability to purchase can be modified in the Yields.xml
     
  11. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Hey Kail, I keep getting this error recently in my WH version, I am fairly certain it is because I forgot to add a change somewhere, after losing my original attempt, I am just not sure where in the setup 'steps' this is missing from. I was wondering if you might know from looking at it, otherwise I will just go back through the tut. step by step to find the missing link! :)

    File: CvGlobals.cpp
    Line: 3769
    Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
    Message: info type TRADE_SCREEN_EURO_ZONE_MARKET not found, Current XML file is: xml\Units/CIV4FormationInfos.xml

    Can't find enum python error as well.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Ahh good. A problem not adressed to me. I will just ignore it.
    :hide:

    .
    ..
    ...
    OK fine.

    You use TRADE_SCREEN_EURO_ZONE_MARKET, but you never defined it as a type anywhere. Using it as <Type> will make the string turn into an int, which is the index in the file in question. Without knowing the index the conversion from string to int fails.
     
  13. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
  14. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I've added a new TradeScreensAllowed xml tag to LeaderHeadInfos in the CivicEffect branch. This will allow you customize what Trade Routes each Leader can have access to. The default is True for all Trade Screens (EuropeTypes), so you set this to 0 to disallow access.
    Code:
    <iVictoryType>1</iVictoryType>
    <iTravelCommandType>1</iTravelCommandType>
    <iEconomyType>2</iEconomyType>
    <TradeScreensAllowed>
            <TradeScreens>
              <TradeScreen>TRADE_SCREEN_MOTHERLAND</TradeScreen>
              <bValid>0</bValid>
            </TradeScreens>
    </TradeScreensAllowed>
     
  15. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
  16. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I have this idea where instead of Trade Screens being preset, you actually discover them randomly. "Europe" tiles would be placed as normal but these tiles allow your units to go on Missions to discover new trade routes. Then Trade Screens are discovered randomly. While on a mission your units can not be accessed, but when they return there is a chance they have discovered a new Trade Route. There is also a chance the units do not return (lost at sea), or return damaged, blown off course, or return laden with goods from a new Trade Route. There would be land and sea missions for new Trade Routes. This would work best when there are more Trade Routes in the game. Techs and such, along with unit Promotions can determine the chance of success.
     
  17. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Yeah, that's sounds pretty cool for WHM.

    You could potentially have multiple trade screens for each 'continental area' so it could be a bit like the local barb town markets, where it has one 'foreign' resource at a really good price, and one 'domestic' resource that they pay good money for.

    It would be really good for the expanded promotions, where traders or explorers would get better at mounting expeditions, and focussing your resourcs on exploration can net you the reward of new locations for trade oppurtunies.

    Also if there are a lot of these screens 'available' they could be a lot more volatile and fluctuating (with things like natural disasters, as well as buying and selling effecting prices) so that having a 'diverse portfolio' of trade screens that you have found and have access to being much more important for a trade empire, so if one market crashes, you can survive it by shifting to others.

    It could also give more 'power options' for trade and exploration FF's (or whatever they will eventually be) where they can add boosts to land or sea exploration, price support etc.

    One thing I would like to see, is making the access points for trade screens much smaller, so instead of being the full length of the screen, making them more like 'boxes' that lead to them, either because they are a particular trade hub, like an on map city, or a mountain pass (so tiles all around are too mountainous for any meaningful quantity of people or goods to be moved) or like the trade triangle of america, africa, europe, that needed the favourable winds of the north and south to make those long sea journeys possible.

    This way you can (especially when the crime/banditry elements are introduced) focus your more nefarious energies into specific areas, to maximise the damage.

    You can ofcourse also focus your defensive energies in these 'hot spots' as well, leading to a lot more naval skirmishing between pirates and escorts and land skirmishing between bandits and patrols.
     
  18. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yes, all good additional ideas. For the "Exploration for new Trade Routes" mission the success chance could be based on the Supplies given to the Expedition. More than one Unit can go on the same mission to increase the chance and supplies such as food, weapons, etc help to increase the chance. And if your Expedition has goods like Wine they can award bonus exotic goods or gold.

    With the ability to have Trade Screens spawned on the fly in the dll (thanks to Night) we have lots of options we can add to customize each Trade Screen.
     
  19. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

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

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Did I do something great and then completely forget about it? It wouldn't be the first time but I really don't recall doing much for trade screens, other than hardcoding them to max 32.
     

Share This Page