View Single Post
Old 03-10-18, 09:07 AM   #2
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,749
Downloads: 439
Uploads: 2


Default

If you open that particular file in a text editor, you'll see lines like "DelayMin=1", "DelayMinInterv=8635" and "SpawnProbability=70". This particular example from one of my files means that the RGG (Random Generated Group) will spawn with a one minute delay every eight thousand six hundred thirty-five minutes, but at a seventy percent rate, or 7 in 10 times. In SH4MissionEditor, you do not see that "DelayMin=1" setting, and the "DelayMinInterv=8635" is actually listed in hours, or 143.91666_ hours, in this case. Further down in the text will be something similar to "MaxInst=50", which means, for this particular example, that the RGG will generate 50 time maximum in this cycle (file lifetime), irrelevant of the other three settings above. If it hits 50 prior to the end of the file cycle, it quits generating the RGG. There is also a "MaxUnitsCreated=20" setting, which means that each spawning of the RGG can have a maximum of 20 ships. You'll see "default" values for those for 10000 and 100 in the stock game. Most would be on the order of 100 and 1. They all work together though, for when to spawn the RGG (Random Generated Groups).

In other words, if an RGG is set to spawn more than once ("MaxInst=" line), and you've destroyed the one in-game at this time, when the next spawn cycle comes due (the "DelayMinInterv=" line), then it will spawn another vessel in that same spot. By the same token (and lurker worked very hard on this portion of his mods), if the spawn rate is set too high, and the game attempts to generate another "new" unit where the first is, you will often end up with overlapping spawned units, which can look very strange, sometimes resulting in explosions and fires, when the ships' collision detection kicks in...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote