Spearhead 1944 Known Issues and Workarounds: Difference between revisions
m (added info about bocage building positions. Some formatting) |
(Updated content, wording and formatting) |
||
Line 64: | Line 64: | ||
</sqf> | </sqf> | ||
== Random | == Random headgear assigned to units == | ||
To disable headgear randomization, insert the following code in the unit's init field: | To disable headgear randomization, insert the following code in the unit's init field: | ||
Line 70: | Line 70: | ||
<sqf inline>this setVariable ["BIS_enableRandomization", false];</sqf> | <sqf inline>this setVariable ["BIS_enableRandomization", false];</sqf> | ||
== | == AI gets spawned inside bocage objects == | ||
As of version 1. | As of version 1.0.1 bocage objects have building positions. They were originally added to support the destruction states of the bocage. | ||
If you have access to the scripts that work with buildings positions you can filter these bocage objects | 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: | |||
<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. | |||
Usually AI spawning scripts are putting units inside building they will have something that looks like this: | |||
<sqf>_nearestObjects = nearestObjects [_position, ["BUILDING","HIDE"], 100]; | |||
_objectsWithBuildingPositions = (_nearestObjects select {count (_x buildingPos -1) > 0});</sqf> | |||
or this | |||
<sqf>_nearestTerrainObjects = nearestTerrainObjects [_position, ["BUILDING","HIDE"], 100]; | |||
_terrainObjectsWithBuildingPositions = (_nearestTerrainObjects select {count (_x buildingPos -1) > 0});</sqf> | |||
You would filter then these like: | |||
<sqf>_objectsWithBuildingPositions = _objectsWithBuildingPositions select {!(_x isKindOf "spe_bocage_base")};</sqf> | |||
or | |||
<sqf>_terrainObjectsWithBuildingPositions = _terrainObjectsWithBuildingPositions select {!(_x isKindOf "spe_bocage_base")};</sqf> | |||
= Recruited or spawned AI won't revive others / cannot get revived = | |||
If you play with an AI recruiting feature, or the mission/game spawns AI mid mission and joins them to the player group, currently the Enhanced Revive system won't handle them. | |||
# Name the revive module in the editor '''My_Revive_Module''' // to access it when calling the revive params function in your scripts | |||
# Add to initPlayerLocal.sqf | |||
{{Feature|informative|The code sets SPE_reviveToksaParams_initialized to false to have the revive params function run through completely rather then exiting early}} | |||
<sqf> | |||
[] spawn | |||
{ | |||
waitUntil { !(isNil "My_Revive_Module") }; | |||
SPE_reviveToksaParams_initialized = false; | |||
[revive_module] call SPE_MissionUtilityFunctions_fnc_ReviveToksaParams; | |||
(group player) addEventHandler ["UnitJoined", { | |||
params ["_group", "_newUnit"]; | |||
[_newUnit] call SPE_MissionUtilityFunctions_fnc_ReviveToksaInit; | |||
[_newUnit] call SPE_MissionUtilityFunctions_fnc_ReviveToksaActionsInit; | |||
}]; | |||
};</sqf> | |||
[[Category: Spearhead 1944]] | [[Category: Spearhead 1944]] |
Revision as of 15:34, 8 August 2023
Known Issues and Workarounds
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!
Simple solution:
- Load the mission in Eden
- Force load despite the missing class
- Place the module again and configure it as desired
Advanced solution:
- Locate your mission folder
- Make a backup of your mission (copy the folder to another location)
- 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)
SPE_Module_AI_Systems => SPE_Module_AI_Systems_Hotfix SPE_Module_Indirect_Fire_Support => SPE_Module_Indirect_Fire_Support_Hotfix
- Save the mission.sqm file
- 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
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:
or this
You would filter then these like:
or
Recruited or spawned AI won't revive others / cannot get revived
If you play with an AI recruiting feature, or the mission/game spawns AI mid mission and joins them to the player group, currently the Enhanced Revive system won't handle them.
- Name the revive module in the editor My_Revive_Module // to access it when calling the revive params function in your scripts
- Add to initPlayerLocal.sqf