Announcement

Collapse
No announcement yet.

Making Cradle 3+ fully compatible with the Apolyton Edition

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

  • Removing Excess Wonders (Part 3):

    4) Resurrection: Most of the "Religion" Advances (Judaism, Buddhism, Islam, etc) are associated with a "Book Wonder" (Torah, Pali Canon, Koran) but Christianity instead provides the "Resurrection" Wonder. Although truly the seminal act which served as the foundation of the religion, it must be admitted that this was not seen as a world changing event AT THE TIME IT HAPPENED, but only became so as the word spread. Which points instead to the Christian Book ("Holy Scriptures") which already is a Wonder, but one which becomes available much later with the "Theology" Advance.

    Ignoring the religious aspect for a moment, the "Resurrection" Wonder provides a 1-point Happiness Bonus which never expires. However, the Christianity Advance already provides an additional 1-point Happiness Bonus (the same as all the other Religion Advances), so in that sense the associated Wonder is a bit overpowered. Accordingly, the change will be to remove "Resurrection" and shift the "Holy Scriptures" from Theology to Christianity. Game Impact? Minimal.

    Click image for larger version

Name:	Resurrection-Scriptures.jpg
Views:	188
Size:	11.2 KB
ID:	9467562 ​
    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


    • Too many Wonders and Buildings (revisited):

      By now, veteran thread viewers will know that I've been poking at every aspect of this game, right from the beginning. There certainly are hard-coded game limitations, and even a few instances of Source Code team induced bugs that broke previous functionality (more than compensated for by the multitude of improvements, of course). But frequently, things which had long seemed impossible, turned out not to be.

      Anyway, this particular issue - the hard-code limit of 64 Wonders and 64 Buildings - has been eating away at me for almost a month now, and consequently I've been dragging my feet at implementing the required changes. Removing functionality, no matter how you spin it, isn't a lot of fun. Accordingly, most of this time has actually been spent on various ideas for workarounds, all of which failed. So last week I finally "bit the bullet" and started to make all the necessary changes (many of which haven't been previewed yet), to include heavy testing to make sure all the new changes work properly.

      During that process - in particular the efforts aimed at future Techs and Structures - I couldn't help but notice that some unbuilt Wonders were not appearing in my city build queues. And without exception, all of them had Expiration Advances. So a little itch started up in the back of my brain, and it wouldn't go away...."what if?"​
      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


      • Too many Wonders (the issue):

        Let's start by reviewing the issue as it specifically pertains to Wonders. Like every other Wonder, those which are # 65 and higher in the "Wonder.txt" file are buildable by each civ from the moment it discovers the Enabling Advance. The problem arises upon completion, because the finished Wonder does NOT appear in the city which built it, and thus continues to be buildable everywhere. Exacerbating the problem, the AI continues to see the Wonder as a high priority structure, and will continue building it in perpetuity. In short, the "too many Wonders problem" will cripple the AI and is effectively a game-breaker.

        That said, "Wonders" in CtP2 operate according to a number of fixed rules, and those rules apply regardless of where a Wonder might be positioned on the Wonder.txt list:
        1) All have an Enabling Advance (the scientific discovery which allows them to be built)
        2) All *can* have an "Obsoleting Advance", although many do not (the scientific discovery which cancels their powers and makes them unbuildable).
        3) By definition, you can never have more than ONE Wonder. The "bug" masks this fact, but only because the game code does not see the structure in a City Inventory and thus cannot recognize that it was completed.

        Now we can't do anything about the hard code limit and how it presents in-game, but it turns out that we CAN use items 2 and 3 to offset the worst part of the problem: A Wonder which is buildable forever.​
        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


        • Too many Wonders (the solution):

          In Cradle5 there are 8 "Great House" Wonders, each of which provides a historical Great Leader in the form of a Wonder Unit - and not much more. They offer some historical background and enhance the atmosphere, but primarily they are delivery mechanisms for Wonder Units. The slic code which does this (contained in the wonderunits.slc file) is remarkably simple; an Event Handler with nine lines of code which place a Wonder Unit in the city which completes that particular Wonder.

          Next, a brief segue into a related area. Unlike the hard code limits which apply to Buildings and Wonders, CtP2 effectively has no limit on the number of Advances, i.e the scientific discoveries laid out in the Tech Tree. The rules are also pretty loose, so you can even have Advances which link to nothing else - true dead ends which can't be researched and don't lead to any others. Point being that the options in this area are essentially unlimited.

          For testing purposes I created a new Wonder called "Sargon2" (a copy of the existing Sargon Great House) and placed it in the # 65 position. The enabling Advance was set for "Toolmaking" (granted to every civ at game start) while it also received an obsoleting advance - a newly created dead-end Advance imaginatively named Z_LAST. The slic file was then edited to include some "Great Leader" unit creation code, but also an additional section - also only 9 lines - in which "Z_LAST" was gifted to the civ which first built the new Wonder.

          A new test game was launched and early on we can see that every civ began building the Sargon2 Wonder in multiple cities (see image #1). By 2340 BC the race was almost over, with Egypt on the verge of completing the "House of Sargon2" in Memphis (see image #2). As you know from the attachment in Post #223, that normally wouldn't matter much because the instant the Wonder was built, other cities such as Tanis and Abydos would continue to work on it - as would every other AI civ in the game.

          But that's not what happened. Instead, on the very next turn (2330 BC) Sargon2 has been built (see image #3) and both Tanis and Abydos have switched production to Nomads (and given the mass of shields built up in the process of working on Sargon2, those units will be constructed immediately). And - tellingly - no other Egyptian cities are working on Sargon2. And in fact, EVERY Civ has switched production to something else. As additional confirmation (see image #4), a full 12 turns later we see that only Egypt has built Sargon2, something that is seemingly impossible given the parameters of the "Hard Code Limit".

          So how can this be? Well, it's surprisingly simple. Once Egypt built Sargon2, the SLIC code gave them the Obsoleting Advance, and that makes it IMPOSSIBLE for any other civ to build this Wonder. To put the discovery in perspective, it means this: Rather than a hard-code limit of 64 Wonders, the real number is UNLIMITED. Kind of stunning when you think about it.
          Click image for larger version  Name:	Excess Wonder Solution.jpg Views:	1 Size:	536.2 KB ID:	9467594 ​
          Last edited by Kull; January 31, 2024, 17:55.
          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


          • Unlimited Wonders (what's next?):

            Definitely a very exciting discovery, but what does it really mean? We'll start by dampening expectations - an "unlimited number of Wonders" does NOT mean "Wonders with a full set of Wonder attributes". The traditional CtP2 Wonders were noteworthy because they provided a variety of built-in attributes that were easy to activate without any need for coding - increases to science, food, commerce, regard, hitpoints, etc. But all those require the Wonder to be physically located in a City Inventory, which is NOT the case with the "beyond 64" structures.

            That said, they can still do a lot of things:
            - Trigger a number of existing SLIC events such as Feats and Unit & TIMP creation
            - Trigger a nearly unlimited number of other SLIC events
            - Have Great Library entries
            - Other stuff we haven't even thought about

            That may seem rather generic, but let's consider those abilities in the context of the existing Wonders already present in Cradle5:

            1) As noted earlier, there are 8 "Great House" Wonders, and all of them deliver units (check), provide Historical background in the GL (check), and provide 1 Gold every turn (check)

            2) In addition there are 6 "Religion" Wonders, and all of them deliver units (check), provide Historical background in the GL (check), and deliver a 5% increase in Science every turn (check)

            That's a total of 14 Wonders in those two categories alone, ALL of which could be shifted into a "beyond 64" position in the file, without any reduction in their ability to provide EXISTING functionality. So instead of "5 too many" it's more like "9 too few", lol.

            That doesn't mean it's time to make wholesale changes to the existing Wonders, but certainly some of those which were eliminated can now return. In addition, this entire exercise required that I take a long hard look at the existing Wonder system, so a number of changes will be made regardless, simply because they make more sense (such as shifting "Internet" from a Wonder to an Advance).

            Bottom line, there's a lot to do here, but at least it's going to be fun. Adding is much more pleasant than subtracting!​
            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


            • Can the same approach be taken to increase the number of buildings?

              Comment


              • Originally posted by Cyberguy00 View Post
                Can the same approach be taken to increase the number of buildings?
                First of all, my apologies for the incorrect response to your original question back in Post # 196. That needs to be edited so others don't follow the wrong path. As to the current situation...

                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


                • Too many Buildings (revisited):

                  On the other hand, what about "Too many Buildings"? Can the same discovery help in that area as well? Ummm, no. By design, buildings can be constructed in multiple cities for multiple civs. So the same solution - give an obsoleting Advance to the first Civ which builds one - would NOT work here, unless you greatly altered the code to give that same Advance to ALL civs. But even then, "why bother"? A building of this sort could only exist in one city of one civ, and it still wouldn't be found in City Inventory, and thus would have IDENTICAL properties to all the "beyond 64" Wonders. And since those are unlimited in number anyway.....and far, far easier to code? Well, you get the idea. All of which means that Cradle5 still has an excess of 3 structures in Buildings.txt, but fortunately there are some good solutions available for those.​
                  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


                  • Originally posted by Kull View Post

                    First of all, my apologies for the incorrect response to your original question back in Post # 196. That needs to be edited so others don't follow the wrong path. As to the current situation...
                    Did you edit or delete a post as post #196 does not look like a reply to my Civ4 BtS Democracy Game post? Not that its an issue however.

                    Also, can new units be added, i was thinking possibly a 'Drone Swarm' - short range that can take out most anything but can be countered by an 'Advanced EW' unit or a 'Laser Anti-aircraft' unit as examples?

                    Comment


                    • Originally posted by Cyberguy00 View Post

                      Did you edit or delete a post as post #196 does not look like a reply to my Civ4 BtS Democracy Game post? Not that its an issue however.

                      Also, can new units be added, i was thinking possibly a 'Drone Swarm' - short range that can take out most anything but can be countered by an 'Advanced EW' unit or a 'Laser Anti-aircraft' unit as examples?
                      Yes, I changed it because the whole idea was flat-out wrong and I didn't want to mislead anybody. Technically speaking that idea would still work so long as the total number of buildings remained at 64 or less. So yes, you could use that mechanism to set up a system of "churches" or "mosques", or perhaps "commerce" or "production".

                      As for Units, they are unlimited in number. Sprites are capped at 200, however. Other limits: City sprites: 255; Tiles: 1024; Advances: Unlimited; Feats: Not sure, but I suspect unlimited.
                      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


                      • Removing Excess Buildings (Part 1):

                        1) Religious Victory: As you may recall the "Religious Victory" building was added as the final structure necessary to achieve the Religion Victory option, following completion of the Hagia Sophia Wonder. As I noted at the time, the building itself can only be constructed once and it never appears in the City Inventory since the game ends the instant it is completed.

                        When the modified Religious Victory test was successfully performed, this building was located at the # 67 position in buildings.txt, so inadvertently we already ran the test which proves the "too many buildings" limit is not a problem for this particular structure, and thus it will remain in the game exactly as-is. Game Impact? None.​
                        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


                        • Removing Excess Buildings (Part 2):

                          2) Orbital Lab: This is a really strange implementation for a building. You can build one in every city - and see it in the Inventory - yet it represents an orbiting space lab. Even if this were a "Far Future Era" structure (which it isn't), it's hard to visualize a scenario where every city on the planet would maintain their own private space laboratories.

                          In fact, this works MUCH better as a "Wonder" - a single orbiting Space Station. The associated Advance is "Space Flight", and as such the very first Space Station would (and historically did) qualify as an amazing technological spectacle, the very personification of a "World Wonder".

                          The current building gives a 30% Science increase in each city that builds it, but as a Wonder we'll reduce that to 10%, since it immediately benefits the entire Empire. In addition - since this will be a "normal" Wonder using the "built-in" attributes - the host city will gain a Science Specialist. And we'll toss in a free "Space Plane" unit, just for fun! The CtP2 "Solarius" Wonder movie plays when it's built (previously unused in Cradle), and we'll use a screenshot from that for the 2D art (see attached)

                          Transforming this Building into a Wonder resolves the 2nd of 3 "problem" slots in the buildings.txt file. Game Impact? Improvement.

                          Click image for larger version

Name:	Space Station.jpg
Views:	144
Size:	111.0 KB
ID:	9467717 ​
                          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


                          • Removing Excess Buildings (Part 3):

                            3) VR Amusement Park: A late-game building, but current technology trends indicate this to be an unlikely version of the future. Virtual Reality is happening at home, not in a large facility you have to physically visit. By contrast, something that is within the realm of "far future" possibility would be the CtP1 Dinosaur Park Wonder. For which there is also a TIMP (so it will be a Visible Wonder!) As with the Space Lab, we'll substitute an interesting Wonder in place of an unlikely "building". The movie already exists, but for Cradle 5 it's been edited to remove the CtP1 "bonus description text" appended at the end. The 2D art is a straight copy (see attached).

                            The existing structure provides +3 Happiness in every city which builds it, but that's a bit too much for a Wonder. So we'll drop the bonus to +1 and will also add 2 Scientists to the Specialists in its home city. Since this will be a "normal" Wonder, it can use existing "built-in" Wonder attributes.

                            To make up for some of the Happiness Loss, we'll add +1 Happiness to the "Incubation Center" which is a nearby structure on the Tech Tree that currently provides only a single benefit - raising the overcrowding level.

                            In addition, although the VR Amusement Park is enabled by "Neural Interface", the new Wonder will instead be associated with "Genetic Tailoring". Transforming this Building into a Wonder resolves the final "problem" slot in the buildings.txt file. Game Impact? Improvement.

                            With this, the "excess building" problem has been completely resolved.

                            Click image for larger version

