Overlords...The New Campaign!

Status
Not open for further replies.
I played a first turn and maybe found a bug.
In the Mediterranean Sea the Allied attacked a German Freighter with trade units in it. After destroying the Freighter, the trade units didn't disappear with the vessel, so the AI attacked them too with the naval units.
I checked the rules file but didn't find anything wrong as the trade units are marked as ground units. I'm wondering why this happened.

The Trade Trucks haven't been set to be 'carriedBy' the freighter. I'm guessing the 'no stack kills' TOTPP feature checks the 'carriedBy' field of land units to determine if they should be sunk with the freighter.

Putting
Code:
civ.getUnit(1562).carriedBy = civ.getUnit(1560)
into the console makes one of the 2 Trade Trucks get sunk with the ship.

The numbers used are the ID numbers of the units in question, which are displayed when the reveal map cheat is enabled.

I'm pretty sure this won't be an issue after the first turn, since a transport with space will 'carry' any units not being carried at sea.
 
Hello Curt,

I played a first turn and maybe found a bug.
In the Mediterranean Sea the Allied attacked a German Freighter with trade units in it. After destroying the Freighter, the trade units didn't disappear with the vessel, so the AI attacked them too with the naval units.
I checked the rules file but didn't find anything wrong as the trade units are marked as ground units. I'm wondering why this happened.

Overlord had this happening with all sorts of units, but no-one bothered about it.
I think stranded units won't live long in the warzones, but will add it as a "maybe" fix. :)
 
Some units need specific improvements before building/training can begin...
I list the CanBuildSettings here, but also refer to the file in your "LuaRulesEvents" folder.
I'll eventually make a proper text file that lists requirements for all units...Any problems check here, or ask. :)

Spoiler Build Requirements :

--NAVAL UNITS
unitTypeBuild[object.uFreighter.id] = {allImprovements={object.iShipyard}}
unitTypeBuild[object.uLiner.id] = {allImprovements={object.iShipyard,object.iMilitaryFactory}}
unitTypeBuild[object.uLibertyShip.id] = {allImprovements={object.iShipyard,object.iMilitaryFactory}}
unitTypeBuild[object.uDestroyer.id] = {allImprovements={object.iShipyard,object.iNavalBase}}
unitTypeBuild[object.uCruiser.id] = {allImprovements={object.iShipyard,object.iNavalBase}}
unitTypeBuild[object.uAACruiser.id] = {allImprovements={object.iShipyard,object.iNavalBase}}
unitTypeBuild[object.uAACruiserII.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}
unitTypeBuild[object.uBattleship.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}
unitTypeBuild[object.uSuperBattleship.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}
unitTypeBuild[object.uAircraftCarrier.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}
unitTypeBuild[object.uEscortCarrier.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}
unitTypeBuild[object.uSubmarine.id] = {allImprovements={object.iShipyard,object.iNavalBase}}
unitTypeBuild[object.uSubmarineII.id] = {allImprovements={object.iShipyard,object.iNavalBase,object.iMilitaryFactory}}


--GENERIC LAND UNITS
unitTypeBuild[object.uWorkers.id] = {allImprovements={object.iLocalIndustry}}
--An empire's capital can train Engineers, even without a university or the required tech
unitTypeBuild[object.uEngineers.id] = {allImprovements=object.iOfficerAcademy,alternateParameters={engineerAltCondition}}
unitTypeBuild[object.uPartisans.id] = {allImprovements={object.iBarracks,object.iPropaganda}}
unitTypeBuild[object.uArtillery.id] = {allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uHeavyArtillery.id] = {allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uMobileArtillery.id] = {allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uAABattery.id] = {allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uAABatteryII.id] = {allImprovements={object.iBarracks,object.iAssemblyLine}}
unitTypeBuild[object.uTradeTruck.id] = {allImprovements={object.iAssemblyLine}}
unitTypeBuild[object.uArmoredInfantry.id] = {allImprovements={object.iBarracks,object.iAssemblyLine}}
unitTypeBuild[object.uLightTank.id] = {allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uMediumTank.id] = {allImprovements={object.iBarracks,object.iAssemblyLine}}


