Kilo Zulu 0 Posted November 14, 2006 For some reason I'm having trouble with the AI shooting at empty vehicles when they detect them. In some cases I've been able to hide the vehicles from sight, but it doesn't always work, and that's only a work-around, anyway. What's worse, I've seen occassions where the AI will continue to attack a vehicle after other allied troops board the vehicle. I can't think of anything unusual about either the vehicles or the troops in question. The vehicle might officially be part of the other side's inventory, but I wouldn't expect anyone to care as long as it's unmanned. It's annoying to start the mission and all you can hear is the sound of machine guns and hand grenades in the distance as the AI declares war on parked cars. Share this post Link to post Share on other sites
scars09 9 Posted November 14, 2006 this setcaptive true in init phrase of empty vehicle Quote[/b] ]*Note: As a general rule I have used numerous search strings and read any FAQ's that are pertinent before posting a question.* Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 14, 2006 this setcaptive true in init phrase of empty vehicleQuote[/b] ]*Note: As a general rule I have used numerous search strings and read any FAQ's that are pertinent before posting a question.* Â I had to. I'm asking questions that have surely been answered in the years that OFP has been out, but I'm not finding the answers through searches. Inevitably, however, someone points right to the post I missed with the tag, "RTFM!" Murphy's Law, and all that. Thanks for your help. Just out of curiousity, any idea why the AI reacts that way? Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 14, 2006 Nope, didn't work. Â According to the comref, when setcaptive is used on a vehicle it applies to the commander. Â Since the empty vehicle doesn't have a commander, perhaps the command is ignored? Does it make a difference that this is a multiplayer mission? Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 16, 2006 Well, I've determined that the only empty vehicles that the AI shoots at are those which are technically designed for the other side. Â So, the AI members of the players' squad (west side) shoot at empty UAZ's, while the AI east side & (aligned) resistance shoot at jeeps. What's odd is that not all units will detect these vehicles as enemy and shoot at them. Â Those that do, however, will shoot at such vehicles even when they later are crewed by units from their own side. Â Furthermore, those that detect these vehicles as enemy actually detect them as belonging to the other side - such that a trigger to detect west will go off when the AI spots the empty vehicle. Given all that, I was forced to move the vehicles to bases where no one seemed to mind their presence, or they wouldn't be seen until they were called on to be used. Â Some of them are in full view of AI patrols, but are ignored, yet when they're crewed and driving down the road, their own forces will shoot at them in passing. It makes no sense. It would be so much easier if there's was a comparable UAZ with a machinegun. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 17, 2006 I'm back! (for anyone that remembers me) Computer trouble... Couldn't run OFP. Anyways, here's a sloution for you. It's a *little* advanced though: Recently, I had a need to make a quick simple officer for resistance that looked and was equiped just like the east officer (special ed actually needed it). The easiest way to make such a thing editor capable is to use to make a quick addon pbo. All you have to do, is inherit the vehicle, and only change it's side (perhaps it's name should be changed a little too for clarity), pbo it, and stick it in addons. Here's my officer as an example. config.cpp packed inside of OfficerGFakeECSL.pbo no other files needed. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class ResistanceEastOfficer { units[]={"OfficerGFakeECSL"}; requiredVersion=1.26; }; }; class CfgVehicles { class All{}; class AllVehicles:All{}; class Land:AllVehicles{}; class Man:Land{}; class Soldier:Man{}; class SoldierEB : Soldier{}; class OfficerE : SoldierEB{}; class OfficerGFakeECSL : OfficerE { side=2; displayName="Officer (East)"; }; }; Be sure and make the classname distinctive. side 0 = east side 1 = west side 2 = resistance side 3 = civillian (never checked this one) You can easilly distribute the pbo with your mission if that's your thing as it's only like 1-2 kbs. You'll have to pull the information you need (classnames) from the ofp config.cpp, or in the case of addons, their config.cpp This'll require binview, and a pbo tool. For more reading on how config.cpp's work, try any of the numerous addon making tutorials If anyone wants my fake officer pbo, e-mail me and I'll send it. Great thing about this solution is that it's compatible with addons like the various flavors of ffur, etc. edit: forgot that the forums don't display tabs right... Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 17, 2006 Welcome back, CSL. Â I'm glad for the opportunity to thank you for your vehicle loading scripts - particularly for loading/unloading personnel via helo. Â They work like a charm. I was hoping to avoid forcing players to take any additional steps to play my mission, but perhaps this was inevitable. Â If they have to stick a file in their add-ons folder, perhaps I should do it right and see if I can't find a Soviet car that offers a mounted machine gun, instead. Â Failing that, I'll be sure to use your pbo idea. None of this solves the underlying problem, however, which is that the AI shouldn't be shooting at empty vehicles by default. I've placed empty vehicles in the mission, as have others, with the notion that players would be able to commandeer them. It's frustrating when an AI squad mate starts shooting out the tires of your transportation. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 18, 2006 Nice to know your work is appreciated. I aughta post all thos scripts I wrote for the community on ofpec now that it's back. Share this post Link to post Share on other sites
macguba 0 Posted November 18, 2006 Yes please do post yours scripts at ofpec. Share this post Link to post Share on other sites
Shashman 0 Posted November 20, 2006 Could it also work if you assignasdriver a game logic to the empty vehicle and setcaptive it, then make your trigger setcaptive false it when you want the AI to open fire on the vehicle? Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 20, 2006 Could it also work if you assignasdriver a game logic to the empty vehicle and setcaptive it, then make your trigger setcaptive false it when you want the AI to open fire on the vehicle? I haven't tried that specifically, but I have tried putting an AI unit of the same side into the jeep as the driver and just leaving him there from the start. The AI will still shoot at the jeep (and crew) even when it's being used by their own side, allied resistance, or even civillians. It's obvious that the AI couldn't care less who is using the jeep, it only looks at who's side it is listed as belonging to in the .cfg file. I've noticed this behavior in the past with other missions I've played, but never recognized a pattern until I made my own mission and could watch it repeat itself. Share this post Link to post Share on other sites
Shashman 0 Posted November 21, 2006 What if you assign the vehicle as a civilian vehicle in the mission.sqm? AFAIK no side opens fire on a civilian vehicle... Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 21, 2006 That's a cool idea there sashman. Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 27, 2006 That's odd, I thought I had posted a response to this, but I don't see it here now? Well, the idea of changing the jeep's side in the mission.sqm file didn't work. I tried changing it from west to civ, from civ to guer, and from guer to east. Nothing worked. The same AI units continued to fire at it, regardless. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 27, 2006 No, you where hallucinating... Next thing you know you'll be saying that there's this trippy dancing banana thing at the top of this post. Not really, the forum glitched and they rolled it back. Some posts where lost. I had a potential solution for you, for the life of me though, I can't remember what I said now... I'll probably get it here soon Share this post Link to post Share on other sites
mandoble 1 Posted November 27, 2006 Well, I've determined that the only empty vehicles that the AI shoots at are those which are technically designed for the other side. So, the AI members of the players' squad (west side) shoot at empty UAZ's, while the AI east side & (aligned) resistance shoot at jeeps. This is not the case if you are using BIS jeeps/UAZ's, these vehicles are not "sided" and noone will fire against them when empty. BTW, empty vehicles side is and should be side="EMPTY". Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 27, 2006 I believe you are correct that the jeep was listed as "empty" to start. Â I'll peek again when I get the chance to verify that, as it's been a good week since last I looked. Â I'm using empty jeeps with MG's, which are eventually crewed by Guerilla units once the trigger is sprung. Â The Guerilla are sided with the Soviets. It's too bad that the Soviet side doesn't have anything similar to the Jeep w/MG. Â I've seen some BRDM models that would be great, but not all of my friends have Resistance yet (I've got them shopping for it,) and every useful model I've found requires it. I'm really hoping for this route, as CSL's plan of creating a custom PBO...scares me. Share this post Link to post Share on other sites
mandoble 1 Posted November 27, 2006 Well, then your problem may be a different one. If the vehicle is detected with guerrilla inside from long range, a western unit may decide to target it, and the vehicle will keep as current target even if abandoned by its crew. OFP AI does not switch current target easily. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 28, 2006 I'm really hoping for this route, as CSL's plan of creating a custom PBO...scares me. Seriously, it's easy. Hell, I'll even do it for you if you like. It would take all of 10 mins. You just need to tell me more specifically what you're needing. Which specific vehicles, and which specific side you want? Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 28, 2006 New problem: since altering the mission.sqm, other players are unable to connect. I see "players config file has changed." They just crash to desktop and OFP remains running in their processes. I edited the file to remove my edits, but that didn't work, either. I can play the mission fine, but no one can join. How do I fix this? Thanks for your help. Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 28, 2006 I'm really hoping for this route, as CSL's plan of creating a custom PBO...scares me. Seriously, it's easy. Â Hell, I'll even do it for you if you like. Â It would take all of 10 mins. Â You just need to tell me more specifically what you're needing. Â Which specific vehicles, and which specific side you want? I appreciate the offer, CSL, and I know how much you enjoy coding, but it's not what I meant. Â I haven't messed with any PBO editors, so it would be new territory for me. Â If I have to learn it, I will. Â It doesn't feel right to have you do it. Â "Teach a man to fish," and all that. I've decided that the easiest way to do it, without learning PBO's, is to get my friends to do the upgrade. Â They are doing it, it's been the plan for sometime, but they seem to be experiencing "coordination issues." Â I just need to get the mission back to a point where they can actually join it now. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 28, 2006 You sure it's the mission and not some addon compatibility issue? Try launching a mission by someone else with them if you haven't already. Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 28, 2006 You sure it's the mission and not some addon compatibility issue?Try launching a mission by someone else with them if you haven't already. Yep, 99% positive it's being caused by the mission.sqm. We did try playing a different mission, and it ran fine. Also, when I replaced the .sqm with it's back-up file, my friend could join normally. Unfortunately, the "back-up file" appeared to be blank. I'm guessing that it was simply created at the same time as the mission and never updated as I made changes. What's odd, however, is that I made my own back-up file prior to making changes, and it causes the same problems as the modified .sqm. My mission has no add-ons. I did, at one point, include an add-on model by mistake, but I removed it and it's file reference ages ago. We've played the mission any number of times since then. The error is completely different. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted November 29, 2006 Just loaded up classic straight ofp 1.47 for the first time in ages today. I noticed the behaviour of the AI's shooting at enemy vehicles operated by friendlies. It's different in res. I doubt that there's a classic ofp workaround. Share this post Link to post Share on other sites
Kilo Zulu 0 Posted November 30, 2006 Update: The mission.sqm has been solved. A.) You can't modify an empty vehicle's side. The modified SQM cannot be interpretted by other players. B.) Changing the side of the crew who share the same variable as the jeep, instead of the jeep, will not fix the problem. I used "find" to locate the jeeps' names (jp1, jp2, jp3, etc.) and return their side to "empty" rather than "east." In my haste to return the file to it's original form, as players were waiting to play the game, I didn't look closely enough at the entries I was replacing. I changed the side of the vehicle driver rather than the vehicle itself, compounding the problem. I'm back to the original problem alone, which is that the AI is shooting at the empty vehicle. Thanks for the confirmation, CSL. I'm going ahead with installing Resistance. Two of my players have done so, and perhaps it'll put some fire under the remaining two. If that doesn't fix the problem outright, I've already downloaded the vehicle models that should rectify the problem. Share this post Link to post Share on other sites