Blanco 0 Posted July 15, 2007 First off all, this script requires an addon. This script, written in oldskool sqs, keeps AI behind the sandbags and make them pop-up once a while (optional) Check the demomission in Rahmadi and let me know what you think... In the zip: - Testmission - Sandbagfix1.1 addon by Raedor - Readme in txt and pdf format Download it here http://www.mediafire.com/?310gz09bxtz Share this post Link to post Share on other sites
Blanco 0 Posted July 19, 2007 Update 1.1 Added: AI groups support static weapons (optional parameter) When a gunner got killed, other units from the group will take his place. More information in the readme. Download trenches1.1 script mirrors: http://www.assaultmissionstudio.de/infusio....?did=70 (thx to Imutep) http://rapidshare.com/files/44179253/Trenches1.1.zip.html http://www.ofpec.com/index.p....29804.0 http://www.megaupload.com/?d=0HPEJUJ2 http://mihd.net/y286z9 (click on request download link and then download file) In the zip: - A new demomision - Sandbagfix1.1 addon by Raedor - Readme in txt and pdf format Can somebody try this in MP coop, please? Share this post Link to post Share on other sites
ManDay 0 Posted July 19, 2007 I hope you dont care if I post my opinion on that : The script isself sounds very usefull for certain purposes but I think requiring an addon seems a bit over the top. Maybe you could do it without the addon? Share this post Link to post Share on other sites
Blanco 0 Posted July 19, 2007 Thanks for trying The addon has it's purpose, it's not just for eyecandy. AI don't fire over sandbags (Arma bug), unless you use this addon by Raedor. Share this post Link to post Share on other sites
ManDay 0 Posted July 19, 2007 Thanks for trying The addon has it's purpose, it's not just for eyecandy. AI don't fire over sandbags (Arma bug), unless you use this addon by Raedor. Oh really? I didn't know that. At least in OFP I rember seeing them shooting over sandbags so I exspected them to do this in ArmA as well. I'll definitly going to try it out tomorrow - didn't yet. Just telling from what you said. Share this post Link to post Share on other sites
Guest Posted July 19, 2007 Could you try a different host for your file please? I tried to download this almost 20x, and if I finally can view a page the download link itself will give me a page can not be displayed error............if I even get there cause often it just stops. If you like you can mail it to me, check my profile. Share this post Link to post Share on other sites
VanhA 10 Posted July 20, 2007 Looks interesting. Have to try it out. Nice work. Share this post Link to post Share on other sites
nubbin77 0 Posted July 20, 2007 Great script. Couple questions / observations: It looks like they do not scan around for incoming contacts - it seemed like each person only looked in one direction and would only change heading to look for / engage enemy troops when the leader orders them to. Not a problem when there are a lot of units in the same group covering a large scanning radius. But if you have a small bunker with 2-3 people in it, it seems like you could easily sneak past their scanning radius without them even having a chance to turn and look for you. Actually, that's probably easy for me to test when I get home. I'll put a guy directly behind everyone and see if anyone will turn around an notice me. I'm curious if there is a way to re-enable the AI after a certain condition. As in the defensive line is getting overrun and after a certain condition have them turn tail run and regroup. Can this get combined with the suppression scripts that are out? Share this post Link to post Share on other sites
ManDay 0 Posted July 20, 2007 It requires some EditorUpdate for me Share this post Link to post Share on other sites
Blanco 0 Posted July 21, 2007 Manday, editorupgrade is installed here but I didn't use any objects from the editorupgrade. I probably did while making the mission, but I removed them afterwards. Thing is, the editorupgrade is still in the addons list of the mission.sqm. My bad. All you have to do is to remove that line. I'll upload a fixed version later, but meanwhile you can simply fix it: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ... addOns[]= { "cacharacters", "caweapons", "RAE_sandbagFix", "camisc", "desert", "CABuildings", "CATracked", "EditorUpdate_v102", <== remove this line "CAWheeled" ... @nubbin77 Quote[/b] ]It looks like they do not scan around for incoming contacts - it seemed like each person only looked in one direction and would only change heading to look for / engage enemy troops when the leader orders them to. True, I didn't change AI behavior, they act like they do without the scripts. Alertness from behind sucks, It's even worse when their positions are fixed. That why I called it basic. I do have some ideas to improve these things, I'm still looking into the new Arma commands. How can I improve AI awareness? You can use Neartargets but the problem is that this only returns units who are known by the unit. So when he doesn't know about the units behind him, I can't give him a dotarget/dofire/reveal or dowatch command because they are not in my list. Nearestobjects should work when I filter out the enemy units. I allready tried that, but ran into another problem. Filtering the enemies was easy, but filtering all the living enemies was harder to do. I already posted this problem on OFPEC forums. Sounds easy, but it seems it was not easy at all. I think there must be a better an easier way to do this, I just couldn't figure it out yet. Also, directing the AI to an enemy he doesn't know about is a bit cheating, you only have to know when you can give hil dofire/dotarget/reveal, etc commands to make it look right , because these commands override normal AI behavior. I'm thinking about creating some kind of formula (algoritm) based on 3 things (knowsabout, distance & rating) to simulate situation awareness. I'm thinking out loud here, I still don't know where to begin, it's just an idea FSM editing would be even better, but thats far beyond my knowledge. Quote[/b] ]Actually, that's probably easy for me to test when I get home. I'll put a guy directly behind everyone and see if anyone will turn around an notice me. Try this without scripts and the result will be the same. Quote[/b] ]I'm curious if there is a way to re-enable the AI after a certain condition. As in the defensive line is getting overrun and after a certain condition have them turn tail run and regroup. A collective retreat is easy to do. I just have to add a bolean when it's set true, run an enableAI "move command and exit all scripts. But... (there's always a but) ...since all groups run the same script(s), all groups will leave their position at the same time, it will be a collective retreat. So I need a unique bolean for every group. I'm thinking about dynamic boleans created by the boleanname + the name of group (if you know what I mean) Automatic rearm is another thing that slips through my mind. You can detect when a unit is out of ammo (I think so, I didn't try it yet ), you can give him move orders and let him run to nearrby ammobox, but the hard part is the next move order. Move orders are not that precise. I can store his postion behind the sandbags in a variable, but moving him back to that postion... is euh... undo-able. Arma pathfinding sucks (sorry to say BIS) Again, I'm brainstorming about a very tricky solution Imo the only way to really force an AI unit to move to a precise position is to skew him into the right direction and run some animation commands. You have to calculate how many times (and how long) the animation should run before he reaches that postition. It's really tricky and probably hard to do, but if this works, many things can be done. AT support for example, when a AT soldier dies, the closest unit will take his AT launcher. Quote[/b] ]Can this get combined with the suppression scripts that are out? I use the suppression scripts in the demomission but only on the enemies, to see how they do it against the trenched guys. I really don't know how these behave when I combine them with my scripts, but I know for sure that all move orders will be ignored because the disableAI commands will override them all. Like I said, this is a basic trenchscript, I wanted it to make as simple as possible, but I'm also exploring a more advanced example. I need more time to learn about the new arma scripting commands. Share this post Link to post Share on other sites
nubbin77 0 Posted July 21, 2007 Hey thanks for the thorough response. Of course you are right on all points. I was thinking out loud myself. I have no idea how to use FSM's yet, but this might be the type of thing where they are actually most useful. Something along the lines of: First state - in the "trench" Transition A - Out of ammo Run next state where he does the scripting required to rearm then he'd be in his second State From second state next course of action is determined - one of which would be to return to the line and resume the first state. First state...transition B - taking too many casualties / overrun position Run next state where he runs away, etc. Obviously much easier said then done, but from speaking to Crashdome about FSM's it seems this "simple" transitions are where fsm's are most useful. Share this post Link to post Share on other sites
ManDay 0 Posted July 21, 2007 Sorry for the spam, but now I get an error "No entry bin\config.bin/CfgVehicles.AAMI286." Do I miss a further addon? Share this post Link to post Share on other sites
DBO_ 0 Posted July 21, 2007 same problem here To make it playable with unkwn consequences to mission i simply replaced the object AAMI286 and theres only one with FenceWood in the mission sqm, not seen any noticable problem but i dont know what AAMI286 was to begin with . Share this post Link to post Share on other sites
Blanco 0 Posted July 21, 2007 Quote[/b] ]Sorry for the spam, but now I get an error "No entry bin\config.bin/CfgVehicles.AAMI286." Do I miss a further addon? Nha, AAMI286 is that tankwall, that concrete platform under the cannon. I thought that object was in vanilla Arma without using the editorupgrade ? OK, I'll fix that and doublecheck my demomission again. Sorry. Thx for bringing this up, m8. That's not spamming at all, it's simply the thruth. Share this post Link to post Share on other sites
Blanco 0 Posted July 21, 2007 Ok, there shouldn't be any problems anymore with missing addons because I removed the editorupgrade from my addonsfolder to make sure. All download links & mirrors were updated, see the second post in this thread. Share this post Link to post Share on other sites
Blanco 0 Posted July 22, 2007 Quote[/b] ]I'm curious if there is a way to re-enable the AI after a certain condition. As in the defensive line is getting overrun and after a certain condition have them turn tail run and regroup. Done. In the next update you can make them leave the trenches in a very simple way. All trenched units are in combat behavior. When you change the group behavior into something else then "combat" (by scripting or via a command order), the whole group will leave the trenches and return back in formation. So you can add a trigger with a certain condition and exit all trenchscripts for that specific group with nameofgroup setbehaviour "aware" in the onactivation field. Do you want it automatic via some kind of courage argument or do you want to define the condition yourself? There is no way to bring them back behind the sandbags. That would be very hard to do. Quote[/b] ]It looks like they do not scan around for incoming contacts - it seemed like each person only looked in one direction and would only change heading to look for / engage enemy troops when the leader orders them to. Not a problem when there are a lot of units in the same group covering a large scanning radius. In the works: Idle units (units without targets) will randomly scan the horizon. I hope that will improve situation awareness a bit. Share this post Link to post Share on other sites
johnnyboy 3797 Posted July 22, 2007 @Blanco, two things: 1. You mentioned the save game bug... Try adding "dostop this" to static unit init fields (in addition to "disableai "MOVE""), and add "this enableAttack false;" to the init of each static group leader. The units will then stay in place after a save, EXCEPT when they feel they need ammo. When thye need ammo, they will run foolishly to exposed positions and get killed. 2. I can't run your example mission, as I get this error: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">You cannot play/edit this mission, it is dependent on downloadable content that thas been deleted. RAE_sandbagFix. Share this post Link to post Share on other sites
nubbin77 0 Posted July 22, 2007 Blanco, I hadn't spent enough time with the script before. They do sufficiently scan and react to enemies as long as they are aware of them from someone else in the group reporting the contact. You just need to have enough guys in the group to cover looking in most directions. In any case if you have found a way for them to scan and stay in place that's even better. JohhnyBoy - the first post says very clearly what addon you need. Its in the zip. You have 129 posts, so I have to assume you aren't new to Arma / OFP and you know how to use addons. If not post back and I'll explain in detail. Share this post Link to post Share on other sites
johnnyboy 3797 Posted July 23, 2007 My mistake, missed the addon. Will give it a whirl now. Share this post Link to post Share on other sites
Blanco 0 Posted July 23, 2007 Quote[/b] ]1. You mentioned the save game bug... Try adding "dostop this" to static unit init fields (in addition to "disableai "MOVE""), and add "this enableAttack false;" to the init of each static group leader. The units will then stay in place after a save, EXCEPT when they feel they need ammo. When thye need ammo, they will run foolishly to exposed positions and get killed. I will explore both methods. I know dostop commands work aswell but it has a downside. Some grouped units with dostop commands will face the opposite direction of their leader. I don't know why this happens. Enableattack false prevents the leader to give attackorders, but he can still can perform targetorders, so units in the group will stay put. But I have the feeling they fight better without enableattack false command, especially the AT/AA-soldiers and the guys in static weapons. I have to do some testing to see what's best. If it really nails that damn savegame bug, I might choose for your method. Thx for the tip. Share this post Link to post Share on other sites