Announcement

Collapse
No announcement yet.

Making Cradle 3+ fully compatible with the Apolyton Edition

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

  • Impressive work Kull
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • Originally posted by Ekmek View Post
      Impressive work Kull
      A compliment indeed, coming from one of the Source Coders! If you ever get the itch to take another look at the code, I can provide a list of several proven bugs!
      To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

      From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

      Comment


      • Apologies for the long stretch of inactivity, but I was engaged on completing an important piece of a different, even larger project involving another game. With that submitted, it's time to re-engage here, and we'll begin with something that's fairly uncomplicated, but important in terms of adding depth and improving immersion:

        City Names & Numbers: Cradle has 33 civilizations, and originally included 1163 cities (about 35 each). That's probably fine if you are playing on a smaller map or with a large number of civilizations, but on a gigantic map it doesn't take long before the names run out and you start to see cities with names like "Athens2" or "Rome2".

        Exacerbating the problem is the large number of duplicate city names, which is almost inevitable when you have a variety of ancient civilizations occupying the same geographic region. For example the heartlands of Sumer, Babylon, & Assyria were all located in modern day Iraq, and historically they owned many of the same cities. And we see the same sort of thing with Shang/Han, Turks/Hittites, Rome/Etruscans, Greeks/Macedonia, etc.

        Rather than address this as a single project, I've been "working the issue" from the beginning, usually dealing with one geographic group at a time, often prompted by the appearance of duplicates during the extensive playtesting periods. Anyway, I don't have a firm count of how many were eradicated, but it was a LOT! The most recent exercise involved the Byzantines, who shared city names with their early predecessor Rome, and also with geographic neighbors such as the Turks, Hittites and Arabs. 7 of 45 city names were duplicates (15%), and had to be replaced. At this point I'm confident that while some repeats have undoubtedly escaped discovery, they are few and far between.

        As for the count of cities per civ, that was also addressed, often at the same time. Currently there are 1369 cities for an average of 41.5 per civ. In many respects the increase is even larger, because "popular" civs like Rome & Greece used to have only 35 cities, but now have 50 each. And most of the rest have also grown, from as few as 30 to 40 or 45. All of which improves the immersion factor.
        To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

        From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

        Comment


        • Assassin/Poisoner: One benefit from letting a project sit for a while is that you come back to it with "new eyes", and sometimes what seemed like a finished project is ripe for a little tweaking. In this case, the Assassin and Poisoner units. Or more specifically, their names.

          As discussed in Post #28, the original Cradle Assassin is a military unit who stomps around carrying a Sword and Shield, dispatching foes at the whim of his Leaders, and looking the very antithesis of a secretive "Assassin", operating unseen from the shadows. Which is actually OK, because ancient rulers wielded near absolute power and most didn't seek to hide what they were doing. They employed brutal "Hired Thugs" to carry out their dirty work, and that is exactly what this unit looks like...and is now named as (see red arrow in the attachment).

          With the advent of Monarchy, the Hired Thug is succeeded by the "Poisoner", who certainly has a stealthy appearance. But she lacked one important attribute - her Attack animation used a knife, not the "poison" implied by her name. But now that "Assassin" is available once more, she can be given that far more appropriate name, and in the process she can carry a blade and look a little more sinister in her unit picture (see attached).
          Click image for larger version

