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
    TIMP Control files:

    "Big Dividends" eh? Such as? Well, one of the earliest Cradle5 game improvements was focused on revising the Advances associated with Terraforming. As just one example, the ability to remove Dead tiles was now associated with the Tribunal Empire Advance instead of the late-game Conservation:

    PHP Code:
    TERRAIN_DEAD {
    TilesetIndex 17
    Icon ICON_TERRAIN_DEAD
    InternalType
    Dead

    RemoveAdvance ADVANCE_TRIBUNAL_EMPIRE
    TransformRemove 
    {
    Time 3
    Materials 1000

    Seems pretty clear. In fact, all the changes mentioned in that post were made to the terrain.txt file, after which I moved on to other things, confident that all was well. But it wasn't. According to Martin Guhmann, changes to CtP2 tiles require the adjustment of TWO files, "tileimp.txt and terrain.txt, if I remember correctly you have to modify both files."

    Uh Oh. And sure enough, the tileimp.txt entry for TILEIMP_TERRAFORM_GRASSLAND still included this segment of code:

    PHP Code:
    TerrainEffect {
    Terrain TERRAIN_DEAD
    BonusFood 300
    EnableAdvance ADVANCE_CONSERVATION
    TilesetIndex 1

    While you could now transform a Dead Tile into "something else" after Tribunal Empire was discovered, the only option was terraforming it into Grasslands and that would not be possible until Conservation. In other words, nothing had changed. Ugh.

    OK, why are there two files, and how do they work? The terrain.txt file identifies a type of tile and provides the basic values (food, gold, movement points, etc) and also lists the Advances which allow this terrain-type to be added and/or removed via terraforming. However, in order to know what it can be transformed into, you need the tileimp.txt file. And THAT had not been modified to match the new changes implemented in Cradle5.

    So yes, a big problem, now identified and fixed.​

    EDIT: Or.....not. Gah. After running a series of tests to conclusively establish the role of each file, it turns out that part of the above is incorrect.

    The tileimp.txt file assigns a "TerrainEffect" to every entry in that file, which includes a line for "EnableAdvance". That code is necessary for non-terraforming TIMPs (such as Farms or Mines), but it has no effect on terraforming - all those Advances are assigned by the terrain.txt file. Which means the Terraforming Advances listed in tileimp.txt are confusing and meaningless. For that reason, I'm going to change them all to the late-game "ADVANCE_HEXTAPUL" (which exists simply as something to research when all other Advances have been discovered)​
    Last edited by Kull; December 16, 2024, 14:23. Reason: Added an edit section at the bottom to discuss a correction.

    Leave a comment:


  • Kull
    replied
    Terraform Ocean Button (con.):

    Unfortunately, this particular sub-project came to naught because there's a fundamental difference between "standard" TIMPs and the "terraforming type". When you look at the controlling file (tileimp.txt), a standard TIMP has TWO button location identifiers: "Level" (the row number of the TIMP) and "Class" (one of 12 column names for each of the 3 TIMP placement groups). For example, the "Port" icon (see top of the attachment) is on "Level 1" (first row) in the "Class:OceanATM" group (the 3rd column of the "Ocean" button group).

    By contrast, the Terraform group has THREE button location identifiers: "Level" (the row number of the TIMP), "Column" (the column number of the TIMP), and "Class" (the name of the button group). An example of this system is "Terraform Desert" (see bottom of the attachment), the icon for which can be found at "Level 3" (third row) of "Column 0" (first column) in the "Class:Terraform" group (the Terraform Land Button).

    The problem is that "standard" TIMP icons will not appear in the Button Bank if they have three location identifiers, and the new "Terraform Ocean" button will not accept any TIMPs that have only two. So the new button only works if you are creating additional terraforming-types, and the only remaining candidates for that sort of activity are the various ocean-type terrains, none of which are being modified in Cradle.

    Apologies for the long dissertation, but hopefully this clarifies the limitations associated with the new "Terraform Ocean" button. More to the immediate point, it means my grand project for adding new TIMPs is restricted entirely to the last two remaining "standard" TIMP slots. Disappointing, but there was a silver lining - the research expended in trying to make this work provided a much deeper insight into the workings of the Tile Improvement control files. That will pay big dividends as we proceed.

    ​ Click image for larger version

Name:	TIMP location fields.jpg
Views:	104
Size:	95.3 KB
ID:	9478513

    Leave a comment:


  • Kull
    replied
    Terraform Ocean Button:

    Tile improvements are an important facet in the game, and Cradle 5 already features a number of new options in this area. Examples include the new "Trawlers" level and a 4th level for roads. Although the number of SLIC-created tile improvements is essentially unlimited (for example the Natural Wonders feature), those which can be placed by the players (AI and human) are limited by the number of slots in the Tile tab on the Control Panel (bottom right of the game screen).

    In the base game the Tile Tab has 3 buttons for the placement of TIMPs, each with 12 slots, and currently most of those are used (34 of 36). The 4th button is fully assigned to Terraforming, and has no open slots. However, the Source code team added a 5th Button ("Terraform Ocean") along with the following message in the Apolyton Edition Readme file: "Added: TerraformOcean button in tile bank. This allows modders to use up to 60 of the 64 available tileimp slots".

    Based on that information, I kicked off a large sub-project which aimed to re-name and restructure the TIMP buttons (see before and after button names on the attachment), while also examining ways to greatly expand the number of tileimps in Cradle5.

    Click image for larger version

Name:	TIMP button renaming.jpg
Views:	102
Size:	84.6 KB
ID:	9478506 ​

    Leave a comment:


  • Kull
    replied
    TIMP Project:

    After completing the City Graphics project back in September, I've been running an extended playtest that's uncovered a few issues along with some under-the-hood improvement opportunities (most have been reported along the way), but otherwise the game has been quite stable and is working largely as intended. Behind the scenes however, work is proceeding on the last big project - Tile Improvements. It's been a multi-faceted and challenging exercise, and there's still a long way to go, but it's time to start pulling back the curtain to give you a look at some of what's been going on.​

    Leave a comment:


  • Kull
    replied
    TurnsAcceptedForOnePop:

    This is a new setting in Const.txt (not previously available in Cradle or even AE) which tells the AI to add Farmer specialists if city growth requires more than the specified number of turns. This flag can also be referenced in the strategies.txt file. The format is: TurnsAcceptedForOnePop ** (choose any number to replace **)

    The chief benefit is to reduce the AI's single-minded focus on production (which I've been unable to achieve with other game file settings). Now in Cradle 5 with a value of 40.

    File Changed: Const.txt​

    Leave a comment:


  • Kull
    replied
    AI Intelligence Factor:

    According to Protra3211, he changed the AI_INTELLIGENCE_FACTOR in DiffDB.txt to "25" (normally "1") since "All the mods have this changed to 25 and some post it helps the AI." To see how others have handled this, I looked at the AE Mod scenario and they keep it at 1 in the earlier difficulty settings, but then raise it to 25 with "Hard" and "Very Hard" and increase it again to 35 for "Impossible". MoT doesn't change it at all, while AOM uses 25 only for "Impossible".

    For Cradle 5, we'll alter the settings to 10 for Medium, 25 for Hard and Very Hard, and 35 for Impossible

    File Changed: DiffDB.txt​

    Leave a comment:


  • Kull
    replied
    The "North American Tribes":

    The "Native American" civilization has been renamed "North American Tribes". One reason is that every city is named after a North American tribe, but equally important is that Cradle includes 3 other civilizations who are also "Native Americans" (in the larger context of "the aboriginal peoples of the Americas"), specifically the Aztecs, Maya, and Inca. Rather than change the underlying code name (which remains "native_americans"), only the translation files have been altered.

    Files Changed: civ_str.txt, feat_str.txt, and the GL​

    Leave a comment:


  • Kull
    replied
    "Unwelcome invaders" regard hit:

    It's fairly common to see the following message in the Intelligence Report window: "This nation is outraged that we continue to move our troops within their borders. To them, we are unwelcome invaders." This is the visible manifestation of a particular type of "Regard Hit", so it's helpful to understand what causes it.
    - After a fair amount of testing, I can say that invisible civilian units (such as Diplomats) don't trigger the message, even if they are seen by other stealth units and remain in foreign territory over multiple turns.
    - Military units can travel within another nation's borders without negative effect IF they are not spotted.
    - Military units DO trigger the message if they enter the other nation's territory and ARE seen (even if they leave on the same turn).

    Leave a comment:


  • Kull
    replied
    Plunder unit types:

    When participating in battle, some of the Wonder units generate "Plunder" (controlled by SLIC), but the type of plunder unit changes after the discovery of certain Advances. And - similar to the situation with Elite Unit upgrades - that information wasn't provided anywhere.

    Fortunately the solution is the same. Each Advance which alters the type of Plunder unit now has an entry in the Great Library which describes the change (from unit "x" to unit "y"). The second paragraph in the Bronze Working GL entry (see the attachment to post # 303 above) has an example of the new text.

    Files Changed: plunder.slc & GL.txt​

    Leave a comment:


  • Kull
    replied
    Chariots appear late in the historical timeline:

    Currently the player can get the City State and Oligarchy gov-types before Chariots are available, which is far later than their true historical appearance. This also means it's rarely worth building any.

    Although not directly related, this problem was obscured because the "Barracks" Advance is graphically out of place on the Tech Tree (part of the "Engineering" series instead of "Warfare"). Moving it however is problematic since it doesn't have any direct "Warfare" pre-reqs.

    Accordingly, Chariots are now a pre-req for Bronze Working (see attachment above), which is close to the true historical sequence. In addition, since Bronze Working is a pre-req for Barracks, this also gives Barracks a firmer place in the Warfare sequence.

    Files Changed: Advance.txt, GL.txt, Tech Tree.​

    Leave a comment:


  • Kull
    replied
    Elite Unit Upgrade Info:

    Upgrading of Elite Units is controlled by SLIC, and is driven by the discovery of a limited number of Advances (Bronze Working, Barracks, Iron Working, Dark Ages, Gunpowder, Flintlock, Mass Production, Advanced Infantry Tactics, Chaos Theory, Feudalism (Militia Only) & Railroad (Militia Only)). In addition, the upgradeable units have to be in a City, Fort, or Airbase otherwise the code won't "see" them. Unfortunately this information is not specified anywhere, and without advance warning the player will miss out on the opportunity to upgrade many of his Elite Units.

    Accordingly, a "notification" comment has been added to the GL Entries of every Advance which drives an Upgrade (see attached).

    File Changed: GL.txt

    Click image for larger version

Name:	Elite Unit upgrade.jpg
Views:	129
Size:	112.6 KB
ID:	9478048 ​

    Leave a comment:


  • Kull
    replied
    New "Citizen" graphic:

    The image which accompanied the new "Citizen Concept" entry in the Great Library uses the CtP2 "pick-axe guy" who also appears in the "Worker" and "Specialist" concept images. There's nothing terribly wrong with that, but it definitely doesn't fit the mental image of a "Citizen". Accordingly, I've created three new images which use the CtP1 Farmer as the centerpiece (see attached)

    New files: upcp050l (Specialist), upcp070L (Citizen) & UPCP085L (Worker)

    Click image for larger version

Name:	Specialist-Citizen.jpg
Views:	179
Size:	112.7 KB
ID:	9477530 ​

    Leave a comment:


  • Kull
    replied
    Freight Flag: Per the quote below from Martin Guhmann, there has to be a "freight flag" activated in tileimp.txt in order for trade routes to follow roads:

    "Some of the tileimp records contain an additional flag the Freight flag. Just copy it to the according entries in the Cradle versions, so that new trade routes follow the roads"

    Accordingly, I've added Freight flags to all the road types in Cradle 5 (see attached example), using the values from AE in all cases, except making some alterations to account for the lower movement rate on Cradle roads vs. AE roads (2 tiles-per-turn vs 3)

    File changed: tileimp.txt

    Click image for larger version

Name:	Freight flag.jpg
Views:	200
Size:	57.4 KB
ID:	9477293 ​

    Leave a comment:


  • Kull
    replied
    Units which arrive with the "Great House" Wonder Units: Some of the "Great House" Wonders have been moved to new advances, and there's also been a number of changes made to units themselves, especially those tied to gov-types. Accordingly I reviewed all of them to see whether the "army" which arrives with each Wonder Unit is still era-appropriate. And in several cases, it was not:

    1) House of Sargon (L3 Dynasty) gives Sargon and an Archer (from the L5 Archery Advance) and a Spearman (from L1 Toolmaking). This is a problem. A better mix would be a Slinger (from L2 Projectile Weapons) and a Swordsman (from L1 Agriculture). See attached.

    2) House of Atilla (L9 Dark Ages) provides Atilla and a Man-at-Arms (from L10 Feudalism) and a Raider (from L8 Stirrup). The problem here is that Raiders are now gov-type units and are not supported by Monarchy or Theology, the most likely govs to be enacted after this Wonder is built. By design, this unit is not supposed to be available to those gov-types, so the only solution is to replace it with another unit. Cataphract (from L8 Stirrup) seems best because the Hunnic units were a type of heavy cav.

    3) House of Genghis (L11 Monarchy) provides Genghis and a Cataphract (from L8 Stirrup) and a Raider (from L8 Stirrup). Similar to the issue with the House of Atilla, Raiders are gov-type units which are not supported by Monarchy or Theology, the most likely govs to be enacted after this Wonder is built. And again, the only solution is to replace it with another unit. In this case the Mounted Archer (from L5 Mobile Tactics), best replicates the Raider's combination of movement and stealth.

    File changed: wonderunits.slc, GL.txt

    ​ Click image for larger version

Name:	Sargon Units.jpg
Views:	43
Size:	104.9 KB
ID:	9477195

    Leave a comment:


  • Kull
    replied
    Research completion "bug":

    When loading a saved game, the "years to complete" on technology research are always incorrect. As you can see in the attachment, the Sumerians are 13 turns away from completing research on "Agriculture" when the game is saved. After quitting and reloading, the research time has been replaced by a set of dashed lines (meaning "infinite"). This will reset after hitting end turn and has no impact on the true count of remaining turns (i.e. it's effectively a graphics glitch). However, if you click the "Empire Manager" button (circled in red), that is usually enough to reset the true value (sometimes you also have to click the "Government" tab in the next window and hit the "Close" button).

    ​Click image for larger version

Name:	Research turn before and after Save.jpg
Views:	100
Size:	115.6 KB
ID:	9476544​

    Leave a comment:

Working...
X