Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

 

 

 

Thank you, IsharaMeradin, but what about the second part of the question? Why does debug.SendAnimationEvent produce no effect?

 

All right, this is strange: getting rid of the abHitBlocked condition made NPCs stagger, but only once they had around 25% of their total health removed (does this have something to do with their resistances?). Switching from StaggerStart to BleedOutStart made the script behave normal. Just what exactly is going on here?

 

Update:

 

Stumbled upon another problem:

ScriptName ImprovedCombatParry Extends ReferenceAlias

Bool DeflectWindowActive
Bool ParryWindowActive
Actor Property PlayerRef Auto			
Spell Property Stagger Auto

Event OnInit()
	RegisterForAnimationEvent(PlayerRef, "BlockStartOut")
	RegisterForAnimationEvent(PlayerRef, "BlockStop")
	RegisterForActorAction(0)
EndEvent

Event OnActorAction(int actionType, Actor akActor, Form source, int slot)
	If akActor == PlayerRef && actionType == 0
		UnregisterForUpdate()
		DeflectWindowActive = 1
		Debug.Notification("Deflect window is active")
		RegisterForSingleUpdate(0.5)
	EndIf
EndEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
	If akSource == PlayerRef
		ElseIf asEventName == "BlockStartOut"
			ParryWindowActive = 1
			RegisterForSingleUpdate(0.2)
			ElseIf asEventName == "BlockStop"
				UnregisterForUpdate()
				ParryWindowActive = 0
	EndIf
EndEvent

Event OnUpdate()
	If ParryWindowActive
		ParryWindowActive = 0
		ElseIf DeflectWindowActive
			DeflectWindowActive = 0
			Debug.Notification("Deflect window is inactive")
	EndIf
EndEvent

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
	If (abHitBlocked && ParryWindowActive) || DeflectWindowActive
		Stagger.Cast(akAggressor)
	EndIf
EndEvent
Again, getting no errors when compiling, and animation events work as desired, however, actor action events do not appear to function, and I fail to see why.

 

OnActorAction is an SKSE event. If you are not starting the game with SKSE, the event will do nothing.

Other possibilities of it not working are that your test save already contains a version of the script and the game is not recognizing the update. Try testing on a save that has not seen any aspect of the mod you are working on.

Beyond that, no clue.

 

Re-installed the game thrice today. Not even previously working scripts function now. I'm done.

 

Christ, what in the hell is wrong? The simplest damn script won't work.

Scriptname aaaCombatTestScript extends ReferenceAlias

Actor Property PlayerRef Auto

Event OnInit()
	RegisterForAnimationEvent(PlayerRef, "blockStartOut")
EndEvent

Event OnAnimationEvent(ObjectReference akSource, String asEventName)
	if akSource == PlayerRef && asEventName == "blockStartOut"
		debug.notification("Blocking")
	endif
EndEvent
Why is it so freaking random? Why was this working on a fresh installation from a few days ago, but suddenly isn't today? This is *censored*.

http://forums.nexusmods.com/public/style_images/underground/attachicon.gifCapture_0001.PNGhttp://forums.nexusmods.com/public/style_images/underground/attachicon.gifCapture_0002.PNG

 

 

Well, because you didnt FILL the "PlayerRef" property in the script property editor. Those pesky auto properties!

 

Try this non-property version instead. I would argue that even storing the player in a field is unnecessary because you only use it once on initialization.

Scriptname aaaCombatTestScript extends ReferenceAlias

Actor Player

Event OnInit()
	Player = Game.GetPlayer()
	RegisterForAnimationEvent(Player, "blockStartOut")
EndEvent

Event OnAnimationEvent(ObjectReference akSource, String asEventName)
	Debug.Notification("Blocking")
EndEvent

edit: Nothing random about it. All properties in the CreationKit property editor un-fill themselves when you remove and then re-add a script to an object. You know a property is filled when the icon is yellow, not blue.

Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

First of all, I did try filling it manually (despite the fill type being set to forced). It makes no difference. I also tried declaring player as variable, but to no avail. Besides, did you not read the part where I said that the script was working a few days ago?

 

Guess I will just try re-installing again and not using SKSE this time around. If this fail, seems like I will have to try by adding perk with active ability, and use ActiveMagicEffect.