Name:	New Assassin.JPG
Views:	200
Size:	48.9 KB
ID:	9450895
          To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

          From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

          Comment


          • Colony TIMP Bug: First, some background. In the original CTP2 game, there is an "End Game" victory option which involves building the Solaris Project Wonder along with two types of Buildings (Gaia Computer & Power Satellite) and a Tile Improvement (Obelisk). In Cradle, this project has been re-purposed as the Birth of an Empire, which essentially equates to setting up the Roman Empire and winning the game as a result. In the original versions of Cradle, the buildings were renamed (Arch and Monument), as was the TIMP (Colony), and they could be built regardless of whether the player owned the Wonder. The buildings have no ancillary benefit (in fact they add a great deal of cost), but the TIMP is quite valuable as it delivers an additional +10 to the food, production, and commerce values of the tile on which it sits.

            The "Colony" build button becomes available with the discovery of "Civic Engineering", and that's where the "bug" first appears. Even when the player has the 7000 PW required to build it, the button remains "greyed out" (see attachment). And the same is true even if the player builds the Pax Romana wonder (which triggers a possible "Birth of an Empire" victory). Interestingly, I found the same to be true in the base-line source code game - Obelisk buttons were not active even when the player discovered the pre-req Advance and had the necessary PW. Further research showed that the same issue affected the two associated buildings. By contrast, there was no impediment to constructing the buildings or the TIMP in non-SourceCode CTP2 games. After a great deal of testing, I finally discovered the problem: The Source Code Team added an undocumented feature - the player MUST own the Solaris Wonder in order to unlock the ability to construct the associated buildings and TIMP. Going one step further, they added a line of code ("StartGaiaController") to the Solaris section in "Wonder.txt". Without that line of code (which was not present in any of the Cradle files), the player will NEVER be able to build any of the structures required for the "Birth of an Empire" victory. And adding it? Made the Bug go away! So, problem solved, right? Well, sort of.

            As I noted earlier, any civilization could construct the buildings or the TIMP, even if they never built the Wonder, but that is no longer the case. These are now "Wonder-owner-only" buildable items, and there's no way to change that since it's hard-coded into the executable. Considered purely in the context of the base game's "Solaris Project", that is not a terrible decision since it prevents the AI from building structures which (absent the Wonder) provide little or no benefit. However it does hurt modding since (as we see in Cradle) it's possible that the buildings and TIMP could be given other uses. And doing this and NOT documenting it? Well, really unfortunate.

            For Cradle 3+ I've added the necessary code to Wonders.txt, which activates the Colony button for the wonder-owner (and not incidentally, makes it possible to achieve the "Birth of an Empire" victory). Additionally - as I discussed obliquely in Post #80 - the colony.slc file allows players to disband a Nomad/Settler and thereby build a Colony. This system still works as designed and does NOT have a "wonder-owning" pre-req but the coding is a little wonky and the player REALLY needs to understand the intricacies (now fully detailed in the Great Library) as otherwise it's easy to lose your Settler and get nothing in return. And as you might expect, the AI is completely clueless and cannot utilize this system.
            Click image for larger version  Name:	Colony build Bug.JPG Views:	1 Size:	55.8 KB ID:	9452918
            Last edited by Kull; February 26, 2023, 19:04.
            To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

            From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

            Comment


            • Colony from Settler: As Cradle was upgraded over the years, one of the most recent improvements involved Colonies. In the original Cradle v3, they are a Tile Improvement like any other, which means they can only be constructed within city limits. And this limitation extended to those created by the disbanding of Nomads or Settlers. However, Cradle v4 added "fort-like" code so that Colonies now have a 2-hex vision component AND they have a 1-hex border on all sides. As you can see in the attachment, a Nomad was disbanded 2 hexes outside the Etruscan borders, but once the Colony was built (inset), the Etruscan boundaries were extended. Given the high cost of building a Colony (and what it is supposed to represent), this is clearly the better approach, and will be adopted in Cradle 3+. The "Disbanding Settler" mechanism still requires Civic Engineering and 7000 PW, but a Nomad is no longer lost when it disbands outside the national borders. In addition, once a player builds the Pax Romana Wonder and the Colony button activates, that too allows the construction of Colonies outside the civ's boundaries.

              The slic code itself was pretty confusing, so that was cleaned up as well. Previously the player needed to have 12,000 PW available (even though only 7000 was used) AND the code required at least 500 Gold in the Treasury even though NONE OF IT was used, and in fact the code ADDED 1000 Gold when the unit disbanded. All of that has been fixed, and the Great Library updated accordingly.
              Click image for larger version

