Jump to content


Photo

Special effects, lightnings


  • Please log in to reply
64 replies to this topic

#61 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,436 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 20 May 2012 - 09:50 PM

Probably, but I don't see what you wanted to achive with posting it? Did you fix it? It doesn't seem so.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#62 DeeZire

DeeZire
  • Members
  • 140 posts

Posted 26 May 2012 - 10:11 PM

Just to settle this issue for anybody still wondering ;)

In BFME the Freezing Rain power triggered the special lightning visual effect. In BFMEII/RotWk it does not. The code for the lightning effect was disabled as it worked by 'jittering' the shadows across the whole map - this obviously did not look too good on the large number of snow terrain maps added for BFMEII (the engine does not differentiate between snow and rain, snow is simply rain with a different texture so on snow maps you get a snow storm rather than rain and this looked funky with lightning). It was even further complicated by the addition of the new lighting and shadow system code. It did get fixed for the next engine iteration - C&C3 - as that engine was given independent handling for snow and rain and associated code to tweak them.

The observant amongst you will also have noticed that the Darkness power does not change the ambient light setting and cloud texture nor does it speed up cloud movement in BFMEII as it did in BFME - again, this was disabled due to an engine change which allowed for the settings of map-specific cloud textures and their movement speeds (although you can't edit these in the publicly released version of World Builder) - something used extensively in BFMEII, as BFME used one global cloud texture and speed setting for all maps.

So if you want the lightning effect in BFMEII the only way to go is with map scripts as described, putting these scripts into the single player music scripts will trigger their use globally rather than being map-dependent.

Edited by DeeZire, 26 May 2012 - 10:16 PM.


#63 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 30 May 2012 - 12:46 PM

Just to settle this issue for anybody still wondering ;)

In BFME the Freezing Rain power triggered the special lightning visual effect. In BFMEII/RotWk it does not. The code for the lightning effect was disabled as it worked by 'jittering' the shadows across the whole map - this obviously did not look too good on the large number of snow terrain maps added for BFMEII (the engine does not differentiate between snow and rain, snow is simply rain with a different texture so on snow maps you get a snow storm rather than rain and this looked funky with lightning). It was even further complicated by the addition of the new lighting and shadow system code. It did get fixed for the next engine iteration - C&C3 - as that engine was given independent handling for snow and rain and associated code to tweak them.

