Administrator
Last active 3 years ago
Just to be clear on profiles. If a player is in range, the profiles will spawn and then act like any normal AI, shooting other AI that are manually placed etc. If a player is not nearby, then the units stay profiled and fighting only takes place in the ALiVE virtual battle space between other profiles.
Profiling your workers would be fine. You could continue the "build" process with "invisible" AI because the player won't be there to see it. Then they spawn in and carry on their build anims when a player comes into range.
@Opendome Thanks! Do you mind sharing these tricks? :P
Nothing magical. Only use properly optimised mods. Use garbage cleaner aggressively. No sound or fps killing client side mods. Minimal scripts running simultaneously. No wait loops in scripts. Use simple objects and disable SIM wherever possible. That kind of thing.
1 is enough. I sometimes run 2 with very heavy missions if I'm expecting players to be in different parts of the map. I've maxed out at 144 groups and around 600 AI with no significant client FPS loss that way, but you have to know all the tricks of the trade for it to work reliably.
Definitely one for @Tupolov He loves persistence and all the code to do with it.
Only virtual "profiled" AI can attack other virtual AI. Only spawned AI can attack other spawned AI.
Regular spawned or unprofiled units will be ignored by virtual units until they are spawned in themselves (e.g. when a player is in range), at which point regular BIS AI routines take over.
If you want the virtual battles to take place between virtual AI and your workers, then the workers will need to be profiled by ALiVE and be a hostile faction.
All profiled units will be taken over by the AI Commander (OPCOM) on the next Command Cycle. This can be prevented by using [_profileHash,"busy", true] call ALiVE_fnc_hashSet;
on a group of units, in which case OPCOM will ignore that group.
ALiVE Virtual Profiles support Move and Cycle waypoints only. The profiled groups retain their equipment state and an estimate of casualties taken during virtual combat (e.g. a group of 12 that has taken 50% damage will respawn with only 6 unit).
Profiles do not retain any custom scripts such as animations or gear loadouts. There is a workaround for this on our wiki here: http://alivemod.com/wiki/index.php/Script_Snippets#Adding_Custom_Inits_to_Spawned_Units
Easiest way without scripting is to us C2ISTAR ops tablet to remove the group from AI Commander's control.
You can probably call that same function from the unit unit line. Not sure what it is but it'll be referenced in the relevant module code on github
Or spyderblack might be able to point it out for you
Unfortunately Hazey's insurgency has all sorts of custom non-ALiVE stuff and as far as I know hasn't been updated in ages, so it's very unlikely we'll be able to help unless you can pin the issue down to something very specifically related to ALIVE.
The feeling is mutual. Shall we date?