Name:	Colony from Nomd.JPG
Views:	151
Size:	134.1 KB
ID:	9452929
              To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

              From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

              Comment


              • City Specialists on the Tech Tree: The player can tweak the output of individual cities by using any of 5 different City Specialists, depending on the desired outcome. For example, if the player wants increased "Production", assigning one of the "Workers" to the role of "Laborer" (see attachment) generates additional Production (albeit at the cost of reduced output elsewhere). This all happens as part of the normal game code and I haven't changed any of that! However, each type of Specialist only becomes available once certain Advances have been researched, and as such they appear in the Tech Tree. In the old document, Specialists had the same icon as Units so it was a bit confusing as to whether, for example, a Laborer was much the same as a Hoplite. Anyway, Specialists now have their own icon so it will be easier to find them when looking at the new Cradle 3+ Tech Tree (see inset).
                Click image for larger version  Name:	Specialists.JPG Views:	1 Size:	114.2 KB ID:	9452957
                To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                Comment


                • Ulysses Grant Sprite: Another fairly small project, but I only recently noticed that the Ulysses Grant Wonder Unit had the same sprite used by the CtP2 Cavalry, basically a helmeted British Lancer (see attached). The CtP1 Cavalry sprite has a red uniform as well, but the broad-brim hat is more in keeping with a Civil War General (and in fact, a blue version of that is used for the Grant unit pic, see bottom of attachment). As with most CtP1 sprites, this one did not have the Idle animation (and thus had no movement), so it was disassembled and rebuilt. There are two animations (Move & Attack), comprising 120 images (plus another 120 shadow files), and a new Idle animation was created which uses 6 files that allow the horse to shake its head and tail. The only change needed was to reference the new creation in "newsprite.txt", and so the new Grant sprite is now in-game.
                  Click image for larger version