The observant amongst you will also have noticed that the Darkness power does not change the ambient light setting and cloud texture nor does it speed up cloud movement in BFMEII as it did in BFME - again, this was disabled due to an engine change which allowed for the settings of map-specific cloud textures and their movement speeds (although you can't edit these in the publicly released version of World Builder) - something used extensively in BFMEII, as BFME used one global cloud texture and speed setting for all maps.

So if you want the lightning effect in BFMEII the only way to go is with map scripts as described, putting these scripts into the single player music scripts will trigger their use globally rather than being map-dependent.


Thanks for your great describing post Deezire. But I have a further question concerning this topic. You're talking about the darkness power which is not able to change the ambient light and further things which are involved in it. So do you maybe know a way of solving this problem like the lightning thing? Cuz I think the darkness effect gives so much atmosphere to the game that it has to be implemented again in RotW.

Edited by TroDuS, 30 May 2012 - 12:46 PM.


#64 DeeZire

DeeZire
  • Members
  • 140 posts

Posted 06 June 2012 - 09:51 PM

You could do the same thing with the global music scripts by detecting when a player has activated the Darkness power and then adjusting the ambient light setting, I haven't tried this myself however I think you may have trouble restoring the ambient light to the pre-Darkness settings. One thing I do know is that trying to speed up the clouds won't work - the 'adjust the speed of the Mordor cloud effect' script does not work - that got nerfed with the rest of the effects due to the addition of map-specific cloud settings in BFMEII.

However I'm pretty sure that the ambient light does get changed when the old (from BFMEI) Rain Of Fire module is activated, so by hooking that into a player spell book so it's activated along with Darkness you may be able to replicate the effect.

#65 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 07 June 2012 - 12:22 PM

You could do the same thing with the global music scripts by detecting when a player has activated the Darkness power and then adjusting the ambient light setting, I haven't tried this myself however I think you may have trouble restoring the ambient light to the pre-Darkness settings. One thing I do know is that trying to speed up the clouds won't work - the 'adjust the speed of the Mordor cloud effect' script does not work - that got nerfed with the rest of the effects due to the addition of map-specific cloud settings in BFMEII.

However I'm pretty sure that the ambient light does get changed when the old (from BFMEI) Rain Of Fire module is activated, so by hooking that into a player spell book so it's activated along with Darkness you may be able to replicate the effect.


Thanks for your fast reply in advance. But I don't get into that Rain Of Fire module at all. I can't remember such a spellbook-spell, even though I have played BFME1 for years and I don't know how it would work and so on. So unfortunately I have no plan at all what I have to do now regarding your suggestion of implementing it into the spell book.

My first attempt was a few days before while using a script to change the ambient light after using the darkness special power but either I did it wrong (cuz I am not that into scripting, actually not a bit) or it just does not work. Maybe someone else who knows more about scripting properly could check this out, huh? :p

SpecialPower SpellBookRainOfFire
	Enum			= SPECIAL_SPELL_BOOK_RAIN_OF_FIRE
	RadiusCursorRadius	= 200
	RequiredSciences		= SCIENCE_RainOfFire
	ReloadTime		= SPELL_RECHARGE_TIME_TIER_4 ; in milliseconds
	InitiateSound = SpellRainOfFireMS
	ViewObjectDuration = 10000
	ViewObjectRange = 200
	Flags			= RESPECT_RECHARGE_TIME_DISCOUNT
End
CommandButton Command_SpellBookRainOfFire
	Command				= SPELL_BOOK
	SpecialPower		= SpellBookRainOfFire
	Options				= NEED_TARGET_POS
	TextLabel			= CONTROLBAR:RainOfFire
	ButtonImage			= SBEvil_RainofFire
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:ToolTipSpecialAbilityFiresOfDoom
	RadiusCursorType	= RainOfFireRadiusCursor
	CursorName			= AttackObj
	InvalidCursorName	= GenericInvalid
End
	Behavior = OCLSpecialPower ModuleTag_RainOfFire
		SpecialPowerTemplate = SpellBookRainOfFire
		OCL				  = OCL_SpellBookRainOfFire
		CreateLocation	   = CREATE_AT_LOCATION
		AvailableAtStart	 = No
		RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	End
  
	Behavior = OCLSpecialPower ModuleTag_RainOfFire02
		SpecialPowerTemplate = SpellBookRainOfFire
		OCL				  = OCL_SpellBookRainOfFire
		CreateLocation	   = CREATE_AT_LOCATION
		AvailableAtStart	 = No
		RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	End
; RainOfFire spell
ObjectCreationList OCL_SpellBookRainOfFire
	CreateObject
		ObjectNames	= SpellBookRainOfFire
;		ForbiddenUpgrades = Upgrade_AllFactionUpgrade
	End
  
	; yup
;	CreateObject
;		ObjectNames	= SpellBookRainOfFire02
;		RequiredUpgrades = Upgrade_AllFactionUpgrade
;	End
End
;------------------------------------------------------------------------------
Object SpellBookRainOfFire02
	 Draw = W3DScriptedModelDraw ModuleTag_01
		DefaultModelConditionState
			  Model = EXMeteor02
			ParticleSysBone Meteor RainTrail FollowBone:Yes
			ParticleSysBone Meteor01 MRainTrail2 FollowBone:Yes
			ParticleSysBone Meteor02 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor03 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor04 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor05 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor06 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor07 RainTrail2 FollowBone:Yes
			ParticleSysBone Meteor01 RainHit FollowBone:Yes
			ParticleSysBone Meteor02 RainHit FollowBone:Yes
			ParticleSysBone Meteor04 RainHit2 FollowBone:Yes
		End
		IdleAnimationState
			Animation = SPAWN
				AnimationName	 = EXMeteor02.EXMeteor02
				AnimationMode	 = ONCE
			End
		End  
	  End
	EditorSorting   = SYSTEM
	KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE INERT
	ForceLuaRegistration = Yes ; I have no AI, but I want to send a fear message so please register me.
  
	; *** AUDIO Parameters ***
  
	ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
		MaxUpdateRangeCap = 1800
		AnimationSound = Sound:SpellRainOfFireProjectileFlyBy	Animation:EXMeteor.EXMeteor		Frames: 20 49 55 61
		AnimationSound = Sound:ImpactRainOfFire					Animation:EXMeteor.EXMeteor		Frames: 52 75 79 89
		;AnimationSound = Sound:SpellRainOfFirePlume				Animation:EXMeteor.EXMeteor		Frames: 85
	End
  
	; *** ENGINEERING Parameters ***
	Body = ImmortalBody ModuleTag_02
		MaxHealth = 1  
		InitialHealth = 1
	End
	Behavior = DeletionUpdate ModuleTag_03 ; Not LifetimeUpdate, since I can't die.  This will DestroyObject me.
		MinLifetime = 10000
		MaxLifetime = 10000
	End
  
	Behavior = FireWeaponUpdate ModuleTag_DamageHandler
		FireWeaponNugget
			WeaponName = RainOfFirePhaseInitialWeapon02
			FireDelay = 0
			OneShot = Yes	; Alternative is to fire as often as the reload time of this weapon allows
		End
		FireWeaponNugget
			WeaponName = RainOfFirePhaseOneWeapon02
			FireDelay = 2500
			OneShot = Yes  
		End
	End
	Geometry			= BOX
	GeometryMajorRadius = 10.0
	GeometryMinorRadius = 1.0
	GeometryHeight	  = 3.0
	GeometryIsSmall	 = No
	Shadow			  = NONE ; doesn't actually have a model...
End
;------------------------------------------------------------------------------
Object SpellBookRainOfFire
	 Draw = W3DScriptedModelDraw ModuleTag_01
		DefaultModelConditionState
			  Model = EXMeteor
			ParticleSysBone Meteor MeteorTrail FollowBone:Yes
			ParticleSysBone Meteor01 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor02 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor03 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor04 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor05 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor06 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor07 MeteorTrail2 FollowBone:Yes
			ParticleSysBone Meteor01 MeteorHit FollowBone:Yes
			ParticleSysBone Meteor02 MeteorHit FollowBone:Yes
			ParticleSysBone Meteor04 MeteorHit2 FollowBone:Yes
		End
		IdleAnimationState
			Animation = SPAWN
				AnimationName	 = EXMeteor.EXMeteor
				AnimationMode	 = ONCE
			End
		End  
	  End
	EditorSorting   = SYSTEM
	KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE INERT
	ForceLuaRegistration = Yes ; I have no AI, but I want to send a fear message so please register me.
  
	; *** AUDIO Parameters ***
  
	ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
		MaxUpdateRangeCap = 1800
		AnimationSound = Sound:SpellRainOfFireProjectileFlyBy	Animation:EXMeteor.EXMeteor		Frames: 20 49 55 61
		AnimationSound = Sound:ImpactRainOfFire					Animation:EXMeteor.EXMeteor		Frames: 52 75 79 89
		;AnimationSound = Sound:SpellRainOfFirePlume				Animation:EXMeteor.EXMeteor		Frames: 85
	End
	  
	; *** ENGINEERING Parameters ***
	Body = ImmortalBody ModuleTag_02
		MaxHealth = 1  
		InitialHealth = 1
	End
	Behavior = DeletionUpdate ModuleTag_03 ; Not LifetimeUpdate, since I can't die.  This will DestroyObject me.
		MinLifetime = 10000
		MaxLifetime = 10000
	End
  
	Behavior = FireWeaponUpdate ModuleTag_DamageHandler
		FireWeaponNugget
			WeaponName = RainOfFirePhaseInitialWeapon
			FireDelay = 0
			OneShot = Yes	; Alternative is to fire as often as the reload time of this weapon allows
		End
		FireWeaponNugget
			WeaponName = RainOfFirePhaseOneWeapon
			FireDelay = 2500
			OneShot = Yes  
		End
	End
	Geometry			= BOX
	GeometryMajorRadius = 10.0
	GeometryMinorRadius = 1.0
	GeometryHeight	  = 3.0
	GeometryIsSmall	 = No
	Shadow			  = NONE ; doesn't actually have a model...
End

;----------------------------------------------------------------------------

;------------------------------------------------------------------------------
Weapon RainOfFirePhaseInitialWeapon
	RadiusDamageAffects = ENEMIES NEUTRALS ALLIES
	FireFX = FX_RainOfFirePhaseInitialWeapon
	LuaEventNugget						; Sends a lua script event out
		LuaEvent		= BeUncontrollablyAfraid
		Radius			= 200
		SendToEnemies	= Yes
		SendToAllies	= No
		SendToNeutral	= Yes
	End
End
;------------------------------------------------------------------------------
Weapon RainOfFirePhaseInitialWeapon02
	RadiusDamageAffects = ENEMIES NEUTRALS ALLIES
	FireFX = FX_RainOfFirePhaseInitialWeapon02
	LuaEventNugget						; Sends a lua script event out
		LuaEvent		= BeUncontrollablyAfraid
		Radius			= 200
		SendToEnemies	= Yes
		SendToAllies	= No
		SendToNeutral	= Yes
	End
End
;------------------------------------------------------------------------------
Weapon RainOfFirePhaseOneWeapon
	RadiusDamageAffects = ENEMIES NEUTRALS
	FireFX = FX_RainOfFirePhaseOne
	DamageNugget						; A basic Nugget that just does damage
		Damage		= 7250
		DamageScalar  = 50% NONE +COMMANDCENTER
		DamageTaperOff = 200
		Radius		= 200
		DamageMaxHeightAboveTerrain = 1
		DelayTime	 = 0
		DamageType	= SIEGE
		DeathType	 = NORMAL
	End
	MetaImpactNugget					; A Nugget that throws things back with force
;		HeroResist			= .99
		ShockWaveAmount		= 50.0
		ShockWaveTaperOff	= 1.0
		ShockWaveRadius		= 50
	End
	;FireLogicNugget						; Increase the fuel where it hits
	;	LogicType		= INCREASE_FUEL
	;	Radius			= 150
	;	Damage			= 25
	;	MinMaxBurnRate	= 10
	;	MaxResistance	= 5
	;End
	;FireLogicNugget						; Light everything on fire
	;	LogicType		= INCREASE_BURN_RATE
	;	Radius			= 150
	;	Damage			= 100
	;End
End
;------------------------------------------------------------------------------
Weapon RainOfFirePhaseOneWeapon02
	RadiusDamageAffects = ENEMIES NEUTRALS
	FireFX = FX_RainOfFirePhaseOne02
	DamageNugget						; A basic Nugget that just does damage
		Damage		= 7250
		DamageScalar  = 50% NONE +COMMANDCENTER
		DamageTaperOff = 200
		Radius		= 200
		DamageMaxHeightAboveTerrain = 1
		DelayTime	 = 0
		DamageType	= SIEGE
		DeathType	 = NORMAL
	End
	MetaImpactNugget					; A Nugget that throws things back with force
;		HeroResist			= .99
		ShockWaveAmount		= 50.0
		ShockWaveTaperOff	= 1.0
		ShockWaveRadius		= 50
	End
	;FireLogicNugget						; Increase the fuel where it hits
	;	LogicType		= INCREASE_FUEL
	;	Radius			= 150
	;	Damage			= 25
	;	MinMaxBurnRate	= 10
	;	MaxResistance	= 5
	;End
	;FireLogicNugget						; Light everything on fire
	;	LogicType		= INCREASE_BURN_RATE
	;	Radius			= 150
	;	Damage			= 100
	;End
End

This is what I found in the BFME2-inis. And as far as I know it exists since BFME2 and so wasn't implemented in BFME1. I think this spell creates flamed rocks in the sky which crush into the ground and destroy everything with an area damage.

So either you think of a different spell as I do, or there has been a different spell in BFME1 than BFME2.

I found something out now.
This one from BFME1's system.ini has been ignored in BFME2:
; -----------------------------------------------------------------------------
;Object RainOfFire
;  ; *** ART Parameters ***
;  Draw = W3DScriptedModelDraw ModuleTag_02
;	DefaultModelConditionState
;	  Model = NONE
;	  WeaponLaunchBone = PRIMARY NONE
;	End
;  End
;
;  ; ***DESIGN parameters ***
;  EditorSorting = SYSTEM
;
;  WeaponSet
;	Conditions = None
;	Weapon	 = PRIMARY CINE_RainOfFireWeapon
;  End
;
;  ; *** ENGINEERING Parameters ***
;  KindOf		= NO_COLLIDE NO_HEAL_ICON IGNORES_SELECT_ALL IGNORED_IN_GUI UNATTACKABLE ENVIRONMENT IGNORE_FOR_VICTORY
;
;//THIS IS THE MOST IMPORTANT PART!!!
;  Behavior	  = RainOfFireUpdate ModuleTag_01
;	StartRainTime	  = 1000  ; Amount of time till rain starts
;	DarknessFadeTime   = 4000  ; Amount of time to get dark
;	RainEmitterHeight  = 300.0 ; Height of rain drops
;	DarknessLevel	  = .5	; How dark it will get during rain
;	JitterRadius	   = 276.0 ; Radius of the effect
;	DPSMin			 = 10.0  ; Minimum drops per second
;	DPSMax			 = 15.0  ; Maximum drops per second
;	DPSRampupTime	  = 3000  ; Rampup from zero intensity
;  End
;
;  Behavior	  = DestroyEnvironmentUpdate ModuleTag_03
;	StartTime = 60000
;	DestructionTime = 2000
;  End
;End

Now I just tried the old code-part of BFME1 in ROTWK:

;//THIS IS THE MOST IMPORTANT PART!!!
; Behavior = RainOfFireUpdate ModuleTag_01
; StartRainTime = 1000 ; Amount of time till rain starts
; DarknessFadeTime = 4000 ; Amount of time to get dark
; RainEmitterHeight = 300.0 ; Height of rain drops
; DarknessLevel = .5 ; How dark it will get during rain
; JitterRadius = 276.0 ; Radius of the effect
; DPSMin = 10.0 ; Minimum drops per second
; DPSMax = 15.0 ; Maximum drops per second
; DPSRampupTime = 3000 ; Rampup from zero intensity
; End


I changed the OCL of Spiderlings to the Old Rain of Fire Object (so it has summoned the Rain of Fire Object instead of the Spiderlings)
Anyway, it darkens, but just the units and buildings, the global ambient light stays like before. (Fords of Isen 2)

Edited by TroDuS, 07 June 2012 - 12:56 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users