Shell

From Data Realms Wiki

(Redirected from Shell Tutorials)
Jump to: navigation, search

Shells are the ejected particles of a round. These can be a huge variety of objects, but they are generally MOSParticles with an animation of a spinning casing. Because the shell is defined in the round, tracer rounds can have shells separate from those of the regular rounds. They are ejected at a velocity defined by the round, at a position on the HDFirearm defined by said HDFirearm, at a spread and angular velocity range defined by the HDFirarm, and at a hard coded angle, which is backwards-upwards. Negative velocities result in a forward-downward angle.

'Shell' is actually an incorrect term for what they are in CC, Casing is a more fitting term generally. But Shell is the term used in the code.

Shells do not produce any recoil. You can use this combined with negative shell velocity variable on the round to make tool or a weapon that can fire an object with high mass without worrying about your actor exploding from the recoil force that is usually processed when heavy projectile is used as a round instead of a shell. A drawback on this is that the hardcoded angle causes the projectile to fly at a diagonally downwards angle.

No variable explanation is shown on this page, due to the shells being defined by the round and not being limited to MOSParticles.

Example

AddAmmo = TDExplosive // Dictates that the ammo is an explosive
	PresetName = Blank Shell // name used for reference to be copied from in other parts of mod
	Mass = 10
	RestThreshold = -500 // negative will gib, positive will not gib on contact
	HitsMOs = 1 // true or false value determines if the shell itself can deal damage
	GetsHitByMOs = 0 // true or false value determines if the shell itself can take damage
	SpriteFile = ContentFile
		FilePath = YourMod.rte/Images/CannonRound.bmp
	FrameCount = 1
	SpriteOffset = Vector
		X = -2
		Y = -2
	EntryWound = AEmitter
		CopyOf = Dent Metal
	ExitWound = AEmitter
		CopyOf = Dent Metal
	AtomGroup = AtomGroup
		AutoGenerate = 1
		Material = Material
			CopyOf = Military Stuff
		Resolution = 2
		Depth = 0
	DeepGroup = AtomGroup
		AutoGenerate = 1
		Material = Material
			CopyOf = Military Stuff
		Resolution = 4
		Depth = 1
	DeepCheck = 1
	JointStrength = 6
	JointStiffness = 0.5
	DrawAfterParent = 1
	DetonationSound = Sound // sound played upon shell gib
		AddSample = ContentFile
			Path = YourMod.rte/Sounds/Explode1.wav // file pathway that loads the detonation sound file
	StanceOffset = Vector
		X = -12
		Y = -5
	StartThrowOffset = Vector
		X = -12
		Y = -5
	EndThrowOffset = Vector
		X = -12
		Y = -5
	TriggerDelay = 1100 // How long until it explodes, set it really high for Impact-Only detonation.
	ParticleNumberToAdd = 100
	AddParticles = MOSParticle // type of particle upon gib
		CopyOf = Your Mod Blast Ball
	ParticleNumberToAdd = 100
	AddParticles = MOPixel // type of particle upon gib
		CopyOf = Your Mod Fragment Gray
	ParticleNumberToAdd = 150
	AddParticles = MOPixel // type of particle upon gib
		CopyOf = Your Mod Fragment Yellow
	ParticleNumberToAdd = 150
	AddParticles = MOPixel // type of particle upon gib
		CopyOf = Your Mod Air Blast
		GibParticle = MOPixel // type of particle upon gib
			CopyOf = Your Mod Gib Glow
		Count = 1 // number of particles to be gibbed
		Spread = 2.25 // the radial spread of gibbed particles
		MaxVelocity = 0.1 // the maximum velocity allowed for the particle
		MinVelocity = 0 // the minimum velocity allowed for the particle
		InheritsVel = 0 // whether the gibbed particle takes on the velocity of the shell
Personal tools