Announcement

Collapse
No announcement yet.

[Mod] Tradeable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Mod] Tradeable

    The Tradeable mod is designed to make it easier to tell for which resources you have extras. This makes it easier to make resource trades with other Empires.

    More specifically, it will separate the resources on the 'Resource' tab of the Foreign Advisor screen into two columns (much like the "Will Trade" and "Will Not Trade" columns). The first column, labeled as 'Surplus' lists any resource that you have sufficient to trade (that is, more than 1 of, after other trades are considered). The second column, labeled as 'Used' lists the resources that you currently only have 1 of (again, after other trades are considered - if you have 4 of a resource, but are trading 3 already, you only have 1 available).

    Note, this mod has no impact on the actual trade screen.

    As always, this should go in "My Documents\My Games\Civilization 4\", not your Civilizations "Assets" folder.

    Note: The v1.52 patch introduced a system to display duplicates by displaying an icon for every resource (ie, if you have 3 corn, it will display 3 corn icons). I still consider that system to be inferior to this one, but if you prefer that one, you can stop using this mod.

    History:
    v0.5
    - Updated to work with v1.52 patch

    v0.4
    - Updated to work with v1.09 patch

    v0.3
    - adjusted the display so that both Surplus and Used resources are displayed, but separated into two columns

    v0.2
    - was using getNumAvailableBonuses() instead of getNumTradeableBonuses(), which caused it to display any
    resource you had multiples of, even if they weren't available to trade

    v0.1
    - first release

    Bh
    Attached Files
    Last edited by Bhruic; December 27, 2005, 23:56.

  • #2
    Thanks, not being able to tell if you have excess resources is most annoying.

    Comment


    • #3
      With your permission I'll put this into my mod- seems like a good idea.

      credit to you of course

      Comment


      • #4
        Can't get it to work: Failed to load cveventinterface. ANy ideas?

        Comment


        • #5
          EventInterface? It doesn't use CvEventInterface. It's entry point is from CvScreensInterface. Are you sure the error is caused by this mod?

          Bh

          Comment


          • #6
            Ok, I got it to load right- but I'm not seeing any changes in both saved games and new ones... hm. I wonder what's different at my end.

            Oh. What do you mean by saying it uses the inheritance model in your first post- maybe I'm goofing up something on that end- can you point me to a thread that covers that so I'm up to speed?

            I'd REALLY like to get this mod working for me so I can integrate into my game.

            Comment


            • #7
              I uploaded a new version (minor change), so you'll want to get that one.

              But specifically, the inheritance model is pretty simple. The files in 'entrypoints' tell the game where to look to get the various classes. The CvScreensInterface.py file I include tells the game to look at my CvCustomForeignAdvisor.py file instead of the normal CvForeignAdvisor.py file. Of course, the CvCustomForeignAdvisor class is a subclass of CvCustomForeignAdvisor - so I don't have to duplicate all of the functions, they already exist. All I have to do is override the function(s) that I want to change (in this case, the drawPossibleDeals() function). It, in turn, calls the function from my Tradeable class.

              If you don't have any other mods that affect screen display, you should be able to just drop the files in the proper directories and have it work.

              This thread is the one that originally dealt with the inheritance system.

              edit: Link fixed - oops.

              Bh
              Last edited by Bhruic; November 15, 2005, 09:04.

              Comment


              • #8
                Are you sure you didn't mean this thread?

                Apologies for self-promotion

                Comment


                • #9
                  Ok, this afternoon I'll try it again. I am using the improved city-advisor Homegrown made, but the files you have didn't overwrite any of his, so I just dropped them in.... didn't seem to take.

                  Comment


                  • #10
                    Update: Modified it so that it displays all the resources like it did previously, but now separates them into two columns (Surplus / Used) to make it easy to distinguish.

                    Bh

                    Comment


                    • #11
                      Wow. That will be nice. RRRG! Wish I was done writing my assessment report at school and could go home.

                      Comment


                      • #12
                        Ok, it's not working for me.

                        I guess what I want to be able to do is just place the python files for this mod into the civ4\mods\assets\python directories where they would be expected to go.

                        I've placed them in the mydocs\blah\blah folders and in the custom assets folders and it doesn't show up in diplomacy.

                        Can't figure this one out- never run into this before.

                        Comment


                        • #13
                          Unless you have another mod that's overriding this one, I'm not sure what the problem is. For me, it's a simple "plug and play" of the files (into CustomAssets, for me). Do you have any other mods that override the CvScreensInterface.py file?

                          Bh

                          Comment


                          • #14
                            With patch 1.09 installed, this mod prevents the Info Screen (F9) from opening.

                            Comment


                            • #15
                              Yup, the easiest way to fix it is to copy over the new CvScreensInterface.py file ("Assets\Python\EntryPoints"), and modify the line that says:
                              import CvForeignAdvisor
                              to
                              import CvCustomForeignAdvisor

                              and:
                              foreignAdvisor = CvForeignAdvisor.CvForeignAdvisor()
                              to
                              foreignAdvisor = CvCustomForeignAdvisor.CvCustomForeignAdvisor()

                              But I'll throw up a new version soonish.

                              Bh

                              Comment

                              Working...
                              X