|
Post by Jabo on Apr 20, 2006 15:32:24 GMT -5
Hello,
im now involved creating a spanish version of the Hummer called VAMTAC, exactly the one that mounts the single MISTRAL missile launcher. I want to use MCAR on it, but i dont know so much about scripting , i´ve readed all about the AA MCAR scripting, and I have checked the MCAR Gaskin in his latest version (MCAR 0.9) but i haven´t find the way to fit it and run ok all the system. The greatest obstacle i find is that Gaskin has a multiple launcher and the one Im using has a single launcher, because of that i dont know how to deal the scripts to fit to the new vehicle.
It would be more helpful to me that you writes for me the changes i must enter in the stringtable, .sqs and .cpp files, i give you the class and model names for each element to make more accurate your changes:
CLASS NAMES:
ammo: FA_dummy_Mistral FA_Mistral_true weapon (launcher): lanzador_MISTRAL SAM vehicle: JAvi_vamtacSAM Tilt vehicle: Mistral_tl
MODEL NAMES:
lsg missile: Mistral_lsg.p3dmissile model: Mistral.p3d vehicle model: JAvi_vamtacSAM.p3d (this model has the neccesary modifications to suit the MCAR engine with cargo proxies)
i will be very pleased to you if you send me the changed sqs,cpp (only the eH section if you prefer) and .csv files necesaries to run the MCAR.
I´ve used the MCAR ENGINE 0.9 on ATGM vehicles of our mod and runs all OK.
excuse me about my terrible english writing, Im spanish ...if you can, send me the files to spy1g@hotmail.com
thanks to you and psy team for your excellent works!!!!
|
|
|
Post by Sa8Gecko on Apr 20, 2006 20:29:47 GMT -5
I'll need some little more info: - how many gamelogics reserved places are in the vehicle p3d file and, if more than two, what are used to set missile launch position - what is (or what are) the problem you're encountering: no missile being fired, missile being fired in the wrong direction, exploding vehicle when pressing the trigger etc.
If you just only have two GLs, you can try with
JAvi_vamtacSAM_P1,"[[0],[0,1]]" (or JAvi_vamtacSAM_P1,"[[1],[0,1]]") JAvi_vamtacSAM_P2,"0" (or JAvi_vamtacSAM_P2,"1")
as _P1 and _P2 points, if you were puzzled by them being dynamically set in the Gaskin, as in that case each missile exit from a different pod. Also, the AA code doesn't register kills, so you just need an ammo type (the one actually fired by the vehicle weapon). Either way, it's not so different as setting an AT weapon, so both the stringtable.csv and config.cpp related part won't differ that much. If you could post here (or PM me) your stringtable.csv file, we could have a look and fix it. If you've still to set the mistral behaviour (how much fast it does fly, endurance and the like) you can post here the mistral specs and I can calculate the parameters you need, since fine tuning the missile requires a version of MCAR engine printing flight data on screen, which is not available for end users (and it's not desiderable that they have it, as it makes the game unplayable). You can always set MCAR_debug to 'true', but this may anyway take longer than using my dev version.
|
|
|
Post by Jabo on Apr 23, 2006 13:59:49 GMT -5
Thanks for your help, SA8Gecko, i´ve reserved two gamelogics for the launcher,called as proxyes cargo.02 and cargo.03, the 02 for the beginning of the launcher, and the 03 for the muzzle. I´ve tried the lines you told me in the csv, but the problem persists, the matter is that missile didn´t fly to the target, the locking appears OK, the launcher systems moves OK, the missile launchs, i can see it flying and i received the "warhead armed" message when launch, but for any reason, the missile didnt´t drives himself to the target. i put here the csv lines for checking: JAvi_vamtacSAM_PRN,"7" JAvi_vamtacSAM_PRX,"6" JAvi_vamtacSAM_P1,"[[0],[0,1]]" JAvi_vamtacSAM_P2,"0" JAvi_vamtacSAM_PATH,"\MCAR_engine\psy_mcar_scripts\aa\MCAR_getAmmo.sqs" JAvi_vamtacSAM_FM,"Mistral_tl" JAvi_vamtacSAM_MT,"FA_Mistral_true" JAvi_vamtacSAM_IS,"5" JAvi_vamtacSAM_SL,"5000", search range JAvi_vamtacSAM_WA,".5" JAvi_vamtacSAM_FT,"20",missile flight time JAvi_vamtacSAM_FP,"10",probability of a flare to attract the missile (0-100%) JAvi_vamtacSAM_PF,"10",proximity fuse range JAvi_vamtacSAM_GC,"LEADCOLL" JAvi_vamtacSAM_SM,"mcar_gaskinSMK" JAvi_vamtacSAM_SS,".25",missile sensor sensitivity in degrees for proportional
navigation guidance code JAvi_vamtacSAM_BI,"[1,3]",how much the missile with pure pursuit guidance code
will try to reach target's height JAvi_vamtacSAM_PS,"25",prediction sensitivity in percentage for proximity fuse
activator of proportional navigation and lead collision guidance codes JAvi_vamtacSAM_AS,"ALERT! SAM MISTRAL inbound !", alert string for target vehicle JAvi_vamtacSAM_FLM,"true" JAvi_vamtacSAM_SBK,"true" JAvi_vamtacSAM_NOS,"false" JAvi_vamtacSAM_NCK,"true",missile looses lock if launcher destroyed (true) - else
'false' JAvi_vamtacSAM_LCK,"true",missile looses lock if target flies under a certain
height (true) - else 'false' JAvi_vamtacSAM_FLR,"true",flares on(true)/off(false) JAvi_vamtacSAM_MBNT,"5.1" JAvi_vamtacSAM_MEXH,"1700" JAvi_vamtacSAM_MMAS,"32" JAvi_vamtacSAM_MKGS,"2" JAvi_vamtacSAM_MINT,"2*_tDiff" JAvi_vamtacSAM_MMTR,"100" JAvi_vamtacSAM_MFRC,"1.7*exp(-300/(_speed))"it would be useful for me that you explain me the changes i´ve to do in mistral_init.sqs("ex " gaskin_init.sqs), mags.sqs and eventhandlers into config.cpp; excuse me to ask you for so many things, but im slow on understand scripting... gratefully you, Jabo
|
|
|
Post by Sa8Gecko on Apr 23, 2006 21:59:31 GMT -5
Two parameters in stringtable.csv are wrong: if you have just three cargo spaces (one for a passenger ant two for gamelogics) then : JAvi_vamtacSAM_PRN,"3" JAvi_vamtacSAM_PRX,"2" I can't see any other error.
Some other, non essential, parameters: JAvi_vamtacSAM_LH : the height the target is flying below which the missile looses lock, if JAvi_vamtacSAM_LCK is set to "true": default is 25 meters (for choppers it gets halved)
I would set JAvi_vamtacSAM_NCK to "false" for an IR missile like the mistral, so that if the launching vehicle gets destroyed while the missile is still flying to the target, it doesn't loose lock on it. Also, tailor the search range on the max engaging range of your vehicle,as this would save script time (now it's set to 5000 meters). I see you used the same parameters as for the gaskin: this means the missile flies like it and not like a mistral: as I've written, if you have the mistral specs post them here and I'll give you the correct parameters.
The gaskin_init.sqs relevant part for MCAR to work are only these lines:
[_this] exec "\MCAR_engine\psy_mcar_scripts\MCAR_repair.sqs" ? MCAR_gaskinInit: exit MCAR_gaskinInit=true ?format["%1",count MCAR_types]=="scalar":MCAR_types=[] MCAR_types set [count MCAR_types,["mcar_gaskin"]];MCAR_types set [count MCAR_types,["","\MCAR_engine\psy_mcar_scripts\MCAR_VHsmoker.sqs"]];
the first takes care, in case the vehicle gets damaged so that all crew exits and successively repaired by the player, to put back the gamelogics in, and it's executed for every MCAR vehicle you may have put in the editor. The last line is executed only once (for every MCAR vehicle type) and basicly tells the scripts what to do when the vehicle is destroyed (in this case it executes the MCAR own burning script) and it's used in the rapair.sqs file (internal to MCAR_engine.pbo). Please note that if you have your own repair and burning script, these lines are not necessary. The burning and repair scripts are for the addon makers not to have to write their own. If you have another burning script or don't like the MCAR one, just substitute "\MCAR_engine\psy_mcar_scripts\MCAR_VHsmoker.sqs" with your own (full path) or, for nothing, write an empty script (file with nothing inside it), for example "\JAvi_vamtacSAM\nothing.sqs", where "\JAvi_vamtacSAM\ is the addon directory (pbo name) and nothing.sqs is an empty file in the same directory.
Mags.sqs, pods.sqs and MCAR_mcop.sqf are strictly addon related (and infact they're found in the gaskin.pbo) and they open/close pods when the missiles are fired or recharged: so I guess you can do without them (or use your own scripts). If you do without, delete them from the init.sqs file and if they're present, from the init eH and fired eH.
|
|
|
Post by Jabo on Apr 24, 2006 11:48:27 GMT -5
Thanks!!!!!!!! thanks you SA8Gecko!!!
tha missile system works fine!! no error message received, no bug and no any complain about the proceeding, i suppose the wrong was the two lines in csv that you mentioned, the ones refered to gamelogics. The result is a very credible SAM platform and i must tell to any one that doubts about MCAR that the new engine make the things really easy and realistics. Chapó!
for fine adjustment of the missile system as you proposed me, i writes here the MISTRAL missiles specifications, if you have time would be fantastic to make a little more realistic the weapon with your new adjustments.
SPECIFICATIONS - MISTRAL AIR DEFENSE MISSILE SYSTEM, FRANCE
Key Data Missile weight 18.7 kg Missile Length 186 cm Missile diameter 90 mm Fin span 18 cm Warhead 3 kg high explosive with tungsten ball projectiles Fuses Contact fuse and laser proximity fuse Guidance Infrared passive homing Propulsion Solid rocket booster Speed Mach 2.5 Range 500 m to 6 km Altitude 3000m warhead: 3 kg VT proximity guidance: passive IR direct autoguidance trajectory: proportional navigation Firing rate: 1 missile each 2 minutes
Im very grateful for your excellent help, if you want, tell me your email because i want to send you the whole pbo so you can prove him.
Thanks SA8Gecko, Jabo, FFAA MOD
|
|
|
Post by Sa8Gecko on Apr 25, 2006 0:23:27 GMT -5
Since I don't know the engine burnout time, you can try these three versions, that is use the one you like the best: first, delete the parameters JAvi_vamtacSAM_MKGS,"2" JAvi_vamtacSAM_MINT,"2*_tDiff" from stringtable.csv. For each one I set the guidance code as proportional navigation (PROPNAVG) as specified in your specs. It's a little less precise than the lead collision algorithm used before, but it's still very good. 1) engine burnout time set to 5.5 seconds, missile endurance 15 seconds, missile will loose a lot of speed while turning: replace the following parameters with the ones listed below (or add them when not present): JAvi_vamtacSAM_FT,"15" JAvi_vamtacSAM_GC,"PROPNAVG" JAvi_vamtacSAM_MBNT,"5.5" JAvi_vamtacSAM_MEXH,"1900" JAvi_vamtacSAM_MMAS,"18.7" JAvi_vamtacSAM_MFRC,"2*exp(-250/(_speed))" JAvi_vamtacSAM_FARR,"[""BOOBO"",1.2,2,1.5,15]" you can make the missile more agile raising this parameter: JAvi_vamtacSAM_MMTR,"100" that is the max turn rate in degrees/second
2) engine burnout time set to 5 seconds, missile endurance 13 seconds, missile won't loose so much speed as the previous one: JAvi_vamtacSAM_FT,"13" JAvi_vamtacSAM_GC,"PROPNAVG" JAvi_vamtacSAM_MBNT,"5" JAvi_vamtacSAM_MEXH,"1900" JAvi_vamtacSAM_MMAS,"18.7" JAvi_vamtacSAM_MFRC,"1.5*exp(-400/(_speed))" JAvi_vamtacSAM_FARR,"[""BOOBO"",1.1,2.5,1.5,8]"
3) engine burnout time set to 4 seconds, missile endurance 14 seconds, missile accelerates faster and looses speed in a way between the first two: JAvi_vamtacSAM_FT,"14" JAvi_vamtacSAM_GC,"PROPNAVG" JAvi_vamtacSAM_MBNT,"4" JAvi_vamtacSAM_MEXH,"1900" JAvi_vamtacSAM_MMAS,"18.7" JAvi_vamtacSAM_MFRC,"1.7*exp(-300/(_speed))" JAvi_vamtacSAM_MKGS,"(1+6.7*sin(deg(_tDiff-.1))*exp(-_tDiff))*(-exp(10*(_tDiff-_M_bnT))+1)" JAvi_vamtacSAM_MINT,"auto"
as said, you can use the combination you like more. For each one, max range is about 6000 meters and max speed 2700 km/h, which is reached at engine burnout time.
|
|
|
Post by Jabo on Apr 25, 2006 13:28:36 GMT -5
well, i,ve tried the 3 proposals you made, i choosed the third one, the results are excellent against helicopters of all types (both, moving fast in front and crossing)but i have experimented problems against planes, in about 50 launches, no one hits the targets which were changed between Su-25, MiG-31 and some others, I dont know if the problem resides in terminal velocity of the missile or in maneuvrability, I guess if may be a solution for fit it, because although the MISTRAL missile is a was intended mainly against choppers and low flying planes, it must have a minimal hit percent to take down planes.
another question: is any way to put a lock sound to use when the missile cages on an aircraft?
|
|
|
Post by Sa8Gecko on Apr 25, 2006 14:49:47 GMT -5
Not at the moment, sorry.
what was the engaging distance ? I've found out that at distances of less than 500 meters the missile is quite inffective for targets flying trasversally, simply because it still can't turn so much. You can raise JAvi_vamtacSAM_MMTR to something substantially more than 100, and see what happens (this acts like the 'maneuvrability' parameter in config.cpp). Also, did flares deviated the missile or it simply didn't hit ? Try setting JAvi_vamtacSAM_FLR,"false" and see what happens. I've tested (a lot) the missile in the configuration I suggested and I had no problem shooting down planes, even those flying at 1000 km/h. It may also be a problem of proximity fuse: how big is the indirectHitRange value of the Mistral_lsg ? If it is a big deal less than 10 (the current value of JAvi_vamtacSAM_PF ) this may be a cause, especially on head on or side attacks, as the missile detonates prematurely. Or does the SAM launcher apply to much lead on the target ? You can understand if this is happening if the missile flies a straight trajectory. If this is the case, that is target not aquired, then it's a config issue of the launcher (machine gun). InitSpeed must be at least 50000 (but 100000 is even better).
maneuvrability: raise JAvi_vamtacSAM_MMTR (see above) terminal velocity: it's actually big, 750 m/s, more or less. But it's reached (3rd configuration) 4 seconds after launch and after having travelled about 1800 meters. The missile reaches mach 2 in about three seconds, starting from still. After 4 seconds the speed starts to decrease, and, depending on the amount of turning the missile is subjected, it falls to about 300-350 m/s at 15 seconds (still about mach 1). In my opinion, since I (my AI) could hit planes and you (or your AI) could not, the more likely cause is the short distance of the target from the launcher, and the fact that this launcher engages targets when they're too near: you have to play with the vehicle sensitivity value, raising it , and with the bullet minRange and maxRange (and their probability). The second more probable cause is lag; discovering this is easy: just lower your OFP settings (view distance, terrain detail and so on) and if now the missile hits (and not before, in the same situation) you've found where your problem lies. If it's not lag, then the problem is solvable. It's just a matter of tuning some parameters in config.cpp and stringtable.csv .
|
|
|
Post by Sa8Gecko on Apr 27, 2006 12:21:01 GMT -5
Just another configuration, similar to the one you chose, for you to try out: JAvi_vamtacSAM_FT,"12" JAvi_vamtacSAM_GC,"PROPNAVG" JAvi_vamtacSAM_MBNT,"4" JAvi_vamtacSAM_MEXH,"1900" JAvi_vamtacSAM_MMAS,"18.7" JAvi_vamtacSAM_MFRC,"exp(-300/(_speed))" JAvi_vamtacSAM_MKGS,"(1+6*sin(deg(_tDiff-.1))*exp(-_tDiff))*(-exp(10*(_tDiff-_M_bnT))+1)" JAvi_vamtacSAM_MINT,"auto" JAvi_vamtacSAM_MMTR,"250" this missile max range and max speed are pretty the same as the others, but it is much more maneuvrable and will loose less speed to friction. This leads to less endurance (in time), which means the scripts will stay in execution shorter. The enhanced maneuvrability allows the missile to succesfully attack targets at shorter distances than before.
|
|