The Hinge of Fate - Development Thread

Did I comment out things appropriately in the attached file?
In transport.lua, yes. However, based on the error, it looks like you forgot to comment out the transport.onChooseDefender line in your onChooseDefender function.

Note that if you use this method and want any unit killed events to apply to the transported units, you'll have to move those events from onUnitKilledInCombat to onUnitDefeated.
 
I added Ustase (German controlled) and Chetniks (Minor Nation controlled) to fight with Tito's partisans (Soviet controlled). The three of them are the only ground units in the game that can get into impassable terrain, which should make Yugoslavia a real pain.
 
In WW2 Germany had 11 Gebirgsjäger Divisions, 1 Skijäger Division and 6 SS Gebirgsdivisions. They were elite troops fighting in Norway, Yugoslavia, Greece, Russia (Caucasus), Finland and Crete.

https://en.wikipedia.org/wiki/Gebirgsjäger (here they forgot the 10. Gebirgsjäger Division - there was a 9. Gebirgsjägerdivision Nord and a 9. Gebirgsjägerdivision Ost - and the 1. Skijäger Division)
https://de.wikipedia.org/wiki/Gebirgstruppe_(Deutschland)#Gebirgstruppe_der_Wehrmacht (in German)
 
Last edited:
Thanks! I am thinking it through more though (after I made the changes to the 12 files... ugh) and think I'm probably setting myself up for problems giving the human the ability to access impassable at all. All they'd need to do is bring a chetnik or mountain division or whatever over to Italy and ZOC would prevent the Allies from ever moving. So, I'll probably have to scratch that idea...

Of note however, what's really cool about lua is you could certainly have a "mountain division" that gets a bonus when fighting in hills/mountains. I've made it so that all infantry get a bonus when attacking a city (in addition to ignoring the walls). So, things like mountain divisions can have purpose beyond simply being new art.

There's a few select files (canBuildSettings, initiateCombat, and potentially munitionSettings if you wanted ranged attack) that I think you'd really be interested in exploring more, Tech. They'd be compatible with a scenario mainly built by macro events as neat little addons. I'm not sure how much you're dipping your toes into things but it's well worth it.
 
I'm now feeling fairly confident that I can start another playtest... This one "for keeps." All the additions from 0.18 have been added and I've made several changes to the events file. I still could stand to make some tweaks to the U.S. invasion and I need events to make sure some of the better Allied weaponry in '44 and '45 shows up, but that can be built as I go. It's a 144 turn scenario so it's not like I need all that finished before I get there.

Let's see if the changes I've made and bugs I've fixed lead to a more difficult scenario.

Edit - I'm hopeful, at least, that I'm maybe 1 solid day's work on events away from being finished with those, and then just needing to compile the readme and describe.txt as well as fix a few odds and ends. But, we'll see what is broken in the next few tests ;)
 
This time I took out the B.E.F. in Dunkirk and am going to try my darndest to win the Battle of Britain.

upload_2022-1-29_23-34-32.png
 
The RAF has thwarted me! I needed to reduce them to 3 fighters. I got them down to 6! Now I'll have to keep playing having squandered quite a bit of resources trying to bring them to their knees.
 
I've been saving each turn so I can easily go back and try some different things. I will probably eventually go back and pretend that I won the Battle of Britain and see what happens if Germany commits to an "England First" strategy. For now, we're following a more or less historical track where the Battle of Britain was attempted, but lost, and the mauled Luftwaffe had to be rebuilt.

I'm currently at turn 16 (late December, 1940) and the Italians have been pushed back far enough that the Afrika Korps event triggered. Historically, it would be formed on turn 17 and start arriving around turn 19. This is pretty much when it should contact the enemy, so I think I'm good here. With dice rolls its conceivable the event could fire later on other playtests, anyway. This has played out over multiple playtests so I'm pretty happy with it.

upload_2022-1-30_9-51-59.png


In Europe, I have the Romanians, Hungarians, and Bulgarians advancing into Greece. Yugoslavia has just "turned" Axis, though in the events there's a strong likelihood that the historical path will be chosen and they'll revert Allied soon. There is the possibility I'll catch a break, however...

I'm only a few turns away from Barbarossa (25 is the earliest I can launch it) and I'm not nearly as strong as I was last play through. On the other hand, infantry are far better units now so perhaps it will balance out. I've prioritized researching panzergrenadiers as they should prove immensely useful in Russia now that they are excellent street fighters.

