The Hinge of Fate - Development Thread

The AI's choice of unit building is annoying to say the least. I'm not sure why they decide to keep building the same buildings they already have. I'm going to build a module that considers the AI build choices. That'll be a good ordeal.
Have you checked the aggressiveness of your soviets, just in case ?
 
I'm not sure that is what is causing it at this stage but I suppose it could be. There's basically a channel where the British gets ships on the top and bottom 3rd of the map and the Americans go through the middle. I've taken out a few offending outliers to make sure this won't be an issue going forward. I think I need to spend a turn or two just watching the AI moves to figure it out.

If my hypothesis is correct, you'll find a lot of British and American units close to each other.

The AI's choice of unit building is annoying to say the least. I'm not sure why they decide to keep building the same buildings they already have. I'm going to build a module that considers the AI build choices. That'll be a good ordeal. I guess I'll try "onTurn" first and then "beforeProduction" to see what makes it stick.

If you're using the 'overrideDefaultBuildFunction' option, you must also include a check that the improvement is not already in the city. Perhaps you need to increase the AICapitalizationLimit, so more units will be produced.

Also, you mentioned that you can use lua to allow units to investigate cities. How would I go about that specifically? I'm unfamiliar with a sample from another scenario (though I might have forgotten if we were doing it in OTR).

