Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

 

I have a fire based explosion going off and attached to it is an enchantment magic effect with the keyword MagicDamageFire. It's not lighting oils, anyone know what the problem could be?

Bump

 

Check the oils and see if there isn't a list of things that are allowed to light it. Perhaps you need to add something from your explosion into said list.

Link to comment
Share on other sites

 

 

I have a fire based explosion going off and attached to it is an enchantment magic effect with the keyword MagicDamageFire. It's not lighting oils, anyone know what the problem could be?

Bump

 

Check the oils and see if there isn't a list of things that are allowed to light it. Perhaps you need to add something from your explosion into said list.

 

You were right, there are formlists. I saw the keywords and hoped that would be enough. Is it safe to manually insert for bash patching?

 

 

 

scriptName TrapOilPool extends TrapExplosiveGas
;
;
;==============================================

; form fireHazard
;objectReference myHazardRef

float property burnDuration = 30.0 auto
{duration that the pool burns for}
string oilAnim = "stopeffect"
string oilDisappearEvent ="end"
objectReference myLinkedRef
bool lightIsOn = False
bool property lightStaysOn = False auto
{if set to 'TRUE' the enabled linked ref will not get disabled when the oil pool is destroyed}
;used to track if we have turned on our linkedRef light yet

bool property deleteSelfAfterIgnition = True auto
{whether or not the oil pool is used up after burning
	default == true}

;bool hazardAssigned = False
explosion property OilExplosion auto ;hidden
bool property weaponResolved = false auto hidden
int Property TrapLevel = 1 auto
{Used to determine the difficulty of the trap, currently only tied to damage
	0 = Easy
	1 = Medium (DEFAULT)
	2 = Hard
	3 = VeryHard}

; event onLoad()
	; fireHazard = game.getForm(0X0005A1A3)
	; hazardAssigned = True
; endEvent

;/
event onCellAttach()
	if !weaponResolved
		ResolveLeveledExplosion()
	endif
endEvent
/;

Function gasExplode(objectReference causeActor)
	;if (causeActor as actor)
		self.setActorCause(causeActor as actor)
	;endif
	goToState("DoNothing")
	;if hazardAssigned == False
	;	AssignHazard()
	;endif
	;myHazardRef = PlaceAtMe(fireHazard, 1)
	(self as objectReference).damageObject(5.0)
	myLinkedRef = getLinkedRef()
	if myLinkedRef && !lightIsOn
		lightIsOn = True
		myLinkedRef.enable()
	endif
	
	
	
endFunction

state doNothing

	event onHit(objectReference akAggressor, form akWeapon, projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
	endEvent

	event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
	endEvent
	
	event onTriggerEnter(objectReference triggerRef)
	endEvent
	
endState

; function AssignHazard()
	; fireHazard = game.getForm(0X0005A1A3)
	; hazardAssigned = True
; endFunction

event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage)
	myLinkedRef = getLinkedRef()
	;if !weaponResolved
	;	ResolveLeveledExplosion()
	;endif
	
	if aiCurrentStage == 2
		placeAtMe(OilExplosion)
	endif
	if aiCurrentStage < 3 && !lightIsOn && myLinkedRef
		lightIsOn = True
		myLinkedRef.enable()
	endif
; 	debug.Trace(self + " has received destruction event #" + aiCurrentStage)
	if aiCurrentStage == 3
		if deleteSelfAfterIgnition
			playanimationandwait(oilAnim, oilDisappearEvent)
		endif
		
		if !lightStaysOn && myLinkedRef
			myLinkedRef.disable()
		endif
		
		if deleteSelfAfterIgnition
			self.Disable()
		else
			self.reset()
			self.clearDestruction()
			goToState("Waiting")
		endif
	endif
endEvent

;/

;================================================================

int property LvlThreshold1 auto
int property LvlThreshold2 auto
int property LvlThreshold3 auto
int property LvlThreshold4 auto
int property LvlThreshold5 auto
Explosion property TrapOilExplosion01 auto
Explosion property TrapOilExplosion02 auto
Explosion property TrapOilExplosion03 auto
Explosion property TrapOilExplosion04 auto
Explosion property TrapOilExplosion05 auto
Explosion property TrapOilExplosion06 auto

