Announcement

Collapse
No announcement yet.

PROJECT: Modding / Scenario Structure

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

  • PROJECT: Modding / Scenario Structure

    I think the time has come to report some real good news about the Apolyton Edition (and to let you know I am not only crashing the playtest): In general, the scenario structure now works as originally intended / advertised. And this makes modding a lot easier:
    • It's easier to keep the overview since you only need to put the files into the scenario folder which actually contain modifications.
    • It's easier to use different units / tiles / graphics since you may put into the scenario folder whatever you need without the risk of overwriting original files or files that belong to other mods.
    • It's easier to test and maintain different versions of a mod: you just need to copy the entire scenario folder and you have a new sub-scenario available.
    • And of course it's much easier for the player to select and play your mod using an in-game menu without the hassle of installing a separate program and carefully copying files into the default data folder (with a good chance of screwing up something ).


    As far as my testing goes, I think I am able to say that all modified database files are properly loaded and used by the game and all SLIC is working as usual (with the usual unpredictable outcome, of course ). All sprites and graphics (including TileFile) are properly loaded and used, too.

    The only remaining issue is that the soundfiles in the scenario folder (e.g. \scen0000\default\sound) are simply ignored. If you put them into \ctp2_data\default\sound they are used.

    Generally I would consider the Apolyton Edition playtest/beta version being more stable and much faster than the 1.11 version (I am testing my mod with a lot of SLIC on 140 x 280 ultragigantic maps and in the -- rare -- moments when my SLIC is clean the game runs really fast).

    As for clean SLIC: The Apolyton Edition, as I have already mentioned in the playtest thread, is a bit more demanding -- as far as I could notice specially concerning return values of functions/event handlers. It seems to be essential to evaluate the returned values of int-functions -- changing all function calls like e.g.

    Code:
    GetCityByIndex(player, index, cityvar);
    // do everything else
    to
    Code:
    if(GetCityByIndex(player, index, cityvar)) {
    // do everything else
    }
    seemed to solve a lot of problems I had.

    Similarily it seems to be a good idea in pre-EventHandlers that
    Code:
    return STOP;
    also to
    Code:
    return CONTINUE;
    if the conditions for stopping the event are not met.

    Anyway making a mod fit for CTP2 AE is a good opportunity for cleaning up / overhauling the code .

    So to resume this initial post: I want to encourage modders to start converting their Mods to the Apolyton Edition Scenario Structure and to report their experiences in this thread.
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

  • #2
    Awesome. but this may be a dumb question. If we have it in our scenario folder you actually have to have a saved scenario there right. You just cant start a new game within a scenario folder right? meaning i cant just have a mod in there and start with the mod settings.

    as you can tell i havent messed with scenarios much but intend too.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • #3
      Ahhhh, that's the most awesome aspect of the working scenario structure: Now you can just put in the modded database files, SLIC-files and "game materials" and the player will be able to start a "regular" (random map, using the settings from the options menu) but modded game:

      just have a mod in there and start with the mod settings
      Yeah, that's it! You do no longer need to put a savegame in (and actually you shouldn't if you just want to provide a mod)! That's the way modding should have worked from the beginning.

      P.S.: Of course you may still use the scenario structure to actually provide a scenario (with a pre-made map, civs, starting positions etc.) .
      The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

      Comment


      • #4
        excellent, I'm going to test it out soon. but I'm assuming it uses the preferences in the profle/last new game for your choice of civ and number of players right. You cant change that in the csenario screen right?

        this should be in the ctp2 bureau...
        Formerly known as "E" on Apolyton

        See me at Civfanatics.com

        Comment


        • #5
          BureauBert,

          Another stupid question. I created a scenario folder and the scen000 folder add a scenario.txt and an ico. but the cenario doesnt come up as an option. What do i got to do to get itin the scenario folder?
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment


          • #6
            In your main scenario/mod-folder (e.g. \Civ3Mod\ ) you need a packlist.txt -- as an example:

            Code:
            The Name Of The Mod
            Some short description
            1
            The number in the last line indicates the number of secenario versions (= the number of scenXXXX folders) -- the game needs this indicator to recognize the scenario folders.
            You also need a packicon.tga. I am not sure if you also need to put the empty files Activision.txt and error_msg.txt in (I did so in order to avoid avoidable trouble ).

            In each scenario folder (scen0000, scen0001 etc.) you need a scenario.txt -- another example:

            Code:
            The Name Of The Mod (or: The Name Of The Version)
            Subtitle, Version, Whatever
            Some description of this scenario/mod version
            And you need to put a scenicon.tga into these folders.

            Within the scenXXXX folders you may reproduce the folder structure usually found under \ctp2_data\. The game should load files found in the scenario folder and it's subfolders from there and the rest from \ctp2_data\ and it's subfolders. And generally it does so except for soundfiles (the remaining bug I reported above).

            It might also be helpful to take a look at the existing scenarios like the Alex scenario. But remember NOT to put in a savegame.c2g if you want to provide a MOD (as opposed to a "real" scenario).
            The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

            Comment


            • #7
              Thanks! Got it working. Next time I release my Civ3mod it will be as a scenario.

              Gues we ought to get work on converting some old mods
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • #8


                Although I usually don't tend towards optimism I am still hoping that the release of an "almost final, as good as bug free version" of the Apolyton Edition could be a motivation for the authors of existing mods to get back to their creations, convert them to scenarios and adapt them to the AE (some database modifications, SLIC as described above).

                Of course, with the new modding features available (some very useful variables, functions and db-flags introduced by the Source Code Project and documented here) the authors could take the conversion work as an opportunity to revamp their creations, abandon obsolete workarounds, improve code performance, and maybe even introduce new features they always wanted to have in but were unfeasible with the original game.

                The game itself is performing much better and (eventual remaining bugs being fixed -- but this can be done now and thanks to at least two people still working on the source code it actually is done -- many thanks to you and Martin) more stable than the 1.11 version.
                The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                Comment


                • #9
                  Although I wish there was more here, I'm really happy with how the AE is turning out. granted I'm making the game to my liking so I better like it!

                  I reported this to Apolyton News, hopefully that will get the call out, but Locutus has been dissing us lately
                  (Maybe weshould approach him about passing on some of the responsibilities)

                  My first crack is trying to get AoM3 into the scenario structure. we might get some people to cross over to AoM once they know that even AoM isnt using everything that AE now provides.

                  Do we have icons for CtC and Cradle to start putting into the scenario structure?
                  Formerly known as "E" on Apolyton

                  See me at Civfanatics.com

                  Comment


                  • #10
                    icons for [...] Cradle
                    I think this one could be easily adapted:



                    More Mods and their respective icons can be found in the directory

                    we might get some people to cross over to AoM once they know that even AoM isnt using everything that AE now provides
                    Well, I think Stankarp and his co-authors could/should be interested in crossing over to the Apolyton Edition since it's already a better environment for such a large modification and still getting better . Granted the "migration" needs a lot of work, but IMHO noone can expect all the work being done by three people , therfore the only realistic way to get the existing Mods running under CTP2 AE will be the original authors getting involved. Of course I am willing to help where I see fit to help -- I am already trying by providing some info here and there .
                    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                    Comment

                    Working...
                    X