Announcement

Collapse
No announcement yet.

[MOD] Unit Upgrades 'Pedia Mod

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

  • [MOD] Unit Upgrades 'Pedia Mod

    Version 1.1
    Changes:
    - Improved the arrow drawing algorithm. Now the view should be less cluttered.
    - Removed all the unnecessary code from the library that the mod depended upon. This cut the size of the mod from ~300K to ~30K
    - Moved the arrow drawing code into a new file, so that if arrow drawing is changed again, there will be no need to merge existing files, just overwrite the files introduced by the mod.

    Version 1.0 Removed after 205 downloads.

    This mod will add a new page to the civilopedia, displaying the unit upgrade paths.

    It is inspired by this here diagram:

    I have found it annoying to trace the upgrage path of some units so I put it all down on a chart. Some of the upgrade paths are no brainers such as tank to modern armor and some are long such as warrior to mechanized infantry.


    I thought it was very useful and wanted to add a screen to the pedia that does that automatically. The results of my first attempt are shown below:



    Mouse over unit portraits to get additional unit info. Click unit portraits to go to the detailed 'Pedia entry on the particular unit.

    The view is kinda convoluted, but this is generated automatically, so it will be updated if another mod is applied. Also, I used a very simple graph layout algorithm I wrote myself to put the buttons on. So if you can find an open-source algorithm that works better and is written in Python, feel free to tell me. I might incorporate it into the mod.

    Credits go to the NetworkX library, which is what I used to generate the upgrade graphs. (And whose layout algorithms unfortunately depend on a library written in C and I couldn't get pyd files to load, so I ended up rolling my own ...)



    Enjoy.

    PS: Installation instruction are available in the mod readme.
    Attached Files
    Last edited by vovan; December 28, 2005, 13:33.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  • #2
    Wonderfull idea, this will definatly help improve the Pedia. I have already been noticing that its hard to figure out the upgrade paths the Unit Screen, you dont get the whole overview and constantly need to click back. I am curious how you will resolve merging/spliting upgrade paths.
    Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche

    Comment


    • #3
      Vovan,

      Did you add a CivilopediaPageType to get that Unit Upgrades page? How exactly did you do that? I was trying to do something related with buildings but I seemed to need to add a CivilopediaPageType and I couldn't find where I needed to add it.

      Comment


      • #4
        Fantastic, the civopedia needs alot of work and anything you do here will help future development
        ~I like eggs.~

        Comment


        • #5
          Originally posted by Impaler[WrG]
          I am curious how you will resolve merging/spliting upgrade paths.
          With magic! Actually, I've already coded up an algorithm that does a decent enough job of this. Not perfect, but works for first release. Only thing left now is to draw the arrows.

          /me stares at the tech chooser screen code to figure out how arrows work.

          Originally posted by platypotamus
          Did you add a CivilopediaPageType to get that Unit Upgrades page? How exactly did you do that? I was trying to do something related with buildings but I seemed to need to add a CivilopediaPageType and I couldn't find where I needed to add it.
          No, I didn't have to change CivilopediaPageTypes enum (I believe you can't actually change it; at least I could not find it in any of the python files, so I think it may be hard coded). I had to change the self.mapCategories and self.listCategories in CvPediaMain, and that's pretty much all.

          Originally posted by ghen
          Fantastic, the civopedia needs alot of work and anything you do here will help future development
          XBox Live: VovanSim
          xbox.com (login required)
          Halo 3 Service Record (I fail at FPS...)
          Spore page

          Comment


          • #6
            Excellent. I encourage you to put this together. I would certainly like to use it.
            One of these days I'll make 501 posts, and you won't have to look at my silly little diplomat anymore.
            "Oh my God, what a fabulous room. Are all these your guitars?"

            Comment


            • #7
              First version of the mod released. See OP.
              XBox Live: VovanSim
              xbox.com (login required)
              Halo 3 Service Record (I fail at FPS...)
              Spore page

              Comment


              • #8
                That is beautiful Vovan, and I look forward to installing it when I get home today.

                Comment


                • #9
                  Cool! My only reservation is it will screw up Sevo's mod by overwriting the main page .py file, right? Can you post the text I would need to add to Sevo's mod manually? I think you can do that here with the [php] tag.

                  Is there a way to change arrow colors so they differ from each other and are easier to track?
                  ~I like eggs.~

                  Comment


                  • #10
                    If you look at the python file in question, all the places where I added or replaced code are clearly marked.

                    Vovan
                    XBox Live: VovanSim
                    xbox.com (login required)
                    Halo 3 Service Record (I fail at FPS...)
                    Spore page

                    Comment


                    • #11
                      Okie dokie Thanks.
                      ~I like eggs.~

                      Comment


                      • #12
                        looks nice, but I was wondering could it be possible to have the X axis sort units by Tec level sor for example the GunShip apears far to the right with units like SAM infantry rather then underneith units like Rifleman.

                        Along the same line of though, place a row of all the games tecnologies that provide acces to a unit along the bottom of the screen, arange them in order from lowest to highest tec cost. Then place all units that require that Tec above it (if units require multiple tecs use the Tec with highest cost). Now we would see a very nice cronological listing of the units and imediatly see what is more and less advanced.
                        Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche

                        Comment


                        • #13
                          For arranging units in chronological order more or less sounds doable. I'm not sure if it would look good, but I will look into it.

                          As far as displaying techs below units, I think it would make the already convoluted view even more cluttered... I think it would make it more confusing that it needs to be. Plus, I'm pretty sure you can see that information when mousing over the unit portraits.
                          XBox Live: VovanSim
                          xbox.com (login required)
                          Halo 3 Service Record (I fail at FPS...)
                          Spore page

                          Comment


                          • #14
                            Vovan-- Wow...this looks great, and it's incredibly useful as there's no good place to see this informaion. With your permission I'd like to include this in my improved civilopedia.(improved civilopedia mod)

                            Between the group of us we'll actully make this civilopedia useful!

                            Comment


                            • #15
                              Sevo,

                              I think your mod is excellent. I actually wanted to do something similar, replacing the picutres with text, etc. Feel free to include my changes in your mod, like the README file says.

                              I believe you shouldn't have any problems incorporating my mod into yours. Like I said above, the three or four places where I changed the original file are clearly marked: just search the file for "[MOD]" (no quotes), and you will find all these places. Everything else lives in it's own set of files.

                              Good luck.

                              Vovan
                              XBox Live: VovanSim
                              xbox.com (login required)
                              Halo 3 Service Record (I fail at FPS...)
                              Spore page

                              Comment

                              Working...
                              X