--GENERIC AIR UNITS
unitTypeBuild[object.uFighter.id] = {allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uJetFighter.id] = {allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uBomber.id] = {allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uAlliedHeavyBomber.id] = {allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uAxisHeavyBomber.id] = {allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uAtomBomb.id] = {allImprovements={object.iResearchFacility,object.iArmamentsPlant}}


--RUSSIAN UNITS
--Soviet home cities with a Barracks can train Red Army Units
unitTypeBuild[object.uRedArmy.id] = {location=SovietHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uRedArmyII.id] = {location=SovietHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uShockTroops.id] = {location=SovietHomeCities,allImprovements={object.iBarracks}}

--Certain Soviet home cities with a Barracks and an Airbase can train Red Army Airborne Troops
unitTypeBuild[object.uAirborneTroops.id] = {location=SovAirborneCities,allImprovements={object.iBarracks,object.iAirbase}}

--Certain Soviet Hero cities with a Barracks can train Red Army Guards units
unitTypeBuild[object.uRedArmyGuards.id] = {location=GuardsHomeCities,allImprovements={object.iBarracks}}

--Certain Soviet Hero cities with a Barracks and a Tank Factory can train Red Army Guards tank units
unitTypeBuild[object.uGuardsT34.id] = {location=GuardsHomeCities,allImprovements={object.iBarracks,object.iTankFactory}}

