Jump to content

maxarturo

Supporter
  • Posts

    2204
  • Joined

  • Last visited

Everything posted by maxarturo

  1. You can use Vex's alias > create a quest > and run and 'OnActivate()' event on the alias to change a global variable that you can use for your purpose. * Every time you speak to an actor, that actor also triggers an 'OnActivate()' event. But this will work in consistency on a new game, since if you install it mid playthrough the player may or may not have spoken with that npc. Alternatively, you can check the vanilla quest that's attached to Vex's dialogue and look for any 'Stages' or 'Global Variables' that are changed when his first dialogues with the player occur.
  2. You were able to find scripting tutorials for games before Skyrim because the language Bethesda used for those games was just a series of commands and nothing more, while since Skyrim was developed the Papyrus language actually started to become a real coding language with one of its attributes to be the many different ways a coder can achieve the same thing without the restriction of having to follow one single 'how to do path'. However this does not mean that all applicable coding ways are equally find and best and here is where the coder's experience and knowhow comes in to distinguish the best approach for the requiered situation. Now as IsharaMeradin mentioned the majority of modders who didn't knew or had any association with programing, they learned following the same path as IsharaMeradin. My advice to someone that wants to learn coding/Papyrus is to exclusively concentrate on that and nothing more. Create a 'Test ESP' and dedicate 2 weeks to 1 month only in reading > manipulating > creating > testing scripts, after a month you will be able to create your own scripts for all your basic needs. After you have conquered that part, we are here to guide you to more complex stuff and show you things that actually need some programming knowledge and applicable knowhow.
  3. The only way is to create 'static' versions of the actor's meshes and then insert them into CK as new static or movable static objects. There is also a scripted way to start your npc dead without a head, but it will only have 1 head and you can't manipilate where the head will be placed in the world.
  4. - Using the same logic as mentioned before, you can create different 'Drain Magica' Magic Effects with different damage output and insert them all in the same ability spell. - Each 'Drain Magica' Magic Effect that will be inside the same ability spell will have its own set of conditions to obtain the data you want. - According with the player's current actor value the corresponding 'Drain Magica' Magic Effect will fire. You can use conditions such as, example: # 1 Magic Effect GetActorValue - Conjuration => 25 GetActorValue - Conjuration =< 50 # 2 Magic Effect GetActorValue - Conjuration => 51 GetActorValue - Conjuration =< 75 And so on.... I don't remember them all by heart (and probably it ain't even named like that), but if you search them in the wiki / creationkit.com you will find the one you need for the job. You can also using the same logic create different "perks' which each one will be carrying its own 'Drain Magicka Ability Spell'. * Here you don't need to add conditions to the magic effects leaving inside the ability spell, as the suggestion above. And then in the 'Equip Script' obtain the player's value you want when the weapon gets equipped and add the corresponding Perk that corresponds to the player's value. 2. I use the "Draw" and "Sheate" actor actions to register the magic effect so as to prevent it from happening as long as the player weapon is equipped (but not drawn or in use). The events Event OnEquipped() and OnUnequipped() works exactly the same as registering for animation event 'Draw' and 'Shater'. * This part is a little confusing, I think you were thinking something else and wrote something else.
  5. Simplify your idea's implementation, I haven't looked at your scripts because what you want can be done with a way more easy approach without the need to pull every couple of seconds which makes it system's resource pull heavy. 1) Create an 'Ability' spell and add to it a 'Drain Magica' Magic Effect. 2) Create a 'Perk' and add to it the 'Ability Spell' you created in step '1', in the 'Spell To Apply' drop down menu. Perk Flags = Playable - Hidden NOTE: I think it's called 'Spell To Apply', I'm not sure cause I haven't runned CK for more than a year, more or less... 3) Add to your weapon a simple script to add and remove the 'Drain Magica Perk': Perk Property MyPerk auto Event OnEquipped(Actor akActor) If ( akActor == Game.GetPlayer()) akActor.AddPerk(MyPerk) EndIf EndEvent Event OnUnequipped(Actor akActor) akActor.RemovePerk(MyPerk) EndEvent You are done.
  6. Moving npcs from a holding cell to your 'display' is not a bad approach, but if you are concern about save file size, then except if you are talking about having thousands upon thousands of npcs, we are talking here about a byte size file size increase. Now if you wanna get rid of that byte, you can always spawn the npc > then move the npc away from the player (but in the same cell) to not hear the death sound if you won't be creating a custom hkx file > then run 'SetCriticalStage()' on that npc. For your ghost: There are a couple of ways you can do this, but they require some extend scripting. One way is to utilize the 'Story Manager' (and a quest that will handle the npc) and run an 'OnLocationChange()' event. Event OnLocationChange(Location akOldLoc, Location akNewLoc) https://www.creationkit.com/index.php?title=OnLocationChange_-_Actor Once your location fires the 'Event Node' then in the same script you run a 'GetCurrentGameTime()' function to spawn or not the ghost. https://www.creationkit.com/index.php?title=GetCurrentGameTime_-_Utility Here you have an example about 'Function for Time of Day': https://www.creationkit.com/index.php?title=Function_for_Time_of_Day Trying to figure out how to return things to original never entered the graveyard condition when you leave or daylight comes, whether or not you killed the thing while there. This part is a little confusing, what do you mean by 'return things to original'?
  7. 1) I have no idea what 'frostfall' is, so I can't provide data of how it works. 2) The summon function of the game is 'Hard Coded', so is the summon delete function of the summon. The 'delete actor' function works exactly as the 'SetCriticalStage()' with the only difference that it dosen't care about its equivilant Papyrus function restrictions since it's hard coded, and it will always delete the summoned actor without leaving a trace in the save file and game world. If you explain in simplified details what you are aiming to achieve, someone will be able to provide you with the necessary knowhow. Right now there is no enough data for it.
  8. So if it won't work if you move the npc to a different cell before calling it there is no way to avoid that horrible death sound you get with summoned creatures? - Yes, the function 'SetCriticalStage(int aiStage)' will never fire if both npc and player are NOT in the same cell, it plays no role if you first move the npc to another cell. This also applies for exterior cell (worldspaces), for example: You can call the function while you have visibility of the npc (LOS), but the npc is 3 or more cells away from you, in this case the function again will not fire. - As for the 'death' sound and/or the death animation: You can remove them both or change them if you wish so. In order to do this you need to edit (and create a new one) the actor's hkx file that exists in the actor's race, this file is what the engine uses/reads for a variaty of the actor's ai functions and behaivior. If you also don't want a dead npc on the floor would you need to call delete after critical stage or delete and disable? - DON'T EVER USE THE FUNCTION "DELETE()" ON ACTORS!!! If you call 'delete()' on an actor, then you will be deleting not the actor you spawned, but the 'BASE' actor from the game. If it's not clear, here you have a simpler explanation: Let's say you create a scripted summon spell that does not uses the game's summon mechanics, but instead you place an actor via script. If you call 'delete()' to remove the actor, it will be removed, but next time you cast your scripted summon spell, the expected npc to spawn will never appear again because the 'Base' actor does no longer exists in game. - Also, there is one more thing I forgot to mention before: The function 'SetCriticalStage(int aiStage)' will not fire if you first disable the actor. For things like ghosts would it leave ectoplasm or the like behind? - No, this is done through script. You can take a look at the game's default 'Ghost' abilty spell and the script living inside the 'Ghost Ability' Magic Effect. The script uses the function: Function AttachAshPile(Form akAshPileBase = None) native https://www.creationkit.com/index.php?title=AttachAshPile_-_Actor When this is used the game will automaticaly place a default 'Ash Pile'. I read but didn't really understand the function. If I just wanted to get rid of say a wolf I spawned I could have something like wolf.SetCriticalStage(0) and it would disappear and be removed from my save? - I will be using your example above for the following script, some explanations will be bellow each script. EVENT OnDying(Actor akKiller) Self.SetCriticalStage(3) ENDEVENT EVENT OnDeath(Actor killer) Self.SetCriticalStage(4) ENDEVENT - The script is living in the actor itself, in the 'Base' actor. So, there is no need to define the actor, instead will be using the function 'Self', since the script is living inside the actor. - Here we call and begin the deletion/cleaning process when the actor starts dying, the moment the actor receives the 'Death Blow' while he is still standing = Self.SetCriticalStage(3) - Once the actor has finished the death process, meaning: Falling down, finishing the death animation and completing its 'Death' dialogue, we call the final function that will remove the actor from our game = Self.SetCriticalStage(4) Important Note: In order for the 'cleaning/deleting actor' process to work correctly you need to use the function in this order: SetCriticalStage(3) SetCriticalStage(4) You can call 'SetCriticalStage(4)' imidiatelly and the actor will disapear from game, but you will find it again lying dead somewhere because the 'SetCriticalStage()' never actually started = SetCriticalStage(3) EVENT OnDeath(Actor killer) Self.SetCriticalStage(3) ENDEVENT EVENT OnCellDetach() Self.SetCriticalStage(4) ENDEVENT - Here we start the clening process when the actor finishes the death process, and we finish it once the player moves to anothe cell dettaching the cell from the player where the function was called. * Both scripts are simple just to explain the functions, if you need to use any of them, then they need further scripting so they can be functionable correclty. I hope I was clear enough.
  9. For actors: Function SetCriticalStage(int aiStage) native https://www.creationkit.com/index.php?title=SetCriticalStage_-_Actor NOTE A: This function will not fire if both npc and player are not in the same cell. NOTE B: This function is the only relaible way to delete an actor. For objects: Function Delete() native https://www.creationkit.com/index.php?title=Delete_-_ObjectReference NOTE A: The deletion of the object from memory and from the save file happens much later from when it was triggered in game regardless if you saw the object being deleted when playing. The deletion happens when at least 2+ cells have been loaded and unloaded, but this depends on the size of the loaded/unloaded cells. So, the 2 cells is not an accurate number.
  10. If you want for example to create a dialogue scene where an npc is 'trying' to cast a spell but without actually casting it. Example line: Player: What are you doing? Npc: I'm trying to cast a spell but I can't! Here you can add a fragment to the beggining or the end of the dialogue line the following script line: Debug.SendAnimationEvent(Npc, "CastSpell") Function SendAnimationEvent(ObjectReference arRef, string asEventName) native global https://www.creationkit.com/index.php?title=SendAnimationEvent_-_Debug But since you will be doing this on a quest, then the 'npc' needs to be on an alias, and the line goes like this: Debug.SendAnimationEvent(NpcAlias, "CastSpell") * The name 'CastSpell' is random, I don't actually remember the names. You can see spell casting animation names in the 'Npc Preview Window' (if I remember correctly), or in the tab: Gameplay > Animations > Actors\Character\0_Master.hkx
  11. 1) The animations that exists inside the idle 'drop down menu' are limited to dialogue expressions and the tool has 1 major flaw: a) The dialogue line (audio line) must not be smaller (in time length) than that of the animation assigned to play for that dialogue line. b) The following behavior is closely related and attached to the above: - If you have animations assigned to each dialogue lines in succession, the animation must finish before the dialogue line (audio line) for the next animation to fire correctly. If an animation overlaps another in the 'dialogue animation sequence', the animation that gets overlaped will not play. And according with the length of the animation that overlaps the next, it may even cause the 2 next animations following to not play at all. 2) In order to make an npc to cast a spell (to any target npc) while in or after dialogue with the player or any npc, you need to utilize the 'Scene Creation' tool that is inside the 'Quest Object'. This is done inside a scene with sequences and with 'cast magic' packages that are handled by the quest's scene creation tool. As for preview animations: I've no idea my friend, I've never bother trying to find an animation preview tool. The animation names are pretty straight forwards so that I would also need and a preview.
  12. When you record an npc's response, where you write the subtitles, there is the "Idle Animations", from the drop down menu you can choose which animation will play when the npc's dialogue response in "That" recorded line.
  13. 1) Create your custom weather. 2) Assign your custom weather to your worldspace region you want. * NOTE: If you are going to use 'Regions', then your entire worldspace's cells needs to be assigned to regions. I've notice that: If the above is not true, then the worldspace's weather has some really weird behaiviors, when transitioning from region weather to none region and vice versa. 3) In your worldspace window (property) assigned the flag 'Use Climate Data'. * NOTE 1: The 'regions tool' weather transition is kind of slow, if you need a faster transition, then this needs some scripting. * NOTE 2: All foggy weather regions in the vanilla game are also combine with 'movable statics', the weather system all by itself is insufficient to achieve a nice and realistic or even a dark atmosphere.
  14. You will either: 1) Add a script directly to the actor itself 2) Create an 'Ability' spell which will hold the script. What's the difference?: By doing #1 you have to do the same proccess everytime you want this to be appied to an npc, while with the 'Ability' you make it only one time and then you just drag it into the actor's spells inventory. For #1: Explosion Property Explo01 Auto EVENT OnDeath(Actor akKiller) Self.PlaceAtMe(Explo01) ENDEVENT For #2 you can use the above or: Explosion Property Explo01 Auto Actor SelfRef EVENT OnEffectStart(Actor akTarget, Actor akCaster) SelfRef = akTarget ENDEVENT EVENT OnEffectFinish(Actor akTarget, Actor akCaster) SelfRef.PlaceAtMe(Explo01) ENDEVENT
  15. No, the engine does not support such application. I personally have tried to manipulate the 'text' dialogue for such application using all kinds of approaches, but none worked....
  16. OnCellAttach() - OnLoad() - OnSpellCast() - OnActivate() - OnEffectStart() - OnMagicEffectApply() All of the above work just fine, the only issue is how and where they will be implemented.
  17. This is because the Papyrus event react only to actors: OnEffectStart(Actor akTarget, Actor akCaster)
  18. - All the 'Investor' perk merchants are handled by the quest = PerkInvestor - Inside this quest are all the merchants dialogue concerning the 'Investment' dialogue. - The branch of the dialogue contains a dialogue and respond for each of the merchant in the game. - When one of this dialogues is triggered (by investing), at the end of the dialogue line a script fragment will change the 'Global Variable' conserning THAT merchant. - Now, every time you speak to a merchant, the quest handeling its dialogue has 2 respons, 1 normal and one for the 'Investor' perk. Both dialogue lines check and fire according to how the 'Global Variable' is set. Go to the Miscellaneous > Global in CK and type "Investor", you will now see all the global variables for each merchant in game, this is what the game uses to obtain the info you are searching.
  19. I was too tired yesterday and I was confusing games and forgetting things. So, I'll write this again in a proper order to not confuse you and others that may need this. 1) Create a Magic Effect with archetype = script and add to it this script: * Don't forget to fill in the script's properties with the explosions you desire. 2) Create an 'Enchantment' and add to it the MagicEffect you created in step '1' 3) Find and duplicate an 'Explosion' to your likings (give it a unique ID). * if I remember correctly there is an empty explosion in CK that serves for applications like this one. * By 'Empty' I mean: An exlosion that dosen't have any visuals or FXs, it's just an empty FX used to deliver to the spell's target things like this (the script). 4) Add to your explosion the enchantment you created in step '2'. 5) In your Main Spell's MagicEffect add a projectile to your likings and the explosion you created in step '3'. Now, go in game and spread some mayhem.
  20. EDIT: Scratch this post, I'm too tiered and I'm confusing games. Ok, I undersatnd, but I'm about to hit the bed now.
  21. "I wonder if it's possible to use scripts to make the separate magic effects play at the same time." No, you can't, you can only play one Effect Shader at a time. If you use a script to play 3 different shaders, then one will overwritte the other leaving the last one active. It's either a frost, a fire or a shock shader. VisualEffect on the other hand, you can apply more than one, but it depends on the VisualEffects that will be working together. "For example, to make a spell launch 3 projectiles - a firebolt, an ice spike, a shock orb - launch at once" You can create a projectile that will include all 3 of them, but this is done outside CK, one way is through NifSkope, or create it in a programm like 3dMax. But, the hit shader will always be only one, since you can apply only one through the CK's default Magic Effect tool. As for using a script for this, it can't be done in an easy way, it needs too much scripting because using the function 'Cast', you can't target the actor, it will always cast it in '0' axes in front of the actor. "Or to make a spell with 3 stacked explosions, fire, frost & shock. All at once." You need a script for this: 1) Create a spell with a projectile of type 'Fire And Forget' 2) Create an enchantment - Archtype = Script - Add this script to the Enchantment's magic effect: 3) In your spell's projectile add the Enchantment you created in step '2' "I know that there are vanilla scripts that allow stacking additional hit shaders" This is a combination of EffectShader with VisualEffect. "as well as adding cast & target point effects" I don't understand what you are trying to say here.
  22. Typo on > GoToState("SEQ01") Spell Property MySummonSpell01 Auto Bool Property isCasted = False Auto Hidden AUTO STATE SEQ01 EVENT OnCombatStateChanged(Actor akTarget, int aeCombatState) If (aeCombatState == 1) If ( isCasted == False ) isCasted = True MySummonSpell01.Cast(Self, Self) GoToState("SEQ02") EndIf EndIf ENDEVENT ENDSTATE STATE SEQ02 EVENT OnCombatStateChanged(Actor akTarget, int aeCombatState) If (aeCombatState == 0) isCasted = False GoToState("SEQ01") EndIf ENDEVENT ENDSTATE
  23. I misunderstood your initial post, I thought you were aiming for a fully working vampire lord combat scene. So, that's why I made the post I made. But, for what you actually wanted, the function 'StartCombat()' would have done the trick.
  24. You can just use the Harkon Magic as it is, actually duplicate it and give it a unique ID, that actor will float and use magic attacks when the opponent gets to 3 meters distance of him, but he will not use melee attacks, and when he lands he can't counter attack when he gets hit from 3 meters+.
  25. Except from the vanilla game Harkon boss fight and my own mod, I personally have never seen this done before in any mod I've played the last 12 years. And this is because the DLC1 vampire lord assets are completely broken, they are from the worst created assets by Bethesda, so in order to do the: - Transform to Vampire Lord > Vampire Lord Melee combat style > To Vampire Lord magic combat style (floating), and vise versa. 1) Except that you need 3 actors 2) You have to do this inside a controlled combat scene, because you can't change combat style on the vamipre lord on the fly using the same actor, it just won't work!! This means that this requires a specific setup that you will end up with more than 1 script containing, as with my circumstance, thousands of lines!!! To get an idea of how this 'change combat style' is done on the vampire lord, take a look at how Bethesda coded the whole thing. And you need to take in account that 'that' specific vanilla combat scene despite the coding, is completely bugged!!!! Even here they F***** Up everything!! Script name = DLC1dunHarkonBatTeleport This is the part where the change combat style is done, by actually changing actors and transfering their 'actor values'. This is the entire vanilla script handeling the actor: And this is the vanilla combat script inside the quest responsible for everything: And here is my approach to change combat style / change actors which is done in my mod, I'm only posting the function that swamp actors, and not the whole script: * The obtain 'actor's AV' and store it, is done by another function not living inside this one. Here is a 'fixed' function that serves as a 'Fail Safe' inside the script, just in case something went wrong with the player's playthrough this will fire instead of the more demanding function. I won't post my 2 main scripts because they reach 1375 lines. Plus the way I created this entire combat scene to ensure stability and a bug free scene, I ended up with 7 scripts just for the combat scene. Just a friendly advice: Save yourself some migraines, and leave this alone. Trust me on this, during the 6 years of my mod's development, I've tried every single possible approach... This here isn't the case of a simple function or line like the 'IsCommandedActor()', or a simple adjustment that you'll change something somewhere and it will work.
×
×
  • Create New...