Announcement

Collapse
No announcement yet.

DESIGN: Modding Features Requests Thread

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

  • DESIGN: Modding Features Requests Thread

    I think this is the first time I am opening a new thread and it's also the first time I dare to "request" a modding feature:

    E has added the database flags CivilisationOnly, CityStyleOnly and CultureOnly.

    He obviously intended to add GovernmentOnly as well, but somehow didn't. Well, ... I would like to have it

    I don't like the original GovernmentType flag because it makes the units just disappear when the governemt is switched, which seems a bit "unrealistic" (even fascists unfortunately didn't just disappear after WW2, as we know -- the vast majority of them were absorbed by the democratic, post-war institutions, including armies) and weakens the AI, which doesn't have the means to prepare for the switch.

    Due to these considerations I am using the mod_CanCityBuildUnit() function for gov-spec units in my humble Mod, but I am afraid this will not work so well with the new unit upgrading mechanism: I assume it will be possible to upgrade to the next best unit technically available even if it couldn't be built in any of your cities -- which might be an issue to take care of apart from my government-specific application).

    Anyway a flag would be more elegant ...
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

  • #2
    Originally posted by BureauBert View Post
    I think this is the first time I am opening a new thread and it's also the first time I dare to "request" a modding feature:

    E has added the database flags CivilisationOnly, CityStyleOnly and CultureOnly.

    He obviously intended to add GovernmentOnly as well, but somehow didn't. Well, ... I would like to have it

    I don't like the original GovernmentType flag because it makes the units just disappear when the governemt is switched, which seems a bit "unrealistic" (even fascists unfortunately didn't just disappear after WW2, as we know -- the vast majority of them were absorbed by the democratic, post-war institutions, including armies) and weakens the AI, which doesn't have the means to prepare for the switch.

    Due to these considerations I am using the mod_CanCityBuildUnit() function for gov-spec units in my humble Mod, but I am afraid this will not work so well with the new unit upgrading mechanism: I assume it will be possible to upgrade to the next best unit technically available even if it couldn't be built in any of your cities -- which might be an issue to take care of apart from my government-specific application).

    Anyway a flag would be more elegant ...
    Could you use the GovernmentModified method?

    I'm not sure if it's implemented in all files yet, but it's working in some. I would have to check, probably fix up units.txt first. I'm also not sure how to access a government modified record from slic...
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

    Comment


    • #3
      Originally posted by BureauBert View Post
      I think this is the first time I am opening a new thread and it's also the first time I dare to "request" a modding feature:

      E has added the database flags CivilisationOnly, CityStyleOnly and CultureOnly.

      He obviously intended to add GovernmentOnly as well, but somehow didn't. Well, ... I would like to have it
      Why don't you add it?

      Originally posted by BureauBert View Post
      I don't like the original GovernmentType flag because it makes the units just disappear when the governemt is switched, which seems a bit "unrealistic" (even fascists unfortunately didn't just disappear after WW2, as we know -- the vast majority of them were absorbed by the democratic, post-war institutions, including armies) and weakens the AI, which doesn't have the means to prepare for the switch.
      I agree that we should change this one possibility would be to change the GovernmentType flag so it works this way or we add a new flag. The latter wouldn't affect mods.

      Originally posted by Maquiladora View Post
      Due to these considerations I am using the mod_CanCityBuildUnit() function for gov-spec units in my humble Mod, but I am afraid this will not work so well with the new unit upgrading mechanism: I assume it will be possible to upgrade to the next best unit technically available even if it couldn't be built in any of your cities -- which might be an issue to take care of apart from my government-specific application).
      There shouldn't be a problem upgrading any units.

      Originally posted by Maquiladora View Post
      Could you use the GovernmentModified method?
      Not very elegant and I doubt that it does what BureauBert wants to do.

      Originally posted by Maquiladora View Post
      I'm not sure if it's implemented in all files yet, but it's working in some. I would have to check, probably fix up units.txt first.
      Government modified should work for units.

      Originally posted by Maquiladora View Post
      I'm also not sure how to access a government modified record from slic...
      Not at all.

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #4
        Originally posted by Martin Gühmann View Post

        Not very elegant and I doubt that it does what BureauBert wants to do.
        Yeah, I guess he would have to add a new full unit entry for every gov modified one? That would be awkward.

        Not at all.
        That's a good reason not to use it by itself.
        Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
        CtP2 AE Wiki & Modding Reference
        One way to compile the CtP2 Source Code.

        Comment


        • #5
          Could you use the GovernmentsModified method?
          Well, it's getting close to what I want to do: introduce a unit with different stats that is only available during a certain government, does not disappear when the government is switched, and may be upgraded to whatever is available at the time. If the description of GovernenmentsModified holds true, it should even be possible to define a different sprite for the unit (via DefaultSprite). There only remains one disadvantage of this concept: As soon as the player switches his government all his gov-spec units would "mutate" into their "regular" (or next government-specific) variants. If I introduced let's say a "soviet" tank (weaker but cheaper), everything would work well until the player leaves communism: at this point all his "soviet style" material would turn into "regular" material, which seems a bit awkward -- I'd prefer the player to keep his "soviet style" material until he eventually upgrades it to whatever is available at a later time.

          one possibility would be to change the GovernmentType flag so it works this way or we add a new flag. The latter wouldn't affect mods.


          Why don't you add it?
          Fair question! The only answer being that I already spend too much time on modding, and updating the Bureau

          I just recently browsed the source code in the search of new modding features I might have missed, and I managed to find the file where new SLIC functions are defined. I still have no idea how events are exposed to SLIC, and where DB flags are defined

          BTW, the GovernmentsModified page could need some eventual update

          There shouldn't be a problem upgrading any units.
          I don't think there is a general problem with the upgrading. Also, it's not only a matter of government specific limitations. The general question is: If a player is unable to build a certain unit in any of his cities (because of general, player-specific as opposed to city-specific conditions in mod_CanCityBuildUnit()), should he still be able to upgrade to this unit? I am not entirely sure how to answer this question, but I tend towards a "no" -- the current answer of the game seems to be "yes" .
          The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

          Comment


          • #6
            Originally posted by BureauBert View Post

            I just recently browsed the source code in the search of new modding features I might have missed, and I managed to find the file where new SLIC functions are defined. I still have no idea how events are exposed to SLIC, and where DB flags are defined

            I can offer one expert C++ copy-paster's opinion: do a search in the code for something similar that is already implemented, and copy it.

            BTW, the GovernmentsModified page could need some eventual update

            I'm not sure what works and what doesn't with this. I tried modifying the vision of a warrior some time ago but there were problems with updating the vision. Some thorough testing is needed at some point.

            BTW I added GetStoredProduction to the main part of the wiki by accident. I apparently don't have the power to remove it, so please remove it when you get the chance.

            If a player is unable to build a certain unit in any of his cities (because of general, player-specific as opposed to city-specific conditions in mod_CanCityBuildUnit()), should he still be able to upgrade to this unit? I am not entirely sure how to answer this question, but I tend towards a "no" -- the current answer of the game seems to be "yes" .

            Without thinking too much, my answer would also be "no".
            Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
            CtP2 AE Wiki & Modding Reference
            One way to compile the CtP2 Source Code.

            Comment


            • #7
              Adding DB flags is really easy.
              "

              Comment


              • #8
                do a search in the code for something similar that is already implemented, and copy it
                You are certainly right, but as for now I have decided to limit my activities to a somewhat reasonable amount. As I stated above I am already spending more time on modding and such than I should -- and I am still hoping to release an almost-final-beta version of my Mod as soon as I am able to test and refine all modifications with an almost-final-beta version of the AE. *)

                Some thorough testing is needed at some point.
                Well, at some point I will hopefully get around it

                added GetStoredProduction to the main part of the wiki by accident
                Don't worry! Actually you didn't add it, the script did it as a result of my screwing a template up while trying to (unseccessfully) implement the modifcation you had requested -- it's fixed

                *) After having added 100 modern civs I am currently working on a couple of new city styles ("African": completed, "Slavic/Balcanic": in the works, and I collected/"organized" the material for some other styles but am yet to decide which ones I really need ...).

                SLIC-wise I have a satisfying version of BetterSettling, a not-so-satisfying version of Frenzy 2.x (which I will probably drop in the end), a technically working version of MergeCivs, Pillbox & Barbed Wire (includes making the AI build them), the latter containing the basic techniques for adding a Missile Silo, and some minor SLICs ...

                I am still stuck with "emancipating" the AI from their "leader personalities" regarding their choice of governments.

                I'd like to "de-localize" wonders that are strongly related to a location, because I always found it a bit annoying to build the "London Exchange" in Paris and the "Temple Of Karnak" in a city other than Karnak.

                And finally I had some ideas to make good old barbs a bit more interesting (and not merely the annoying "bad guys") ... ah yes: and I want to make the nuclear threat a bit more interesting, too, and I need to reconsider all the units I added some years ago ... and some other things ...
                The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                Comment


                • #9
                  I think I added it. Only tested it once though.
                  "

                  Comment


                  • #10
                    Thank you! I will give it a thorough testing.
                    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                    Comment


                    • #11
                      I assume your silence means its working?
                      "

                      Comment


                      • #12
                        I assume your silence means its working?
                        My silence means I am waiting for the new playtest version ...

                        But I am prepared to crash-test it immediately upon release ...
                        The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                        Comment


                        • #13
                          Oh. I thought you were in the l33t compiling posse.
                          "

                          Comment


                          • #14
                            1 b just @ humbL3 pL4yt3st3r w1th0ut 4ny l33t-4mb1t10nz >>
                            The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                            Comment


                            • #15
                              "

                              Comment

                              Working...
                              X