Jump to content

ughfhhyg4555786

Premium Member
  • Posts

    52
  • Joined

  • Last visited

Posts posted by ughfhhyg4555786

  1. I would like to confirm that the Shout_MidasWrath_TollCollector (The legendary action of Toll Collector in act 2) exist in Gustav\Public\Honour\Stats\Generated\Data\Spell_Shout. And also file sizes of Interrupt.txt, Spell_Projectile.txt, Spell_Shout.txt, Spell_Target.txt, Status_BOOST,txt, Status_DOWNED.txt, and Status_INCAPACITATED.txt.

    Thank you very much for the help!

  2. If I create a text file with new entry in Public\my_mod\Stats\Generated\Data, does the new entry actually create a new spell in the game, or must the new entry be a spell that already exists in the game (like Replacement)?

     

    for example,

    new entry "XX"
    type "SpellData"
    data "SpellType" "Shout"
    data "Icon" "Action_DivineIntervention_Attack"
    data "Level" ""
    data "SpellSchool" ""
    data "DisplayName" "h28ef3af2gddf1g4280ga47agb801a76;1"
    data "Description" "hc32a0860g7654g49a5g917egd77f048;1"
    Does XX have to be the one that in the game?
  3. Thank you for the information. So, if I understand correctly, I don't need to write the function KillEssential myself. Instead, I only need to type 'Actor.KillEssential Player' in the console, right?
    I also noticed something that lee3310 suggested. I have found multiple NPC quests that only contain a single referenceAlias. Some of the referenceAlias only set the NPC to protected, while others set the NPCs to essential. "Even if I use either the console command or papyrus setEssential baseID 0, it won't work, because I guess the referenceAlias will override the setting, right?

     

    In this case, besides modifying the mod referenceAlias, is there anything else I can do to override the referenceAlias's setting? (perhaps, force the quest to end?)
  4. I probably figure out the reason. Changing the actorbase to non-essential and protected does not affect already spawned NPCs. The related reference still shows an essential status, indicated by "[EP]" instead of "[PP]". This is likely due to the fact that these NPCs were already present in the game world. So, I am wondering if there is a way to change the essential status of already spawned NPCs from essential to non-essential.

  5. Sorry, I didn't make it clear. I was wondering if the quest is related to invincible NPCs besides setting essential, ghost, and invulnerable flags on them. I'm certain that I've removed all the necessary flags from the NPCs, but I still can't kill them. Therefore, I'm curious if there are any other game mechanics preventing the NPC from dying.

  6. I can never figure this out myself :pinch:. I hate to use timer too, but it is the only way I can think about. Anyway, I changed my code here:

    Scriptname oo_RefCollectSpell extends activemagiceffect
    
    Actor Property PlayerRef Auto Const
    Float Property ExpectedDistance Auto Const
    RefCollectionAlias Property NewReconTargetCollections Auto Const
    
    Event OnEffectStart(Actor Target, Actor Caster)
    	NewReconTargetCollections.AddRef(Target)
    	(NewReconTargetCollections as oo_NewReconTargetsCleanUp).RegisterForDistanceGreaterThanEvent(PlayerRef, Target, ExpectedDistance)
    EndEvent
    

    This for clock spell

    Scriptname oo_NewReconTargetsCleanUp extends RefCollectionAlias
    
    Event OnUnload(ObjectReference akSender)
    	Self.RemoveRef(akSender)
    EndEvent
    
    Event OnDistanceGreaterThan(ObjectReference PlayerRef, ObjectReference TargetObj, float afDistance)
    	Self.RemoveRef(TargetObj)
    EndEvent
    

    This attached to the Reference Collection Alias.

     

    By the way, I found there is one section called Quest Objectives. There is one condition write as this:

    Target Ref Conditions

    ReconTarget (GetDead None == 0.00)

     

    I think they use this to get rid of dead actor from their reference collection, I wonder if I can add a condition like NewReconTarget (GetDistance PlayerRef < 4600.0) something like that for my quest. But I don't know which one is best for the performance.

  7. Scriptname oo_RefCollectSpell extends activemagiceffect
    
    RefCollectionAlias Property NewReconTargetCollections Auto Const
    
    Event OnEffectStart(Actor Target, Actor Caster)
    	NewReconTargetCollections.AddRef(Target)
    EndEvent
    

    I attached this to a clock spell.

    And Then I created a new quest and just did exactly same thing as recon quest, but removed the script that is attached to PlayerRef

     

    This was the timer to track the distance (1 seconds each Timer):

    Scriptname oo_DistanceDetectTimer extends activemagiceffect
    
    RefCollectionAlias Property NewReconTargetCollections Auto Const
    Actor Property PlayerRef auto Const
    Float Property TimerTime auto Const
    Float Property ExpectedDistance auto Const
    
    Int DistanceTimerID = 238
    
    Event OnEffectStart(Actor Target, Actor Caster)
    	StartTimer(TimerTime,DistanceTimerID)
    EndEvent
    
    Event OnTimer(Int aiTimerID)
    	
    	If aiTimerID == DistanceTimerID
    		Int ICount = NewReconTargetCollections.GetCount()
    		Int Index = 0
    		ObjectReference PlaceHolder = None
    		
    		While (Index < ICount)
    			PlaceHolder = NewReconTargetCollections.GetAt(Index)
    			
    			If PlayerRef.GetDistance(PlaceHolder) > ExpectedDistance
    				NewReconTargetCollections.RemoveRef(PlaceHolder)
    			EndIf
    			
    			Index += 1
    		EndWhile
    		
    		StartTimer(TimerTime,DistanceTimerID)
    	EndIf
    	
    EndEvent
    
    Event OnEffectFinish(Actor Target, Actor Caster)
    	CancelTimer(DistanceTimerID)
    EndEvent
    
  8.  

    But also a cloak magic effect will work if you set the condition to "IsActor". You can then tag them with a keyword, put them in an array (formlist works too), send a custom event or just interact with them directly from within the ActiveMagicEffect script. Beware the misleading parameter names though, range is defined by "magnitude" not "range", which is very weird but once you know it you know it.

     

    This is great. I guess now I need to plan how to make this work. And I think the entire commonwealth is considered as one cells, so I'm not sure "Find all actors in cell" is good idea.

     

     

    I don't think you actually want to target all actor types.

     

    (Actually, I do. Any potential hostile or friendly target. And also you have some really great ideas about keyword stuff I think I can also detect some activators like traps and mines. I know its weird I use DetectLive as my spell name. I think I should change the name to hyper sense something like that).

     

    Very inspiring and much appreciate you guys. I'm ready to start working on it. See you guys a day or two.

  9. I never thought about that. Doing a small area will avoid to rapidly find a same actor. This should do the trick. I guess I will drift a script here (tomorrow or after tomorrow), so you guys may take look or throw comments here whenever you like. Again much appreciated for the help.

     

    In addition, I have one question about FindRandomActorRef function, so if we use player as the center and searching for nearby actor reference, assuming we have 5 actors (including player self) in the valid area, how many time the FindRandomActorRef function needs to run in order to find all actors without repeated actor reference? I know this function just return a single actor not an actor array.

×
×
  • Create New...