--Soviet home cities with a Barracks and a Military Factory can train Red Army Katyusha units
unitTypeBuild[object.uKatyusha.id] = {location=SovietHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--Soviet home cities with a Barracks and a Military Factory can train the Red Army medium tank units
unitTypeBuild[object.uT34.id] = {location=SovietHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uT3485.id] = {location=SovietHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--Soviet home cities with a Barracks and a Tank Factory can train the Red Army heavy tank units
unitTypeBuild[object.uKV1.id] = {location=SovietHomeCities,allImprovements={object.iBarracks,object.iTankFactory}}
unitTypeBuild[object.uIS2.id] = {location=SovietHomeCities,allImprovements={object.iBarracks,object.iTankFactory}}

--Soviet home cities with an Airbase and a Military Factory can train the early Red Air Force units
unitTypeBuild[object.uI16.id] = {location=SovietHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uLa5.id] = {location=SovietHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uTB3.id] = {location=SovietHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}

--Soviet home cities with an Airbase and an Assembly Line can train the later Red Air Force units
unitTypeBuild[object.uYak3.id] = {location=SovietHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uIl2Sturmovik.id] = {location=SovietHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}


--JAPANESE UNITS
--Japanese occupied cities with a Barracks can train Imperial Armies
unitTypeBuild[object.uImperialArmy.id] = {location=JapaneseArmyCities,allImprovements={object.iBarracks}}

--Certain Japanese cities with a Barracks and an Airbase can train Imperial Paratroops
unitTypeBuild[object.uIJAParatroops.id] = {location=JapaneseParaCities,allImprovements={object.iBarracks,object.iAirbase}}

--Certain Japanese cities with Barracks and a Naval Base can train Imperial Marines
unitTypeBuild[object.uSNLFMarines.id] = {location=JapaneseMarinesCities,allImprovements={object.iBarracks,object.iNavalBase}}

--Japanese home cities with a Barracks can train Bushido soldiers
unitTypeBuild[object.uAssaultTroops.id] = {location=JapaneseHomeCities,allImprovements={object.iBarracks}}

--Japanese home cities with a Barracks and a Military Factory can train the Imperial Army tank units
unitTypeBuild[object.uType97ChiHa.id] = {location=JapaneseHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uType3ChiNu.id] = {location=JapaneseHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uType5ChiRi.id] = {location=JapaneseHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--Japanese home cities with an Airbase and a Military Factory can train the early Imperial Air units
unitTypeBuild[object.uA6MZero.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uKi61Hien.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uD3A.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uKi67Hiryu.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}

--Japanese home cities with an Airbase and an Assembly Line can train the later Imperial Air units
unitTypeBuild[object.uKi84Hayate.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uD4YSuisei.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}

--Japanese home cities with an Airbase can train Kamikaze units
unitTypeBuild[object.uMXY7Ohka.id] = {location=JapaneseHomeCities,allImprovements={object.iAirbase}}


--GERMAN UNITS
--German home cities with a Barracks can train Grenadier units
unitTypeBuild[object.uGrenadiers.id] = {location=GermanHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uGrenadiersII.id] = {location=GermanHomeCities,allImprovements={object.iBarracks}}

--If Berlin has a Barracks and an Officer Academy, the city can train Waffen SS units
unitTypeBuild[object.uWaffenSS.id] = {location=WaffenSSCities,allImprovements={object.iBarracks,object.iOfficerAcademy}}

--If Berlin or Frankfurt have a Barracks and an Airbase, these cities can train Fallschirmjager units
unitTypeBuild[object.uFallschirmjagers.id] = {location=FallschirmHomeCities,allImprovements={object.iBarracks,object.iAirbase}}

--German home cities with a Barracks and a Military Factory can train the early Panzer units
unitTypeBuild[object.uPanzergrenadiers.id] = {location=GermanHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uPzKpfwIII.id] = {location=GermanHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uPzKpfwIV.id] = {location=GermanHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--German home cities with a Barracks and assembly lines can train the later Panzer units
unitTypeBuild[object.uPzKpfwVPanther.id] = {location=GermanHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}
unitTypeBuild[object.uPzKpfwVITiger.id] = {location=GermanHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}

--German home cities with an Airbase and a Military Factory can train the early Luftwaffe units
unitTypeBuild[object.uBf109.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uJu87Stuka.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uJu88.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}

--German home cities with an Airbase and an Assembly Line can train the later Luftwaffe units
unitTypeBuild[object.uFw190.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uHs129.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}

--German home cities with an an Airbase, an Assembly Line and an Armament Plant can train the Luftwaffe Amerika bomber units
unitTypeBuild[object.uJu390.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine,object.iArmamentsPlant}}

--German home cities with an Airbase and a Research Facility can train the advanced Luftwaffe units
unitTypeBuild[object.uMe262Schwalbe.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iResearchFacility}}
unitTypeBuild[object.uV2Missile.id] = {location=GermanHomeCities,allImprovements={object.iAirbase,object.iResearchFacility}}


--ITALIAN UNITS
--Control of Italian home cities with a Barracks will allow the training of Italian Armies
unitTypeBuild[object.uItalianArmy.id] = {location=ItalianHomeCities,allImprovements={object.iBarracks}}

--FINNISH UNITS
--Control of Finnish home cities with a Barracks will allow the training of Finnish Armies
unitTypeBuild[object.uFinnishArmy.id] = {location=FinnHomeCities,allImprovements={object.iBarracks}}

--ROMANIAN UNITS
--Control of Romanian home cities with a Barracks will allow the training of Romanian Armies
unitTypeBuild[object.uRomanianArmy.id] = {location=RomanianHomeCities,allImprovements={object.iBarracks}}

--FRENCH UNITS
--Germany can train Vichy Armies in certain French cities with a Barracks
unitTypeBuild[object.uVichyArmy.id] = {location=VichyHomeCities,allImprovements={object.iBarracks}}


--SPANISH UNITS
--Control of Spanish home cities with a Barracks will allow the training of Spanish Armies
unitTypeBuild[object.uSpanishArmy.id] = {location=SpanishHomeCities,allImprovements={object.iBarracks}}

--DUTCH UNITS
--Control of certain Dutch Far East cities with a Barracks will allow the training of Dutch Armies
unitTypeBuild[object.uDutchArmy.id] = {location=DutchHomeCities,allImprovements={object.iBarracks}}

--GARRISON UNITS
--Certain neutral cities with a Barracks will allow the training of Garrisons
unitTypeBuild[object.uGarrison.id] = {location=GarrisonHomeCities,allImprovements={object.iBarracks}}

--MUSLIM UNITS
--Certain Muslim cities with a Barracks will allow the training of Muslim Armies
unitTypeBuild[object.uMuslimArmy.id] = {location=MuslimHomeCities,allImprovements={object.iBarracks}}

--COLONIAL RIFLE UNITS
--Certain Eastern cities with a Barracks will allow the training of Colonial Rifles
unitTypeBuild[object.uColonialRifles.id] = {location=ColonialHomeCities,allImprovements={object.iBarracks}}


--AMERICAN UNITS
--American home cities with a Barracks can train US Army units
unitTypeBuild[object.uUSArmy.id] = {location=USAHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uUSArmyII.id] = {location=USAHomeCities,allImprovements={object.iBarracks}}

--Certain American home cities with a Barracks and an Airbase can train US Airborne units
unitTypeBuild[object.uUSAirborne.id] = {location=USAirborneCities,allImprovements={object.iBarracks,object.iAirbase}}

--Certain American home cities with a Barracks and a Naval Base can train US Marine units
unitTypeBuild[object.uUSMarines.id] = {location=USMarineCities,allImprovements={object.iBarracks,object.iNavalBase}}

--Certain American home cities with a Naval Base and a Military Factory can train US Marine LVT units
unitTypeBuild[object.uUSMCLVT.id] = {location=USMarineCities,allImprovements={object.iNavalBase,object.iMilitaryFactory}}

--American home cities with a Barracks and a Military Factory can train the early US Army tanks
unitTypeBuild[object.uM3Lee.id] = {location=USAHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--American home cities with a Barracks and an Assembly Line can train the later US Army tanks
unitTypeBuild[object.uM4Sherman.id] = {location=USAHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}
unitTypeBuild[object.uM26Pershing.id] = {location=USAHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}

--American home cities with an Airbase and a Military Factory can train the early USAAF units
unitTypeBuild[object.uP38Lightning.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uB17Fortress.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}

--American home cities with an Airbase and an Assembly Line can train the later USAAF units
unitTypeBuild[object.uP47Thunderbolt.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uP51Mustang.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}

--American home cities with an Airbase, an Assembly Line and an Armament Plant can train the USAAF super bomber units
unitTypeBuild[object.uB29SuperFortress.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine,object.iArmamentsPlant}}

--American home cities with an Airbase and a Research Facility can train the advanced USAAF units
unitTypeBuild[object.uP80ShootingStar.id] = {location=USAHomeCities,allImprovements={object.iAirbase,object.iResearchFacility}}

--Certain American cities with an Airbase and a Naval Base can train F6F Hellcat units
unitTypeBuild[object.uF6FHellcat.id] = {location=USNAFBases,allImprovements={object.iAirbase,object.iNavalBase}}


--BRITISH UNITS
--British home cities with a Barracks can train British Infantry units
unitTypeBuild[object.uInfantry.id] = {location=BritishHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uInfantryII.id] = {location=BritishHomeCities,allImprovements={object.iBarracks}}

--The cities of Newcastle and Birmingham with a Barracks and an Airbase can train British Paratrooper units
unitTypeBuild[object.uParatroopers.id] = {location=BritParaCities,allImprovements={object.iBarracks,object.iAirbase}}

--The cities of London and Glasgow with a Barracks and a Naval Base can train British Commando units
unitTypeBuild[object.uCommandos.id] = {location=BritCommandoCities,allImprovements={object.iBarracks,object.iNavalBase}}

--Certain British Indian cities with a Barracks can train Gurkha regiments
unitTypeBuild[object.uGurkhas.id] = {location=GurkhaHomeCities,allImprovements={object.iBarracks}}

--British Australian cities with a Barracks can train Anzac units
unitTypeBuild[object.uAnzacs.id] = {location=AnzacHomeCities,allImprovements={object.iBarracks}}

--British Canadian cities with a Barracks can train Canadian army units
unitTypeBuild[object.uCanadianArmy.id] = {location=CanadianHomeCities,allImprovements={object.iBarracks}}

--British home cities with a Barracks and a Military Factory can train the early British tanks
unitTypeBuild[object.uValentine.id] = {location=BritishHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}
unitTypeBuild[object.uChurchill.id] = {location=BritishHomeCities,allImprovements={object.iBarracks,object.iMilitaryFactory}}

--British home cities with a Barracks and an Assembly Line can train the later British tanks
unitTypeBuild[object.uComet.id] = {location=BritishHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}
unitTypeBuild[object.uCenturion.id] = {location=BritishHomeCities,allImprovements={object.iBarracks,object.iAssemblyLine}}

--British home cities with an Airbase and a Military Factory can train the early RAF units
unitTypeBuild[object.uHurricane.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}
unitTypeBuild[object.uSpitfire.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iMilitaryFactory}}

--British home cities with an Airbase and an Assembly Line can train the later RAF units
unitTypeBuild[object.uTempest.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uMosquito.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}
unitTypeBuild[object.uLancaster.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iAssemblyLine}}

