Synchronizing Object_Specifications with Meta_IF44_Unit_Definitions
Posted: Sat 14 Mar 2020 10:49 pm
Hi everyone,
Ensuring that your IF44 world matches your IL2 world can be annoying, especially if you are tweaking your infantry unit compositions. The following SQL query allows you to make some decisions regarding soldier and supply weights, and then automatically updates Object_Specifications based on your infantry squad definitions in Meta_IF44_Unit_Definitions.
This doesn't make all your synchronism problems go away, but it is a help.
Cheers,
4S
Ensuring that your IF44 world matches your IL2 world can be annoying, especially if you are tweaking your infantry unit compositions. The following SQL query allows you to make some decisions regarding soldier and supply weights, and then automatically updates Object_Specifications based on your infantry squad definitions in Meta_IF44_Unit_Definitions.
Code: Select all
#
# Synchronize infantry squads in Object_Specifications to those defined in Meta_IF44_Unit_Definitions
# Set Crew, Transport_Weight and Fuel_Capacity to sensible values based on crew numbers in Meta_IF44_Unit_Definitions
#
# Average soldier body weight in kg
SET @SOLDIERWEIGHT = 95;
# Average soldier equipment weight in kg
SET @EQUIPMENTWEIGHT = 15;
# Average soldier supply requirement in litres
SET @SUPPLYVOLUME = 18;
SELECT
IL2_Equivalent_Unit,
IF44_Unit_Description,
Total_Crew,
Total_Crew*(@SOLDIERWEIGHT+@EQUIPMENTWEIGHT+@SUPPLYVOLUME) AS Transport_Weight,
Total_Crew*@SUPPLYVOLUME AS Fuel_Capacity
FROM
Meta_IF44_Unit_Definitions
WHERE
IF44_Unit LIKE 'squad_%'
ORDER BY
IL2_Equivalent_Unit;
UPDATE
Object_Specifications,
Meta_IF44_Unit_Definitions
SET
Object_Specifications.Crew = Meta_IF44_Unit_Definitions.Total_Crew,
Object_Specifications.Transport_Weight = Meta_IF44_Unit_Definitions.Total_Crew*(@SOLDIERWEIGHT+@EQUIPMENTWEIGHT+@SUPPLYVOLUME),
Object_Specifications.Fuel_Capacity = Meta_IF44_Unit_Definitions.Total_Crew*@SUPPLYVOLUME
WHERE
Meta_IF44_Unit_Definitions.IF44_Unit LIKE 'squad_%' AND
Meta_IF44_Unit_Definitions.IL2_Equivalent_Unit = Object_Specifications.Object_Type;
Cheers,
4S