Jump to content

VictorFarbau

Member
  • Content Count

    557
  • Joined

  • Last visited

  • Medals

Posts posted by VictorFarbau


  1. @IceBreakr - if you use that addon all units of class "man" (and that includes civilians) will use opportunities to get ammo and weapons.

    @DMarwick - units should throw smoke given 3 conditions:

    1. You use the correct addon

    2. Units are wounded

    3. Units carry a smokeshell (will try to get replacements when empty using the ammo script)

    I have seen that working fine - except for the weird AI interruptions that might be caused by cascaded commands given to the AI (like gun pointing to the skies for minutes, units being stuck, units not reacting to commands). The latter I need to work on still to make it more friendly to the underlying AI engine of Arma.

    Cheers,

    VictorFarbau


  2. @DMarkwick - I took the liberty to have a look at your config. I saw that you prepared the usage of viewblocking objects already in there. Are they not working or why did you decide to not use them?

    @william1 - I have observed similar behaviour in my group. Only in the first game though, the second round was going splendid. Some of the guys were running low on ammo, ran to dead west soldiers but just stood there. After a while they ran away again. The same behaviour shown by some opfor soldiers whereas others took weapons and mags just fine and other ignored everything around them.

    Knowing that it is the very same script running on all of them I can only conclude that there is a conflict with pending orders and AI status of some kind. This is generally the risk when interfering with the AI engine on a higher level w/o having real control over the unit.

    The current scan ranges are (quoting from top of my head) 30m for ammo and 60m for weapons which is almost too much in my mind - don't wanna have units running around everywhere just for a mag. It should more be like using the opportunity and not being the big harvester.

    I guess only more observations will help me to work around this if at all possible. There seems to be a good amount of random in there.

    VictorFarbau


  3. Sorry for starting a new topic for this one. But I got this now error-free in MP as well and added functionality. Would like to extend this more in the future.

    I simplified the usage, the paramter version drove me nuts and caused several errors. The way it is used now is simple - you place the addon and off you go. Alternatively you can use any @Addon directory if you rather en- or disable it as needed.

    I use the Smokeshell version together with @DMSmokeEffects 4.2. This drove my mates crazy during MP, AI was throwing smoke all over the place and snitched magazines and ammo everywhere. Ultimately I was killed by a SpecOp carrying a M16 ACOG nener.gif

    Cheers,

    VictorFarbau


  4. == Current development has ceased. VFAI will be continued in Arma II. See you in Chernarus. ==

    Current version is 2.6 - release date 24.May.2009

    Revision 2.6 adds ACE compatibility and improves the control panel and code. I don't use ACE a lot but since so many people do I wanted VFAI to be as compatible as possible. I'd be interested to hear whether anybody finds weird bugs due to VFAI. Please post them in this thread and I'll have a look at it. Needless to say that this VFAI release runs with or without ACE alike.

    The addons require "Extended_EventHandlers" © by Solus (included in the archive).

    VFAI consists of 3 independent addons

    1. VFAI_Equipment enables units to independently equip themselves with weapons and ammo from dead bodys. Further information and details included in the readme file. I advise you to read the readme file - it might explain some behaviour you wonder about. Installation: read the readme file (it is easy).

    2. VFAI_Smokeshell will cause units to throw smokeshells whenever they're hit. They will try to throw smoke into the direction of the gunner to block his view. More details in the included readme file. *Installation: read the readme file (it is easy). All units will then be equipped with 1 smokeshell and will know when to use it.

    Attention ACE Mod users: ACE uses additional "Hit" event handlers to simulate gunshot wounds. It might interfere when both addons try to process the hit event at the same time. I got stuck only once in a seemingly endless animation loop due to that; but it can happen. If you experience this too often, simply turn off Smokeshell.AI through the control panel or don't install SmokeshellAI.pbo at all.

    3. VFAI Control Panel

    Using this control panel addon you will be able to switch VFAI addons on and off in the middle of the game. The control panel is moveable (finally) and will indicate which relevant addons are being found (Equipment, Smoke, ACE Mod), hence some options will or will not be selectable.

    DOWNLOAD LINKS

    VFAI current version download link (Megaupload)

    OLDER YOUTUBE VIDEO SHOWING VFAI

    VFAI history

    Revisions

    VFAI Control Panel v2.6

    - More decent design + moveable interface

    - Autoconfiguration of options based on addon presence

    Equipment.AI v2.6

    - Bug resolved (Grenades not taken)

    - ACE classes dynamically added if ACE is deteced

    Smokeshell.AI v2.6

    - ACE smokeshells used (if found)

    2.5 Major change: New control panel, Equipment.AI can now be turned on/off for each group (by group leaders)

    2.41 numerous fixes in all addons (see included readmes)

    2.4 Major release, ControlPanel included, reworked Equipment.AI to kill bugs, signed all addons with key VICFA (see OFPEC)

    2.3 Corrected dedicated server bug

    2.2 Added compatibility to XEH (Solus' Extended Event Handlers)

    2.2 Split Equipment.AI and Smoke.AI into 2 independent addons

    2.2 New options included, bugs corrected

    2.1 Not released

    2.0 Code completely revised and optimized, improvements made

    © 2008 Victor Farbau


  5. Solus, one question. Have you tested this on a dedicated server? I have used the init event handler in my VFAI extension which runs fine on a local server and also local dedicated server (running the client on the same machine).

    But as soon as I run it from a remote dedi server (addon is present) the inits don't seem to be run anymore. Have you heard similar feedback?

    Thanks,

    VictorFarbau


  6. Interesting feedback - I will work on this to cater the needs. I guess there should be one version that always runs and another that can be configured per need.

    @william1 - I configured the threshholds conservatively; the guys are not meant to rip apart everything they find. Don't forget this is an interruptive script for them. They will only take weapons and ammo (mags, smokeshells, handgrenades) if they need them.

    See ya,

    VictorFarbau


  7. Current version is 1.0

    !!! THE ADDON VERSION REQUIRES "Extended_Init_EventHandlers" © BY SOLUS !!!

    VFAI Equipment.AI download

    Equipment.AI Introduction

    =========================

    What does it do? Equipment AI will allow units to scan their immediate environment for bodys and their equipment. If a unit goes below certain ammo levels it will try to snitch a magazine, a grenade or smokebomb here and there. If the unit looses its weapon or does not find ammo in a given time the unit will focus on getting a new weapon as quick as possible.

    Equipment.AI activation

    =======================

    To activate Equipment.AI for the desired side (west, east, guerilla or civilian) you need to place an object of any type (e.g. InvisibleH) with a specific name onto the game map. Combinations with multiple objects are possible. This way undesired effects in foreign game maps are avoided.

    Naming scheme:

    -------------

    An object named VFAIEQW will activate Equipment.AI for all west soldiers. Add another object called VFAIEQE to also activate it for all east soldiers. The same goes for VFAIEQG and VFAIEQC (guerilla and civilian side). Any combination will work. If no such object is found then Equipment.AI will not be run on any unit.

    Multiplayer

    ===========

    Apart from the desired VFAIEQ[x] objects you need to have a "Logic" object by the name of "Server" placed onto the game map. So the usual procedure when creating MP maps in fact. Needless to say that the server will need to have the VFAI.PBO object placed into its addons dir. No client will need this addon unless you are creating soldiers on a client PC while playing MP.

    Additional comments

    ===================

    Since this addon hooks into the common unit creation process using extended init event handlers © by Solus I deem it necessary to use this activation method. Otherwise the script would be run on all units in all missions and you would be forced to remove the addon each time you don't want to use it. So this is a bit clumsy but it works.

    If you want to activate this extension only for specific units you will need to use the script version instead and call it by putting >this execVM "equipment_ai.sqf"< into the init line of each unit on the map.

    Next steps

    ==========

    - Include secondary weapons (AT, Pistols) etcpp

    - Smart weapons choice (based on missing weapons types within the group)

    - Better weapon detection (now units will try to exchange unknown weapons as quick as possible for known ones)

    - Eliminate any errors (I bet there will be some, too much nightly scripting and testing goodnight.gif )

    Regards, Victor Farbau


  8. Equipment AI will NOT allow units to take ammo and weapons if their behaviour is COMBAT or STEALTH. Which means they shouldn't turn their back on enemies in the middle of fighting. The game engine changes that status quite dynamically so there should be sufficient idle time to get stuff while not being suicidal. I guess the code is ready for release within the next few days.

    There will be script and addon versions included.

    Cheers,

    VictorFarbau


  9. Ok, so I understand that this command is simply not what I need.

    @Sickboy: I am not controlling any player here - I am only allowed to check whether he's mounted or not. But you're right about that "unassignVehicle" command. If I use that on units from within a script then the assigned vehicle role is reset to [] indeed. A simple "disembark" command from within the game is not enough. I guess it has to do with the AI engine where units are controlled by simple "mount" and "unmount" commands (when using WP e.g.).

    @benreeper: that simple (_unit == vehicle _unit) bool is working fine, I'll go for this one thumbs-up.gif

    Thanks,

    VictorFarbau


  10. One day I'm gonna tear this game a new one tounge2.gif

    To finalize my latest project I need to know whether a unit is mounted in any vehicle. I thought I'd use the "assignedVehicleRole" command for that. Initially all units return a [] when queried. Once I have them mount a truck it changes to ["Cargo"] e.g. which is fine. But this status is not being reset to [] after having left the vehicle - actually it seems it's never being reset to [] after that and the unit keeps that status forever or unless assigned to a new role.

    Jeez it's soo tiresome to work around all these behaviours confused_o.gif Does anybody have an idea how to query the correct "mount status" of a unit?

    Thanks,

    VictorFarbau


  11. Good idea DMarwick. Equipment.AI is just the first module in a series I was planning to overcome some everyday-annoyances.

    Vehicle.AI could be the next step - need to consider different things there compared to "simple" weapon&ammo logistics. Like group waypoints, battlefield situation etcpp. Don't forget that most vehicles e.g. weaken groups rather than strengthen them (like: only 1 Gunner, slow AI pathfinding and driving behaviour).

    Cheers,

    Victor


  12. DMarwick, I had this already built in but took it out for now since the script commands of Arma do not allow to scan the inventory of a "weaponholder" at this point in time.

    I tried all sorts of tricks to work around this but came to no acceptable results. The inventory list will always be []. The Arma engine can do it (you can manually command you units to take stuff) but scripting commands won't work as expected.

    Cheers,

    Victor


  13. Quote[/b] ] what if you need the ammo and the a.i's steal it all

    Interesting you mention that. That is exactly the most tedious work left for me. There's also no point if a dead unit carries 8 magazines and the first AI grabs them all and leaves 7 teammates empty handed.

    Also got to be careful when it comes to sending additional commands to AI in combat. Multiple casaded orders sometimes cause awkward behaviour (like courching around with the gun pointing skywards e.g.).

    I will release as soon as the parameters are sufficiently balanced.

    Cheers,

    VictorFarbau


  14. I will release both script and addon (addon prolly a bit later) when ready.

    The script is independent from the unit's side. So east, west, res and civ can use the same script alike. AI units won't care about which weapons they can get their hands on as long as they know the type and ammo (which is part of the script).

    VictorFarbau


  15. Topic discontinued - pleaser refer to this link for any updates to Equipment.AI:

    VFAI (Equipment.AI)

    WIP status of Equipment.AI is v0.8

    I wanted to extend the capabilities of the AI particularly in regards to their ability to support themselves with weapons and ammo. I never liked it that my men became sitting ducks in the midst of battle only because they ran out of ammo or grenades at some point.

    Equipment AI will allow units to scan their immediate environment for bodys and their equipment. If a unit goes below certain ammo levels it will try to snitch a magazine, a grenade or smokebomb here and there. If the unit looses its weapon or does not find ammo in a given time the unit will focus on getting a new weapon as quick as possible.

    The script will ultimately be put into an addon to be more convenient to use.

    Limitations:

    Currently AI will only be able to handle standard Arma weapons. Unknown weapon and ammo types (read: addons) will result in AI trying to exchange them for any known type at first opportunity. If there is no opportunity then units will keep their unidentified weapon.

    YouTube example here:

    VF Equipment.AI

    Will be released soon as 1.0. More work on this to come soon after.

    Regards,

    VictorFarbau


  16. Quote[/b] ]but the model I made CTDs the game

    Oh, that's not good. Since I am not a modelmaker (haven't tried this yet) I can't help. I was just thinking that two invisible simple walls of about 30m length forming a cross should do the trick, don't you think? This being placed into the middle of the smoke explosion would block everybody's view from each angle. Shame that there's no such object available in the available game objects... or is there? xmas_o.gif

    Cheers,

    VictorFarbau


  17. Hey DMarwick, congrats. Great improvements. It's real nitty-gritty work. I remember my smoke scripts in good old OFP (picture link) and that was a lot of work in regards to tuning and tweaking.

    One question, did you pursue this idea with the viewblock object at least for smokegrenades any further already? That smoke is very nice but seems to have little genuine blocking effect due to engine limitations as it seems.

    Regards,

    VictorFarbau


  18. Well, I bet ya the error is in the first consecutive statement right after "While {TRUE}".

    So this would be <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NearestVehicle =  nearestObjects [_plyr, ["landvehicle", "Air", "Ship"], 10000] select 0;

    Are you sure you can query for these class names? I don't know and can't check right now, but I only used classes like "Car","Tank", "Man" or "Motorcycle" so far which are sub-classes to the ones you query.

    VictorFarbau


  19. Fasad, that's interesting as a workaround concept but it's not really cool if you know what I mean.

    Basically units should have the freedom to find, identify and use stuff that is lying around. With the limitation to not be able to browse a Weaponholder that vision is useless.

    What cracks me up is that the engine *knows* what's in there tounge2.gif You can command your men to pick up whatever is lying around there by name (e.g. G36Mag). And yet there's no way to get this info by any other means? Hmmm... need to spend more time on this confused_o.gif

    Thanks,

    VictorFarbau


  20. Exactly Fasad. In fact I want to be able to detect any weapons and ammo lying around.

    I made some progress: each item you place onto the ground from your inventory is being wrapped into a "WeaponHolder" object and can be detected by the nearObject functions. The funny thing is that even opening your inventory creates a weaponholder. So if you place one charge and you inventory window is still open you can see already 2 weaponholder objects. Weird stuff, this Arma engine.

    Anyways, what's missing now is how to access the inventory of a Weaponholder. The only thing I found so far was a request for exactly this on the ArmA Wishlist

    Quote[/b] ]Access to MagazineCargo/WeaponCargo as an array of the magazines and weapons in a cargospace or weaponholder. Bedges 23:38, 7 December 2006 (CET)

    I wonder if this has been implemented already huh.gif The "weapons" and "magazines" commands return [] when used on the WeaponHolder.

    Cheers,

    VictorFarbau


  21. Exactly Fasad. In fact I want to be able to detect any weapons and ammo lying around.

    I made some progress: each item you place onto the ground from your inventory is being wrapped into a "WeaponHolder" object and can be detected by the nearObject functions. The funny thing is that even opening your inventory creates a weaponholder. So if you place one charge and you inventory window is still open you can see already 2 weaponholder objects. Weird stuff, this Arma engine.

    Anyways, what's missing now is how to access the inventory of a Weaponholder. The only thing I found so far was a request for exactly this on the ArmA Wishlist

    Quote[/b] ]Access to MagazineCargo/WeaponCargo as an array of the magazines and weapons in a cargospace or weaponholder. Bedges 23:38, 7 December 2006 (CET)

    I wonder if this has been implemented already huh.gif The "weapons" and "magazines" commands return [] when used on the WeaponHolder.

    Cheers,

    VictorFarbau


  22. You forgot "and thanks for nothing" smile_o.gif

    Either way, if my ignorant questions caused you to scrutinize your script again and by chance find this error then the purpose of this forum has been served.

    The tough part is that there's no real good debugger which would forsee incorrect references and variable states during programming. A lot of things have to be tested by trial&error; subsequently a lot of errors occur. Gotta live with that. Best way around it is to abstract tested code and make it re-useable.

    Cheers,

    VictorFarbau

×