--British home cities with an Airbase and a Research Facility can train the advanced RAF units
unitTypeBuild[object.uMeteor.id] = {location=BritishHomeCities,allImprovements={object.iAirbase,object.iResearchFacility}}


--CHINESE UNITS
--Chinese republican cities (including liberated ones) with a Barracks can train KMT army units
unitTypeBuild[object.uKMTArmy.id] = {location=ChineseHomeCities,allImprovements={object.iBarracks}}
unitTypeBuild[object.uKMTArmyII.id] = {location=ChineseHomeCities,allImprovements={object.iBarracks}}

--Two KMT cities with airbases can ship in allied lend-lease AVG fighters
unitTypeBuild[object.uAVGWarhawk.id] = {location=ChineseAVGBases,allImprovements={object.iAirbase}}

--Chinese cities with a Barracks can train PLA troops when captured by rebels or soviets
unitTypeBuild[object.uPLATroops.id] = {location=ChineseHomeCities,allImprovements={object.iBarracks}}

local improvementBuild = {}

--INDUSTRY IMPROVEMENTS
--Shipyards can be built in cities with Local Industry and Docks
improvementBuild[object.iShipyard.id] = {someImprovements={object.iLocalIndustry,object.iDocks},numberOfImprovements=2}

--Military Factories can be built in cities with Local Industry and a Rail Station
improvementBuild[object.iMilitaryFactory.id] = {someImprovements={object.iLocalIndustry,object.iRailStation},numberOfImprovements=2}