The code will look something like this (untested):
Code:
if keyID == keyboard.k and civ.getActiveUnit() and civ.getActiveUnit().type == object.uPhotoRecon then
    for _,tile in pairs(gen.getAdjacentTiles(civ.getActiveUnit().location) do
        if tile.city and tile.city.owner ~= civ.getActiveUnit().owner then
            text.simple("Our photo reconnaissance unit has brought back information about "..tile.city.name..".  Click on the city to see the information.","Intelligence Ministry")
            gen.setCityInvestigated(tile.city)
        end
    end
end
 
Have you checked the aggressiveness of your soviets, just in case ?

They're sufficiently aggressive so I don't think that is it - it's probably the AI Capitalization Limit @Prof. Garfield mentioned, come to think of it.

If my hypothesis is correct, you'll find a lot of British and American units close to each other.

I suppose it's possible - there are a few American freighters... Frankly, there's no real "need" for the "Americans" to have freighters in this scenario (I was having "their" freighters reinforce the 8th and 15th AF). I can simply have all the units be British and just send them to different "boxes" on the Europe map, and make one "box" for the 8th AF reinforcement. That'll at least eliminate the most likely culprit.

If you're using the 'overrideDefaultBuildFunction' option, you must also include a check that the improvement is not already in the city. Perhaps you need to increase the AICapitalizationLimit, so more units will be produced.

Well, I don't actually tell them to build these improvements ever. Wouldn't I only need to check to see the improvement didn't already exist if I was telling the city to build it? I think the AI might just be stuck because of the capitalization you mentioned.

The code will look something like this (untested):

Thanks - I'll plug it in and see how it works.
 
Well, I don't actually tell them to build these improvements ever. Wouldn't I only need to check to see the improvement didn't already exist if I was telling the city to build it? I think the AI might just be stuck because of the capitalization you mentioned.

Sorry, I should have been more clear. The 'overrideDefaultBuildFunction' option is part of the canBuildSettings, and makes it so that the game doesn't check the 'regular' conditions for building the item (having the prereq technology, being on the coast, etc). If you used that, then that might explain why the AI was building improvements they already have (or, at least, able to build them).
 
I've been trying to get the ships working better and thought I'd try to simplify the code for them anyway since on map 3, all I need them to do is move east. Unfortunately, this is telling me that the "tile" is a nil... Can someone please advise of a better way to write it? I've messed around with this for about 20 minutes trying a few different things and am not getting anywhere. Being able to simply send ships west seems desirable in that the player then can't sit on a particular tile to prevent the mechanics from occurring

if unit.location.z == 3 then
unit.gotoTile = civ.getTile(unit.location.x + 5,unit.location.y, 3)

end
 
Watching the AI turn I'm noticing that for some reason, many of the cargo ships do as they're told and sail east without issue however many (maybe about half) decide to take precisely one move west. They did not need to interact with a US/other unit to do this. However, in wishing to just observe the ship movements, I eventually created a save where I got rid of the other British units/"noise" so I could focus on this.

When I did this, it immediately seemed to correct the behavior with So, perhaps the for loop has some sort of issue when there are too many units? It would make sense since this event worked well earlier in the game and stopped working when there were a ton of British cargo ships out there.

So, I guess the solution is to cut down on the number of cargo ships (which shouldn't be an issue given how ridiculously many of them there are in this playtest).
 
I've been trying to get the ships working better and thought I'd try to simplify the code for them anyway since on map 3, all I need them to do is move east. Unfortunately, this is telling me that the "tile" is a nil... Can someone please advise of a better way to write it? I've messed around with this for about 20 minutes trying a few different things and am not getting anywhere. Being able to simply send ships west seems desirable in that the player then can't sit on a particular tile to prevent the mechanics from occurring

if unit.location.z == 3 then
unit.gotoTile = civ.getTile(unit.location.x + 5,unit.location.y, 3)

end

try civ.getTile(unit.location.x+6,unit.location.y,3)

In Civ II, x and y values of tiles must be both even or both odd. Adding 5 to the x value will change its parity, but not change the parity of the y value, therefore making the coordinates invalid. (You may also have to worry about choosing a tile off the map, depending on how far away you teleport your units to the next map.)
 
you've reminded me of that before - sorry. But, wouldn't any unit that starts on an odd y value have the same issue but in reverse? I don't think I need to worry about the map issue here because they're spirited away long before the +5/+6.
 
But, wouldn't any unit that starts on an odd y value have the same issue but in reverse? I don't think I need to worry about the map issue here because they're spirited away long before the +5/+6.

No, it will be fine, because you are always starting with valid tiles. Suppose a unit starts at (10,20). It will be given a goto for tile (16,20), which is a valid tile. If, however, the unit starts at (11,21), it will then be given a goto of (17,21), which is also valid. Tiles are either (even,even) or (odd,odd), and even+6->even, while odd+6->odd, so (even+6,even) and (odd+6,odd) are also valid tiles (provided they aren't too close to the edge of the map).
 
Well, as an update...

I did manage to conquer Moscow, precisely one turn before winter (36). While I am going to toughen it up a bit in the next version, I had enough extra units left over that I'm pretty sure if a player really focused on getting there before winter, they'd have a good chance of capturing it. Mind you, I launched my invasion 3 turns early and invested heavily in getting there. The balance seems pretty good.

Unfortunately events in Afrika were broken by the convoy bug I had to work through, so for the purposes of the playtest I'm going to continue trying to conquer the Soviet Union but am basically going to lose Africa so I can test the Allied landings in Torch, Sicily, etc. I could easily sweep everything aside but then that is what happens when the Allies don't get reinforcements (when convoys make it to Malta, the Allies also get reinforcements in Egypt. Your U-Boats are supposed to sink most convoys on the American map so think of it as ships that were headed around the horn).

I'm curious if the Soviets can still put up a good winter offensive without Leningrad or Moscow. I need to capture Stalingrad and Baku to finally defeat them, and as you can see I have a long way to go for that. Winter will be a time of consolidation and bringing up the newly-discovered Tiger I to the front lines for a summer '42 offensive to win the War in the East.

upload_2022-1-1_19-17-18.png
 
Frankly, there's no real "need" for the "Americans" to have freighters in this scenario (I was having "their" freighters reinforce the 8th and 15th AF). I can simply have all the units be British and just send them to different "boxes" on the Europe map, and make one "box" for the 8th AF reinforcement.

This is exactly the solution I have used for the Civ 3 Scenario "SOE" (Storm over Europe) avoiding the traffic jam of US and British units, blocking each other. Even more valuable for Civ 2 TOT could be the fact to free one of the precious civ slots for another civ. In SOE the British-US civ is called "Western Allies". May be this could be a good name for that civ in Hinge-of-Fate, too.
Spoiler :
8th and 9th USAAF.jpg
 
Last edited:
Bomber Command is giving the Luftwaffe fits as they've recently stepped up their game.

upload_2022-1-2_10-24-15.png


The Soviets launch a desperate bid to retake Moscow. Those Il2's knocked quite a few guns out.

upload_2022-1-2_10-25-0.png


This is exactly the solution I have used for the Civ 3 Scenario "SOE" (Storm over Europe) avoiding the traffic jam of US and British units, blocking each other. Even more valuable for Civ 2 TOT could be the fact to free one of the precious civ slots for another civ. In SOE the British-US civ is called "Western Allies". May be this could be a good name for that civ in Hinge-of-Fate, too.

I do have the Brits called the "Allies" as that civ will control all the ground forces in Europe. At this point I still have the Americans as a unique civ. I have been recycling the "Minors" civ to make it first the benelux countries, then Yugoslavia. For now, the Americans don't change over to "Allies" after Pearl Harbor, though it's possible I'll change that. It's easier to handle the reinforcement/preparation of the North American invasion with different civs than it would be combining them since I am currently beefing them up based on ownership and size rather than going through each city individually. It saves days worth of work so I think there's always going to be an odd thing where you have the Allies + America.
 
I´m looking forward to this scenario. :)

Allies is the better name, when Britain, US and Russia all have the same victory conditions, as only Germany can be played by the human player. I have forgotten this. In SOE all these civs can be played by human and AI players and here Russia has different conditions for a total victory than the western allies.

The night bombing over Germany is one of the features that cannot be done well with Civ 3 and may be there is even the radar feature from Over the Reich in your scenario ?
 
Last edited:
Well, I'm at a complete loss for why some cargo ships decide to move precisely one step west when they should only be going East. The only two logical explanations are either that they are running into an enemy unit (which I've ruled out) or that there is another "go to" command that is conflicting with it (that was the issue with Malta - units would get to Sicily and suddenly have a tug of war between Plymouth and Malta).

I've gone through every "go to" event as well as "cargo ship" event and "domain == 2" event in the scenario folders and can't find a culprit. Further, when deleting ALL units in the game to just do a test, all the cargo ships perform without issue. This is making me think there might simply be too many units which is causing it to get stupid? In my next playthrough, I'll commit to suffering through watching the long AI turns so I can try and figure out when precisely the behavior manifests as it seems to work well early in the scenario. If I can figure out what the issue is perhaps I can institute a "count" check to determine if the cargo ship is spawned or not.

For now, however, I need a break after trying to source this all morning. Time to playtest Curt's scenario to enjoy someone else's problems lol for a change.
I´m looking forward to this scenario. :) The night bombing over Germany is one of the features that cannot be done well with Civ 3 and may be there is even the radar feature from Over the Reich in your scenario ?

