Jump to content

andbressan

Supporter
  • Posts

    16
  • Joined

  • Last visited

Posts posted by andbressan

  1.  

    Another thing to consider, if you are adding a property to an existing script and then using an existing save to test. If that save already has an item loaded running that script, that instance may not update and continue to use only those properties that were previously present. This could explain why you are receiving notifications but not getting the perk applied.

     

    @IsharaMeradin You're right, I hadn't thought of that. The script is already running... :confused:

     

    Is there any way via console to reset the script?

  2. Hey guys. I'm working on a simple mod, but it's giving me a headache. In summary, I'm trying to add a perk via script but I don't know why the hell it's not working. I'm adding lines of code into the original Bethesda script.

     

     

    Scriptname DA02CuirassScript extends ObjectReference  
    {Script on the DA02Cuirass base object.}
    
    Quest Property DA02 Auto
    Spell Property DA02ArmorAbility Auto
    
    Perk Property BoethiahGrace Auto
    {Default = DA02BoethiahGracePerk.}
    
    ;This script assumes that the only way to get the armor is to kill the champion. If this assumption becomes incorrect, we will likely need handling and extra objectives for seperating out the killing and getting of Armor
    
    ;Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
    ;	
    ; ;	Debug.Trace(self + "OnContainerChanged()")
    ;	
    ;	if DA02.GetStageDone(20)	;Boethiah told the player to do this because he slayed his friend and killed all the cultists at the shrine - if not, stage 20 will poll to see if the player has the armor
    ;		if DA02.GetStageDone(30) == false && akNewContainer == Game.GetPlayer()
    ; ;			Debug.Trace(self + "OnContainerChanged() now in player's inventory.")
    ;			DA02.SetStage(30)
    ;		EndIf
    ;	EndIf
    ;EndEvent
    
    Event OnEquipped(Actor akActor)
    
    	IF akActor == Game.GetPlayer()
    		IF !akActor.HasPerk(BoethiahGrace)
    			IF akActor.AddPerk(BoethiahGrace)
    				Debug.Notification("Boethiah's Grace added!")
    			ELSE
    				Debug.Notification("Unable to add Boethiah's Grace perk.")
    			ENDIF
    		ENDIF
    	ENDIF
    
    ; 	Debug.Trace(self + "OnEquipped()")
    
    	if DA02.GetStageDone(30)	;player's killed everyone at the bandit lair
    		if DA02.GetStageDone(40) == false && akActor == Game.GetPlayer()
    ; 			Debug.Trace(self + "OnEquipped() by player.")
    			DA02.setstage(40)
    		endIf
    	EndIf
    	
    	;akActor.AddSpell(DA02ArmorAbility) -- handled directly by enchantment on the armor
    EndEvent
    
    Event OnUnequipped(Actor akActor)
    
    	IF akActor == Game.GetPlayer()
    		IF akActor.HasPerk(BoethiahGrace)
    			IF akActor.RemovePerk(BoethiahGrace)
    				Debug.Notification("Boethiah's Grace removed!")
    			ELSE
    				Debug.Notification("Unable to remove Boethiah's Grace perk.")
    			ENDIF
    		ENDIF
    	ENDIF
    
    ; 	Debug.Trace(self + "OnUnequipped()")
    
    	;akActor.RemoveSpell(DA02ArmorAbility) -- handled directly by enchantment on the armor
    EndEvent
    
    

    The script itself works, the problem is that the variable (property) "BoethiahGrace" is always empty (null) even if I set a value (content), so, the "IF akActor.AddPerk(BoethiahGrace)" function always returns FALSE.

     

     

     

    I have tried several ways to solve the problem but without success.

     

    Help will be welcome.

     

  3. Hi. I'm trying to run the game with FOSE installed but I get an error message. I'm running the game through Epic. Anyone have an idea what it could be?

     

     

    You have an unknown version of Fallout. Please check http://fose.silverlock.org to make sure you're using the latest version of FOSE, then send an email to the contact addresses listed in fose_readme.txt if this version is not supported in the latest release. (CRC = 6E3D50D1)

     

     

  4. Hello everyone.

     

    Well, I'm unsure how I add perks to an NPC in CK. I must follow the same way as if it was the player? For example: I want add the "Light Foot" perk to a NPC, I must add first "Stealth00" (rank 1), after "Muffled Movement" and finally "Light Foot" or can I put directly "Light Foot"?

     

    Thanks!

  5. Hello everybody! I really find it interesting the Flaming Familiar, but the time of his life is very short. My idea is simple and I think it is not hard to do:

     

    1 - Increasing the life time to 60 seconds;

    2 - Increase health points;

    3 - Only explode when die;

     

    Would be so much more useful.

     

    Thanks.

×
×
  • Create New...