Surilindur Posted January 26, 2017 Share Posted January 26, 2017 To display a message instead of using a messagebox, you can use the Message command: MessageBox "This is a messageBox" Message "This is a Message"The function list in the Construction Set wiki is handy when looking for scripting commands. Both Message and MessageBox are listed there. As for the other questions:Yes, it is possible. To change the text - as in, the effect name of the magic effect on your spell, which happens to be script effect - you can use OBSE. I cannot remember which command it was, but maybe something like SetNthEffectItemName would work (more in the OBSE Command Documentation). Yes, it can be changed. To change the spell icon, you could use CustomSpellIcons (an OBSE plugin and more, requires OBSE). I cannot remember the command name, but it is very easy to change the icon with CustomSpellIcons. Yes, you can have an NPC equip everything in their inventory. It only takes about three lines of script with OBSE.With OBSE, the limit of what can be done is moving closer and closer to the sky. It also makes scripting, in general, a lot more straightforward. If you do not want to use OBSE, you could try equipping the items one by one with the EquipItem command, but that is a very clumsy way of going about doing it (in my opinion). If you do not want to use OBSE, you cannot change the effect name as far as I know, and you cannot change the spell Icon, either. You can equip an item, but it will have to be "hardcoded" for every item separately. But if you want to use OBSE in a reasonable manner, you will need to learn how to use it. It makes scripting very easy, but there is a learning curve, I think. Programming background helps, though (something I did not have when I started modding, so it made learning a bit slower). For reference, with OBSE, you can define your own custom functions (object script) and call them on an actor. For example a function to equip items of a specific type in a potentially unordered fashion: scriptname EquipItemsByType short Type array_var a begin _Function { Type } ; the thing below should work with compiler override applied (underscore before block name) ; since similar things do work, but I have not tested that specific one so it might have ; an issue or two - the fix would be to add in a "ref" variable for storing a["value"] in ; which should fix any issues - however that would mean one additional variable foreach a <- ( GetItems Type ) if eval !( GetEquipped a["value"] ) EquipItemSilent a["value"] endif loop endAnd it could be called like: SomeActorRef.call EquipItemsByType 20 ; armour SomeActorRef.call EquipItemsByType 22 ; clothing SomeActorRef.call EquipItemsByType 33 ; weapon SomeActorRef.call EquipItemsByType 33 ; ammoBut that is just an idea for what a function could look like. The main point is the underscore before the script block name to allow the use of more reasonable expressions, so adding the underscore to the spell effect start block would make it possible to move the equip things there and save one script. With OBSE, you could even build a system to dynamically fetch the summon target based on spell name and a StringMap in a maintenance quest. OBSE is great. However it can also take a bit more learning. Hopefully that helps a bit. Again, if someone knows of a great tutorial for scripting with OBSE (and scripting in general), then that would be great. Is the issue in the video the one with spell names and icons? Or is it something else? Link to comment Share on other sites More sharing options...
bomo99 Posted January 26, 2017 Author Share Posted January 26, 2017 no the problem is that i can use 3 summons and 3 npcs show up but i want to these spell to act like a summon(i dont reall care if i can use vanilla summons with these) thats why i think an if statement would work in this problem likeif Player has summoned Dremore and wants to summon Draxe then dremore return to the xmarker and draxe appearsbut i wonder where in the code to place this if statement Link to comment Share on other sites More sharing options...
Surilindur Posted January 26, 2017 Share Posted January 26, 2017 (edited) Ah, hmm. Well. There could be two options:Have several spells, one for each summonable actor. When casting one summon spell, it would dispell all other summon spells (this should get rid of the actor as well). Have one single spell with a menu for selecting the actor to summon.Would the menu option be reasonable, or do the spells need to be separate spells? Edited January 26, 2017 by Contrathetix Link to comment Share on other sites More sharing options...
bomo99 Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) id like them to be separatedo i need to use obse for the spell effect desc and icon to change or is there a way to do it in CS Edited January 26, 2017 by bomo99 Link to comment Share on other sites More sharing options...
Surilindur Posted January 26, 2017 Share Posted January 26, 2017 I do not know if there is a way to do it in the Construction Set, someone else would need to answer that. :blush: If you do not want to use OBSE, you could add dispel statements to the spell effect script. For example if you have three spells: SpellA, SpellB and SpellC, you could try adding to SpellA, commands to dispel SpellB and SpellC, for example. begin ScriptEffectStart ; the one in spell A script Dispel SpellB ; dispel spell B Dispel SpellC ; dispel spell C <the rest of the ScriptEffectStart block here> endIt could help dispel other summons before continuing with the new one. But that is just an idea. I am not sure if Dispel is safe to use if the spell to be dispelled is not currently applied to the actor, but I suppose it is. If someone else knows of a clever workaround for the dispel method, then that would be great. That one is the best I could think of at the moment with base game scripting... :confused: Link to comment Share on other sites More sharing options...
bomo99 Posted January 27, 2017 Author Share Posted January 27, 2017 (edited) now i ran into a problem i wanted to test out a new set of armor i put in my mod and this happened when i fast traveled to memorial Cave if you need more context all my summons followed me to memorial cave after i fast traveled if you need to see what happens let me know i will make a video to show what happened. if anybody wants to take a look here is a link to he omod https://drive.google.com/file/d/0B0b7QFTyv89_aUlNaHRGYkQ3cGc/view?usp=sharing Edited January 27, 2017 by bomo99 Link to comment Share on other sites More sharing options...
Surilindur Posted January 27, 2017 Share Posted January 27, 2017 When the summon ends, the actor(s) should be moved to a holding cell and disabled. If the issue is your summonings appearing even when the spell is not active, you should make sure they are disabled after the summon ends and they are moved to the holding cell. I would guess the actors are not being disabled properly somehow and that is why they appear like that. You could also make sure the summonable actor references are marked "initially disabled" so that they would start disabled. Maybe. Of course it could be something completely different that is causing the issue. That is another part of modding: figuring out why something does not work as intended, and learning something new in the process. :) Link to comment Share on other sites More sharing options...
bomo99 Posted January 27, 2017 Author Share Posted January 27, 2017 i fixed the issue i clicked on all of them "initially disabled" and voila fixed, my first thought of why it did this was the actor package that they all had Followplayer. Link to comment Share on other sites More sharing options...
Surilindur Posted January 27, 2017 Share Posted January 27, 2017 Great! And yes, the package is to blame, especially if the actors have low level processing enabled (I think). Something must be updating their status based on the package and somehow moving them all to their target (player). Disabling the actors prevents them from doing anything funny when they are not needed. Sounds like your project is getting closer to finished all the time. :thumbsup: Link to comment Share on other sites More sharing options...
bomo99 Posted January 27, 2017 Author Share Posted January 27, 2017 ya until i decide to do something else with it Link to comment Share on other sites More sharing options...
Recommended Posts