Over the Reich - Creation Thread

I won't be changing the events today. I've spent a lot of time this weekend reworking the readme and will likely try to finish that, if possible
 
I've started working on the events.

I noticed that there is a note in the Atlantic for German submarines to press 'k'. What is that supposed to do? Also, do we want to have a convoy from Norway for the Germans?
 
I need to change the note. I misinterpreted how the Battle of the Atlantic worked originally.

I think we would be pretty good with just the French freight trains unless you feel that attacking a freighter or two from Norway would be enough fun to make it worth it.
 
I've been thinking about the French trains, and I've been having trouble figuring out a calculation system that makes the Allies want to send over fighter bombers, but doesn't make them too powerful.

The problem is that loitering some fighter bombers over France puts them at significant risk of being destroyed. If the effect is large enough to risk a couple fighter bombers over France, then it is probably worthwhile to have 2-3 groups of 10-15 loiter over France instead of trying your hand at bombing Germany.

One thought I had was to give the fighter bombers a large point bonus for being at full health, the idea being that it might make sense for the Germans to do a little damage to the fighter bomber to 'chase it off' but not go in for the kill, since they'd then leave other fighter bombers at full health. But this now means that the Germans must either build tons of radar stations in France or send aircraft to look for the fighter-bombers, in what I imagine would be a chore nearly as boring as searching for submarines.

I propose an alternate system. Trains are generated automatically for the German player, and placed at random locations on the French rail network. If the Germans have a high score, these trains are placed on the German turn with full movement, so they can be protected. If the Germans have a low score, the trains are placed during the Allied turn, making them vulnerable to Allied air attack. (I.e. the resistance has reported the train schedule).

This still doesn't give the Allies much of a reason to build fighter bombers over regular fighters to attack trains. My idea is that if a train is killed in an adjacent square to a Jabo aircraft, that unit (or units) get a movement bonus in order to get away.

Thoughts?
 
You have a good point about the goose chase.

We could simplify the points so the Germans either get them or not depending on how many units they have in France, without Allied fighters contributing. If the Allies kill enough German army units (or the Germans withdraw them) it's assumed that the Maquis is being effective.

Could we also just refuse to let the train die unless it is attacked by one of those fighter bombers? Perhaps it respawns with 50% or even 25% health so that other aircraft can slow down trains but only the hurricane IV, typhoon, and Tempest can destroy them?

Then there's a point to building these but at the same time you arent forced to because you could use other aircraft to whittle down the army instead, reducing trains that way.
 
On second thought your idea of giving the movement boost is probably better than only allowing certain aircraft to kill the train
 
How would I read this exactly? This is what occurs when testing to see if a P-51D can intercept an Me262. I'm not quite sure how to break this down to see where the issue is - I look at 3572 and assume it's looking for a triggertypes table yet when I search for triggertypes and go to the P-51D it has:

{triggerTypes=reactionGroups.germanJets, damageSchedule = ds.P51DinterceptionJet}}, }

Over the Reich
Events.lua parsed successfully at 11/20/18 19:16:48


P-51D
D:\Test of Time\Scenario\OTR3\events.lua:3572: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
D:\Test of Time\Scenario\OTR3\events.lua:3572: in upvalue 'getDamage'
D:\Test of Time\Scenario\OTR3\events.lua:3601: in local 'targetReactionDamage'
D:\Test of Time\Scenario\OTR3\reaction.lua:210: in upvalue 'individualReaction'
D:\Test of Time\Scenario\OTR3\reaction.lua:242: in function 'reaction.reaction'
D:\Test of Time\Scenario\OTR3\events.lua:3898: in upvalue 'primaryAttackReactionWrapper'
D:\Test of Time\Scenario\OTR3\events.lua:4496: in function <D:\Test of Time\Scenario\OTR3\events.lua:4270>
 
I was able to figure out what I messed up... I had germanJets as the reaction group instead of luftwaffeJets and some other issues. At some point I'll need the events to do some bug fixing but I'll wait until you release them. I'd rather you have the events until you have other commitments.
 
I haven't worked on the events as much as I planned in the last few days, but I have made some changes, so I still have the events.

I'll set up the French Train bonus using a calculation only involving the German troops in France for now. That way, there is at least something, and we can change when trains spawn or whatever later on if we get a good idea.

