|
Author
|
Topic: Engine DM - Problems, Solutions, Ideas, Code
|
Laika 801 Pilot
|
posted 07-25- 08:36 AM
OK, First - I run into problems (of course). It seems that some fire is hardcoded for CEngine objects. This sucks, cause when this "hardcoded fire" starts, the hardly build engine DM is ingnored from this point. I.e. under flak fire the engine reaches DM-level 25% but then the "hc-fire" starts and the engine does NOT use my DM any longer (with levels 50% and 75% etc), it just explodes or detaches when maximum obHits are reached. I got an idea (I think its not new), but the dogs are moaning loud so I had to go. I'll explain it later..LK IP: Logged |
jedi Pilot
|
posted 07-25- 10:47 AM
I think you might be able to get around that using the obFireResistant property. You can make the part invulnerable to fire if you want, or less vulnerable. Then your engine combat damage should be able to take over to degrade performance or whatever. You could always create a fire in the fuel tank or fuselage or an oil tank object or whatever NEAR the engine to simulate an engine fire if you want one for the later stages of damage.
------------------ --jedi-- IP: Logged |
Tailslide Pilot
|
posted 07-25- 11:04 AM
Laika did you get the new pe-2 FM i sent that uses the new airfoil?IP: Logged |
Sv Pilot
|
posted 07-25- 11:23 AM
How does fire work to damage the plane? I find this a bit flaky. I had to make my SE5a obFireResistant, otherwise the fire seemed to explode the aircraft within a second after it started. Is there any way to allow fire to slowly cause damage to something? I read that obFireResistant should have a setable level, but this did not work for me... I had to make it 100% resistant or it would just explode.Maybe I have another aircraft bug though... ------------------ -Sv =FC= WWI in SDOE!
IP: Logged |
Laika 801 Pilot
|
posted 07-25- 02:03 PM
obFireResistant - a strange thing ! I.e. the hardcoded fire of the engines destroys the wing, this means the engine burns some seconds and then the wing detaches (with the engine which is a child of the wing), the wing is set to FireResistant (inside and outside of the Damage proplist) but still gets damaged by the hardcoded fire (same for the engine)...seems it does not work for fires wich come directly from this objecthardcoded Engine DM - Waaa - comes with 2 fire trails, number 1 starts around 50% damage, number 2 starts when the engine is detached We could build an extra "hit-detection" object and delete the 1st lod of the engine. The "hit-detector" gets damaged and executes function in the engine. The obHits of the engine should be very high (500,1000 or higher) so that the hardcoded Dm does not start to work. "hardcoded" see Page 4 of the official (!!) OpenPlaneSpecification : quote: ...all aspects of an aircraft's geometry and behaviour are mutable - nothing is hardcoded into the simulation.
-- I bet they got someone with a long long nose over there.Anyway, this is my plan of an engine DM: The red numbers are possibilities (?). Engine/Fire means and Explosion (prob. X) followed by Fire (prob. Y). Of course we can use obProb's for maxHP/SFC too (DM Level 25% --> reduce maxHP by 20% or 25%). Need some Feedback... Tail - I did not receive anything please try again and use the new mail adress. Thanks ! LK
IP: Logged |
ArgonV Pilot
|
posted 07-25- 02:31 PM
There needs to be a way where the engines dont detach. Ive also noticed that when things detach SDOE deletes them or causes them to blow up prematurly sometimes (there are many things that affect this) My Mistel HAD this problem but I fixed it by upping the obHits up to 500 and setting the obKillDelay to 8000 (whats going to stay in the air for 8000 seconds?)IP: Logged |
Tailslide Pilot
|
posted 07-25- 02:41 PM
Laika, I'd like to use probabilities for everything it would be more realistic IMHO. Even if it means SFC could go up then down its worth if if the DM is unpredictable.. TS
IP: Logged |
Falck Pilot
|
posted 07-25- 02:42 PM
8000 may be a little bit overkill. 900secs (15min) should be plenty i would think.about the hard coded stuff, this is what I most want changed in sdoe. I'd also like the plane maker to be able to specify when the sputtering sound starts and to tie the engine sound pitch to the rpm instead of throttle setting, so when your rpm decreases you know. IP: Logged |
Tailslide Pilot
|
posted 07-25- 02:45 PM
Your idea about creating a seperate engine hit object is very good 
IP: Logged |
Tailslide Pilot
|
posted 07-25- 03:07 PM
Laika click here for FM http://tailslide.firelight.dynip.com/Files/Pe2fm.zip I changed the switchin on the left gun so it switches out inside the cockpit since you cant see it anyways. The FM changes are in the included text file, please do not change the CG boxes now. I will recalibrate for climb and top speed just before you release as many other changes to the plane can affect this. TS IP: Logged |
Laika 801 Pilot
|
posted 07-25- 05:19 PM
engine detaches - when I talk about this, I mean the CEngine object, there is still a rest of the engine 3D-model, so it doesn't looks like the whole engine is gone...obHits - hmm - there is one problem here, we can only use integer values for the "obDmg" thingy, that means we can NOT use "obDmg 0.025" or so. When the "obHits" value is too high (i.e. 1000) for an object that should detetect hits you would need hours to get an obDmg of 1  "sputtering sound" unfortunately I did not find out when this starts to happen(tested it the whole day) seems to start around 25%, not sure... Tail - yeah, switchins are "messy", needs some serious calibration (BodySit of the crew members etc...), got no time to test the new FM intensively yet cause I turn 24 years right now , had to trink and dance a bit now..
LK
IP: Logged |
Laika 801 Pilot
|
posted 07-26- 07:14 AM
some good news - when an CEngine object gets 100% damage, it gets detached (or just killed) without an obDetach, so the 2nd fire of the hardcoded DM wont start (correction here - this fire starts at the origin of the engine, but stays at the plane when the engine detaches) - so we don't had to detach the engine just for CG changes...Fires Trials showed that Fires are an evil thing, somehow they dont increase the "normal" damaged like bullets, i.e. a small fire started in one engine, 5 seconds later the engine explodes without showing me all the colored smoke I added to the dmg-levels obFireResistant works like obHidden, i.e. you can not add it to an function and call it later when something gets damaged, the value wich is set is allways active Maybe we should set obHits to about 2000 and increase the weight of all bullets by 10, so we could add maximum Damage at "onDmg 5" ? LK
IP: Logged |
Laika 801 Pilot
|
posted 07-26- 07:16 AM
Ohh - forgot to say that when the engine reaches 100% dmg and gets killed (without obDetach) you can still fly the plane, the wings do no longer start to rip off..IP: Logged |
Laika 801 Pilot
|
posted 07-26- 08:49 AM
..for your viewing pleasure: some "alpha"-code - don't use it, its not tested intensively yet (might be full of bugs) ! (obProto 'CEngine) (engGearRatio 1) (engTarget 'prop2) (engMaxHP 1100,2200) (engFuelSource 'MainTank 'TankIL 'TankML 'TankOL) (engSFC 180) (obNoDamageChain) (obFireResistant) (obFunc (smallExplosion (obExplode 0.25 2))) (obFunc (smallFire (obSmokeTrail (smkDensity 1 smkColor 255,255,0 smkOrigin 0,1.9,1.3 smkDiameter 1 smkFire smkLifetime 0)))) (obFunc (Fire (obSmokeTrail (smkDensity 0.8 smkColor 255,150,0 smkDiameter 3 smkFire smkLifetime 0)))) (obFunc (KillMe (obKillDelay 1))) (obDamage (obHits 100 onDmg 2 (obProb (50 (engMaxHP 825,1925) 50 (engMaxHP 880,2063)) obProb (50 (engSFC 270) 50 (engSFC 360)) obProb (25 (obExec (Func 'smallExplosion) obProb (15 (obExec (Func 'smallFire))))) obSmokeTrail (smkColor 90, 100, 105 smkDensity 0.4 smkDiameter 1.5 smkOrigin 0,1.9,1.2 smkLifetime 240)) onDmg 5 (obSmokeTrail (smkColor 20,10,0 smkDensity 0.7 smkDiameter 3.1 smkLifetime 0) obProb (50 (engMaxHP 550,1650) 50 (engMaxHP 770,1788)) obProb (50 (engSCF 540) 50 (engSFC 720)) obProb (50 (obExec (Func 'smallExplosion) obProb (33 (obExec (Func 'Fire))))) obProb (20 (obExec (Name 'prop2 Func 'DetachMe)) 20 (obExec (Name 'leftGear Func 'DetachMe)) 20 (obExec (Name 'prop2 Func 'DetachMe) obExec (Name 'leftGear Func 'DetachMe)))) onDmg 9 (obExec (Name 'LeftEngine Func 'DModel Name 'leftGear Func 'DetachMe Name 'prop2 Func 'DetachMe) obExec (Func 'KillMe)))) (onChildDetach 'prop2 (obBodyPts (verts 0,1.88,-1.31 0,-3.4,-2.0 0,2.666,1.52 1.32,3.5,0.65 ) obUnhide 'L_PropDetach)) (plus ( phyCylYInertia 2.000000,7.250000,2.000000 phyCG 0.000000,-1.000000,0.600000 )) (phyLBS 1450) (obShadow ( 'lEng2Shad 1.00000 0.00000 0.00000 0.0 0.00000 1.00000 0.00000 0.0 0.00000 0.00000 1.00000 0.0 0.35248 10.03036 -9.25941 1.0 'lEng2Shadow 1.00000 0.00000 0.00000 0.0 0.00000 1.00000 0.00000 0.0 0.00000 0.00000 1.00000 0.0 -0.14752 9.53036 -9.25941 1.0 )) Any comments ? LK
IP: Logged |
Falck Pilot
|
posted 07-26- 10:24 AM
Oh ye openplane master. I am not worthy  BTW im opposed to changing loadouts to be unrealistic. Changing weights would affect trajectories. Now that the source is starting to get out maybe some kind-hearted coder will change some of these things properly so we dont have to hack them. BTW heres a bug: obProb (50 (engSCF 540)
[This message has been edited by Falck (edited 07-26-2000).] IP: Logged |
Laika 801 Pilot
|
posted 07-26- 11:24 AM
Falck - openplane master ?? Actually I hate it ! Unreal loadouts ? All would stay "real" if we change the obHits by the same factor as we changed the weight of the bullets ! Thanks for finding the bug  LK IP: Logged |
Falck Pilot
|
posted 07-26- 11:46 AM
Increasing the bullet weights by so much would still affect trajectories in a big way.Maybe SOS can change onDmg to accept 1-100 instead of 1-10. Most bullets weight much less than 10 lbs. IP: Logged |
Laika 801 Pilot
|
posted 07-26- 02:33 PM
Falck - You are right ! I didn't mind the change of trajectory !OK - 3 (or 4 ?) days are gone, forget the code above, I did alot of changes. I found some more things: obKillDelay - the weight of the engine will only be subtracted from the whole plane, when the prop was NOT detached before - took me about 3 hours to find this out - I assume the engine needs an target, otherwise it gets not detached when killed by obKillDelay One other strange thing, at the end, when most things where working quiet good, I got an weight difference of 294 lbs between the 2 engines (when they where killed/detached). The only difference was that one engine did not detached/killed weightless childs (gear doors) of the gear (which got weight) when it (the engine) was killed/detached. Hmmm  Anyway, I wont talk to myself here - the engine DM of the Pe-2 is works now more ore less like I want it. You can look at some pics here if you want: http://www.fightersquadron.com/ubb/Forum14/HTML/000272.html LK801 out
IP: Logged | |