Edited by nonamed817
Link to comment
Share on other sites

Edit: All problems were caused by a wacky behaviour of .esp or game saves i.e. after editing and re-compiling script it would still behave as it did previously, even when loading a save file that was made on a clean game. I managed to get everything working by removing scripts from player alias prior to editing them and by running a clean game before testing edits.

 

Anyway, I now have some other questions:

  • As I understand, player movement speed during the swing is dependant on the weapon attack speed parameter. But in case it's not, what's the parameter responsible for modifying player's speed during weapon swing animation? Is it possible to modify said parameter through scripts?
  • Creation wiki page on animation events mentions preHitFrame event, which isn't recognized by the game, unfortunately. If preHitFrame is what I think it is (a frame which detects collision of a weapon with some object, but doesn't actually apply damage), is there a similar event or action I can trigger to achieve the same result, receive an event when weapon collides with an object but before the damage is applied?

I know there are workarounds for the first two without using what I'm asking, but I would like to avoid making an overbloated mess. Is it doable with standard Skyrim + SKSE papyrus functions or is writing SKSE plugin the only way to go?

Edited by nonamed817
Link to comment
Share on other sites

As someone new to the Skyrim mods, I was wondering if anyone had any recommendations to enhance the Skyrim experience while keeping it true to the original game. Bonus points if they do not require expansions as I currently only have vanilla Skyrim for the PC; I have had my fun with Dawnguard, Hearthfire and Dragonborne in my many Xbox play throughs.

 

From browsing Brodual's YouTube channel, I have had my interest piqued in:

- Water and grass enhancing modules

- Soundscaping modules

- Smarter followers (anything that will allow them to ride horses and discourage them from boxing me into a corner, further immersion is just a bonus)

- Ordinator's perk overhaul

 

