Over the Reich - Creation Thread

I downloaded the files I submitted, and got the same thing you did, so somehow I managed to screw up the file upload. Try again, it should work now (I hope). I was getting worried that there might be a difference between different releases of TOT.

It's working and it's beautiful :) I've only ever had the 109 attack once - is there a reason for this or is it possible for them to attack multiple times per turn, as in the base game? If not, we'll probably need to script a "leader bonus" to give the 190s more powerful ammunition than the 109s to compensate for the fact that they can't simply fire more times.
 
For some reason that I didn't want to debug, the munition generating code wasn't deducting movement points from the AI unit, leading the unit to wait around forever just 'pressing' k. The 1 attack was the result of a work around in the 'AI' code.

Comment out this line (10963 in my file, maybe a couple lines off in yours)
-- unit.moveSpent = unit.type.move-2
Replace with something like
unit.moveSpent = unit.moveSpent+4

It looks like a single unit will expend all its movement, before the game moves on to the next unit (that is, 'activate' for the AI may not work). There's probably a decent amount of debugging to do in 'guiding' the AI. It would be unfortunate if all planes move to the same enemy, generated munitions, and then the munitions attack.
 
For some reason that I didn't want to debug, the munition generating code wasn't deducting movement points from the AI unit, leading the unit to wait around forever just 'pressing' k. The 1 attack was the result of a work around in the 'AI' code.

Comment out this line (10963 in my file, maybe a couple lines off in yours)
-- unit.moveSpent = unit.type.move-2
Replace with something like
unit.moveSpent = unit.moveSpent+4

It looks like a single unit will expend all its movement, before the game moves on to the next unit (that is, 'activate' for the AI may not work). There's probably a decent amount of debugging to do in 'guiding' the AI. It would be unfortunate if all planes move to the same enemy, generated munitions, and then the munitions attack.

If getting these to work for the AI is something that you would find enjoyable, I'm not going to try and stop you, but I think we could also just make AI units behave "in standard fashion." I think the biggest challenge we are going to face is getting the AI to go where we want it to, without stacking up like a bunch of dummies in one tile. That was the issue that forced Nemo to abandon The Blitz, and that behavior will likely be the one we need to address first and foremost.
 
If getting these to work for the AI is something that you would find enjoyable, I'm not going to try and stop you, but I think we could also just make AI units behave "in standard fashion." I think the biggest challenge we are going to face is getting the AI to go where we want it to, without stacking up like a bunch of dummies in one tile. That was the issue that forced Nemo to abandon The Blitz, and that behavior will likely be the one we need to address first and foremost.

I did the work two days ago because it struck my fancy. I didn't spend all that long on it. When the time actually comes, I might spend a little time seeing if I can a semi-competent k attacking AI. If I can't then we have the fallback of giving units attack values.

We can always use an after production trigger to 'unstack' the AI if all else fails. It might not be too hard, however, to give units goto orders so that they don't stack, since we can check if the intended destination already has a unit, and, if so, set the goto to an adjacent tile or something.
 
I've run into a bit of a problem with the Peenemunde event.

The problem is that the command tribe.researching crashes to desktop if called on a civ that is not currently researching anything. The problem is that if Peenemunde grants the currently researching tech, and the Germans don't happen to be researching anything at that moment, there will be a crash to desktop. We could just give 10% of the current research cost to the German player each turn, and that wouldn't be too much waste if the beaker box is already full after production. I'll implement this, and then change it if necessary.
 
Events are available, but let me know if you take them.

Have a look at the changelog, I've done slightly different things with some of the Critical Industries. Let me know if you want them changed. You may also want to tweak the parameters.

changelog

