Announcement

Collapse
No announcement yet.

Making Cradle 3+ fully compatible with the Apolyton Edition

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

  • Kull
    replied
    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:	154
Size:	114.0 KB
ID:	9467790

    Leave a comment:


  • Kull
    replied
    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:	160
Size:	111.0 KB
ID:	9467717 ​

    Leave a comment:


  • Kull
    replied
    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.​

    Leave a comment:


  • Kull
    replied
    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.

    Leave a comment:


  • Cyberguy00
    replied
    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?

    Leave a comment:


  • Kull
    replied
    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.​

    Leave a comment:


  • Kull
    replied
    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...

    Leave a comment:


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

    Leave a comment:


  • Kull
    replied
    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!​

    Leave a comment:


  • Kull
    replied
    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.

    Leave a comment:


  • Kull
    replied
    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.​

    Leave a comment:


  • Kull
    replied
    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?"​

    Leave a comment:


  • Kull
    replied
    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:	201
Size:	11.2 KB
ID:	9467562 ​

    Leave a comment:


  • Kull
    replied
    Removing Excess Wonders (Part 2):

    3) Internet: Another late game wonder, this puts Computer Centers in all cities. As with National Shield, it doesn't provide anything new, but rather repeats what is already available as a Building. The main difference of course is the "Internet" is a real thing - one of the most important developments of all time - and completely removing it from the game is just wrong.

    More to the point, the way in which CtP2 portrays the Internet is completely incorrect. The main fallacy behind an Internet Wonder is the fact that only ONE CIV would get it. In addition, the benefit of the Internet Wonder - placing computer centers in each city - is a poor representation the true Internet reality.

    The solution to all this is to remove the Wonder and replace it with an ADVANCE called "Internet" and associate that with a FEAT which increases Science. Game Impact? Improvement.

    The new Advance follows "Quantum Mechanics" and is a pre-req for "Global Communications" and "Robotics" (see attached snippet from the Tech Tree). Implementing this requires changes to a LOT of files: Advance.txt, feat.txt, feats.slc, feat_str.txt, uniticons.txt, Wonder.txt, gl_str.txt, Great Library.txt, WonderBuildLists.txt, advancelists.txt, and the Tech Tree.

    Click image for larger version  Name:	Internet.jpg Views:	15 Size:	11.0 KB ID:	9467419 ​
    Last edited by Kull; January 30, 2024, 09:55.

    Leave a comment:


  • Kull
    replied
    Removing Excess Wonders (Part 1): As noted above, there are currently 69 Wonders and we need to remove 5 of them. The first two are quite easy:

    1) National Shield: This is a very late game wonder which provides Forcefield buildings in every city. Since it does nothing more than repeat a benefit which is already available from the Force Field building, it's an easy choice for deletion. Game Impact? None.

    2) Central Matter Decompiler: Another late game wonder which puts Matter Decompilers in all cities. As with National Shield, it doesn't provide anything new, but rather repeats what is already available as a Building. Game Impact? None.​

    Leave a comment:

Working...
X