Over the Reich - Creation Thread

I'm going to add in a few things:

Reactions -I think I need to rework these in several places
**Tactical bombers draw a reaction but I never noticed any damage - I could have been lucky as it was just a few times, but I'm not sure.....

Do you mean reaction fire from fighters or Flak? Certainly the latter is working well on A-20s.

Sunderlands and Condors
**I never bothered to build a single one in any playtest. I'm not sure if anyone has. They're totally outclassed by the A-20s for anti-sub work currently. I was thinking of doing this: Maybe they stay expensive, but they aren't payload aircraft. Perhaps they can attack with bombs twice per turn. I think if they could stay aloft hunting and could take out 2x U-Boat/freighter per turn, they might be worth their cost.

I built 2 I think, purely because I assumed they were the only passive defensive unit that could be parked next to a convoy and I lost a couple early on in the game, but yes, A-20s were far more use in general for ASW. As you say, a buff for the Sunderland would be good given their high cost.

Allied Production
**Allies might need a little tweak in unit costs downward.

I'm not sure that's a problem at the moment. I was able to produce plenty of P-47s and B-17s; enough in fact for the limiting factor to be how quickly I could build new airfields to accommodate them.
 
Here are the parameters that I've currently planned for the new reactions. Let me know if there is some functionality that I've forgotten or that you want. In particular, I have it set up so that the chance of hitting a target can be modified by clouds and technology, but the damage done if a target is hit remains consistent. However, differences in altitude can still result in different damage schedules.

Code:
-- reactionDetail
--
-- A reactionDetail is a table that specifies how a unit will react
-- under a given circumstance (e.g. vs a specific trigger unit type,
-- and the map they are both on)
--
--      Keys
--          targetTypes = table of unit types
--              The reactionDetail applies to the unit types in this table
--          maxDistance = integer
--              maximum number of tiles that a potential shooter can be from the target
--              to still participate in a reaction
--          forbiddenShooterTerrain = {[integer]=bool}
--              if the shooter's location has a terrain type with a 'true' listing,
--              the shooter won't make a reaction
--          hitChance = number or {[integer]=number}
--              chance that the shooter will hit the target
--              if a table, the key is the distance in tiles between the shooter
--              and the target (e.g. hitChance[2] is the chance that a unit two tiles
--              away will hit the target).  If hitChance[dist] = nil, count as 0
--              (could be modified below, and subject to minChance, maxChance,
--              use maxDistance to stop reaction entirely)
--          hitChanceCloud = number
--              chance the shooter will hit a target in cloud terrain
--              nil means use hitChance
--          shooterTechMod = table of {techObject,number}
--              for each technology the shooter has, add the number to the hit chance
--              nil means no modification
--          targetTechMod = table of {techObject,number}
--              for each technology the target has, add the number to the hit chance
--              nil means no modification
--          shooterTechModCloud = table of {techObject,number}
--              apply this instead of shooterTechMod, if the target is in clouds
--              nil means use shooterTechMod
--          targetTechModCloud = table of {techObject,number}
--              apply this instead of targetTechMod, if the target is in clouds
--              nil means use targetTechMod
--          minChance = number
--              this is the lowest likelihood that the shooter hits a target (even
--              if modifications would make it lower)
--              nil means 0
--          maxChance = number
--              this is the greatest likelihood that the shooter hits a target
--              (even if modifications would make it higher)
--              nil means 1
--          damageSchedule = thresholdTable
--              Governs the damage done IF a hit is scored
--              thresholdTable must return a number for damageSchedule[0]
--              consider myDamageSchedule = makeThresholdTable({[0]=6,[0.3]=3,[0.8]=0,[.85]=1})
--              30% chance of 6 damage ('roll' between 0 and .3)
--              50% chance of 3 damage ('roll' between .3 and .8)
--              5% chance of 0 damage ('roll' between .8 and .85)
--              15% chance of 1 damage ('roll' between .85 and 1)
--    


-- reactionInformation
--
-- puts together some reactionDetails in order to specify how a particular unit type
-- will react under different circumstances

