Jump to content

Sarge AI


Dango

Recommended Posts

Alright, I pushed a minor update to fix and prevent some things.

  • All chernarus maps will now use a single grid file and a single groups file to prevent confusion between various chernarus maps.
  • Commented out incompatible features till I can make them compatible with epoch.
  • Replaced arma 3 helicopter to use the epoch version for heli crashes.

Some things I am still working on:

  • Replacing basic arma 3 weapons/items/vests/uniforms with epoch versions.
  • The best method for UPSMON scripts.
  • Base guards to work with the epoch base objects.
Link to comment
Share on other sites

1 hour ago, Dango said:

Essentially, yes it is. The code block for the supported maps is a bit old but for the most part the guide works the same.  Just no longer using the try/catch method for custom error handling. You need to create a mission, save it, add the sarge files and turn on all the debug options. Then save and reload the editor mission. Preview the mission and open the map. You will see the grid and then you adjust it in the files and keep reloading till it is where you want it.

Oh I see! The mission.sqm part was what was confusing me really. Imma give this a shot and see how it turns out on Bornholm! :)

Link to comment
Share on other sites

I went ahead and pushed a very minor update 2.2.8 that now runs the UPSMON scripts from the mission PBO. This will no doubt increase the mission PBO size but will significantly increase the performance of the AI all around. I finally have some free time and I expect to push out another update with some much needed changes either today or tomorrow.

Link to comment
Share on other sites

After hours of testing I have released 2.3.0. There was a major overhaul of the code placement and variables regarding loadout arrays. Changes are as follows:

- [Fix] Fixed a bug causing friendly AI to have head wraps.
- [New] AI women have been added to the spawn function.
- [Change] AI Skills decreased to 10% multiplied by a maximum of 2 bringing the highest possible skill level to 20%.
- [Change] AI loadout variable names were changed to a more uniform template to simplify the customization process.
- [Change] Major changes to code blocks and variables were done to make customizing more intuitive for server owners.
- [Change] AI are tied to nuisance, rewarding players an +10 points for bandit kills and -20 points for friendly kills.

Known Issues
    - Error Undefined variable in expression: upsmon_guer_total

Link to comment
Share on other sites

  • 2 weeks later...

running it, so far so good. Getting this error though

23:02:58 Error in expression <tposATL (_units select 0);
_attackpos = _currpos;

If ("deletethis" in _bldpos) >
23:02:58   Error position: <_currpos;

If ("deletethis" in _bldpos) >
23:02:58   Error Undefined variable in expression: _currpos
23:02:58 File mpmissions\__cur_mp.Altis\Scripts\UPSMON\MODULES\FORTIFY\fnc\UPSMON_patrolBuilding.sqf, line 29

 

Link to comment
Share on other sites

  • 2 weeks later...

@Sneer That building script has given errors before but usually for a reason. Perhaps that unit died while the script was unfinished. Does it spam or is it spread out?

As for the HC it does not require a special name to my knowledge but I notice the HC for this Epoch was somewhat...complicated. It looks for any entity with the string HC in the name. It uses the function

isEqualTo

instead of a definitive operator. Are you having issues with it?

Link to comment
Share on other sites

14 hours ago, Dango said:

@Sneer That building script has given errors before but usually for a reason. Perhaps that unit died while the script was unfinished. Does it spam or is it spread out?

As for the HC it does not require a special name to my knowledge but I notice the HC for this Epoch was somewhat...complicated. It looks for any entity with the string HC in the name. It uses the function


isEqualTo

instead of a definitive operator. Are you having issues with it?

I think its working, I'm just not sure its working that's all. Also that error happens when in town, not sure if any town or always in town. and its not spamming though if there were a lot of connected clients in town I suppose it would spam.

Link to comment
Share on other sites

1 hour ago, Sneer said:

I think its working, I'm just not sure its working that's all. Also that error happens when in town, not sure if any town or always in town. and its not spamming though if there were a lot of connected clients in town I suppose it would spam.