--Naval Bases can be built in cities with a Barracks and Docks
improvementBuild[object.iNavalBase.id] = {someImprovements={object.iBarracks,object.iDocks},numberOfImprovements=2}

--Airbases can be built in cities with a Barracks and Officer Academy
improvementBuild[object.iAirbase.id] = {someImprovements={object.iBarracks,object.iOfficerAcademy},numberOfImprovements=2}

--Financial Districts can only be built in cities at size 10 with Warehouses and a Freight Depot
improvementBuild[object.iFinancialDistrict.id] = {someImprovements={object.iWarehouses,object.iFreightDepot},numberOfImprovements=2,minimumPopulation=10}

--DEFENCE IMPROVEMENTS
--City Defences must be built in cities with existing Barracks
improvementBuild[object.iCityDefences.id] = {someImprovements={object.iBarracks}}

--AA Batteries must be built in cities with existing City Defences
improvementBuild[object.iAABattery.id] = {someImprovements={object.iCityDefences}}

--Coastal Batteries must be built in coastal cities with existing City Defences
improvementBuild[object.iCoastalBattery.id] = {someImprovements={object.iCityDefences}}

--Wasserfall Batteries must be built in cities with an existing AA Battery
improvementBuild[object.iWasserfallBattery.id] = {someImprovements={object.iAABattery}}

--CIVIC ORDER IMPROVEMENTS
--Military Police can be created in cities with Barracks and a Governor
improvementBuild[object.iMilitaryPolice.id] = {someImprovements={object.iBarracks,object.iGovernor},numberOfImprovements=2}

--Cinemas can be built in cities with existing Propaganda
improvementBuild[object.iCinema.id] = {someImprovements={object.iPropaganda}}

local wonderBuild = {}

--The National Shipyard Wonder can only be constructed in a city with a Shipyard and an Assembly Lines
wonderBuild[object.wNationalShipyard.id] = {allImprovements={object.iShipyard,object.iAssemblyLine}}
 
Hello Curt,

I played a first turn and maybe found a bug.
In the Mediterranean Sea the Allied attacked a German Freighter with trade units in it. After destroying the Freighter, the trade units didn't disappear with the vessel, so the AI attacked them too with the naval units.
I checked the rules file but didn't find anything wrong as the trade units are marked as ground units. I'm wondering why this happened.

As I recall I had a similar issue when I designed my Total War scenario a few years back. At the time, TNO confirmed that the reason my land units located in the same ocean tile as transports weren't being eliminated on the first turn was because since I had created both the land and transport units at the same time during the design stage that technically the land unit wasn't actually "loaded" onto the transport and that it would only be considered loaded once the transport actually moved.