I've discovered a random bug that I can't figure out - my Romanian Bomber does not show the health bar even though I haven't deactivated it in rules. It's one of the 62 extra units, but none of the others (so far) have this issue. It's a little perplexing but we'll see if it keeps up throughout the playtest as the art changes.

All in all - the changes made after the last playtest have made this a better game. The convoys work thanks to Prof. Garfield, which means that Bomber Command is a real threat, and I have to spread resource carefully.

While I am going to look into balance on the Battle of Britain given I, the designer, deliberately tried to win it this round, I think for the most part, this is going to be a game of choices and I don't think you'll be able to just cruise to victory.
 
I've discovered a random bug that I can't figure out - my Romanian Bomber does not show the health bar even though I haven't deactivated it in rules. It's one of the 62 extra units, but none of the others (so far) have this issue. It's a little perplexing but we'll see if it keeps up throughout the playtest as the art changes.
144th slot isn't it (on testing purpose) ?
 
I'm currently at turn 16 (late December, 1940) and the Italians have been pushed back far enough that the Afrika Korps event triggered. Historically, it would be formed on turn 17 and start arriving around turn 19.

Have you taken advantage of v0.18's "get formatted date" feature:

onGetFormattedDate (since 0.18)
civ.scen.onGetFormattedDate(function (turn, defaultDateString) -> string) -> void

Registers a function that is called when the game needs to get the date string for a given turn (e.g. "4000 B.C." for turn 1). `turn` is the turn for which the date is requested (not always the current turn), and `defaultDateString` is the string as formatted by the game

If not, do you need some help?
 
I guess I don't understand what that function does. Right now I have Turn 1, 2, 3 etc.

Are you saying I could relabel these as May 1, 1940 , May 15, 1940, June 1, 1940, June 15, 1940?
 
I guess I don't understand what that function does. Right now I have Turn 1, 2, 3 etc.

Are you saying I could relabel these as May 1, 1940 , May 15, 1940, June 1, 1940, June 15, 1940?

Exactly. The function you register takes the turn that the game wants a date for (as well as the string it would use by default), and returns the string to display as the date.
 
That would be quite interesting but I'm completely at a loss for how to implement it - I assume I'll have a lot of string writing to go, but if I just wanted to replace:

Turn 1 = Early May, 1940
Turn 2 = Late May, 1940
Turn 3 = Early June, 1940
Turn 4 = Late June, 1940

And so on - how would I set this up so I can write the other 140?

civ.scen.onGetFormattedDate(function (turn, defaultDateString) -> string) -> void

The bolded is throwing me as most of the other civ.scen's out there don't have that word in them, so I'm not sure what it's asking me to do...

civ.scen.onNegotiation(negotiationSettings.negotiation)
civ.scen.onSchism(onSchism.onSchism)
civ.scen.onCentauriArrival(triggerEvents.onCentauriArrival)
civ.scen.onBribeUnit(triggerEvents.onBribeUnit)
civ.scen.onGameEnds(triggerEvents.onGameEnds)
civ.scen.onCityFounded(triggerEvents.onCityFounded)
 
The bolded is throwing me as most of the other civ.scen's out there don't have that word in them, so I'm not sure what it's asking me to do...

civ.scen.onGetFormattedDate(function (turn, defaultDateString) -> string) -> void

This is notation telling you that the civ.scen.onGetFormattedDate function takes another function as the argument (and returns void, which is standard for the civ.scen functions). The argument function should be a function that accepts 2 arguments, the first being the turn, and the second being the string that the game would use if this event didn't exist.

This code should work

Code:
local function getScenarioDate(turn,defaultString)
    local turnOffset = 7 -- the turn offset allows the code to be written as if
                          -- Early January is the 0th turn
    turn = turn + turnOffset
    local startYear = 1940
    -- 24 turns per year, so divide by 24 and discard fractional part
    -- to get years since start year
    -- turn 24 would be early January of the beginnin of the next year
    local yearsSinceStart = turn // 24
    local year = startYear + yearsSinceStart
    local monthNumber = (turn % 24)// 2 -- turn % 24 removes the year part of the turn
        -- dividing by 2 (discarding fractional part) gives the month number, with
        -- 0 as January, 11 as December
    local earlyLate = "Early"
    -- turn 0 is an "Early" turn, so odd turns are the "Late" turns
    if turn % 2 == 1 then
      earlyLate = "Late"
    end
    local months = {[0] = "Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"}
    return earlyLate.." "..months[monthNumber]..", "..tostring(year)
end
civ.scen.onGetFormattedDate(getScenarioDate)

No point in having you manually write a calendar table.
 
Top Bottom