Surilindur Posted January 24, 2017 Share Posted January 24, 2017 Ooops, my bad. HasSpell is an OBSE function, apparently (I always use OBSE so I did not even think about it). :blush: Removing the check could be enough, it should not matter. scriptname DMRSpellBookScript begin OnEquip PlayerRef PlayerRef.AddSpell DMRChest endThe issue with the NPC not following... is the follow package the only one on the actor? Does the package have any conditions on it that would disqualify it when the NPC is finding a new package to run from the list it has? Each actor has a list of packages on it, and when an actor is looking for a new package to run, it picks the first one possible (determined by the conditions on the AI package itself) with the highest priority (the packages in the list have an order). Each package has, in addition to conditions, a type, a target, a location and all that. I am not really all that good with AI packages, but I have noticed that it sometimes takes quite a bit of testing to get the correct type of outcome from a package. Maybe someone with more knowledge on AI packages can help you with that. The first thing to check would be that your actor only has one package (the follow package) since it is supposed to always follow player, and that the follow package does not contain any conditions that would prevent if from running under some circumstances. And a tip: you can use the EvaluatePackage command both in your scripts and the console if you need to have an actor immediately re-assess its AI package list and select the currently best package. In the console, you can select the NPC and use: evpIn scripts, you could use: SomeActorRef.EvaluatePackageAlthough an actor usually should automatically pick a package, I think, without too much delay. You can try removing all the other packages from the actor, only leaving the follow package, and then use "evp" on it in-game and see what happens. Oh and in case you have not yet found it, there is this wiki page that is handy when scripting (if you just need to see what is available): http://cs.elderscrolls.com/index.php?title=List_of_Functions Hopefully that helps a bit. :thumbsup: Link to comment Share on other sites More sharing options...
bomo99 Posted January 24, 2017 Author Share Posted January 24, 2017 (edited) these are the packages i have on him in orderaaaCreatureExterior1500AllowFallsaaaCreatureInterior512AllowFallsFollowPlayeri got rid of the first 2 and kept follow player and it worksnow i have found an issue if you resummon the Dremore before the timer runs out the will reset but dremore can no longer be summoned and i was wonder is it is possible to remove all dialogue from the npc except combat dialogue Edited January 24, 2017 by bomo99 Link to comment Share on other sites More sharing options...
Surilindur Posted January 24, 2017 Share Posted January 24, 2017 (edited) You could, in theory, try something like:make a new quest to that quest, add new dialogue that specifically requires the actor (GetIsID) to be your Dremora set the priority to something higher than all the other quests that control dialogue maybe use "AddTopic <TopicID>" to add the new topics in case they are not there at firstSomething like that should force an actor to always use the custom dialogue, I think. If I remember correctly. As for why the summon fails: I cannot test it at the moment, too much other things to do. I will only be booting up my desktop in the weekend again. Hopefully someone else can help you with that. But does it work as intended when summoning the Dremora again after the spell has ended (and the Dremora vanished)? So that the issue is only when casting the spell before the timer runs out? Edit: As in, you probably want to add a new GREETING (yes, it is in caps right there in the game files, see for yourself :P) line for your Dremora specifically (GetIsID) with the "Goodbye" tickbox checked, so that when the topic has been said, the actor will exit dialogue. Edited January 24, 2017 by Contrathetix Link to comment Share on other sites More sharing options...
bomo99 Posted January 24, 2017 Author Share Posted January 24, 2017 when you let the timer go out (mind you i set to 3 secs to test this) it works fine, can still summon himand how am i suppose to do the dialogue thing still new at this and i tried deleting the dialogue that is not going to be used and i am also trying to make so the player cant issue a conversation with the summon just like an other summon Link to comment Share on other sites More sharing options...
Surilindur Posted January 24, 2017 Share Posted January 24, 2017 To prevent conversation you could try adding an empty OnActivate block in the script for the Dremora. That one might also fix all your dialogue issues: begin OnActivate ; either nothing here or just a "return" if it requires something to be here endAlmost all dialogue in the game, as far as I know, is tied to a quest. As in, a quest "owns" topics, so to say. That is why a new quest with high priority would be handy, because you would not need to touch any existing quests or dialogue. I do not have the time to explain now, but there should be something in the wiki, for example on this page: http://cs.elderscrolls.com/index.php?title=Category:Dialogue. Also see how the dialogue things that already exist in the game have been made (for example the dialogue for some miscellaneous quest you remember well to be able to track how the progression of dialogue has been implemented under the hood). Test things out. It is the best way to learn. Quests are also something you might want to look at if working with dialogue. Actually, you will run into quests with quite a lot of things. And as a general tip, when making a mod, you should generally try to change as little existing things as possible, to maintain compatibility. Altering existing dialogue could potentially affect anything else that uses the same dialogue, so it is a very likely source of incompatibilities with both other mods and the base game itself (like accidentally breaking something). The way I learned how to mod was by playing around in the Construction Set and seeing what worked and how. If someone knows of a good tutorial somewhere, then hopefully they will link you to it. The wiki also has some tutorials I think. Right now I need to start working on my assignments or else I will be very very busy tomorrow. Link to comment Share on other sites More sharing options...
bomo99 Posted January 24, 2017 Author Share Posted January 24, 2017 (edited) now the summon cant issue a conversation, thanks(in a Good Way) for the code although the following needs work because the npc does follow the player as soon as he's summonedand still having the "resummon the Dremore before the timer runs out the will reset but dremore can no longer be summoned" Problem Edited January 24, 2017 by bomo99 Link to comment Share on other sites More sharing options...
bomo99 Posted January 25, 2017 Author Share Posted January 25, 2017 As you can see the summon doesnt follow the player at first unless you summon it in combat or change cells then it follows the playerand if you summon after the you summon him initially or just "reset the timer" you cant summon him again Link to comment Share on other sites More sharing options...
Surilindur Posted January 25, 2017 Share Posted January 25, 2017 (edited) Ah. Hmm. I see. I still cannot test anything myself before the weekend (so much real life things to do). Thank you for the video, though, it was useful. Judging by the video, it looks like the summon is actually killed as soon as it is "spawned" a second time, so it could be something related to the old effect ending, the actor script, and the new effect starting. Maybe adjusting the spell and actor scripts would do. Again I have not tested this, because I do not have the time before the weekend (I only have the time to boot up my gaming PC in the weekends now). An alternative spell script idea: scriptname YourSpellEffectScript begin ScriptEffectStart if ( YourDremoraRef.GetDisabled ) YourDremoraRef.Enable endif if ( YourDremoraRef.GetDead ) YourDremoraRef.Resurrect 0 endif YourDremoraRef.ResetHealth YourDremoraRef.MoveTo PlayerRef YourDremoraRef.PlayMagicEffectVisuals DZRE 2.0 ; <-- REMEMBER EFFECT DURATION IN SECONDS! MessageBox "Summoning the Dremora" end begin ScriptEffectFinish YourDremoraRef.DispelAllSpells ; <-- this one might not be necessary? YourDremoraRef.MoveTo SomeXMarkerInYourHoldingCell YourDremoraRef.Disable MessageBox "Dremora moved away" end begin ScriptEffectUpdate ; this one might have issues, although it should work I think if ( YourDremoraRef.GetDead ) Dispel <editor-ID-of-this-spell> ; <-- should also run the finish block or else this will not work? endif endAnd an alternative actor script idea (with just this in it - to prevent activation): scriptname YouDremoraActorScript begin OnActivate endMaybe something like that should work better. Again, I have not tested it, I do not have the time to do it at the moment. If there is an issue somewhere, you could also try tracking it down yourself. It is one great way to learn scripting. :thumbsup: Edited January 25, 2017 by Contrathetix Link to comment Share on other sites More sharing options...
bomo99 Posted January 25, 2017 Author Share Posted January 25, 2017 (edited) from the first codeScript ErrorScript 'DMRSummonDremore', line 12:Item 'DZRE' not found for parameter Magic Effect.Compiled script not saved!fixed the problem changed DZRE to ZDRE and it worked going to test the scripts nowyay the summon works and if you resummon before the duration ends he reappears just as a normal summoni like the idea of MessageBox but i want to know if i can use the one that appear at the left top corner if you dont mind3 small questions1. is it possible to change the text of the spell to anything but saying script effect for 60sec or whatever it says.2. is it possible to change the spell icon.3. is it possible to get a npc to wear everything in their inv? i have a cape in the Dremore npc in cs its biped object is tail but when dremore is summoned he doesnt equip it Edited January 25, 2017 by bomo99 Link to comment Share on other sites More sharing options...
bomo99 Posted January 26, 2017 Author Share Posted January 26, 2017 i have a little problem which i know can be fixed by an if statement but i dont know where to put/dont know what to put Link to comment Share on other sites More sharing options...
Recommended Posts