Other than Ordinator though (which I'm not even sure if I can run with just the vanilla game), I don't know the most up to date and/or popular versions of each.

 

While I am aware of Perkus Maximus, Skyrim Requiem and the "realism" mods (frostfall, wet and cold, realistic needs and diseases), I'm not interested in complete overhauls or mods that cause inconvenience (forcing me to sleep daily, carry a whole bunch of heavy food around, carry and wear a lot of additional things, blind me during natural events, or drop everything to go cure a random disease) at this time, though I will likely try at least the realism mods in some future play through.

 

Thoughts and suggestions appreciated!

Link to comment
Share on other sites

 

 

Hello,

 

I'm new to the Papyrus language and have a few questions. I'm currently wanting to make a channeled flames alternative spell that does frost damage to the caster each "tick" (working on a Thermomancer theme). I'm writing a script for a Magic Effect for frost self-damage that I will use in the spell.

 

  1. Should I use onUpdate() to apply frost damage to the caster, in order for it to happen every tick?
  2. Is there any way to apply a damaged-by-frost visual effect to the caster while channeling this spell?

 

If you are going to use an update loop, use one of the single registration variants so that you don't get stuck with an infinite loop bloating someone's save cause they removed the mod at the wrong time. But yeah, you can use an update loop to damage the caster. You can also use that same location to apply a visual FX, see Play.

 

 

So for example, I can use RegisterForSingleUpdate on spell start as well as in the OnUpdate function for this?

Link to comment
Share on other sites

I'd like to know if anyone could give me a few pointers about modding the civil war. I've been using the CK on and off for years but I've never tried editing quests as complex as the CW, there seem to be many layers to it and I want to know what I'm dealing with before I end up botching it.

 

What I want to do is edit back in all the quests Bethesda omitted, like the capital sieges for every hold, and more missions before taking a hold (yes, I know about the CWO, I don't want to use it because of the animal-whispering, magic-wielding Stormcloaks, which would at any rate be incompatible with my own edits to soldiers).

Link to comment
Share on other sites

 

 

 

Hello,

 

I'm new to the Papyrus language and have a few questions. I'm currently wanting to make a channeled flames alternative spell that does frost damage to the caster each "tick" (working on a Thermomancer theme). I'm writing a script for a Magic Effect for frost self-damage that I will use in the spell.

 

  1. Should I use onUpdate() to apply frost damage to the caster, in order for it to happen every tick?
  2. Is there any way to apply a damaged-by-frost visual effect to the caster while channeling this spell?

 

If you are going to use an update loop, use one of the single registration variants so that you don't get stuck with an infinite loop bloating someone's save cause they removed the mod at the wrong time. But yeah, you can use an update loop to damage the caster. You can also use that same location to apply a visual FX, see Play.

 

 

So for example, I can use RegisterForSingleUpdate on spell start as well as in the OnUpdate function for this?

 

Yep.

Link to comment
Share on other sites

Is it possible to attach a trigger zone to the player?

 

I take it that if I want to prevent player character from doing certain actions when playing certain animation the only thing I need to edit is behaviour file?

Edited by nonamed817
Link to comment
Share on other sites

Hi all,

 

I try to make a script that check the factions of npcs, then according to the result it give them selected items depends on faction.

For now It works for one faction, then I've try to make an extended script but this one give me those errors in the CK:

 

missing RPAREN at '\\r\\n'

no viable alternative at input '\\r\\n'

 

script:

 

 

 

Scriptname aaf_OutfitSwapExt extends ObjectReference

 

faction property aaf_Faction01 auto

faction property aaf_Faction02 auto

armor property aaf_OutfitFa101 auto

armor property aaf_OutfitFa102 auto

armor property aaf_OutfitFa103 auto

armor property aaf_OutfitFa201 auto

armor property aaf_OutfitFa202 auto

armor property aaf_OutfitFa203 auto

armor property aaf_NakedReequipRing auto

 

Event OnTriggerEnter(ObjectReference triggerRef)

Actor akactionRef = triggerRef as Actor

 

If

akActionRef.IsInFaction(aaf_Faction01)

akActionRef.unequipall()

akActionRef.additem(aaf_OutfitFa101,1,true)

akActionRef.additem(aaf_OutfitFa102,1,true)

akActionRef.additem(aaf_OutfitFa103,1,true)

akActionRef.equipitem(aaf_OutfitFa101,1,true)

akActionRef.equipitem(aaf_OutfitFa102,1,true)

akActionRef.equipitem(aaf_OutfitFa103,1,true

 

 

ElseIf

akActionRef.IsInFaction(aaf_Faction02)

akActionRef.unequipall()

akActionRef.additem(aaf_OutfitFa201,1,true)

akActionRef.additem(aaf_OutfitFa202,1,true)

akActionRef.additem(aaf_OutfitFa203,1,true)

akActionRef.equipitem(aaf_OutfitFa201,1,true)

akActionRef.equipitem(aaf_OutfitFa202,1,true)

akActionRef.equipitem(aaf_OutfitFa203,1,true)

EndIf

EndEvent

 

Event OnTriggerLeave(ObjectReference triggerRef)

Actor akactionRef = triggerRef as Actor

 

If

akActionRef.IsInFaction(aaf_Faction01)

akActionRef.unequipall()

akActionRef.removeitem(aaf_OutfitFa101,1,true)

akActionRef.removeitem(aaf_OutfitFa102,1,true)

akActionRef.removeitem(aaf_OutfitFa103,1,true)

akActionRef.additem(aaf_NakedReequipRing,1,true)

akActionRef.equipitem(aaf_NakedReequipRing,false,true)

akActionRef.removeitem(aaf_NakedReequipRing,1,true)

 

ElseIf

akActionRef.IsInFaction(aaf_Faction02)

akActionRef.unequipall()

akActionRef.removeitem(aaf_OutfitFa201,1,true)

akActionRef.removeitem(aaf_OutfitFa202,1,true)

akActionRef.removeitem(aaf_OutfitFa203,1,true)

akActionRef.additem(aaf_NakedReequipRing,1,true)

akActionRef.equipitem(aaf_NakedReequipRing,false,true)

akActionRef.removeitem(aaf_NakedReequipRing,1,true)

EndIf

 

EndEvent

 

 

Any ideas? I don't understand what the error mean :sad:

 

Thanks in advance!

Edited by dredd3110
Link to comment
Share on other sites

There are no major bugs with the regions feature, right? For instance, generating decoration objects with it or using it to generate navmesh won't corrupt my worldspace, right? I only ask because I had a worldspace destroyed by the build in heightmap feature, and could not find any documentation on that bug until after it was too late.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...