-
Posts
524 -
Joined
-
Last visited
-
Days Won
1
Everything posted by xkkmEl
-
How to use weapons as ObjectRefence in papyrus?
xkkmEl replied to dearmisaka's topic in Skyrim's Creation Kit and Modders
I never tried it, but you should be able to just call "myWeaponRef.SetEnchantment( myEnchantment, 1600.0)" from a papyrus script. There is a similar function on the Weapon form, but as you say, that would change all instances of the weapon type. Calling it on the reference will not have that effect. Note that if the weapon is in a container or carried by an actor, you can't access the object reference directly; move the item out into the open world first (using DropObject, for example). -
Not my favorites, but inago777 has a lot of good no-esp visual replacers. Kalilies are (imho) better ones, but with less coverage. I don't see these are dollificators... though you should feel free to disagree.
-
Casting ObjectReference to ReferenceAlias
xkkmEl replied to Sirgallyhave's topic in Skyrim's Creation Kit and Modders
You might use a faction to record each actor's index in your list of aliases. Assuming you don't have more than 128 such aliases, you might simply do: Faction Property MyAliasIndexFaction function setReferenceAlias( int index, Actor npc) (getAlias( index) as ReferenceAlias).forceRefTo( npc) npc.setFactionRank( MyAliasIndexFaction, index) endfunction ReferenceAlias function getReferenceAlias( Actor npc) return getAlias( npc.getFactionRank( MyAliasIndexFaction)) as ReferenceAlias endfunction function clearReferenceAlias( int index) ReferenceAlias ra = getAlias( index) as ReferenceAlias ra.getActorReference().removeFromFaction( MyAliasIndexFaction) ra.clear() endfunction -
SSE Basic Keyword Question
xkkmEl replied to Radioactivelad's topic in Skyrim's Creation Kit and Modders
To change what foods a vendor sells, heed Ishara's advice. Look into Leveled Items. If you look closely at the game database with CK or xEdit, you will see that is how the merchant selling chests are populated; this is also how you'll know which leveled items to change if you want to add/remove food items from specific merchants. Keywords are useful to trigger other features of the food item, like whether it is a poison, who will buy it, etc. Keywords are also easy to test using the condition system. They play no part in determining what is sold by merchants, however. -
In your screen capture, I can see the cursor at the end of the 1st line. From there, hit return and paste it there starting on the 2nd line of the file. It needs to be after the header line (starting with "Scriptname"), and with the lines divided as I showed you. The end of lines are part of the syntax, so make sure you reproduce them as I showed. You can otherwise pretty much use any technique to cut&paste or retype what I gave. It's just basic text. In any case, the worst that can happen is that the compiler will complain. If that happens just report the complaint and show us what your script file content looks like. It is likely you have not prepared your game install for compiling; don't be surprise if the compiler does complain. It'll be a simple matter to fix.
-
I recommend you not touch existing scripts. Create a new one instead. In the CK, in the "Gameplay" menu, launch the "Papyrus Script Manager". After a few seconds, a long list of script filenames will appear. Right click on any of them, choose "New..."; pick a name for your new script file; write "Quest" in the "Extends" box. Press OK. Close the "Papyrus Script Manager" window and open it again. Find your new file and double click on it. A text editor window will appear. The CK already generated the header line. Paste the OnInit() event declaration after that. Save and close the text editor. In the "Papyrus Script Manager", right click on your file and pick "Compile" (with your fingers crossed). Now, finally, go back to your quest, in the "quest script tab", click "Add" and select your new script. In a clean glass, put two ice cubes and an inch of 15y-old scotch. Chug it back, add another inch, and repeat.
-
Almost forgot the matter of the script! Have the setObjectiveDisplayed line called the on OnInit event handler attached in the "quest script tab", like so: event OnInit() if running() setObjectiveDisplayed( 0, True) endif endevent There are other methods... I'm only suggesting this one for its simplicity.
-
Looks good! Excellent. I note that the quest does not start automatically, and the alias does not fill automatically when the quest starts. It looks like it is setup to be started by a script. Hopefully you have that covered (i.e. you understand if/when it starts); testing will be difficult otherwise . I guess something starts the quest... your objective should be visible in the journal at that point.... and something else selects a horse to put in the alias... the map marker won't appear until then. If this behavior is acceptable to get started, you should test it. The "sqv <quest-ck-id>" command is most useful. If this behavior is not what you are aiming for, and you want for example the horses to have a marker from the getgo, you may need to make a new quest instead of modifying these quests.
-
I suppose that if it was working you wouldn't be asking Let's focus on one quest at a time. Pick anyone, and show me: the quest data tab the horse alias window, under the quest alias tab the quest objectives tab Once we have those right, we can take a look at your script, and I'll suggest a testing method. ... if that's ok with you. I'm not sure how experienced you are with these features and how sure or unsure you are of your setup, so I may be asking more than necessary...
-
Double check the branch type. You may have accidentally made it an exclusive or blocking branch.
- 2 replies
-
- 1
-
-
- Dialogue
- No Dialogue Options
-
(and 1 more)
Tagged with:
-
Nah... the markers are part of the "objectives tab" in the CK. The quest flag just makes it so the player cannot drop the reference/object out of his inventory. Not really relevant for horses. I see you have a number of single horse quests. You'll want to see their type in the "quest data tab", and set it to something other than "none", most likely to "miscellaneous" (otherwise the objectives won't show). Create an objective in each of those quests, and reference the horse alias in that objective. Also, you'll need a small script to call "myquest.setObjectiveDisplayed( 0, True)" when the quest starts and the horse alias is filled. To put a map marker, you do need the quest, the alias, the objective and the script. The only alternative afaik is to use mapmarker objects, but those are static and won't follow the horses.
-
Quest objectives is what you are looking for. Typically, you'd create a quest with a bunch of aliases (for your horses), of type "Miscellaneous", with a single objective which you link to all the aliases. This way, your objective appears in the "misc" section of your journal, and you can toggle the markers on and off. The challenge that remains is filling the aliases. Hopefully you are dealing with a static/fixed list of horses and you can use "Specific reference" aliases and initialize them directly. It is also possible to fill the aliases dynamically, but that's more involved and we'd need more details on how the horses are setup (I haven't used CC's Wild Horses).
-
Still looks to me like you are piling on a lot of different, and probably conflicting, effect shaders. Unfortunately the effect names shown in your screen capture are ambiguous (they could hide a number of distinct magic effects with the same name). You should probably replace all the magic effects with custom versions, removing shaders that conflict. Try removing all shaders and then adding the ones you want just in the right place, one at a time. As a simple test, you might want to remove the other effects from your spiced wine, just to see if the flame cloak effects work without the competition.
-
what event call when npc switching cell?
xkkmEl replied to pxd730615's topic in Skyrim's Creation Kit and Modders
OnCellDetach does not fire when you walk from cell to cell. It does fire when you fast travel (there's a subtle technical detail I'm leaving out). GetInSameCell does detect cell changes when you walk from cell to cell. It does not always detect when you fast travel. The method I pointed to combines them to make a reliable solution, and silently takes care of the technical detail. -
what event call when npc switching cell?
xkkmEl replied to pxd730615's topic in Skyrim's Creation Kit and Modders
The method uses a marker to note where the player was, and a magic effect with a condition (getInSameCell) to detect when the player has moved to another cell. The OnCellDetach event only works as a failsafe in case the condition on the magic effect fails to trigger. There are circumstances where the marker will detach before the magic effect sees it, and the getInSameCell condition is not reliable when that happens. Let me know privately if french or spanish would make it easier. -
what event call when npc switching cell?
xkkmEl replied to pxd730615's topic in Skyrim's Creation Kit and Modders
You may want to try this method: https://ck.uesp.net/wiki/Detect_Player_Cell_Change_(Without_Polling) -
NPC stuck in animation loop on marker
xkkmEl replied to glittertind's topic in Skyrim's Creation Kit and Modders
If you are expecting the AI package to stop because of some condition changes, that won't happen. Package conditions are only evaluated when the currently executing procedure finishes or becomes invalid, or when the currently running package is removed from the stack, or a new one pushed on the stack. Try using a custom package with useIdleMarker and wait procedures on simultaneous branches. Or use a scene with a timer to place the useIdleMarker package temporarily. Calling evaluatePackage on the NPC can also help. If this is not sufficient, try sending a "ForceIdleDefaultState" animation event to force the dance to abort (after having removed or rendered invalid the useIdleMarker AI procedure). -
From the quotes you provided, it is difficult to tell exactly what to test for. Papyrus isDead and the corresponding condition will tell you if the NPC died and has not been revived. Being dead is separate from disabled or deleted. Dead actors are ignored by the alias fill procedure, unless you flag allow-dead. Dead actors are still around... as a corpse. Papyrus isDisabled and the corresponding condition will tell you if he is disabled (without 3D and flagged for everyone to ignore it). Being disabled is separate from dead or deleted. Disabled references are ignored by the alias fill procedure, unless you flag allow-disabled. They are still in memory though not visible in the 3D world, and can easiy be re-enabled. Papyrus isDeleted (no corresponding condition) will tell you if the referenced is marked for deletion. Deleted references are always ignored by the alias fill procedure, though they can still be visible in game and continue to behave normally. They will disappear automatically once no quest or script references them. After that, there is no way to refer to it... if it is a created reference. If the reference is part of an esm or esp, it may still reappear when the cell they were created in respawns/resets. Any or all three of these conditions may apply. Though your quote says "deleted", I would not bank on that too heavily. You should experiment and figure out exactly what happens to know what to test for. I'll add another potential test: checking the stage on the quest that handles his deletion... though that requires tracing where and when it happens (I did not immediately find where it occurs).
-
Well, the game does keep "special" references intact when they move in/out/through inventory. However, event handling is compromised in some ways for anything not in a loaded cell. Being in the inventory of a reference that is in a loaded cell does not appear to count for "in a loaded cell" as far as events go. I think some events do work as long as the ref is in ram... I just don't have the details of which need the attached cell and which don't. There are also events that depend on the object being in contact with the nav mesh... or be 3dloaded... it's confusing mess