As I remember, my work around at the time, was simply to move any naval transport at least one tile during the set up stage so that it's land unit would "officially" be loaded (and if required I believe you can still reset the naval units full movement with the unit movement edit function in the cheat menu afterwards).
 
It's not a real bug and of course it doesn't have any influence of the gameplay.
It just looked funny seeing that land units on open sea is attacked by naval units after the Freighter was sunk.

I will try to give you a first detailled feedback when I played more turns. It's fun playing your scenario and I'm curious if I can achieve the same goals like in my first playtest.:)
 
@civ2units
Thanks, I appreciate you taking the time and making a playtest. :)

I'm in the mood for being treated rough, so I am going to play through as the Chinese Republic. :D
 
Would you like to play a multiplayer game with me? You are controlling China, I'm Japan, so we are in a state of war and have to fight against eachother.
I'm a worse player, so you should have good chances to defeat me with China :D
 
@civ2units
At this stage, I'd rather just use the playthrough to iron out potential bugs, etc. :)
But once the scenario is proven to not have any terrible problems, I'd maybe be up for an MP game.
 
I forgot to mention, there are money-boosts in this scenario, based on government "policies" the civs have or research. His enables science to be invested in, while not running out of gold.

I list the perks here:
Spoiler Gold Policy Boosts... :

;===============================================================================
; 3: GOLD BOOST EVENTS - 3XXX
;===============================================================================
;------------------------------------------------
;SOVIET Economy Boosts
;------------------------------------------------
;Soviet Communism: 1000 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=15
receiver=Soviet Union
@THEN
ChangeMoney
receiver=Soviet Union
amount=1000
@ENDIF
;------------------------------------------------
;Soviet Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=Soviet Union
@THEN
ChangeMoney
receiver=Soviet Union
amount=100
@ENDIF

;------------------------------------------------
;JAPANESE Economy Boosts
;------------------------------------------------
;Japanese Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=Japanese Empire
@THEN
ChangeMoney
receiver=Japanese Empire
amount=100
@ENDIF
;------------------------------------------------
;Japanese Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=Japanese Empire
@THEN
ChangeMoney
receiver=Japanese Empire
amount=100
@ENDIF
;------------------------------------------------
;Japanese Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=Japanese Empire
@THEN
ChangeMoney
receiver=Japanese Empire
amount=100
@ENDIF
;------------------------------------------------
;Japanese Fascism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=29
receiver=Japanese Empire
@THEN
ChangeMoney
receiver=Japanese Empire
amount=500
@ENDIF
;------------------------------------------------
;Japanese Fanaticism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=31
receiver=Japanese Empire
@THEN
ChangeMoney
receiver=Japanese Empire
amount=500
@ENDIF

;------------------------------------------------
;GERMAN Economy Boosts
;------------------------------------------------
;German Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=German Reich
@THEN
ChangeMoney
receiver=German Reich
amount=100
@ENDIF
;------------------------------------------------
;German Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=German Reich
@THEN
ChangeMoney
receiver=German Reich
amount=100
@ENDIF
;------------------------------------------------
;German Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=German Reich
@THEN
ChangeMoney
receiver=German Reich
amount=100
@ENDIF
;------------------------------------------------
;German Fascism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=29
receiver=German Reich
@THEN
ChangeMoney
receiver=German Reich
amount=500
@ENDIF
;------------------------------------------------
;German Fanaticism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=31
receiver=German Reich
@THEN
ChangeMoney
receiver=German Reich
amount=500
@ENDIF

;------------------------------------------------
;NEUTRAL Economy Boosts
;------------------------------------------------
;Neutral Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=100
@ENDIF
;------------------------------------------------
;Neutral Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=100
@ENDIF
;------------------------------------------------
;Neutral Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=100
@ENDIF
;------------------------------------------------
;Neutral Republic: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=71
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=500
@ENDIF
;------------------------------------------------
;Neutral Democracy: 1000 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=21
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=1000
@ENDIF
;------------------------------------------------
;Neutral Fascism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=29
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=500
@ENDIF
;------------------------------------------------
;Neutral Fanaticism: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=31
receiver=Neutral Nations
@THEN
ChangeMoney
receiver=Neutral Nations
amount=500
@ENDIF