I had some debug info on it previously but I removed it since it was basically working, spawned on the HC, or not, spawned on the server. So either way I was not worried about it flat out not spawning but perhaps it would be better to add that back in. I have a small loop script that will say the number of entities local to the HC. I will add it to the repo tonight after work. Basically it makes the system chat talk in the HC window. As for that error, I hang out in towns usually but I do not get that error or at least not enough to notice it. Maybe there is some incompatibility somewhere. What map are you using?

Link to comment
Share on other sites

Had a bit of trouble last night with my server so I was unable to finish testing. I noticed that the module giving the error is FORTIFY. Are you spawning any static units that are using FORTIFY? If so you may be able to go to them in game and see if they are there and if they are doing anything like protecting a building.

Link to comment
Share on other sites

Okay. The dynamic spawns do not use FORTIFY to my knowledge but I could have changed something along the way. The two mods shouldn't be able to see each other and cause issues but I guess anything is possible. I plan to setup a few static spawns with FORTIFY and see if I can figure out what is happening. In the meantime you could disable the A3EAI and see if you still see that error. I always recommend not to use Sarge with other AI systems to avoid conflict but really it should be fine.

Link to comment
Share on other sites

Well, @Sneer I cannot seem to reproduce this for the life of me idk why. I have seen it before so I know it is not just a random bug. As far as I ever found out it is caused when the loop no longer has an AI object to run for. Generally from the unit being deleted if players are not close enough, if that unit dies or something else that causes the unit to 'disappear'. Look over the grps file in the map configs and be sure you have no static spawn using the FORTIFY module for UPSMON.

@natoed yeah this mod is like my hobby so it will continue till I am over scripting arma lol. If you have any suggestions I would be happy to hear them.

Link to comment
Share on other sites

updated to latest version and getting this in the rpt, 

Spoiler