--
--      Keys
--          low = table of reactionDetail
--              governs how the shooter will react at low altitude to other units at low altitude
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--          high = table of reactionDetail
--              governs how the shooter will react at high altitude to other units at high altitude
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--          night = table of reactionDetail
--              governs how the shooter will react at night to other units at night
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--          dive = table of reactionDetail
--              governs how a shooter at high altitude will react to a target at low altitude
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--          climb = table of reactionDetail
--              governs how a shooter at low altitude will react to a target at high altitude
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--          groundToNight = table of reactionDetail
--              governs how a shooter at low altitude will react to a target at night
--              the unit types in targetTypes should only appear in one reactionDetail each in this table
--              absent means the shooter won't react for these unit locations
--    
--          reactionsPerTurn = integer
--              the number of reactions a unit can make per turn
--              nil means unlimited
--          forbiddenShooterTerrain = {[integer]=bool}
--              if the shooter's location has a terrain type with a 'true' listing,
--              the shooter won't make a reaction
--          reactInsideCity = bool
--              if true, the shooter can react from inside a city/airbase and when stacked with a carrier
--              nil or false means it can't
--          killMunition = bool or number
--              if true, and the shooter's attack kills the target, destroy the target's munitions
--              if number between 0 and .9999, destroy each munition with that probability
--              if the number is 1 or larger, do that much damage to each munition
 
It looks good to me though I'll probably need an example of "hit chance." I'll start thinking about what units would react to what and how and compare it against what we currently have.
 
This model of reaction has two components to damage: the chance to hit and the damage done if hit. Strictly speaking, these can be rolled up into the damage done schedule, but it is easier to think of them separately. For example, flak might have a 50% chance to hit in clear skies, but only 25% chance to hit in clouds, but radar guided flak would restore the hit chance to 50%. In the event of a hit, the same amount of damage would be done in either case, but because of the hit chance, flak is less effective if the target is in clouds.

For the table version, for a fighter you could have {[1]=.9,[2]=.9,[3]=.5,[4]=.25,[5]=.1}. This would mean that a fighter stands a 90% chance to intercept a trigger unit within 2 squares, but the chance drops off to 10% if the units are 5 squares apart. This would mean that there isn't a clear in range/out of range dividing line, but that nearer escorts are more likely to effectively intercept an attacker.
 
