hawkins308 0 Posted March 7, 2007 OPERATION BULLETHOLES Purpose = To get bulletholes into operation flashpoint that can be given a lifetime of the players choosing. SITREP = 50% operational status, thats to Solus and the SLX mod. The wonderful SLX mod. Ideal finished product = Bulletholes that will last as long as you want them to, different sizes for different weapons. _ Hi, this is my new post on bulletholes. Thanks for coming in, as you can see I am very passionate about seeing working bulletholes in Operation Flashpoint. Now thanks to Solus, I discovered that "crateronvehicle" could be enabled. This added what I wanted. Bulletholes that show up where you shoot, on most objects in the game. It is a bit buggy, they dong always show up. However, it works good enough to be damn cool. Now, some ideas I have about this are as follows. Operation Flashpoint - Virtual Shooting Range With working bulletholes that last forever, one could have a virtual fireing range. You could set targets downrange(in the editor) Barrels, junk cars, bottles, cans, T.V.s, etc.... Then shoot at them, be able to go downrange and see where you hit them, see the damage etc... So virtual plinking. Ok thats all I have for now. Heres a video showing the bulletholes in action, sorry about the stuff in the middle. Now the only problem with these bulletholes is they fade away in about 10.65 seconds. That is no good, and I cannot figure out how to change it. Bulletholes Video Heres some screen shots. Screen 1 Screen 2 Screen 3 I would be greatful for any help on this. The code is in Config.cpp "Crater" and "Crateronvehicle" The only thing you can change is the model, for crateronvehicle, nothing else works. Anyone have any ideas? UPDATE 7-Mar-07 I created a quick mock up of a rifle range, heres some shots. I figure some sounds could be edited, so when you shoot the metal targets you get a very loud *PLANK* that is audiable from several hundred yards away and would be satisfying to hear as you shoot at the target. One shot is of a mock pumpkin that is downrange getting exploded by a rifle shot. I figure models like this could be made and just blow apart when you shoot them. (Fruits, vegatables, glass bottles, milk jugs full of water, etc....) Ideally the targets could be picked up, so you could move them around, put them in your vehicle and drive them to a new shooting area, etc.. The range Range The pumpkin blowing up(not ingame, just mock up shot) pumpkin blown View from the firing line, ahhh shell casings, the smell of cordite and hot barreled firearms. fireing line Share this post Link to post Share on other sites
nephilim 0 Posted March 7, 2007 whoa didnt know that its possible to have bulletholes on vehicles in ofp hmm about the forever thing its not that wise to keep them forever. they are decals and use 2 triangle polys per bullethole.. your fps will be at knees pretty soon if they wouldnt disappear but also i think this is hardcoded anyway hows that crateronvehicle enabled anyway? Share this post Link to post Share on other sites
sanctuary 19 Posted March 7, 2007 You just have to modify in the main config the class CraterOnVehicle definition By default it is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CraterOnVehicle { model=""; simulation="CraterOnVehicle"; }; if i replace model=""; by example with model="LAW"; (the p3d name of the LAW missile model) before after emptying a magazine looking from another angle Share this post Link to post Share on other sites
nephilim 0 Posted March 7, 2007 wicked! thx sanctuary Share this post Link to post Share on other sites
hawkins308 0 Posted March 8, 2007 Hey guys, thanks for the replys. Yeah nephilim, you are right. The bulletholes I could certainly see how they could slow down performance if you had alot. However, I have my bullet casings lasting for ever, and it doesnt really seem to effect game play. Share this post Link to post Share on other sites
nephilim 0 Posted March 8, 2007 casings will also cause lagg... as they have even more polygons i ve tested that stuff on my machine, ofp doesnt render most of the casings that should stay on ground depending on fps and if you look into that direction the casings fall. Share this post Link to post Share on other sites
hawkins308 0 Posted March 14, 2007 Bump, ive got casings lasting forever now. Takes a good bit of casings in one area to notice. Share this post Link to post Share on other sites
Thunderbird 0 Posted March 15, 2007 Quote[/b] ]Takes a good bit of casings in one area to notice Cartridges models tend to bounce if the model's weight is light, due to OFP engine limitations, the same goes for grenades if you want to script them in order to make them bouncing, they should be heavy (80000 -> 100000) kg to avoid getting them into the space. The fact that casings remain on the ground forever doesn't cause any lag, though. (1.5 GHZ, 1024 SDRAM, GFX5700), I guess the same would for bullets holes if the models are properly designed. Maybe to make them last longer, add the following lines as it is already defined for "cartridges". <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> timeToLive="999"; disappearAtContact=0; But I don't guarantee its success since cartridges are defined in the cfgvehicles branch whereas the "crateronvehicle" is defined in the CfgNonAIVehicles. regards, TB Share this post Link to post Share on other sites
nephilim 0 Posted March 15, 2007 funnily the bouncing is also dependant on the cartrige ejection memory points in the rifle and the distance between these two. ive made a famas model a while ago using custom casings. same stuff as already mentioned. sometimes they arent even drawn if you dont look at the place they fall onto. or the bounce around madly if you dont setup the weight correctly or the mem points Share this post Link to post Share on other sites
Fab. 0 Posted March 15, 2007 Hello there, thought i would drop my two cents on the empty cartridges issue <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">funnily the bouncing is also dependant on the cartrige ejection memory points in the rifle and the distance between these two. From my experience i would say the two ejection memory points defines the velocity vector of the empty cartridge, a bit like the setvelocity vector in scripts. place them really close together and the cartridge will be ejected with a very low initial speed, place them far apart and they will fly like crazy (but u prolly knew that already) Quote[/b] ]or the bounce around madly if you dont setup the weight correctly or the mem points True, and the bouncing also greatly depends on the shape of the geometry component in the empty cartridge model. I made mine like a flatten oval shape, and as a result the cartridge find their "place" on the ground a lot faster, making them bounce a lot less, and this also seemed to reduced the bouncing when a cartridge falls on top of another cartridge (which happens quite often when you have a very high ROF machinegun). This particular case is also why i had to limit the timetolive property to about 10 seconds, to avoid getting more than two cartridges stacked together, as a thrid one triggered a lot of crazy bouncing which caused a great deal of lag... cheers Fab Share this post Link to post Share on other sites
Linker Split 0 Posted March 15, 2007 Is there a way to have different bulletholes for different materials? For example wood or metal doors? Share this post Link to post Share on other sites
hawkins308 0 Posted March 16, 2007 Hey guys, all this about the casings is true. Thanks for the replys. Im using SLX mod, got the casings lasting pretty much forever and I really like the effect. They dont do anything crazy on mine, they just fly out of the weapon forcefully, realisticly land on the ground slide or bounce a little then just sit there. Its cool. However my bullet holes vanish Linker Split, I think it would be possiable if someone with the know how to make it happen did it. I dont know how though. It would be awesome though, you have the right idea. Different size bullet holes depending on the bullet, different textures depending on the material. It would be cool to shoot a .223 at a metal sign and get a tiny little hole, then shoot a .45 ACP at the sign beside your .223 hole and get a big ole hole you could stick your pinkie finger in. Again thanks for the replys yall. I am still messing with the config but I am certain that everyone is right about it being hardcoded. It can be done though I know it can. Someone who knows what they are doing though is gonna have to pretty much right a new way for them to work. Share this post Link to post Share on other sites
hawkins308 0 Posted March 17, 2007 all hope is lost Share this post Link to post Share on other sites
Linker Split 0 Posted March 17, 2007 all hope is lost why??? Share this post Link to post Share on other sites
hawkins308 0 Posted March 17, 2007 Quote[/b] ]But I don't guarantee its success since cartridges are defined in the cfgvehicles branch whereas the "crateronvehicle" is defined in the CfgNonAIVehicles.regards, TB Wait just one gosh darn minute, ole thunderbird is a genious. Now, all we have to do is define Craters in Cfgvehicles, instead of of CFGnonaivehicles. Now how can we do this? I have tried and it just locks up, however surely there must be a way. Share this post Link to post Share on other sites
Thunderbird 0 Posted March 23, 2007 It works nicely here, as you could see below... 'followed the cfgvehicle's way as I have stated in the previous page: -Created a new class getting the same name than the wanted one, "crateronvehicle" under "class fxcartridge" (which is the cartridge's class). -Derived the "class crateronvehicle from thingeffect which is resulted as "CraterOnVehicle: ThingEffect". -Finally added the following lines in order to make the "impacts" not disappear at contact, and made' em random as well, in order to get the most stable possible FPS level, but you can change the timetolive if you want to keep' em forever. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> submerged=0; submergeSpeed=0; timeToLive="10+(random 30)"; disappearAtContact=0; As temporary model, I used BIS cartridge just to show how that looks in game. (model="nabojnice";) But don't forget to add // to every line of the previous class crateronvehicle. Before <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CraterOnVehicle { model=""; simulation="CraterOnVehicle"; }; After <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //class CraterOnVehicle //{ //model=""; //simulation="CraterOnVehicle"; //}; and the new class under "fxcartridge" should look to the following one (just replace BIS cartridge by your "bullethole" model). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CraterOnVehicle: ThingEffect { model="nabojnice"; simulation="CraterOnVehicle"; submerged=0; submergeSpeed=0; timeToLive="10+(random 30)"; disappearAtContact=0; }; :] regards, TB Share this post Link to post Share on other sites
hawkins308 0 Posted March 23, 2007 Oh my good glory halelluja, im going to try this right now! Ill be right back, Thunderbird if this works you are a genious! Share this post Link to post Share on other sites
hawkins308 0 Posted March 23, 2007 TB i cant get it to work, they still disapeer. Heres what i have in my config. class FxCartridge:ThingEffect { model="nabojnice"; displayName="$STR_DN_FX_CARTRIDGE"; submerged=0; submergeSpeed=0; timeToLive=555555555555; disappearAtContact=0; }; class CraterOnVehicle: ThingEffect { model="crateronvehicle"; simulation="CraterOnVehicle"; submerged=0; submergeSpeed=0; timeToLive="1000000000+(random 30)"; disappearAtContact=0; }; // SLX ADD : Make small cartriges stay. class FxCartridgeSmall:FxCartridge { model="\O\Guns\nabojnice_small"; displayName="$STR_DN_FX_CARTRIDGE"; submerged=0; submergeSpeed=0; }; Share this post Link to post Share on other sites
Thunderbird 0 Posted March 23, 2007 Argh, you are right, seems I haven't waited long enough... Apparently, the bulletholes disappear after 20 seconds, I'm sure there is a way to make that longer... will keep searching and would keep you informed. regards, TB Share this post Link to post Share on other sites
hawkins308 0 Posted March 23, 2007 Im just greatful you are working on it TB:) I agree, there has to be a way to make them stay longer. Thats awesome you have them working under cfgvehicles though, that seems like a definate step in the right direction Share this post Link to post Share on other sites
canukausiuka 1 Posted March 23, 2007 It may be a hardcoded engine limit for the simulation type craterOnVehicle. It'd be nice to see this pan out though. By the way, I recommend against using "random" calls in the config. When OFP loads the config at startup, it evaluates the "random" just once... eg: 25. Until you restart OFP, the timeToLive would equal 35 (10 + random 30). Next time you start OFP, it could evaluate the "random" to say, 5. Then, until you quit, it would have a timeToLive of 15. So its random per start, but not random in-game. In-game, the time to live is exactly defined. Its the nature of the engine. Share this post Link to post Share on other sites
hawkins308 0 Posted March 23, 2007 Yeah something definatly doesnt jive with the crateronvehicle, or crater. It is weird. No matter what you put, it seems the only thing you can change about crateronvehicle is the model used. Nothing else changes, size, time, nothing works. Share this post Link to post Share on other sites
hawkins308 0 Posted March 24, 2007 Alright, alright. Ive got a brand new plan. However yet again, im clueless as to how to accomplish this feat of engineering. What if we could init a script, that would make bulletholes, bulletholes that we could control. Share this post Link to post Share on other sites
canukausiuka 1 Posted March 25, 2007 It might be possible to detect the crater object once its created, but even if you create a new object w/ a much longer life, there is no way to attach it to a vehicle, at least not that I know of. I suppose it could still work for buildings, though. Share this post Link to post Share on other sites