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
    Apparently so, you don't recall writing CvTradeScreen.cpp:scan:? Trade Screens are their own entity now, we can spawn them at will, and we can add what ever attributes we want.:D
     
  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Oh that thing. Yeah I did write that, but it didn't change anything ingame. It's "just" a feature for modders to have a place to keep data stored both during the game and in savegames. Are we even using that class for anything useful yet?
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yes, we are. All the Europe Infos are converted into a TradeScreen. I can't remeber exactly why we did that but I remeber being really excited about it. With the above mentioned random discoverable Trade Routes we can add a new attribute bRandom to EropeInfos (aka TradeScreenInfos) and when a player discovers a random route it will choose one from the random ones.

    Actually I just remembered why we did that code, so we would have a seperate market for each trade screen. We can also add new things like Weather, Pirate activity, random resources, and units. If pirate activity is high you may want to send along an escort to deter any scallywags.
     
  4. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

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

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    For the next release I really want the current features polished off and working as intended, and the economy well balanced with what we got so far. I also want to add a new Trade Screen, and as Night even suggested we should make them customizable with just having one screen python file. This would be fairly simple just adding xml code for all the differences mostly graphics, name titles, and things like being able to summon units. And now that we can spawn TradeScreens in the dll with their own market we can also cache all the XML values for them as well.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I created a new branch and started working on making a single Python File for the Trade Screens, so far so good. I had to add extra dll functionally to pass arguments to Controls in the game as there was none. Now when the MainInterface is built it will have to loop through all the Trade Screens and place them according to their order in the Loop, placing an argument to let the Control functions know what Trade Screen is being passed to it. Once the Trade Screen is passed to python, python will then use that info to configure the Trade Screen's graphic as well as things like: can you purchase units, does it have a Docks, is there a Transaction screen, etc. We can potential setup any kind of Trade Screen Configuration in the XML by adding new tags.

    When this is done adding new Trade Screens will be as easy as adding a new Unit... I want to add the Gold Coast, ok, just work up some graphics, add the Trade Screen to EuropeInfos, set up the XML, boom you got your Gold Coast. You can then set up Prices in YieldsInfo.

    One question is; we should dedicate one part of the main screen to Trade Screen icons. The Left side is being taken over by Censure Icons, Upkeep info, etc, but we do have some room on the Right side available. However, the Toggle Scores Display also takes up some room on the right side. In my current game there are 13 Players, which would leave room for about 7 or 8 Trade Screen Buttons down the right side, not sure how it would look if there was say, 26 Players.

    We could place the Icons under the Advisor Buttons on the Left Side or Right (I am partial to Right since that is where they have been). That way they will be less likely to underlap the Scores Display. Also, I've shrunk the buttons down a bit so that gives us more room as well. Any ideas?
     
  7. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    That sounds....AWESOME!

    One suggestion with the button placement(It may not even be possible) But how about making some new kind of box in the bottom left that goes along with the 'trade points' counter?

    Then even 6-10 trade screen buttons wouldn't take up that much space.

    It would also make a new 'trade section' for the interface.

    I was just about to go and look to see if there was space there and how practical it would be and my Col. started to crash again....

    I have no idea why it keeps doing this!

    The joys of another reinstall!

    Ok maybe not... second times the charm!

    Ok so it would require moving the unit infor up about but only by a couple centimeters. alternatively it could be placed to the right of the left circle filling in some of the 'Swoop'/'Dip' of the lower console piece.
     
  8. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Once you are done with a feature branch (AI_Trader), it should be merged back into develop. You can then start a new branch from there. Anything else will end up being chaotic.

    Merging AI_Trader is done by switching to develop and then select that you want to merge with AI_Trader. Don't commit the change automatically, but do check that it produce a working merge first.

    I can merge if you like, but you have to commit the final AI_Trader first if I am to do anything.
     
  9. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I'm not done with the AI_Trader saved game yet. I have some significant time and wanted to work out the Trade Screens while the ideas where fresh on my mind. Somehow I have messed up the ability to save games in the Trade Screen branch so am investigating that. If it is fixable I'll merge that into AI_Trader when I am done.

    The Trade Screens branch is coming along faster than I thought it would. I have most of it done already. Just deciding on where the Buttons should go and fixing the save game bug. It may not be present in a new game as I have been loading my AI_Trader game, so will check it out.

    Yeah, I not sure how to move the "unit info up" as you say, there may be a way to do that in the MainScreen.py plot help placement if it exists as that's what is being called. But it is almost to high already as a stack of many units pushes the info up out of the screen.

    What do you mean by "left circle"? You mean the mini map? That could be a fair place to put it, running down the slop of the frame above the next turn button? Although, the next turn button could be resized so they don't touch each other.
     
  10. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    I was thinking in the area marked in red, although it may not be possible.

    There is just a lot of space that I think is unused.

    I think I once figured out how to move the unit info box, when messing with FTTW, but I have unfortunately forgotten how.

    I am fairly sure in was somwhere in maininterface.
     

    Attached Files:

  11. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yeah, I was thinking along the blue edged border in the area, or perhaps the blue border below that under the next turn button there is an area not used.

    I encountered an issue with my initial setup. I couldn't do a quick save of the game because the adding a new attribute to the Dllexport doControl caused some kind of issue that messed up the key presses. So, I had to create my own widget for the TradeScreens, but alls working now. We can place the buttons where ever we like.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    DllExport mean the exe calls this function meaning you are not allowed to modify the arguments at all or weird stuff will indeed happen. Or can happen. Please don't do that again.

    I have plans for a script, which verifies that the functions the exe will call are indeed as they should be. That script will also remove the DllExports, which the exe will never call. Modders tend to add those for no reason, but more surprisingly the same is true for vanilla.

    Another thing, which might cause issues is adding to enums. Some enum values are hardcoded in the exe. To get around that issue, add new values to those AFTER the vanilla values.

    I really wish that we had some documentation for the exe API and/or the API to be more clean, but we have to work with what we have.
     
  13. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    sounds awesome :) I don't think you need to plop an icon down for every single trade screen though, just have one for trade screens (maybe along the top with the vanilla Europe screen button) and when you click it it pops up a menu you can select from.

    Also, because Trade Points screen is essentially just a different type of Research points mechanistically speaking, it could be cool to just let the Research screen have different tabs for different types of research kind of like FF screen does; you can use tabs to flip between them and would need only 1 button on the main interface. (anything results in streamlined interface with less buttons will help keep things from looking too busy/overwhelming etc)

    One cool new option for trade screens would be to let you mod them so a civ can control access to it (your parent King civ, or a civ you specify). Then you'd have to maintain diplomatic trade access with that civ or lose access to that market. :gold::king:
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I like that idea. Just one button for trade screens and when you click it, you get the one you viewed last (or the one with a unit or whatever we decide for default). In each trade screen, there is a row of buttons to switch between them.

    Speaking of research types, I plan to add an XML for that purpose once I'm done with the tag grouping because I plan to demand the XML to set a research category for each invention and naturally the categories will have to be configured in XML. The effect of each will come later, but presumably from a DLL point of view, it will be a civic tag, which can increase/decrease the number of :science: needed to research an invention. The code needs to support both ways as it can be used to make a trait, which gives -10% in one category and +10% in another.
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, we do have room at the moment so I still like having all the TradeScreen buttons up all at once. Saves you one click and a scroll to find the TradeScreen you want each time. Wait till you get to use the Resource Bar right click menu for each individual yield (You can even place Yield Portraits there now as well). You can set all its attributes in that one menu. It beats having to click the Governor button, click export/import, scroll to find your Yield, and then finally select your options.

    This is a good idea actually, but would be way down on my todo list.
    I do like the sound of this. Hmm, this reminds me of my current history studies.To parphrase my book...

    We could implement game mechanics that simulates this effect. Where you can build up Trading Posts at TradeScreens perhaps, and require others to pay taxes. This could be a means to Tax the TradeScreens and of course a reason to declare war! Some cool stuff to ponder on...bed time:salute:
     
  16. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    My Plan for controlling trade routes in WHM was to make the access points of various continental trade hubs 3x3 squares, and then their would either already be a city, or you could build a city and literally control the access to them.

    A bit like how games like Empire Total War Do it, where each continental area has 3 or 4 hubs that you can control with ships, this would give that real Colonial rush moment where everyone is running to be the first to grab a hub!
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    To better help the player keep track of what Units he may have at each trade screen I think we could add a little Unit Counter out next to each Trade Screen icon (or somewhere else appropriate) that details how many units are currently visiting that trade screen. Maybe three values, Inbound/Arrived/Outbound.
     
  18. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    How's this for a Spice Route screen? I took a screenshot of an Anno 1404 Orient city. I bet there are many shots we could take in that game to perhaps setup some cool looking Trade Screens. I tried to mimic the shot angle of the Europe Screen they use in mods like R&R.

     

    Attached Files:

  19. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,446
    Location:
    Stuttgart, Germany
    Europe background graphics for Winter and Summer (TAC and RaR) and background graphics for Africa and Port Royal (RaR) have been especially created by befriended graphical modders.
    (Also former members of TAC Team.)

    Such especially designed background graphics will give much better results than trying to work with screenshots or other images.
    (Of course they require lots of skills and time to be created.)

    Actually there are still several skilled 2D graphical artists around in the forums.
    (Although the "old masters" of 2D graphics like Fankman or Willi Tell are not as active anymore as they used to be.)

    If you ask them nicely they might be willing to support.
    (They often enjoy creating such graphics.)
     
  20. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

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

Share This Page