Function ResolveLeveledExplosion ()
	;Trace("ResolveLeveledWeapon")
	int damageLevel
	damageLevel = CalculateEncounterLevel(TrapLevel)
	
	; weapon lvlWeaponM = LvlWeaponM1
	; weapon lvlWeaponL = LvlWeaponL1
	; weapon lvlWeaponR = LvlWeaponR1
	explosion LvlExplosion = TrapOilExplosion01
	
	if (damageLevel > LvlThreshold1 && damageLevel <= LvlThreshold2)
		; lvlWeaponM = LvlWeaponM2
		; lvlWeaponL = LvlWeaponL2
		; lvlWeaponR = LvlWeaponR2
		LvlExplosion = TrapOilExplosion02
		;Trace("damage threshold =")
		;Trace("2")
	endif
	if (damageLevel > LvlThreshold2 && damageLevel <= LvlThreshold3)
		;lvlWeaponM = LvlWeapon3
		LvlExplosion = TrapOilExplosion03
		;Trace("damage threshold =")
		;Trace("3")
	endif
	if (damageLevel > LvlThreshold3 && damageLevel <= LvlThreshold4)
		;lvlWeaponM = LvlWeapon4
		LvlExplosion = TrapOilExplosion04
		;Trace("damage threshold =")
		;Trace("4")
	endif
	if (damageLevel > LvlThreshold4 && damageLevel <= LvlThreshold5)
		;lvlWeaponM = LvlWeapon5
		LvlExplosion = TrapOilExplosion05
		;Trace("damage threshold =")
		;Trace("5")
	endif
	if (damageLevel > LvlThreshold5)
		;lvlWeaponM = LvlWeapon6
		LvlExplosion = TrapOilExplosion06
		;Trace("damage threshold =")
		;Trace("6")
	endif
	
	; ballistaWeaponM = lvlWeaponM
	; ballistaWeaponL = lvlWeaponL
	; ballistaWeaponR = lvlWeaponR
	OilExplosion = LvlExplosion
	weaponResolved = True
EndFunction


/;

 

 

 

Edit: I added them to the formlists using a quest and script but it's still not firing. I added the explosion and the magiceffect(enchantment that's attached) to both.

Edited by Elias555
Link to comment
Share on other sites

To be honest, I don't know. I've never really worked with trying to get oil pools to light. Only reason I guessed that there might be a list is from my work on getting a magic spell to mine ore. There was a list of what was allowed to "hit" in order to receive ore. Made sense to me that there might have been one for the oil pools too.

Link to comment
Share on other sites

To be honest, I don't know. I've never really worked with trying to get oil pools to light. Only reason I guessed that there might be a list is from my work on getting a magic spell to mine ore. There was a list of what was allowed to "hit" in order to receive ore. Made sense to me that there might have been one for the oil pools too.

That's fine, it was enough for me to get it to work. I attached one of the fire spells as a work around.

Thanks.

 

 

Looks like my mod is pretty much done :)

Link to comment
Share on other sites

Is it possible to use a script to modify the skill level displayed for spells in the magic menu? (the text that says either novice, apprentice, adept, expert or master)

 

And a completely different question:

What determines the spell animation and effect the player uses when casting a spell with multiple magic effects?

I have two magic effects on a spell that gets chosen depending on if the spell is dual cast or not. The dual cast effect has an area explosion.. But the explosion effect is played even when that effects condition returns false. The effect doesn't damage, but still plays it's effects. How can I prevent that?

Edited by Mornedil
Link to comment
Share on other sites

Is there a faction that no actor is hostile to?

 

 

 

Is it possible to use a script to modify the skill level displayed for spells in the magic menu? (the text that says either novice, apprentice, adept, expert or master)

Any reason you can't just edit the perk directly?

 

Bashed patches don't merge formlists. You can add to formlists by script with AddForm()

Ah, okay. That's what I used.

Link to comment
Share on other sites

Is it possible to use a script to modify the skill level displayed for spells in the magic menu? (the text that says either novice, apprentice, adept, expert or master)

Any reason you can't just edit the perk directly?

 

No no I'm talking about spells, not a perk. For example the vanilla spell Frostbite is displayed in-game as a "novice" skill level perk, which in the CK is determined by the "minimal skill level" value in the Magic Effect editor.

I'm looking to modify that variable for a spell instead of creating multiple different spells with a different skill level value. It's always bothered me in the vanilla game that there are so many different spells that do pretty much the same thing (like calm and it's more powerful versions). My intention is to use only one spell and increase it's power as the player levels up. So a spell may start with 10 magnitude but eventually get a magnitude of 100. At that point it would look silly if the spell still says "novice" in-game.

Link to comment
Share on other sites

Actors are hostils based on both their faction relationships and their aggression actor value. So while there are plenty of factions that have no set enemies, any actor set to "very aggressive" will still be hostile.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...