Spearhead 1944 Known Issues and Workarounds: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (moved handling of recruited AI to Spearhead 1944 Enhanced Revive)
m (Some wiki formatting)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= Known Issues and Workarounds =
{{TOC|side}}
 
== Vehicle class SPE_Module_Indirect_Fire_Support no longer exists ==
== Vehicle class SPE_Module_Indirect_Fire_Support no longer exists ==


Line 20: Line 19:
# Open the mission.sqm in a text editor - best with a good one like Notepad++ or similar
# Open the mission.sqm in a text editor - best with a good one like Notepad++ or similar
# Search for below terms and replace them (one by one or mass replacement)
# Search for below terms and replace them (one by one or mass replacement)
  SPE_Module_AI_Systems => SPE_Module_AI_Systems_Hotfix
SPE_Module_AI_Systems => SPE_Module_AI_Systems_Hotfix
  SPE_Module_Indirect_Fire_Support => SPE_Module_Indirect_Fire_Support_Hotfix
SPE_Module_Indirect_Fire_Support => SPE_Module_Indirect_Fire_Support_Hotfix
# Save the mission.sqm file
# Save the mission.sqm file
# Export your mission again/upload to workshop
# Export your mission again/upload to workshop


== Vehicle class SPE_Module_AI_Systems no longer exists ==
== Vehicle class SPE_Module_AI_Systems no longer exists ==


See one above.
See one above.


== IFS module is not fully working ==
== IFS module is not fully working ==
Line 34: Line 35:


<sqf>
<sqf>
[] spawn
0 spawn
{
{
  // Wait for other initializations
// Wait for other initializations
  sleep 15;
sleep 15;


  // Fix for clients not initializing scripts
// Fix for clients not initializing scripts
  if (!isServer) then {[] call SPE_MissionUtilityFunctions_fnc_IFS_Init};
if (!isServer) then { [] call SPE_MissionUtilityFunctions_fnc_IFS_Init };


  // Fix for null variable on clients
// Fix for null variable on clients
  if (isServer) then {publicVariable "SPE_IFS_availableCalls"};
if (isServer) then { publicVariable "SPE_IFS_availableCalls" };


  // Fix for AI not utilizing supports
// Fix for AI not utilizing supports
  if (isServer) then
if (isServer) then
  {
{
    if (isNil "SPE_IFS_AmountMultiplier") then
if (isNil "SPE_IFS_AmountMultiplier") then
    {
{
      SPE_IFS_AmountMultiplier = [[0.33,0.5,1],[0.33,0.5,1]];
SPE_IFS_AmountMultiplier = [[0.33,0.5,1], [0.33,0.5,1]];
    };
};


    publicVariable "SPE_IFS_AmountMultiplier";
publicVariable "SPE_IFS_AmountMultiplier";
  };
};


  // Fix for player respawn
// Fix for player respawn
  if (hasInterface) then
if (hasInterface) then
  {
{
    player addEventHandler ["Respawn",{_this spawn SPE_MissionUtilityFunctions_fnc_IFS_onPlayerRespawn}];
player addEventHandler ["Respawn",{ _this spawn SPE_MissionUtilityFunctions_fnc_IFS_onPlayerRespawn }];
  };
};
};
};
</sqf>
</sqf>


== Random headgear assigned to units ==
== Random headgear assigned to units ==
Line 69: Line 71:


<sqf inline>this setVariable ["BIS_enableRandomization", false];</sqf>
<sqf inline>this setVariable ["BIS_enableRandomization", false];</sqf>


== AI gets spawned inside bocage objects ==
== AI gets spawned inside bocage objects ==
Line 78: Line 81:
If you have access to the scripts that work with buildings positions you can filter out/exclude these bocage objects like this:
If you have access to the scripts that work with buildings positions you can filter out/exclude these bocage objects like this:


<sqf inline>private _validBuildings = _nearBuildings select {!(_x isKindOf "spe_bocage_base")};</sqf>
<sqf inline>private _validBuildings = _nearBuildings select { !(_x isKindOf "spe_bocage_base") };</sqf>


In the example _nearBuildings would be a list (array) of objects.  
In the example _nearBuildings would be a list (array) of objects.  
Line 84: Line 87:
Usually AI spawning scripts are putting units inside building they will have something that looks like this:
Usually AI spawning scripts are putting units inside building they will have something that looks like this:


<sqf>_nearestObjects = nearestObjects [_position, ["BUILDING","HIDE"], 100];
<sqf>
_objectsWithBuildingPositions = (_nearestObjects select {count (_x buildingPos -1) > 0});</sqf>
private _nearestObjects = nearestObjects [_position, ["BUILDING","HIDE"], 100];
private _objectsWithBuildingPositions = (_nearestObjects select {count (_x buildingPos -1) > 0});
</sqf>


or this
or this