Code:
specialNumbers.uBoatBonusThreshold = 3 -- if Germany below this many uBoats/Wolf Packs, they will get uboats with the Hamburg critical industry
specialNumbers.uBoatBonusPerTurn = 1 -- Germany gets this many uBoat/Wolf Packs per turn, if they qualify for the bonus
specialNumbers.uBoatDeployDamage = 5 -- Uboats take this much damage if they deploy to the Atlantic using the Blohm und Voss special function (with backspace)
specialNumbers.bonusME109 = 1 -- If the Regensburg critical industry is active, every ME109 produced gets this many extra 109s given at the same time (fractional parts are probability, e.g. .8 means 80% chance of extra 109, 1.2 means 1, and 20% chance of second bonus
specialNumbers.fighterParity = 0.35 -- ME109s (best kind available) will be created for the Germans if their total fighter count is below this fraction of the Allied fighter count (certain planes may be excluded from the count)
specialNumbers.messerschmidtAirbaseLocation = {341,117,0} -- location of airbase where 109s appear if germany falls below the fighter threshold vs the allies
specialNumbers.aircraftRecoveryBonus = 20 -- this much damage is healed off an aircraft that spends its entire turn in an airfield, if the Schweinfurt critical industry is active
specialNumbers.turnsForFreePeenemundeTech = 10 -- Peenemunde critical industry gives a technology after this many turns elapse
specialNumbers.berlinFuelFraction = 0.5 -- if the Berlin critical industry is active, the Germans only pay this fraction of the regular fuel cost for aircraft operations

Blohm und Voss U-Boot Werke creates a uBoat each turn in Hamburg, if Germany currently possesses less than 3 uboats.
A uBoat with full movement and health can deploy to a random tile in the Atlantic (in a box south of Ireland, north of Spain, west of Brest, at a cost of all its movement, and 5hp, if the u-Boat is in a town with a military port and Hamburg has its critical industry. This might be a little too powerful.

Regensburg gives 1 109 for each produced. These appear in the same airfield where the first was produced.

If German fighter count is less than 35% of allied fighter count, extra 109s are sent to Pocking AF. We might want to build an airbase near an aircraft factory (but, maybe, not attached to rails) for the planes to be delivered. Check this list to see that everything is included/excluded correctly (especially German aircraft, which I'm not familiar with.

Code:
-- these units are counted for the purposes of determining the number of
-- free fighters Germany will get
overTwoHundred.regensburgFighters = {}

overTwoHundred.regensburgFighters[unitAliases.Me109G6.id]               =true
overTwoHundred.regensburgFighters[unitAliases.Me109G14.id]       =true  
overTwoHundred.regensburgFighters[unitAliases.Me109K4.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Fw190A5.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Fw190A8.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Fw190D9.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Ta152.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Me110.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Me410.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Ju88C.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Ju88G.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.He219.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.He162.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Me163.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Me262.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Ju87G.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Fw190F.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Do335.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Do217.id]               =false
overTwoHundred.regensburgFighters[unitAliases.He277.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Arado234.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Go229.id]               =false
overTwoHundred.regensburgFighters[unitAliases.SpitfireIX.id]           =false
overTwoHundred.regensburgFighters[unitAliases.SpitfireXII.id]           =false
overTwoHundred.regensburgFighters[unitAliases.SpitfireXIV.id]           =false
overTwoHundred.regensburgFighters[unitAliases.HurricaneIV.id]       =true  
overTwoHundred.regensburgFighters[unitAliases.Typhoon.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Tempest.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Meteor.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Beaufighter.id]       =true  
overTwoHundred.regensburgFighters[unitAliases.MosquitoII.id]       =true  
overTwoHundred.regensburgFighters[unitAliases.MosquitoXIII.id]   =true  
overTwoHundred.regensburgFighters[unitAliases.P47D11.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P47D25.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P47D40.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P38H.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P38J.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P38L.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P51B.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P51D.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.P80.id]               =true  
overTwoHundred.regensburgFighters[unitAliases.Stirling.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Halifax.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Lancaster.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Pathfinder.id]           =false
overTwoHundred.regensburgFighters[unitAliases.A20.id]                   =false
overTwoHundred.regensburgFighters[unitAliases.B26.id]                   =false
overTwoHundred.regensburgFighters[unitAliases.A26.id]                   =false
overTwoHundred.regensburgFighters[unitAliases.B17F.id]               =false
overTwoHundred.regensburgFighters[unitAliases.B24J.id]               =false
overTwoHundred.regensburgFighters[unitAliases.B17G.id]               =false
overTwoHundred.regensburgFighters[unitAliases.EgonMayer.id]           =false
overTwoHundred.regensburgFighters[unitAliases.AlliedFlak.id]           =false
overTwoHundred.regensburgFighters[unitAliases.He111.id]               =false
overTwoHundred.regensburgFighters[unitAliases.Sunderland.id]           =false
overTwoHundred.regensburgFighters[unitAliases.HermannGraf.id]           =false
overTwoHundred.regensburgFighters[unitAliases.JosefPriller.id]       =false
overTwoHundred.regensburgFighters[unitAliases.AdolfGalland.id]       =false
overTwoHundred.regensburgFighters[unitAliases.GermanTaskForce.id]       =false
overTwoHundred.regensburgFighters[unitAliases.AlliedTaskForce.id]       =false
overTwoHundred.regensburgFighters[unitAliases.RedTails.id]       =true  
overTwoHundred.regensburgFighters[unitAliases.MedBombers.id]           =false
overTwoHundred.regensburgFighters[unitAliases.FifteenthAF.id]         =false
overTwoHundred.regensburgFighters[unitAliases.GunBattery.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Yak3.id]           =true  
overTwoHundred.regensburgFighters[unitAliases.Il2.id]                   =false
overTwoHundred.regensburgFighters[unitAliases.Ju188.id]               =false
overTwoHundred.regensburgFighters[unitAliases.MossiePR.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Freighter.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Convoy.id]              =false
overTwoHundred.regensburgFighters[unitAliases.GermanLightFlak.id]       =false
overTwoHundred.regensburgFighters[unitAliases.AlliedLightFlak.id]       =false
overTwoHundred.regensburgFighters[unitAliases.Carrier.id]               =false
overTwoHundred.regensburgFighters[unitAliases.damagedB17F.id]           =false
overTwoHundred.regensburgFighters[unitAliases.damagedB17G.id]           =false
overTwoHundred.regensburgFighters[unitAliases.UBoat.id]               =false
overTwoHundred.regensburgFighters[unitAliases.hwSchnaufer.id]           =false
overTwoHundred.regensburgFighters[unitAliases.Experten.id]           =false

I think this will be helpful with balance; I tested it on the last turn of our playtest, and you'd have gotten something like 60 aircraft at a 35% fighter ratio.

Berlin critical industry multiplies German aircraft fuel expense by 0.5

Peenemunde gives 1/10 of the current research cost each turn.

Schweinfurt critical industry increases health of air units that didn't move on previous turn and are in cities. (done in OnTurn event, not afterProduction)

Schweinfurt critical industry provides one civilian improvement for building industry improvements (not refinery, aircraft factory)

If a city/airfield can't produce a unit type, but that unit is in the queue and completed, the unit will be deleted and the shields returned to the production box, with a message. Freight trains can still be produced, since I think that could be a pretty big loss if your industry is bombed when you have 500 shields accumulated in the train.

Bolt Head and Mullaghmore can produce Sunderlands even without the tech. Let me know if you want this removed, or if you need production exceptions for other cities.


At the moment, the Critical Industry target units have 50 defense. I'm thinking they should have the same defense as the other industry (or, maybe, a little higher), but 7 or 8 hp instead.

Use this code in the Lua Console to make all units on map with 0 movement points (i.e. units of types with 0 mp) veteran.
Code:
for unit in civ.iterateUnits() do if unit.type.move == 0 then unit.veteran = true end end
 

Attachments

Turns out city:canBuild only checks the default build function, so I'll have to revisit a couple events I wrote earlier. (Sunderlands still can't be produced without the tech, even after my supposed fix.)
 
I changed a few quick things in the events, but you can have them again:

-I increased the max reactions for light flak (German and Allied) from 1 to 6. This will make low-level operations more dangerous.
-I increased the max reactions for the Sdkfz (German mobile light flak) from 2 to 3.
-I declined to increase heavy flak since it is pretty inexpensive and 4 reactions should mean more once you implement the "munitions also destroyed" mechanism
-I changed the regensburgFighters for Me110 and Me410 to "true" so they will count towards the total fighters Germany has.

Blohm und Voss U-Boot Werke creates a uBoat each turn in Hamburg, if Germany currently possesses less than 3 uboats.
A uBoat with full movement and health can deploy to a random tile in the Atlantic (in a box south of Ireland, north of Spain, west of Brest, at a cost of all its movement, and 5hp, if the u-Boat is in a town with a military port and Hamburg has its critical industry. This might be a little too powerful.

I wouldn't worry too much about it - remember that convoys aren't defenseless and can attack U-Boats if they really want to. One additional half-strength U-Boat per turn isn't going to tip the scales, especially once you start having 20-24 convoys active each turn, as you did for most of the game.

If German fighter count is less than 35% of allied fighter count, extra 109s are sent to Pocking AF.

Do we need a list of a few airfields in case this one is captured? Although I suppose if this one is captured, the war is probably lost, so maybe we don't.

Bolt Head and Mullaghmore can produce Sunderlands even without the tech. Let me know if you want this removed,

If you can get it working, it's a good balance for Blohm & Voss, so I'm fine with it. If you can get it working, it's also great for other scenarios (it will save an improvement), so I'm eager to see what you do.
 

Attachments

The readme is coming along. I think that the table approach is going to work better than what I had before. I might just use it in a few more places too (like critical concepts) as it seems to be an easier way to quickly access information. Better than the paragraphs I had in the prior readme.

upload_2020-1-13_5-28-43.png



upload_2020-1-13_5-28-36.png
 
I found this issue:
--starting at line 10385
if tribe == tribeAliases.Germans and counterValue("GermanAircraftKills") >= specialNumbers.GermanExperten3Threshold then
justOnce(tribeAliases.Germans.name..tostring(specialNumbers.GermanExperten3Threshold).."ThresholdJOExperten",function()
civlua.createUnit(unitAliases.HermannGraf, tribeAliases.Germans, {{352,70,0}}, {count=1, randomize=false, veteran=true})
civ.ui.text(func.splitlines(textAliases.JosefPriller))
text.addToArchive(tribeAliases.Germans,textAliases.JosefPriller,"Hermann Graf","Hermann Graf")
end)
end

We need to change the textAliases to textAliases.HermannGraf
 
changelog 21 Jan (Events are available)

Hermann Graf text changed to textAliases.HermannGraf (not tested)

Fixed the canBuild problem I was having.

Removed 'splash' damage by commenting out entries to the table areaReactionDamage.

Made new entries to table areaReactionDamage to make splash damage target munitions (and only munitions).


reactionGroups.bombs = {unitAliases.TwoHundredFiftylb, unitAliases.FiveHundredlb,unitAliases.Thousandlb,}
ds.bystanderBombs = {{1,2},{.8,2},{.6,3},{.1,3}}

areaReactionDamage[unitAliases.FlakTrain.id] = {bystanderFoe = {range = 2,vulnerableTypes = reactionGroups.bombs, all=ds.bystanderBombs}}
areaReactionDamage[unitAliases.GermanFlak.id] = {bystanderFoe = {range = 2,vulnerableTypes = reactionGroups.bombs, all=ds.bystanderBombs}}
areaReactionDamage[unitAliases.AlliedFlak.id] = {bystanderFoe = {range = 2,vulnerableTypes = reactionGroups.bombs, all=ds.bystanderBombs}}

The sum of all 15th AF bombers and fighters is displayed on the points screen.

Rocket Politics

If a V1 or V2 kills an urban target on the British Mainland (continent 3), Allied points for killing strategic targets are reduced or eliminated. Does not affect plane kills at the moment (forgot allies got points for that), or convoy docking (do the Allies still get points for that? didn't check). Killing occupied urban still costs full points.
specialNumbers.rocketPointsTurns = 3 -- the Allies are penalized in gaining new points for this many turns after their urban target in England has been killed
specialNumbers.rocketPointMultiplier = 0 -- Multiply allied point gains from killing targets by this amount if they are being penalized for having rockets attack.
if specialNumbers.rocketPointMultiplier == 0 then
textAliases.rocketPolitics = [[Casualties are mounting from the German 'Vengeance Weapon' attacks. Winston Churchill has ordered that stopping these attacks be made top priority. We will not gain any points when we destroy strategic targets until %STRING1 or we kill a V1 or V2 Launch Site.]]
else
textAliases.rocketPolitics = [[Casualties are mounting from the German 'Vengeance Weapon' attacks. Winston Churchill has ordered that stopping these attacks be made top priority. We will only gain ]]..tostring(math.floor(specialNumbers.rocketPointMultiplier*100))..[[% of our regular points when we destroy strategic targets until %STRING1 or we kill a V1 or V2 Launch Site.]]
end
textAliases.launchSiteDestroyed = [[Destroying this %STRING1 should reduce civilian casualties in Britain. We have convinced the politicians to restore our normal operational latitude. We now gain full points from all targets.]]
textAliases.rocketPenaltyExpired = [[Since no Urban Centers have been destroyed by 'Vengeance Weapons' recently, we have been able to convince the politicians to restore our normal operational latitude. We now gain full points from all targets.]]

I wouldn't worry too much about it - remember that convoys aren't defenseless and can attack U-Boats if they really want to. One additional half-strength U-Boat per turn isn't going to tip the scales, especially once you start having 20-24 convoys active each turn, as you did for most of the game.

My concern was that since a Wolf Pack can be 'deployed' from any city, if the German player focuses on U-Boats, they might all be very quickly deployed to the Atlantic.

Do we need a list of a few airfields in case this one is captured? Although I suppose if this one is captured, the war is probably lost, so maybe we don't.

I figured that if the airfield is captured, the factory won't be far behind. Though, we may want to use a different airfield, in particular, one with access to an industry tile.

If you can get it working, it's a good balance for Blohm & Voss, so I'm fine with it. If you can get it working, it's also great for other scenarios (it will save an improvement), so I'm eager to see what you do.

The part allowing these units to be produces was working. The part where 'disallowed' production was cancelled wasn't working. Basically, all you have to do is not use the 'defaultBuildCondition' function when deciding whether to return true or false for the event function. However, you may need to check some of the stuff the game does (e.g. coastal for ship, is the improvement already built) in your code.

Peenemunde gives 1/10 of the current research cost each turn.

Kighttime showed me how to fix the problem I was having with giving technologies directly. Do we want Peenemunde to explicitly give a technology every 10 turns, or is giving 10% of the research cost good enough? I'm inclined to think giving 10% per turn is fine.

I still have to fix the 'Sell Improvements' problem. Are there other things that must still be fixed? If so, can we get a new to-do list?
 

Attachments

Great work! I will try to get an updated to do list squared away tomorrow so we can move towards finalizing. Any thoughts on the new readme layout? I think it makes it much quicker to find what you need than searching through paragraphs.
 
Great work! I will try to get an updated to do list squared away tomorrow so we can move towards finalizing. Any thoughts on the new readme layout? I think it makes it much quicker to find what you need than searching through paragraphs.

I like it, and I agree it is better than trying to find stuff in paragraphs. There's a lot of information, and being able to look at tables is definitely better than trying to search for a paragraph (or even bullet points) that might have the information you need. I'm inclined to think that as much of it as possible should be in the Civlopedia, even if we have to use wonder descriptions for it.
 
I'll double check tomorrow but I think most of the work I need to complete is text & documentation related, so I can add putting as much into the civilopedia as possible.

It does allow for a "game concepts" section, and it might just be a matter of cramming in more information.

I'll probably just copy and paste it from the readme, so I'll finish that first.
 
My concern was that since a Wolf Pack can be 'deployed' from any city, if the German player focuses on U-Boats, they might all be very quickly deployed to the Atlantic.

If you think it's a big enough issue, we can revisit things, but I think our removing the ability to build aircraft carriers in the French ports is going to be a dramatic handicap to the best Battle of the Atlantic option the Germans have, so I think allowing them to spam more U-Boats will be OK. U-Boats are quite vulnerable to Sunderlands and now the Allies get those at two bases from the start of the game, so it probably evens out.


REMAINING TO DO.

In game:
nothing unless necessitated by an event.

In Text:
Bring the readme and civilopedia up to speed.

In Events:

Please double check these things. If you have already fixed them, my apologies.

-If a reactive attack kills the trigger unit, it should also destroy their munitions - I think you did this with the splash change for flak that you implemented, but if a fighter intercepts a bomber and shoots it down, the bomber's attack should end.

-Firestorm event: chance that destroying an urban center in a city will start a firestorm that destroys everything. I'd suggest a very rare likelihood. Maybe 3-5%. If there's a chance it happens EVERY time an urban target is destroyed, I think it should be very unlikely to happen. A couple of call outs: (1) We need the terrain to change as it normally would if all of these other objects were destroyed independently. (2)We need the player to get the points they would if all of these other objects were destroyed independently. (3) The Germans should also be able to start a firestorm against English cities.

-Did you implement the idea where we give Germany 500 fuel at the end of the Allied turn and then take it away after the turn cycles through the German cities at the start of the German turn? I guess not per your "Sell Improvements" comment.

This might actually be fixed as no day aircraft should "upgrade" to night aircraft per my rules change, but we want to make sure that the following can never be on the daylight map.

-Stirling Bomber
-Halifax Bomber
-Lancaster Bomber
-Beaufighter
-Mosquito NF Mk. II
-Mosquito NF Mk. XIII


Single Player: These two functions would need to be --[[ ]] out of the code for MP. When all is said and done and we ship I will write a batch file that renames MPEvents.lua and SPEvents.lua to Events.lua depending on what someone picks. The game will ship with the default events being the multi-player version.

1. Let's use @tootall_2012 's idea of having a random chance that aircraft won't take off on a given turn. Call it 10%. (I might include instructions for how to "up" this for a more challenging SP game).

2. Let's also add the onResolveCombat function to add, say, a 25% chance an attack won't have any effect (again, I'll include instructions for how to "up" this).

I "think" this is all we need to be "done" with the MP game (from an events perspective) unless you think I missed something.
 
Last edited:
Small update. I might do more later tonight, so post if you take the events, so we don't have to merge the files.

-If a reactive attack kills the trigger unit, it should also destroy their munitions - I think you did this with the splash change for flak that you implemented, but if a fighter intercepts a bomber and shoots it down, the bomber's attack should end.
Implemented.

When a unit is killed via reaction, all munitions (units with destroyed after attacking flag) on that square are deleted.

This can be modified in the function killFunction(deadUnit,reactingUnit), for example if we only want bombs to be deleted, and not fighter guns.

We may (or may not) want to get rid of the splash damage on bombs, now that we have this.

Single Player: These two functions would need to be --[[ ]] out of the code for MP. When all is said and done and we ship I will write a batch file that renames MPEvents.lua and SPEvents.lua to Events.lua depending on what someone picks. The game will ship with the default events being the multi-player version.

1. Let's use @tootall_2012 's idea of having a random chance that aircraft won't take off on a given turn. Call it 10%. (I might include instructions for how to "up" this for a more challenging SP game).

2. Let's also add the onResolveCombat function to add, say, a 25% chance an attack won't have any effect (again, I'll include instructions for how to "up" this).

I'll use a "SinglePlayerGame" flag for these events. Then, we don't have to worry about batch files. We just ship two scenario files, one with the flag on, and the other with the flag off. I'll put these parameters at the top of the special numbers list, so they are easy to find.

This might actually be fixed as no day aircraft should "upgrade" to night aircraft per my rules change, but we want to make sure that the following can never be on the daylight map.

-Stirling Bomber
-Halifax Bomber
-Lancaster Bomber
-Beaufighter
-Mosquito NF Mk. II
-Mosquito NF Mk. XIII
At the moment, if these are produced in a daylight city, they should be deleted, and the shields restored to the shield box (with a message to the player). I could do an after production check to delete them if you really want.

-Did you implement the idea where we give Germany 500 fuel at the end of the Allied turn and then take it away after the turn cycles through the German cities at the start of the German turn? I guess not per your "Sell Improvements" comment.

This still has to be done. The easiest way is to change the rules so that CityIII and Airbase improvements cost 500 shields. That way, when the first is sold, money is put into the treasury, to cover further expenses. Then, we change the function replaceSoldCityBuildings() to take back the money when the building is replaced, and do something bad if there is a shortfall. The trouble is that other buildings might be sold as well, which might be a bit of a problem if it is a target associated building.

Using an after production event to give and take money would be fine, except that killing experten and refineries takes money away, which would happen after the 'float' money was given, so some care would have to be taken with the mechanics. Besides experten and refineries, is there any other way for a player to reduce the enemy's treasury?

Another option would be a scenario loaded event to check if the person loading the game is the next player (same as the radar question), and ask if they want a 'float' if their treasury is low. Extra 'borrowing' wouldn't matter, since the money would be repaid immediately anyway.

This brings the question of what 'bad' thing to do to the player that can't make ends meet. Maybe reduce research progress at a 3 to 1 rate or something?

-Firestorm event: chance that destroying an urban center in a city will start a firestorm that destroys everything. I'd suggest a very rare likelihood. Maybe 3-5%. If there's a chance it happens EVERY time an urban target is destroyed, I think it should be very unlikely to happen. A couple of call outs: (1) We need the terrain to change as it normally would if all of these other objects were destroyed independently. (2)We need the player to get the points they would if all of these other objects were destroyed independently. (3) The Germans should also be able to start a firestorm against English cities.

I'm thinking something along these lines:

Each city has a 'firestorm chance' variable representing percent chance of a firestorm. This changes by 1% each turn towards what we might call the 'weather baseline'. If there are no clouds, the baseline is 0, if there are lots of clouds in the vicinity (say within 5 squares), the baseline might drop as far as -4 or -6.

Destroying an Urban Center would increase the firestorm chance by 2%, destroying another target would increase it by 1% (so the Americans can participate). Destroying the last Urban Center of the city doesn't increase the firestorm chance, but generates a random number to determine if the firestorm happens.

What do you think? Should the mechanic be different, or the numbers different? Or, should there just be a 1% chance that killing any urban center generates a firestorm, and keep everything simple that way?
 

Attachments

Events are available.

local specialNumbers ={}
specialNumbers.engineFailureProbabilitySP = 0.1 -- probability that a plane can't take off on a given turn for the play versus yourself scenario (no effect in the multiplayer version)
specialNumbers.munitionFailureProbabilitySP = 0.25 -- probability that a munition attack will immediately fail and do no damage

Put this into the console
Code:
console.setFlagTrue("PlayingVersusSelf")
to set the flag for 'single player', and save as a different scenario.
 

Attachments

At the moment, if these are produced in a daylight city, they should be deleted, and the shields restored to the shield box (with a message to the player). I could do an after production check to delete them if you really want.

If you're comfortable the current system works, so am I.

Another option would be a scenario loaded event to check if the person loading the game is the next player (same as the radar question), and ask if they want a 'float' if their treasury is low. Extra 'borrowing' wouldn't matter, since the money would be repaid immediately anyway.

Either this makes sense or simply float it automatically each turn and reduce it each turn without the player even knowing/having a chance to mess it up.

This brings the question of what 'bad' thing to do to the player that can't make ends meet. Maybe reduce research progress at a 3 to 1 rate or something?

Well, the whole reason we need this is because the way the game engine is structured, it doesn't think a player can make ends meet when really they can.

But, in the off chance that someone decides to, say, max out science to the point where they're running a true deficit in funds, or that the Allies simply destroy 20 refineries (or whatever) in a turn, the balancing aspect would be that the Luftwaffe can't conduct any air operations. I think that is a pretty bad thing in and of itself, and, frankly, a primary goal for the Allied player to work towards.

So, I don't really care if we float the player 500 so long as they can't "use" it for anything other than making sure improvements aren't sold, which they can't if we immediately remove it. If this float mechanism creates a situation where the Allies can effectively grind German fuel stores down to 0 (or close to it) every turn without the Germans selling improvements, I think you've figured out a marvelous solution that requires no other change or detriment.

I'm thinking something along these lines:

Each city has a 'firestorm chance' variable representing percent chance of a firestorm. This changes by 1% each turn towards what we might call the 'weather baseline'. If there are no clouds, the baseline is 0, if there are lots of clouds in the vicinity (say within 5 squares), the baseline might drop as far as -4 or -6.

Destroying an Urban Center would increase the firestorm chance by 2%, destroying another target would increase it by 1% (so the Americans can participate). Destroying the last Urban Center of the city doesn't increase the firestorm chance, but generates a random number to determine if the firestorm happens.

What do you think? Should the mechanic be different, or the numbers different? Or, should there just be a 1% chance that killing any urban center generates a firestorm, and keep everything simple that way?

I would be more inclined to say keep it somewhat simple. I think the clouds makes sense because you're looking for dry weather to start one of these and clouds by default aren't dry weather/air. So maybe it's unlikely to happen if clouds are nearby. Otherwise, I'd say keep it at a simple 1% chance because the number of cities that actually suffered a catastrophic firestorm compared to the ones that were bombed (in some cases deliberately trying to start another firestorm) were quite small. It usually had more to do with random chance (Hamburg is a great example as there was a period of dry weather, many of the water mains had broken from a previous raid, and a majority of firefighters were on the other side of the city dealing with other fires when the main one broke). It should be pretty rare and devastating if it happens.
 
Well, the whole reason we need this is because the way the game engine is structured, it doesn't think a player can make ends meet when really they can.

But, in the off chance that someone decides to, say, max out science to the point where they're running a true deficit in funds, or that the Allies simply destroy 20 refineries (or whatever) in a turn, the balancing aspect would be that the Luftwaffe can't conduct any air operations. I think that is a pretty bad thing in and of itself, and, frankly, a primary goal for the Allied player to work towards.

So, I don't really care if we float the player 500 so long as they can't "use" it for anything other than making sure improvements aren't sold, which they can't if we immediately remove it. If this float mechanism creates a situation where the Allies can effectively grind German fuel stores down to 0 (or close to it) every turn without the Germans selling improvements, I think you've figured out a marvelous solution that requires no other change or detriment.

OK, I think what I'll do is after production, give the next tribe enough gold to bring their gold reserves up to the 'protected' amount (500 gold, I think), if they are below that, and record how much is given. Then, after their production, I take back what has been given, if anything. Then, I don't have to worry about fuel being destroyed in refineries or with dead experten, since the tribe doesn't have more than the protected amount anyway.

The only possibility is that the player tries to rush something with the small reserve during city processing. I'm inclined to say that if they are that desperate, let them do it.

I would be more inclined to say keep it somewhat simple. I think the clouds makes sense because you're looking for dry weather to start one of these and clouds by default aren't dry weather/air. So maybe it's unlikely to happen if clouds are nearby. Otherwise, I'd say keep it at a simple 1% chance because the number of cities that actually suffered a catastrophic firestorm compared to the ones that were bombed (in some cases deliberately trying to start another firestorm) were quite small. It usually had more to do with random chance (Hamburg is a great example as there was a period of dry weather, many of the water mains had broken from a previous raid, and a majority of firefighters were on the other side of the city dealing with other fires when the main one broke). It should be pretty rare and devastating if it happens.

How about this? We have an improvement called 'firefighters' (I can make coastal fortress work for this with Lua, so we don't have to worry about changing 15th airforce or something). Maybe cost 50 shields and 1 fuel upkeep or something, and can be sold. So, not too expensive. If the firefighters improvement is in the city, a firestorm can't happen.

Killing any urban center destroys the firefighters improvement, if it exists. If there are no clouds within 3 squares, and the city has no firefighters, then killing an urban center has a 2% chance of starting a firestorm.

Here is my thinking. With firefighters, the Allies (or Germans) have to be deliberately targeting a city. A stray air raid that kills a 'soft' urban center won't start a firestorm, unless the German player has cut firefighter funding, in which case, tough luck. However, a single raid that kills all three urban centers over one or two 'dry' turns has a 4% chance of starting a firestorm. 1 in 25 (1 in 50 for cities with only two urban centers) is a large enough chance that you might see it once or twice if the Allies make a deliberate choice in that strategy (I think there are 22 German cities with 3 targets at the start of the game), but shouldn't break the game. We can tweak the chance if we need to.

Perhaps we could make 'day' targets have a 50% chance to kill the firefighters, so the Allies might get a 6% chance if they get lucky and scout their luck.
 
Back
Top Bottom