_leader = _group createUnit [_leaderModel call BIS_fnc_selectRandom, >
14:21:42   Error position: <_leaderModel call BIS_fnc_selectRandom, >
14:21:42   Error Undefined variable in expression: _leadermodel
14:21:42 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 74
14:21:42 Error in expression <SAR_band_leader_model>
14:21:42   Error position: <SAR_band_leader_model>
14:21:42   Error Undefined variable in expression: sar_band_leader_model
14:21:42 Error in expression <t_tools;


_leader = _group createUnit [_leaderModel call BIS_fnc_selectRandom, >
14:21:42   Error position: <_leaderModel call BIS_fnc_selectRandom, >
14:21:42   Error Undefined variable in expression: _leadermodel
14:21:42 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 74
14:21:43 "Sarge AI System: Weapons array is [""arifle_TRG20_F"",""""]"
14:21:43 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Leader!"
14:21:43 Error in expression <SAR_surv_rifleman_model>
14:21:43   Error position: <SAR_surv_rifleman_model>
14:21:43   Error Undefined variable in expression: sar_surv_rifleman_model
14:21:43 Error in expression <en - 1) do
{
_this = _group createUnit [_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error position: <_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error Undefined variable in expression: _riflemanmodel
14:21:43 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 148
14:21:43 "Sarge AI System: Weapons array is [""arifle_MX_F"",""""]"
14:21:43 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Leader!"
14:21:43 Error in expression <SAR_band_rifleman_model>
14:21:43   Error position: <SAR_band_rifleman_model>
14:21:43   Error Undefined variable in expression: sar_band_rifleman_model
14:21:43 Error in expression <en - 1) do
{
_this = _group createUnit [_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error position: <_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error Undefined variable in expression: _riflemanmodel
14:21:43 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 148
14:21:43 "Sarge AI System: Weapons array is [""arifle_TRG21_F"",""""]"
14:21:43 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Rifleman!"
14:21:43 Error in expression <SAR_surv_sniper_model>
14:21:43   Error position: <SAR_surv_sniper_model>
14:21:43   Error Undefined variable in expression: sar_surv_sniper_model
14:21:43 "Sarge AI System: Infantry group (B Alpha 1-3) spawned in: SAR_area_11_5 with action: PATROL on side: WEST"
14:21:43 "Sarge AI System: Weapons array is [""arifle_Mk20_F"",""""]"
14:21:43 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Rifleman!"
14:21:43 Error in expression <en - 1) do
{
_this = _group createUnit [_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error position: <_riflemanModel call BIS_fnc_selectRandom>
14:21:43   Error Undefined variable in expression: _riflemanmodel
14:21:43 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 148
14:21:44 "Sarge AI System: Weapons array is [""arifle_Mk20_F"",""""]"
14:21:44 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Rifleman!"
14:21:44 Error in expression <SAR_band_sniper_model>
14:21:44   Error position: <SAR_band_sniper_model>
14:21:44   Error Undefined variable in expression: sar_band_sniper_model
14:21:44 "Sarge AI System: Infantry group (R Alpha 4-3) spawned in: SAR_area_3_4 with action: PATROL on side: GUER"
14:21:44 Error in expression <SAR_surv_leader_model>
14:21:44   Error position: <SAR_surv_leader_model>
14:21:44   Error Undefined variable in expression: sar_surv_leader_model
14:21:44 Error in expression <t_tools;


_leader = _group createUnit [_leaderModel call BIS_fnc_selectRandom, >
14:21:44   Error position: <_leaderModel call BIS_fnc_selectRandom, >
14:21:44   Error Undefined variable in expression: _leadermodel
14:21:44 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 74
14:21:45 "Sarge AI System: Weapons array is [""arifle_Mk20_F"",""""]"
14:21:45 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Leader!"
14:21:45 Error in expression <SAR_surv_rifleman_model>
14:21:45   Error position: <SAR_surv_rifleman_model>
14:21:45   Error Undefined variable in expression: sar_surv_rifleman_model
14:21:45 Error in expression <en - 1) do
{
_this = _group createUnit [_riflemanModel call BIS_fnc_selectRandom>
14:21:45   Error position: <_riflemanModel call BIS_fnc_selectRandom>
14:21:45   Error Undefined variable in expression: _riflemanmodel
14:21:45 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 148
14:21:46 "Sarge AI System: Weapons array is [""arifle_Katiba_F"",""""]"
14:21:46 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Rifleman!"
14:21:46 Error in expression <SAR_surv_sniper_model>
14:21:46   Error position: <SAR_surv_sniper_model>
14:21:46   Error Undefined variable in expression: sar_surv_sniper_model
14:21:46 "Sarge AI System: Infantry group (B Alpha 1-4) spawned in: SAR_area_3_4 with action: PATROL on side: WEST"
14:21:46 Error in expression <SAR_surv_leader_model>
14:21:46   Error position: <SAR_surv_leader_model>
14:21:46   Error Undefined variable in expression: sar_surv_leader_model
14:21:46 Error in expression <t_tools;


_leader = _group createUnit [_leaderModel call BIS_fnc_selectRandom, >
14:21:46   Error position: <_leaderModel call BIS_fnc_selectRandom, >
14:21:46   Error Undefined variable in expression: _leadermodel
14:21:46 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 74
14:21:47 "Sarge AI System: Weapons array is [""arifle_MX_F"",""""]"
14:21:47 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Leader!"
14:21:47 Error in expression <SAR_surv_rifleman_model>
14:21:47   Error position: <SAR_surv_rifleman_model>
14:21:47   Error Undefined variable in expression: sar_surv_rifleman_model
14:21:47 Error in expression <en - 1) do
{
_this = _group createUnit [_riflemanModel call BIS_fnc_selectRandom>
14:21:47   Error position: <_riflemanModel call BIS_fnc_selectRandom>
14:21:47   Error Undefined variable in expression: _riflemanmodel
14:21:47 File addons\sarge\code\functions\fn_AI_infantry.sqf [SAR_fnc_AI_infantry], line 148
14:21:48 "Sarge AI System: Weapons array is [""arifle_MX_F"",""""]"
14:21:48 "SARGE ERROR: Something went wrong when attempting to determine AI side to change headgear for Rifleman!"
14:21:48 Error in expression <SAR_surv_sniper_model>
14:21:48   Error position: <SAR_surv_sniper_model>
14:21:48   Error Undefined variable in expression: sar_surv_sniper_model

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...