Name:	Dinosaur Park.jpg
Views:	137
Size:	114.0 KB
ID:	9467790
                            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


                            • Buildings and Wonders - Current Status: With the changes discussed above, we now have 67 Wonders and 65 Buildings. Looking first at the Wonders, a number of changes were implemented to reach this final total:

                              1) Although it would have been easy enough to restore Central Matter Decompiler and National Shield, I chose not to do so. Wonders which exist only to grant free Buildings tend to be overpowered. Especially in the late game period, the most advanced civ will build these two, and that's usually a civ with an already substantial lead.

                              2) Resurrection has likewise been omitted. It really was a "two-fer" Wonder for Christianity (along with Holy Scriptures), plus - as I noted earlier - it was backward looking in assigning great importance to an event which historically wasn't recognized as significant until long after the occurrence.

                              3) Internet remains an Advance, not a Wonder.

                              4) Space Station and Dinosaur Park have replaced the Space Lab and VR Amusement Park Buildings.

                              5) The last three on the list (i.e. the non-City Inventory Wonders numbered 65-67) are the Great Houses of Sargon, Alexander, and Hannibal. Those were selected entirely because they are the first to appear, and thus were the easiest to test. Once each is completed, that civ is given the appropriate obsoleting Advance (Z_SARGON, Z_ALEXANDER, or Z_HANNIBAL) and thus no more can be built. Extensive playtesting has shown that this works exactly as intended - the civ which first builds each Wonder is granted the correct Wonder unit (and his retinue), while all other civs shift production to something else. Worth noting that the playtesting also confirmed that the AI civs are happy to steal (or perhaps trade) those Advances, but that is not a problem since they don't do anything other than inhibit construction of something that no civ should be building anyway!

                              As to the Buildings:

                              1) Space Lab and VR Amusement Park have been replaced by the Space Station and Dinosaur Park Wonders.

                              2) The earlier restoration of Micro Defense and Matter Decompiler has not been rolled back, especially in light of the removal of the Central Matter Decompiler Wonder. In addition, both buildings provide the sort of building-specific attributes which cannot be duplicated by Wonders or Feats, unlike those granted by the Space Lab (Science) and VR Amusement Park (Happiness).

                              3) The last Building on the list (i.e. the non-City Inventory Building at number 65) is the Religious Victory structure. This was tougher to test realistically since the Religious Victory option is a mid-game event, only available after enough culture points have been accumulated AND it's only available to the builder of the Hagia Sophia Wonder. Nevertheless, I was able to extend two playtests into the 1700 AD and beyond time frame, and in each case the AI civ which built the Wonder is the only civ which can construct this building and win the game. So it's been tested and it works (see attached), albeit that identified a grammar problem, lol.

                              That concludes the extensive effort invested in researching and identifying workarounds for the 64 Wonder and Building Hard Code limit. Time for something else!

                              Click image for larger version

Name:	AI Religious Victory.jpg
Views:	112
Size:	63.1 KB
ID:	9467941 ​
                              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


                              • Wonders - Related Changes:

                                But before we do that, a few follow-ons to the Wonder-related changes:

                                1) Using a major religious figure as a Wonder Unit always struck me as something of a disconnect, since all the others are primarily secular in character. Accordingly, the Muhammad unit has been replaced by the major Islamic General of that early period, Khalid ibn al-Walid (see attached). He appears with the building of Mecca.

                                2) The Great House of Alexander originally was linked to the discovery of Republic, but historically that is too late (among other things, it meant that Hannibal was arriving before Alexander). That has changed, and Alexander's House is now available with the discovery of City State.

                                Click image for larger version

Name:	Khalid.jpg
Views:	85
Size:	98.8 KB
ID:	9468037 ​
                                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