Name:	Grant.JPG
Views:	142
Size:	55.6 KB
ID:	9452971
                  To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                  From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                  Comment


                  • Wow! It's great to see a big CTP modding project on the go again in 2023! I've just mentioned this thread over on the CTP Fans Discord that Ninja runs as some of the guys there have been playing around with the source code and the Apolyton Edition so they'll find this project thread fascinating! Feel free to drop by and keep us updated there too!

                    Comment


                    • Goods Improvements (Gold): This was another one of those ideas which start off with a limited objective and then slowly grow and expand, folding in more "improvement opportunities" along the way. Earlier in the project, after making a number of changes to the graphics and even adding a few new Goods, I proclaimed those changes at an end and moved on to other things (see Post #40). However, in the course of many playtests I couldn't help but notice that the "Gold Good" graphic was almost invisible when seen against the background of Alpine Mountain terrain (see attached).

                      The first idea was to substitute the "Gold Bars" sprite from Cradle 4, but that is actually a gold-colored version of the gems used by the Emerald Good, and in that context it didn't look very accurate. In addition, all the other metal goods in Cradle 3+ have a more natural appearance (like handfuls of ore), so the gold "Bars" didn't match the other metals.

                      Of course that took us right back to the original problem, since granular piles of yellow ore aren't visible in Mountain terrain. Accordingly I tested the sprite with several other terrain types and determined that it looks best against the Brown Hill (Sand Dune) background. Which was a logical substitution since Silver was the second, "rare" good in that terrain, and it already was used as the rare good in Brown Mountain terrain. Problem solved, yes? Well not entirely....
                      Click image for larger version

Name:	Gold good.jpg
Views:	110
Size:	66.4 KB
ID:	9453509
                      To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                      From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                      Comment


                      • Goods Improvements (Copper): The problem was - and I hadn't really noticed this before - but the "Copper" sprite appeared to be "more gold" than the Gold! Accordingly I created a new granular Copper sprite, using orange tones and mixing in a fair amount of bluish-green to give it a hint of the tarnish-look so common to copper. And as a final touch, I shifted the old Copper sprite to Gold. As you can see in the attachment (Gold left, Copper right), they clearly have a different appearance, even against the same background. So all's well....except for one thing. There was now a gap in the Mountain Good sequence.
                        Click image for larger version

Name:	Gold and Copper.jpg
Views:	115
Size:	15.9 KB
ID:	9453511
                        To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                        From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                        Comment


                        • Goods Improvements (Deer): For some time I'd been thinking about adding "Deer" as a new form of good. They have a long history as a food and trade resource, and exist in almost every part of the planet. But the best location for them would be "Forest" terrain, and that already had four Goods. However, one of those was "Bear" and that animal can be found just as frequently in Mountains as Forest, so.....suddenly it all came together. And now Deer can be seen and heard in the Forests of Cradle 3+ (see attachment) while Bears stalk the Alpine Mountains.
                          Click image for larger version

Name:	Forest Deer.jpg
Views:	115
Size:	30.8 KB
ID:	9453513
                          To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                          From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                          Comment


                          • Goods Improvements (Oil): Lastly, there was the matter of "Tundra Terrain". There's only one Good there (Caribou), but it seemed logical that Oil should be as well. In a purely Ancient Era mod there's a degree of sense in excluding Oil from that sort of terrain, but Cradle 3+ has greatly expanded the opportunities in the Modern portions of the game, so it seemed appropriate to add Arctic Oil availability. But try as I might, the game would simply not display the new Good. Long story short, the "missing link" was found in the terrain.txt file. All terrain-types are listed there, and that includes enumerating the number of Goods available in each. And of course, "Tundra" was set to allow only one....but not anymore!
                            Click image for larger version

Name:	Tundra Oil.jpg
Views:	109
Size:	63.0 KB
ID:	9453516
                            To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                            From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                            Comment


                            • More Sprites: As a general rule, Cradle tries to avoid situations where different units use the same sprite. The exceptions are:
                              1) "Elite Units", for example when "Spearman" is upgraded to "Elite Spearman". All of the unit stats, GL text and 2D art is altered but both units continue to use the same "Spearman" sprite. It's not optimal, but there isn't much choice given the limited number of "good" CtP2 sprites.
                              2) "Wonder Units" also frequently make use of sprites that are used by "normal" units, for example "Hannibal" uses the same sprite as the "War Elephant". This is even less of a problem because each Wonder Unit is both unique and rare, so consequently the player is usually well aware of their location and doesn't confuse them with the "normal" sprites. And, as with "Elite Units", these have different stats, GL text and most importantly - unique 2D unit art.

                              There were a few other cases, but those have already been resolved so that now the Patriarch and Televangelist have different sprites, as do Cavalry and the Ulysses Grant Wonder Unit, the various Pharaoh/Great King units and the Chariot, and a few others. However, there are two cases in which a total of 6 units share two sprites, but even worse - the 2D unit art is the same. Which makes it very difficult to tell one from the other without seeking out the text descriptions.

                              The good news is, all 6 units now have 6 different sprites AND all the text and 2D art is different as well. So let's go through them, beginning with....​
                              To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                              From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                              Comment


                              • Plunder I - The Goat: As discussed in Post #37, several of the Cradle Wonder units have the ability to generate "Plunder" after winning a battle. There are 4 different Plunder Units, but all of them used the CtP2 Settler sprite and the 2D art associated with it. Again, there's nothing inherently wrong with that, but it was a bit confusing, and since each Plunder unit is "era-specific", it makes sense to look at them individually in the context of the era in which each becomes available.

                                The earliest is Plunder I, which appears until the discovery of "Copper Smelting". Historically, this was a time when armies were largely composed of poorly trained peasants, and Plunder was whatever they could glean from the surrounding countryside. Of those, the most desirable items would be small or easily transportable. And in that sense, nothing could be more useful than livestock of the sort they knew intimately in their civilian lives. Something like a herd of Goats.

                                Which is the new sprite which represents the "Plunder I" unit. This is an "all direction" sprite (thank you, Sketchfab), so while there's no moving parts (well beyond my skill level), the goats point in all directions they travel, and you'll hear them trot and bleat as they move.
                                Click image for larger version

Name:	Plunder I.jpg
Views:	86
Size:	48.1 KB
ID:	9453957
                                To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

                                From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

                                Comment

                                Working...
                                X