Author Topic: Damage & Debris Randomizer  (Read 214 times)

0 Members and 1 Guest are viewing this topic.

Damage & Debris Randomizer
Hello all! I have not been on in awhile! Glad to see the community still thriving! Was looking to dive back into modding and modeling for FS2 mods for some personal projects and possibly new projects! (Learned some new stuff while I have been away  ;7).... Anyways.... I did a quick search before starting this, so I dont think this has been looked at.... OK... Here it goes.... Damage & Debris randomizer.... OK... So what do I mean?

Well... Last I messed with making models for FS2 SCP/B5/SW Projects... You have set sub structures that blow up with sub debris field and a damaged substructure.... Additionally, When the ship dies you have a set debris field and carcass.... What I am asking (if it is possible) is to make it where you can have a model with more than one set of debris field and variations of damages.... Along with the damage decals (possibly making a random varying set as well) would add to the game play and a new feel to the game, for each large ship or space station death would be very unique when they finally blow up.... Thoughts anyone?  :D
« Last Edit: August 22, 2017, 05:49:05 am by stithe2000 »


Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Damage & Debris Randomizer
You could possibly already do it with a script that for example instantly destroys a randomly chosen selection of debris pieces as soon as they are created. That way, every time you blow up a ship, a slightly different permutation of all possible debris pieces would appear.

Re: Damage & Debris Randomizer
Cool! That is one idea for the debris! :) Could a script be written for something similar for substructure stuff?.... Example: Bridge Sub Structure, Bridge Destroyed-A, Bridge Destroyed-B, Bridge Destroyed-C, etc and the randomizer would select which destroyed sub structure would appear... Shake mix repeat for other substructures... The battle effect wold be unique each time.... Granted it would be a lot of work for a modelor, and the SCP guys here, but the pay off I believe would be epic on many levels....

Re: Damage & Debris Randomizer
Let me further expand on my thoughts.... So currently I am playing with the classic Klingon Battle Cruise K'Tinga.... I am modeling the superstructure, most of the guts, most of the compartments, etc.... I am going to literally use the heirarchy to build this ship together.... That is just the source model I am putting together in my spare time... The model will be built traditionally with pof hierarchy.... However, the idea that I am running with is a true space battle experience... Where if you shoot the hull in a certain area long enough, BOOM! Hull is gone, guts of ship exposed, fires, etc.... (damage decals help too! :) )  For fighters that would be a waste of time... However, a fighter taking out a cruiser or a super ship... There is a certain satisfaction of blowing something up on a thing that is bigger than you! However, it is also the experience of the game.... If it can be made unique each time some how... We have added a new flavor to it....


Offline AdmiralRalwood

  • 211
  • Mister Subspace Strikes
    • Skype
    • Steam
    • Twitter
Re: Damage & Debris Randomizer
You could possibly already do it with a script that for example instantly destroys a randomly chosen selection of debris pieces as soon as they are created.
The code already does something... similar:
Code: [Select]
if (rand() < RAND_MAX/6) // Make some pieces blow up shortly after explosion.
db->lifeleft = 2.0f * (myrand() * RAND_MAX_1f) + 0.5f;
I know shortening the debris lifespan to 0.5-2.5 seconds 1/6th of the time is not the same as destroying it as soon as it's created, but it's meant to serve a similar purpose.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

Re: Damage & Debris Randomizer
Cool for the debris field! :) Now... What about for sub-structures and the carcass? Also, where would the script be plugged into? Fred or in the model? Thank you all for all of the responses! Looking forward to hearing more from you guys!