<sqf>_nearestTerrainObjects = nearestTerrainObjects [_position, ["BUILDING","HIDE"], 100];
<sqf>
_terrainObjectsWithBuildingPositions = (_nearestTerrainObjects select {count (_x buildingPos -1) > 0});</sqf>
private _nearestTerrainObjects = nearestTerrainObjects [_position, ["BUILDING","HIDE"], 100];
private _terrainObjectsWithBuildingPositions = _nearestTerrainObjects select { count (_x buildingPos -1) > 0 };
</sqf>


You would filter then these like:
You would filter then these like:


<sqf>_objectsWithBuildingPositions = _objectsWithBuildingPositions select {!(_x isKindOf "spe_bocage_base")};</sqf>
<sqf>private _objectsWithBuildingPositions = _objectsWithBuildingPositions select { !(_x isKindOf "spe_bocage_base") };</sqf>
or
or
<sqf>_terrainObjectsWithBuildingPositions = _terrainObjectsWithBuildingPositions select {!(_x isKindOf "spe_bocage_base")};</sqf>
<sqf>private _terrainObjectsWithBuildingPositions = _terrainObjectsWithBuildingPositions select { !(_x isKindOf "spe_bocage_base") };</sqf>
 
 
== Recruited or spawned AI won't revive others / cannot get revived ==


= Recruited or spawned AI won't revive others / cannot get revived =
Visit {{Link|Spearhead_1944_Enhanced_Revive_(ER)#Handle_recruited_AI|Spearhead 1944 Enhanced Revive}} for detailed information.


Visit {{Link|Spearhead 1944#Handle recruited AI|Spearhead 1944 Enhanced Revive}} for detailed information.


[[Category: Spearhead 1944]]
[[Category: Spearhead 1944]]

Latest revision as of 14:02, 6 November 2024

Vehicle class SPE_Module_Indirect_Fire_Support no longer exists

Unfortunately an unintentional class name change slipped into 1.0.1 hotfix - please excuse the mishap!

We will revert the class name change in the next update, but will retain these temporary test classes for backwards compatibility. In simple terms - no change from your end needed with the next update!

Simple solution:

  1. Load the mission in Eden
  2. Force load despite the missing class
  3. Place the module again and configure it as desired

Advanced solution:

  1. Locate your mission folder
  2. Make a backup of your mission (copy the folder to another location)
  3. Open the mission.sqm in a text editor - best with a good one like Notepad++ or similar
  4. Search for below terms and replace them (one by one or mass replacement)

SPE_Module_AI_Systems => SPE_Module_AI_Systems_Hotfix SPE_Module_Indirect_Fire_Support => SPE_Module_Indirect_Fire_Support_Hotfix

  1. Save the mission.sqm file
  2. Export your mission again/upload to workshop


Vehicle class SPE_Module_AI_Systems no longer exists

See one above.


IFS module is not fully working

Add the following code in the init.sqf

0 spawn { // Wait for other initializations sleep 15; // Fix for clients not initializing scripts if (!isServer) then { [] call SPE_MissionUtilityFunctions_fnc_IFS_Init }; // Fix for null variable on clients if (isServer) then { publicVariable "SPE_IFS_availableCalls" }; // Fix for AI not utilizing supports if (isServer) then { if (isNil "SPE_IFS_AmountMultiplier") then { SPE_IFS_AmountMultiplier = [[0.33,0.5,1], [0.33,0.5,1]]; }; publicVariable "SPE_IFS_AmountMultiplier"; }; // Fix for player respawn if (hasInterface) then { player addEventHandler ["Respawn",{ _this spawn SPE_MissionUtilityFunctions_fnc_IFS_onPlayerRespawn }]; }; };


Random headgear assigned to units

To disable headgear randomization, insert the following code in the unit's init field:

this setVariable ["BIS_enableRandomization", false];


AI gets spawned inside bocage objects

As of version 1.0.1 bocage objects have building positions. They were originally added to support the destruction states of the bocage.

Now scripts/missions may spawn AI inside them due to building position often used by spawning AI script. Unfortunately the AI inside can't get out and can hardly get killed.

If you have access to the scripts that work with buildings positions you can filter out/exclude these bocage objects like this:

private _validBuildings = _nearBuildings select { !(_x isKindOf "spe_bocage_base") };

In the example _nearBuildings would be a list (array) of objects.

Usually AI spawning scripts are putting units inside building they will have something that looks like this:

private _nearestObjects = nearestObjects [_position, ["BUILDING","HIDE"], 100]; private _objectsWithBuildingPositions = (_nearestObjects select {count (_x buildingPos -1) > 0});

or this

private _nearestTerrainObjects = nearestTerrainObjects [_position, ["BUILDING","HIDE"], 100]; private _terrainObjectsWithBuildingPositions = _nearestTerrainObjects select { count (_x buildingPos -1) > 0 };

You would filter then these like:

private _objectsWithBuildingPositions = _objectsWithBuildingPositions select { !(_x isKindOf "spe_bocage_base") };

or

private _terrainObjectsWithBuildingPositions = _terrainObjectsWithBuildingPositions select { !(_x isKindOf "spe_bocage_base") };


Recruited or spawned AI won't revive others / cannot get revived

Visit Spearhead 1944 Enhanced Revive for detailed information.