;------------------------------------------------
;AMERICAN Economy Boosts
;------------------------------------------------
;American Super Prosperity: 3000 Gold
;------------------------------------------------
;Even before WW2, the USA's income was three times that of the whole British Empire.
;America's colossal economy generates an extra 3000 Gold Per Month.
@IF
ReceivedTechnology
technology=5
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=3000
@ENDIF
;------------------------------------------------
;American Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=100
@ENDIF
;------------------------------------------------
;American Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=100
@ENDIF
;------------------------------------------------
;American Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=100
@ENDIF
;------------------------------------------------
;American Republic: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=71
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=500
@ENDIF
;------------------------------------------------
;American Democracy: 1000 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=21
receiver=United States
@THEN
ChangeMoney
receiver=United States
amount=1000
@ENDIF

;------------------------------------------------
;BRITISH Economy Boosts
;------------------------------------------------
;British Empire Prosperity: 1000 Gold
;------------------------------------------------
;Britain's Imperial colonies generate an extra 1000 Gold Per Month.
@IF
ReceivedTechnology
technology=11
receiver=British Empire
@THEN
ChangeMoney
receiver=British Empire
amount=1000
@ENDIF
;------------------------------------------------
;British Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=British Empire
@THEN
ChangeMoney
receiver=British Empire
amount=100
@ENDIF
;------------------------------------------------
;British Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=British Empire
@THEN
ChangeMoney
receiver=British Empire
amount=100
@ENDIF
;------------------------------------------------
;British Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=British Empire
@THEN
ChangeMoney
receiver=British Empire
amount=100
@ENDIF
;------------------------------------------------
;British Democracy: 1000 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=21
receiver=British Empire
@THEN
ChangeMoney
receiver=British Empire
amount=1000
@ENDIF

;------------------------------------------------
;CHINESE Economy Boosts
;------------------------------------------------
;Chinese Colonialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=12
receiver=Chinese Republic
@THEN
ChangeMoney
receiver=Chinese Republic
amount=100
@ENDIF
;------------------------------------------------
;Chinese Imperialism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=54
receiver=Chinese Republic
@THEN
ChangeMoney
receiver=Chinese Republic
amount=100
@ENDIF
;------------------------------------------------
;Chinese Militarism: 100 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=49
receiver=Chinese Republic
@THEN
ChangeMoney
receiver=Chinese Republic
amount=100
@ENDIF
;------------------------------------------------
;Chinese Republic: 500 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=71
receiver=Chinese Republic
@THEN
ChangeMoney
receiver=Chinese Republic
amount=500
@ENDIF
;------------------------------------------------
;Chinese Democracy: 1000 Gold
;------------------------------------------------
@IF
ReceivedTechnology
technology=21
receiver=Chinese Republic
@THEN
ChangeMoney
receiver=Chinese Republic
amount=1000
@ENDIF
 
Playing as the Chinese Republic, things are going well...:)

The Japanese are throwing all they can at us, and partisans are in mass production to hold the line.
The Soviets just bombed one of my cities, and happily, they also just went to war with Japan...Buying me some breathing room.

Germany has thrust south, the AI taking Athens in early 1941, on schedule, and the Brits and Soviets are moving into Iraq/Iran.

What happens next? Not sure...Any of the mega-invasion events could fire at any time...Meanwhile, China will begin
amassing a counter-attacking force...And make our move when Japan starts to weaken...IF they start to weaken! :D
 
Some buildings have requirements...
I will make a proper guide soon, but until then, please refer here:

Spoiler City Improvement Requirements... :

--INDUSTRY IMPROVEMENTS
--Shipyards can be built in cities with Local Industry and Docks
improvementBuild[object.iShipyard.id] = {someImprovements={object.iLocalIndustry,object.iDocks},numberOfImprovements=2}

--Military Factories can be built in cities with Local Industry and a Rail Station
improvementBuild[object.iMilitaryFactory.id] = {someImprovements={object.iLocalIndustry,object.iRailStation},numberOfImprovements=2}

--Naval Bases can be built in cities with a Barracks and Docks
improvementBuild[object.iNavalBase.id] = {someImprovements={object.iBarracks,object.iDocks},numberOfImprovements=2}