No, I didn't put radar in the scenario. It didn't really seem necessary vs. an AI when they can strike cities on the same turn they launch.
 
Well, now that TNO has indicated that v.018 is going to support 189 unit types, I guess in the near future I'll have some more room to play with. I'm not totally certain I'm going to mess with this scenario with it though as it's sooo close to being done and honestly it took over a year (off and on work) to get the unit roster, unit swaps mechanism, etc. working here. Though of course it would be nice to add, add, add.... Gosh what a great problem to have :)
 
Hello all, this thread is really cool.

JPetroski - Tiny tiny tiny accuracy nitpick, but for the italian tank unit graphic, you might want to use the M13/40 for more accuracy. The L6 was never used in large numbers compared to the L3 and M tanks.
 
Hello all, this thread is really cool.

JPetroski - Tiny tiny tiny accuracy nitpick, but for the italian tank unit graphic, you might want to use the M13/40 for more accuracy. The L6 was never used in large numbers compared to the L3 and M tanks.

Thanks :)

There's 9 different unit files so there's a ton of different tank art (it changes frequently so the L6 isn't there for long). Right now the Italian tank has been repurposed, anyway, as an "Axis Tank" but with TNO's revelation that we have another 62 unit slots, I'm considering giving all the Axis minors their full compliment and would take your advice into consideration at that time.

I was actually doing an analysis to see just how much of a pain it would be to add more units and *most* of the unit swaps were for the Allied stuff with only a few things for Germany, so it's not the end of the world to add more. We'll see when v.018 comes out but I'm thinking of the following:

German Roster Potential Upgrades
-Panzer II and mobile artillery no longer share a slot, so you could research mobile artillery and get it instantly instead of winter '41-'42 as with the current compromise
-German strategic bombers wouldn't need to share a slot with tactical ones
-I could add a "bomb" as payload for the strat bombers to allow more than 2x MP without the cheap "attacking multiple times over a sortie" issue.
-Ta152 could now be something to research rather than having D9's upgrade automatically to it
-I could explore a greater variety of tank destroyers/assault guns
-The return of "Hero" units - why not recycle the aces from OTR if I have some space?
-Addition of V1 and V2 that aren't in the scenario now for want of space
-Perhaps a rail gun or other very large, wasteful object?
-Dedicated recon unit rather than using the halftrack for everything

Axis Minors
-Current minors (Romania, Hungary, Bulgaria, Finland) could expect: Infantry, tank, fighter, bomber, artillery
-Might expand Axis Minors to include Croatia, Spain, Turkey, Iraq (all of which currently use generic units for want of space).

Allied Changes
-Could really flesh out Yugoslavia and the partisan conflict, have a Tito unit
-Could have more generals/super units to contend with than currently available
-ASW aircraft
-More Allied defensive positions - game is lacking without a British/American one but cut for space
-"Potentially" the return of aircraft carriers. Maybe. Potentially. Perhaps.
 
It seems like every day I learn a new thing that ToTPP makes better. This time, it's sounds. Making sounds has always been enjoyable, but for whatever reason it used to be a two computer process for me as I didn't have soundrecorder or other software that could convert the files appropriately to Civ2 on my Windows 10 machine. Now, I can simply use MP3s, or a variety of .wav files that don't have to have such stringent conditions. This has allowed me to source some music and also create some audio files of speeches and such that I think will really add to this scenario. YouTube has some great artists out there, many of whom allow you to freely use their work so long as you credit them, just like all of us do. It's a little touch but it's nice that at this stage the little touches seem to be what I need to spend most of my time on (at least until v.018 comes out and I make the changes above).

I'm quite excited about the Barbarossa song in particular. that moment is the pivotal moment in this scenario and I think people will get amped up for it now.
 
The first production run of Tiger I tanks begins to approach Moscow to put an end to this ridiculous counter-offensive...

upload_2022-1-3_18-51-30.png
 
Top Bottom