Perhaps we can have a system where there is increased resistance activity (i.e. higher threshold for generating trains) if French cities are unhappy or have a food deficit or something of that nature.
 
Well, you really can't increase food in this scenario as irrigation isnt possible, and the only way that French cities would lose food is if Allied bombers targeted them. For these reasons (while it's a great idea for other scenarios) I don't think we need it in this one.

I have 4 days off for the holiday and so I plan to use the time before I have the events to do some "stress testing" and to try and find what bugs I can. I'll fix what I can figure out and post here if stumped.

I found the recent errors while building an appendix in the readme that shows what units can intercept, how often per turn, and at what range. I think this appendix is necessary because the range especially can influence how one sets up their escort situation or defenses (it also helps me take a second look and see if I still agree with my earlier decisions, which I often don't).
 
Changelog 21 November

French train escort system:
To perform anti-partisan duties, a german unit must have full movement points. The movement of all anti-partisan German units is reduced to 0 after the calculation.

Full movement schutzen are worth 3 points, panzers 2 points, artillery 1 point. Units dedicated to anti partisan activity have their move points removed, and contribute to the occupation score. The Germans get 1 train for every 15 points they have above 150 points, up to a maximum of 6.

At the moment, all trains are created at (166,144,0), and any allied units are moved to an adjacent square.

All this will have to be revisited, since, at the moment, southern France is just as important to Germany as USA/Canada are to Great Britain in terms of supplies, but at least there is a very basic form.

Fixed some unit Aliases:

unitAliases.Refinery1 = civ.getUnitType(88)
unitAliases.Refinery1 = civ.getUnitType(89)
unitAliases.Refinery1 = civ.getUnitType(90)

changed to

unitAliases.Refinery1 = civ.getUnitType(88)
unitAliases.Refinery2 = civ.getUnitType(89)
unitAliases.Refinery3 = civ.getUnitType(90)

Maximum allied Freighters: 5 if Germans have 15 or more military ports, 7 if germans have 10-14, 9 if germans have 5-9, 11 if germans have 0-4.

The events are yours to make whatever corrections you find during your holiday.

Air protected stacks: I almost did a basic version of this, but I realized that my move unit function might take a plane off one ground unit and place it on another, so no air protected stacks fix for American Thanksgiving. Do we want to make it so no ground/sea unit can be protected or are there units that are allowed to be defended with an air protected stack? Also, do we want to make an air protected stack check when a new munition is generated, or do we want to do one under the 'after production' functions?

Veteran Swap: Start thinking about the groups of units that can swap veteran status between themselves. I assume veteran swapping must be done in a city/airbase. Do you want it to take the entire turn of both units involved? Should the units be at full health?

I'll probably work on veteran swap and formation flying (press '4' to make all aircraft in a certain radius follow the "leader's" command, which hopefully means 1 unit moves instead of 10 or 20) this weekend, since I can get most of the work done in separate files. Maybe I'll see if I can tidy up combat reporting or something.
 

Attachments

Air protected stacks: I almost did a basic version of this, but I realized that my move unit function might take a plane off one ground unit and place it on another, so no air protected stacks fix for American Thanksgiving. Do we want to make it so no ground/sea unit can be protected or are there units that are allowed to be defended with an air protected stack? Also, do we want to make an air protected stack check when a new munition is generated, or do we want to do one under the 'after production' functions?
Well, only aircraft, ships, and artillery have munitions, but I'd say it makes sense that these classes can get past air protection and attack (still subject to interception/reactive defense of course), so I'd say we just use the munition generation.

Veteran Swap: Start thinking about the groups of units that can swap veteran status between themselves. I assume veteran swapping must be done in a city/airbase. Do you want it to take the entire turn of both units involved? Should the units be at full health?
I'd say we keep it simple - any American fighter can transfer to any other American fighter, Any British fighter to any other British fighter (including fighter bombers), any German fighter to any German fighter. The same for bombers. The 4th FG and several others transitioned throughout the war to different types of aircraft. It should probably take the entire turn of both units as they transition to new mounts. I'd say they should have full health, yes.

I'll probably work on veteran swap and formation flying (press '4' to make all aircraft in a certain radius follow the "leader's" command, which hopefully means 1 unit moves instead of 10 or 20) this weekend, since I can get most of the work done in separate files. Maybe I'll see if I can tidy up combat reporting or something.

I am interested to see how this works! Good to have options.
 
I have a quick question for you. I want to add some text to this:

if tribe == tribeAliases.Allies and counterValue("AlliedScore") >= specialNumbers.invadeItalyThreshold and not civ.hasTech(tribeAliases.Allies, civ.getTech(73)) then
civ.giveTech(tribeAliases.Allies, civ.getTech(73))
end

Is it as simple as adding in civ.ui.text(func.splitlines(textAliases.newText)) so that it looks like this:

if tribe == tribeAliases.Allies and counterValue("AlliedScore") >= specialNumbers.invadeItalyThreshold and not civ.hasTech(tribeAliases.Allies, civ.getTech(73)) then
civ.ui.text(func.splitlines(textAliases.newText))
civ.giveTech(tribeAliases.Allies, civ.getTech(73))
end

And if so, if I do that, is that text going to pop every single turn that there is the points threshold? I don't see justOnce and don't think it's needed the way you currently have things set up but I'm curious if I would need to add it somewhere to prevent text from repeating.

Am I putting the line in the correct place and following along?
 
Is it as simple as adding in civ.ui.text(func.splitlines(textAliases.newText)) so that it looks like this:

if tribe == tribeAliases.Allies and counterValue("AlliedScore") >= specialNumbers.invadeItalyThreshold and not civ.hasTech(tribeAliases.Allies, civ.getTech(73)) then
civ.ui.text(func.splitlines(textAliases.newText))
civ.giveTech(tribeAliases.Allies, civ.getTech(73))
end

Yes, that is how to do it. If you want a title, you would have to use the 'dialog' system instead. the condition and not civ.hasTech(tribeAliases.Allies, civ.getTech(73)) means this code only runs when the allies don't have tech 73. Since this piece of code gives them tech 73, it will only run once.
 
At the moment, V1s and V2s can attack land and sea units on map 0, which we probably don't want. Just as we've done with Flak, we can generate the munition on the night map, and use lua to remove their native transport abilities.

EDIT: Also, the bombed out terrain on map 2 has move cost of 1, when the equivalent terrain on map 0 has a cost of 2. Is this deliberate?
 
Last edited:
I'll see if I can fix the V1/V2 while I have the events. Now that they're exclusively meant to target population centers, there's no point to them being on the 0 map.

That is a mistake that I'll correct. Thanks for catching it.
 
So I'm trying to add some flavor text the first time a B-17F is destroyed, but adding this code:

Code:
if loser.type == unitAliases.Freighter then
        incrementCounter("GermanScore",specialNumbers.germanScoreIncrementSinkFreighter)
        elseif loser.type == unitAliases.B17F or loser.type == unitAliases.B17G then
        justOnce (civ.ui.text("Testing1."))
            incrementCounter("GermanScore",.75*specialNumbers.germanScoreIncrementKillHeavyBomber)

leads to this error. What am I doing wrong?


Code:
UnitType<id=50, name="P-47D11", prereq="Escort Fighters I", domain=1, attack=0, defense=7, hitpoints=20, firepower=2>
30
UnitType<id=35, name="Spitfire IX", prereq="<nil>", domain=1, attack=0, defense=6, hitpoints=20, firepower=2>
20
D:\Test of Time\lua\civlua.lua:18: attempt to call a nil value (local 'f')
stack traceback:
    D:\Test of Time\lua\civlua.lua:18: in function 'civlua.justOnce'
    D:\Test of Time\Scenario\OTR3\events.lua:4174: in upvalue 'justOnce'
    D:\Test of Time\Scenario\OTR3\events.lua:5316: in function <D:\Test of Time\Scenario\OTR3\events.lua:5181>
 
justOnce(key,function) takes a string as the first argument (a string to put in the state table to tell if it has already been run). Try justOnce("testJustOnce",civ.ui.text("Testing1.")) instead.
 
Unfortunately that throws the same error. I'm going to "park" some text at certain turns for now while I work through some flavor text tonight.
 
I have unit formations mostly working. There are a couple bugs to fix and cases to check, but all the work looks like it will be in the required file from now on. If you can let me have the events for a couple hours (well, ~15 minutes once I notice they are available) I'll give you something you'll want to make a video about. Seriously, this will be a massive quality of life improvement for almost any scenario, so at some point I'll have to make a generalized version of it
 
Back
Top Bottom