Here are event changes (in 2 zips, since I had them in different folders). The file reactionsOTR is the file where you can change reaction stuff (so you don't need the actual events file to do that, and I can keep them and make other changes). I moved the unitAliases to their own file, so they can be referenced in reactionsOTR. I hope I haven't forgotten anything, so let me know if you run into errors.

I have done some testing of the new reaction system, but not extensive testing (the values in place are for testing, not suggestions of actual values to use), so as you fill in the tables, you might find something that needs to be fixed. By default, a maximum of 10 units can make a reaction to any target, but this number can be changed in the special numbers.

I'll probably get started on the other changes a little later.
 

Attachments

  • OTRChanges1.zip
    132 KB · Views: 132
  • OTRChanges2.zip
    14.9 KB · Views: 134
Here are the changes that still have to be made. I'll mark these in green when completed.

Event Changes:

Remove veteran status from new U-Boats.
Give vet status to some convoys, preferably in a way that is dependant on how the battle of the Atlantic is going.
*Prevent V1 and V2 from stacking with gun batteries and battle groups.

*Require rockets to be manufactured -- Not currently going to be done
*Points on the night map can still be gathered under rocket interdict

Remove Wilde Sau bonus for ME110 and 410
Fighters immune to A2A rockets
Landing in city reduces health and MP, rather than outright deletion.
Remove the fortification mechanic for flak.



Event Table Changes:
Remove ranged attack from task forces.
Remove ranged attack from heavy flak and flak trains (light flak can still attack)
Hard to kill only for bombers Note: Hard to kill still for aces/experten

Fighters immune to A2A rockets Note: not immune inside cities/airbases
Make new reactions tables.
Sunderlands need stronger reaction against submarines, or some other benefit.
ME110 and ME410 should not have rockets at night. Maybe night ace shouldn't have them either.

Rules Changes:
Task forces get attack value, other units changed accordingly.
Review cost of heavy flak.
Tweak allied production costs.
Wilde Sau not nuclear power (or, up torpedo mp cost by 1 in event table instead)

Map Changes:
Installation established for some radar stations
Modify battle of the Atlantic and Occupation text on lower map
Check tiles (358,66),(274,82),(277,81),(279,81)

With regard to the V1 and V2 rockets, here are some thoughts:

The Allied player must destroy at least some launch sites because otherwise they can't get points and progress the game, at least once the Germans get a critical mass to be able to destroy an urban target every couple turns. This is especially true of the V2, which can't be intercepted en route. However, it is very difficult to destroy launch sites if they are stacked under a gun battery or even flak, and impossible if stacked with a battle group (except on the off chance that the launch site defends from high health while the battle group is at low health, and is defeated). Although the defence can technically be defeated, in practice it is impractical to do so.

What can we do? One option is nothing, and basically argue that if the Germans get such a critical mass of V1s and V2s, that they've won. I think there is a little to that, but not very much.

Another option is to give up the point penalty, or reduce the penalty to just gaining a fraction of the points that would ordinarily be received. This is easy, since the parameter is already in the special numbers table. However, I like the political mechanic that the Germans can build some of these weapons and impose political costs on the Allies that translate into wasted resources. We might allow the Allies to still gain points at night, just not during the day.

We can move V1 and V2 launch sites off the same squares as other defensive units. If we include flak in the forbidden stack protection, this would mean that flak can shoot down attacking planes, but not act as a shield for the launch sites.

V1 and V2 attacks seem rather inexpensive, costing only fuel, and not all that much of it all things considered. Perhaps we could impose a cost to re-arm launch sites. Cities can produce V1 and V2 rockets, and when they are produced, an event immediately deletes them and adds 1 to a counter for the appropriate weapon. When a launch site generates a unit, 1 is removed from the appropriate counter, or the unit isn't created if the counter is down to 0. This way there is no logistics, and attacks are still cheaper than with bombers, but the cost is more than 50-75 fuel or whatever the cost is.
 
Last edited:
Just so you're aware of my schedule, we're showing our house to some prospective buyers Tuesday trying to avoid putting it on the market, so it's all hands on deck until that is done. After then, I can start plugging away at some stuff. So please feel free to keep the events until then as I won't have much time.

I think probably the easiest way to address the V1/V2 launch sites is to move the defender off of their square. The counter would be interesting but seems like a lot of work, no? I've already significantly increased their cost.
 
That's fine. I'll keep the events. I should get much of the list done tomorrow.

For the moment, V1 and V2 launch sites can't be stacked with gun batteries, battle groups, or any kind of flak unit. We may want to increase their defences somewhat, or allow stacking with flak. I'm inclined to think a modest defense increase is preferable.
 

Attachments

  • Events.lua.zip
    126.3 KB · Views: 144
changelog:

Wilde Sau bonus removed from ME110, ME410

overTwoHundred.rocketInvulnerableTable describes what units can't be damaged by rockets.
Same as regensburgFighters, except, the following units are included:
Spitfire (all variants), Ju87G,all expertens and aces, MossiePR,Ju188
These can still be hit with rockets inside an airbase (on the basis that they're not agile on the ground)

Planes only get deleted if they land in the incorrect 'theatre'. Appropriate messages are displayed.

removed the fortify passive flak from afterProduction
removed munitions from GermanFlak, AlliedFlak, FlakTrain,
removed munitions from GermanTaskForce,AlliedTaskForce


Task forces have 8 attack, 8 defense, and x5 vs missiles -- defense vs munitions raised from 35 to 40
Carriers have 0 attack, 5 defense, and x5 vs missiles -- defense vs munitions raised from 20 to 25
Convoys have 2 attack, 4 defense, and x5 vs missiles -- defense vs munitions constant at 20
Subs have 0 attack, 2 defense, and x5 vs missiles -- defense vs munitions raised from 6 to 10

ME110 and ME410 now have rockets as a secondary attack, only for the day. Primary attack is medium guns (unit 96), at a cost of 8 and 9 mp respectively.

UBoats now take 6 movement points to make a torpedo.

P47s and FW190s no longer hard to kill. Only bombers and aces/experten are hard to kill

All newly produced sea units do not receive veteran status (including those produced by the Allies).

When a convoy is sunk, the chance of a new convoy being veteran is increased by 20%, when one docks successfully, the chance is reduced by 5%. The minumum chance is 0 (so lots of successful dockings don't mean that there have to be lots of sinkings before vet status is bestowed), and the maximum chance is 3 (so if the Allies lost a lot of convoys, they can 'stock up' veteran status for new convoys for a little while, but there is a limit). If the chance is above 1, all new convoys are veterans.

specialNumbers.convoySinkingVetChanceIncrement = 0.2 -- increase the chance that a new convoy is veteran by this much each time a convoy is sunk
specialNumbers.convoyDockingVetChanceIncrement = -0.05 -- increase the chance that a new convoy is veteran by this amount each time a convoy docks successfully (should be negative)
specialNumbers.minConvoyVetChance = 0 -- the accumulated convoy vet chance can't go below this number, if it is less than 0, convoys must be sunk to bring the chance back up to 0 before convoys start becoming veterans
specialNumbers.maxConvoyVetChance = 3 -- the accumulated convoy vet chance can't exceed this number. If it is greater than 1, docking convoys won't reduce the chance of veteran status until the ConvoyVetChance counter is reduced below 1
 

Attachments

  • OTREvents-5-July.zip
    142.5 KB · Views: 114
Do you still have these or can I work them if I have time tomorrow? Today is unlikely.
 
OK great. I'll try to get cracking on the reactions as that will knock several things off the list. I'll see if I can manage the help text in the events at least. I'm not touching the readme until another playtest confirms we've nailed it.
 
The file reactionsOTR is the file where you can change reaction stuff

So OTR3ReactionDetails is a legacy file that is no longer necessary and I'm not messing with - correct? It has a last modified date of 2018 so I assume this is correct and I am ONLY messing with reactionsOTR? I plan on taking a crack at this around 4 a.m. tomorrow and will be groggy so figured I'd better get that sorted first!
 
Oh and btw - nice work on this... The tables are 800% easier than before. It's a lot of work for me to do, but I'm pretty excited to do it as I think I can get things precisely how I want them.
 
So OTR3ReactionDetails is a legacy file that is no longer necessary and I'm not messing with - correct? It has a last modified date of 2018 so I assume this is correct and I am ONLY messing with reactionsOTR? I plan on taking a crack at this around 4 a.m. tomorrow and will be groggy so figured I'd better get that sorted first!

Yes, it looks like it was started but never used. reaction.lua should be obsolete as well. There are probably other files that aren't needed, not to mention tons of commented out code in events.lua that it probably makes sense to delete. Not to mention, tables and code for the old reactions that I didn't remove, since all I had to do was replace a couple lines with the new functions.
 
This is definitely more powerful than the last version and easier to use but I've managed to make it so that some fighters are going to have as many as 55 different reactions to specify (11 reactionGroups x the 5 'scenarios' of climb, dive, low, high, night.

I will be at this for awhile!

Edit:

This is valid, correct? There are some situations where I only want something to have any chance of reaction at 1 space, and that change to be quite dismal (here we see the Me109G6's chance of hitting a jet bomber).

maxDistance = 1,
hitChance = .05
 
This is definitely more powerful than the last version and easier to use but I've managed to make it so that some fighters are going to have as many as 55 different reactions to specify (11 reactionGroups x the 5 'scenarios' of climb, dive, low, high, night.

I will be at this for awhile!

Do you need a programmatic way to generate some of the data? There is a modifyTable function in the file that will let you change up to three table keys (everything will be copied, so you're not changing stuff in the original table), and I could write something more specific if you need it.

You also have the option of writing the canReact, hitProbability, and damageSchedule functions directly if there is a relatively simple logic to your aircraft reactions.

Edit:

This is valid, correct? There are some situations where I only want something to have any chance of reaction at 1 space, and that change to be quite dismal (here we see the Me109G6's chance of hitting a jet bomber).

maxDistance = 1,
hitChance = .05

That should work. It would mean that the 109G6 would have to be on a square adjacent to the jet bomber, and then would have only a 5% chance of hitting. If you want to test this, you should probably increase the maximum number of units that can react, and stack 20 fighters on the adjacent square.

You might consider that the 5% hit chance would still 'use up' a reaction, and so having a weak reaction to the jet bomber could be worse than not having a reaction at all, if the fighter could later attempt to intercept a prop bomber on the turn.
 
Do you need a programmatic way to generate some of the data?
Let me see how it goes first - I think it won't be that big of a deal once I get the first one done. I'm making it somewhat complicated but it will better represent the comparative strengths and weaknesses of the aircraft.

You might consider that the 5% hit chance would still 'use up' a reaction, and so having a weak reaction to the jet bomber could be worse than not having a reaction at all, if the fighter could later attempt to intercept a prop bomber on the turn.

That is a good point I hadn't considered.
 
I'm trying to simplify things to an extent. I'll use the hitchance to make upgraded models better than earlier ones, but I think someone ought to be able to tell at a glance how their units should do. Something like this ought to be simple enough to place in a color coded graph as well for the readme.

--STANDARD FIGHTER VS. FIGHTER
--damageSchedule = gen.makeThresholdTable({[0]=3,[.25]=4,[.5]=5,[.75]=6}), --Strong attack - unit in their element catching unit outside of element (includes dive and nightfighter caught at day)
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Medium attack - unit in (or out of) their element vs. foe in (or out of) its element: Even match
--damageSchedule = gen.makeThresholdTable({[0]=1,[.25]=2,[.5]=3,[.75]=4}), --Weak attack - unit out of element vs. foe in its element (includes day fighter vs. nightfighter at night)

--JET FIGHTERS VS. FIGHTERS
--damageSchedule = gen.makeThresholdTable({[0]=6,[.25]=7,[.5]=8,[.75]=9}), --Strong attack - jet vs. propeller fighter
--damageSchedule = gen.makeThresholdTable({[0]=3,[.25]=4,[.5]=5,[.75]=6}), --Medium attack - jet vs. jet: Even match
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Weak attack - jet is climbing to attack a fighter

--JET FIGHTERS VS. BOMBERS
--damageSchedule = gen.makeThresholdTable({[0]=7,[.25]=8,[.5]=9,[.75]=10}), --Strong attack - jet vs. light or medium bomber
--damageSchedule = gen.makeThresholdTable({[0]=6,[.25]=7,[.5]=8,[.75]=9}), --Medium attack - jet vs. heavy bomber
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=4,[.5]=6,[.75]=8}), --Weak attack - jet vs. jet bomber, or any bomber at night/climbing

--BOMBER DEFENSIVE GUNS
--damageSchedule = gen.makeThresholdTable({[0]=3,[.25]=4,[.5]=5,[.75]=6}), --Strong attack - bomber reacts to escort fighter
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Medium attack - bomber reacts to interceptor
--damageSchedule = gen.makeThresholdTable({[0]=1,[.25]=2,[.5]=3,[.75]=4}), --Weak attack - bomber reacts to armored interceptor, or anything at night

--FIGHTER VS. BOMBER
--damageSchedule = gen.makeThresholdTable({[0]=3,[.25]=4,[.5]=5,[.75]=6}), --Strong attack - bomber attacked by Bomber Destroyer (day only)
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Medium attack - bomber attacked by Interceptor or dedicated night fighter, also CAS attacked by escort
--damageSchedule = gen.makeThresholdTable({[0]=1,[.25]=2,[.5]=3,[.75]=4}), --Weak attack - bomber attacked by Escort, or day fighter flying at night,

--FLAK VS. AIRCRAFT
--damageSchedule = gen.makeThresholdTable({[0]=3,[.25]=4,[.5]=5,[.75]=6}), --Strong attack - reaction against most aircraft at low altitude - exception: armored aircraft
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Medium attack - reaction against most bombers at high altitude
--damageSchedule = gen.makeThresholdTable({[0]=1,[.25]=2,[.5]=3,[.75]=4}), --Weak attack - reaction against fighters at high altitude, armored fighters and jets at low altitude, jet bombers at high alt

--TASK FORCE VS. Attackers (Sunderland shares Strong Attack).
--damageSchedule = gen.makeThresholdTable({[0]=0,[.25]=5,[.5]=15,[.75]=20}), --Strong attack - reaction against U-Boats (25% chance of miss, 25% chance of kill, 25% chance of various damage)
--damageSchedule = gen.makeThresholdTable({[0]=2,[.25]=3,[.5]=4,[.75]=5}), --Medium attack - reaction against most aircraft
--damageSchedule = gen.makeThresholdTable({[0]=1,[.25]=2,[.5]=3,[.75]=4}), --Weak attack - reaction against Sunderland and FW200.
 
I decided I'd better test this after getting through the Me109G6 and I got this issue. I'm not sure where to go with this:

Code:
D:\Test of Time\Scenario\OTR\generalLibrary.lua:1450: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
    [C]: in function 'pairs'
    D:\Test of Time\Scenario\OTR\generalLibrary.lua:1450: in function 'generalLibrary.inTable'
    .\reactionsOTR.lua:707: in upvalue 'canReact'
    .\reactionBase.lua:73: in local 'getReactionUnits'
    .\reactionBase.lua:202: in function 'reactionBase.reactionEngine'
    .\reactionsOTR.lua:857: in function 'reactionsOTR.makeReaction'
    D:\Test of Time\Scenario\OTR\Events.lua:6086: in upvalue 'primaryAttackReactionWrapper'
    D:\Test of Time\Scenario\OTR\Events.lua:8577: in function <D:\Test of Time\Scenario\OTR\Events.lua:8101>

I'm attaching the file - can you please let me know if I messed something up while building out the 109? I don't want to do the other 100 odd aircraft and find I made the same mistake everywhere :) All the lines selected appear to be beyond what I worked on. This was while testing a 109G6's reaction against a Stirling at night, by the way.
 

Attachments

  • reactionsOTR.zip
    5.9 KB · Views: 135
Top Bottom