malformed effects generate not helpful error messages

Bug reports for the different beta versions of transcendence.
Post Reply
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

as the title says:
10/11/2013 12:33:55 digdug-7402.sav: System 1e: Unable to load object.
State: Loading object subclass
ObjectClassID: 100010
I've got this error when I was tinkering with the new weapon effects:

This is the clearly bad effect I was using:

Code: Select all

<EffectType UNID="&efLaserBeamDefault2;"
			instance=			"owner"
			>
		<Effect>
			<ParticleCloud
					style=				"jet"
					emitRate=			"10"
					emitSpeed=			"5-10"
					particleLifetime=	"10-15"
					>
				<ParticleEffect>
					<Particle
							style=			"plain"
							minWidth=		"1"
							maxWidth=		"4"
							primaryColor=	"#ffffff"
							secondaryColor=	"#808080"
							/>
				</ParticleEffect>
			</ParticleCloud>
		</Effect>

		<Events>
			<GetParameters>
				;	This event allows us to initialize effect parameters based 
				;	on weapon properties. In particular, we adjust the size of 
				;	the effect based on the amount of average damage.
				;
				;	For weapon effects, gData has the following fields:
				;
				;	damageHP: The average number of hit points of damage.
				;	speed: The speed of the shot (as a percent of lightspeed).
				;
				;	The event must return a structure with each field representing
				;	a parameter for the effect. For Ray effects, valid fields are:
				;	intensity, length, width, primaryColor, and secondaryColor.

				(block (damageHP primaryColor secondaryColor)
					(setq damageHP (@ gData 'damageHP))

					;	Color depends on damage

					
						

						(block Nil
							
							(setq primaryColor (primaryColourFunction))
							(setq secondaryColor (secondaryColourFunction))
							(setq intensity (intensityFunction))
							)
						
					
					{
						length:
							(mathScale 
								damageHP						; average damage of weapon
								1								; min damage
								30								; max damage
								60								; min beam length
								220								; max beam length
								50								; scale gamma
								)
						width: (mathScale damageHP 1 30 12 28 50)
						intensity: intensity

						primaryColor: primaryColor
						secondaryColor: secondaryColor
						}
					)
			</GetParameters>
		</Events>
	</EffectType>

<Globals>
(block Nil
	

	
	(setq primaryColourFunction (lambda Nil
		(block Nil
			(cat "#" (random 0 255) (random 0 255) (random 0 255)) 
	)))
	
	(setq secondaryColourFunction (lambda Nil
		(block Nil
			(cat "#" (random 0 255) (random 0 255) (random 0 255)) 
	)))
			
	(setq intensityFunction (lambda Nil
		(block Nil
			(random 1 100)
	)))
	
)
</Globals>
It's low priority, but I wanted to alert other people about it.
Post Reply