--Airbases can be built in cities with a Barracks and Officer Academy
improvementBuild[object.iAirbase.id] = {someImprovements={object.iBarracks,object.iOfficerAcademy},numberOfImprovements=2}

--Financial Districts can only be built in cities at size 10 with Warehouses and a Freight Depot
improvementBuild[object.iFinancialDistrict.id] = {someImprovements={object.iWarehouses,object.iFreightDepot},numberOfImprovements=2,minimumPopulation=10}

--DEFENCE IMPROVEMENTS
--City Defences must be built in cities with existing Barracks
improvementBuild[object.iCityDefences.id] = {someImprovements={object.iBarracks}}

--AA Batteries must be built in cities with existing City Defences
improvementBuild[object.iAABattery.id] = {someImprovements={object.iCityDefences}}

--Coastal Batteries must be built in coastal cities with existing City Defences
improvementBuild[object.iCoastalBattery.id] = {someImprovements={object.iCityDefences}}

--Wasserfall Batteries must be built in cities with an existing AA Battery
improvementBuild[object.iWasserfallBattery.id] = {someImprovements={object.iAABattery}}

--CIVIC ORDER IMPROVEMENTS
--Military Police can be created in cities with Barracks and a Governor
improvementBuild[object.iMilitaryPolice.id] = {someImprovements={object.iBarracks,object.iGovernor},numberOfImprovements=2}

--Cinemas can be built in cities with existing Propaganda
improvementBuild[object.iCinema.id] = {someImprovements={object.iPropaganda}}

local wonderBuild = {}

--The National Shipyard Wonder can only be constructed in a city with a Shipyard and an Assembly Lines
wonderBuild[object.wNationalShipyard.id] = {allImprovements={object.iShipyard,object.iAssemblyLine}}
 
Spotting a few messages in "Game.txt" and "Rules.txt" that need edits.
No major problems as yet, although no big attacks have launched.
Might edit the stats to make the attack techs more attractive to AI.

After about 20 turns, Japan offered a peace treaty. Which is maybe realistic,
but not entirely against the idea of turning all negotiations off in this scenario.

There is no real reason for anyone to make treaties, as the scenario is about
total conquest and takeover...So I might make it so no-one can open talks...

Opinions welcome...!
 
I'm now in August 1941 and conquered Pantow. A lot of Chinese hardware and troops are destroyed, at least those on the front line.
Now I'm planning to conquer the cities in Chinas mainland. Stalin too seeing China as a real threat and invaded the Mongolia, good guy.:D

Germany managed to conquer the Balkan, Greece and Crete, while the Allies and Soviets divided Iran.

Meanwhile, the US invaded Marocco. Could it be the start of liberating North Africa from Nazi terrorism?
upload_2022-1-8_21-5-58.png
 
I would deactivate negotiations as it is a war scenario. Historical the Allies also never talked with the Axis and Japan. And the alliance between the Western Allies and the Soviet Union was a very fragile one.
 
I hear ya - I have decided that China being able to talk to the Soviets was the only speech really happening, and does not need to. :)
 
Made some adjustments to the tech settings, and on my new play-through, the Germans launched Barbarossa right on schedule!
Screenie1.png

And even better, the Lua events supporting the invasion enabled to the Germans to strike as soon as the units spawned, like a true surprise attack! This is what I have been striving for!

I can only thank @Prof. Garfield and @JPetroski for helping me achieve this little holy grail...:)

Now I shall see how the attack progresses...It bodes well for when I make the versions of this scenario,
tailored to each civ - As I can now make sure the AI can unleash some very challenging attacks...:D
 
Currently adjusting the tech development to make sure the Allies and Axis AIs develop the proper techs at the right era...No B-29s turning up in Jan 1942!

I'll post the new files soon, but here are the "Rules" to start with...Only a reload required...
 

Attachments

Just noticed a blunder in the events, due to some unit renaming during development. The Red Army Assault troops were renamed Shock Troops, and the Assault name given to Japanese naval attackers.

I forgot to change that in events, so some USSR events might spawn IJN soliders...Which is not ideal!

This legacyevents file will fix things!
Just drop the text file into the LuaTriggerEvents folder...
 

Attachments

Status
Not open for further replies.
Back
Top Bottom