-
Posts
682 -
Joined
-
Last visited
Everything posted by kingtitan
-
I hope that I have a rather easy question, but I have no idea if it is easy or not! I am trying to write up a script that makes an NPC travel to a certain reference, and then upon arriving at their destination, the NPC is scripted to picking an idle. I have the first part down pat by using something simple like this: elseif choice == 2 removescriptpackage addscriptpackage ATBookingFront This is just a snippet of my code, as it is used in a rather lengthy command spell. I assumed this wouldn't work (It didn't), but this is what I wrote out after for my initial test: elseif choice == 2 removescriptpackage addscriptpackage ATBookingFront if GetIsCurrentPackage ATBookingFront == 0 removescriptpackage set ATIdleAnim to 6 pickidle playgroup idle 1 set ATIdleAnim to 0 endif My ultimate question is what kind of function should I use in the "if" statement to make the NPC play the specific idle after the travel package has been completed? I'm also a bit fuzzy on the dynamics of calling an idle for an actor to play. If someone could help me out with that as well I would be even more grateful!
-
Is there new attacking npcs with hearthfire?
kingtitan replied to Deleted4126025User's topic in Skyrim's Skyrim LE
I've had yet to find anything like that in Hearthfire as it is predominantly devoted simply to building your own house. -
Suggest a mod to help a problem please?
kingtitan replied to Christian0oo's topic in Oblivion's Classic Discussion
Do Neph's suggestion first. If that doesn't present any issues I suggest using these three in conjunction as they will drastically reduce if not eliminate those issues: http://oblivion.nexusmods.com/mods/15802 http://oblivion.nexusmods.com/mods/42414 http://oblivion.nexusmods.com/mods/19738 Install them in the order that I posted them for best results. -
If anyone can do it, it would be you Neph! Sending the files now.
-
To be honest, I'm really not sure what needs to be done to it. I got the "original" files from Trawlol (he used a fairly heavily modified version of it it in his Corinthian Pitfighter mod). Anyway, here is what he told me:
-
This should be a very small and easy request for someone who knows how to work Blender (or another similar program) proficiently, or at least better than I myself do! I have a female lower body mesh that needs to be tweaked and then exported to be Oblivion ready. I have four different file formats of this mesh, so I can provide you with whatever format that will work best for you. Also, I can provide you with the Upper body, hand, and foot mesh to go along with it so that seams are eliminated on export. I would greatly appreciate it if someone could do me this favor and kudos are in store for anyone willing to help me out! Also, here is the link to the file: http://www.mediafire.com/?4vuer3eaede9bfa All 4 of the lowerbody formats are included in a zip file within the archive, should be easy to find!
-
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Ahh, my apologies! I should have realized that it should be left ambiguous! Anyway here is the current code: Scn ATPrisonerCollarScript ref self ref wearer Begin GameMode Set self To GetContainer if ( wearer != 0 && wearer != self ) ; container changed and still has reference to previous wearer wearer.SetFactionRank ATPrisonerFaction, -1 set wearer to 0 ; delete reference to previous wearer endif if ( self.IsActor == 0 ) ; item got dropped, previous wearer got removed from faction by previous check in this case, too Return endif set wearer to self ; store reference to current wearer if ( self.GetEquipped ATPrisonerCollar ) self.SetFactionRank ATPrisonerFaction, 0 else self.SetFactionRank ATPrisonerFaction, -1 endif End Begin OnEquip set self to GetContainer if self.GetIsReference Player Message "You are now a prisoner of Carcernus", 5 endif End However it is now "paired" with this scripted spell that I wrote up from scratch (great time to practice what I've learned so far eh?) Scn ATcollarprisonerspell short collarCount Begin ScriptEffectStart if IsActor == 1 && GetItemCount ATPrisonerCollar == 0 additem ATPrisonerCollar 1 equipitem2 ATPrisonerCollar message "This individual is now a prisoner of Carcernus", 5 elseif IsActor == 1 && GetItemCount ATPrisonerCollar >= 1 set collarCount to GetItemCount ATPrisonerCollar unequipitem ATPrisonerCollar removeitem ATPrisonerCollar collarCount setfactionrank ATPrisonerFaction, -1 message "This individual is no longer a prisoner of Carcernus", 5 endif End These two work together really well, and in my opinion are a much better way of instituting the collar anyway instead of using an outside mod spell. However, if there is a better suggestion, by all means I would love to hear it! -
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Here is the Active Inventory script, if that helps anything: For now though, I think I am going to just write up a simple spell that adds and equips a collar on the NPC that it is cast upon. -
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Well, I have a couple of interesting things to report. But first off the up to date code: I did a bit of editing, for some reason one of the newer scripts was giving me strange behavior (the player would sometimes be in the faction and sometimes not). But I did have some interesting finds. First off, just to test the actual validity of the script's logic, I added the collar to an NPC via console commands - the traditional additem ref 1 and equipitem2 ref 1. I highlighted that console command because it is an OBSE command (as I'm sure you are well aware) so that I could bypass the traditional equipitem behavior. As it is no surprise, the message fired correctly and the NPC was placed into the faction. Would it be good to post the code from the Active Inventory spell so that we can write this code in conjunction with it? -
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
The only flaw with that script though is the fact that the message does not go away after a certain period of time (assuming the collar is still equipped). A couple of the doOnce variables were left in the other script, so I finished cleaning it up and updated it to this: As far as I can tell, the script is evaluating the code to say that as long as the "self.GetEquipped" condition is true, the message should not terminate. I have a couple of questions though: Could we use another block entirely within the same script (not using GameMode) that uses the other established variables (self and wearer) to send the message? Maybe something like Begin OnEquip if self != player Message "NPC has been added to the faction", 5 elseif self == player Message "You have been added to the faction", 5 endif End which I could simply put below the GameMode block. What would be the estimated behaviour for this? Edit: I tested this added block of script and have at least some good news to report. The message appeared and disappeared in the five seconds allotted it, but there was never any message for the NPC character. Ha it's never that easy! But, that being said, can that block be improved upon to output the message for an NPC? Also, as another side note, I am still using Active Inventory to test this. My assumption is that 'self' is not holding the actor's reference between blocks. -
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Well I realized that a game mode type script won't work very well for having only a temporary message. However I had another idea, what if I were to write a whole other script and make it the collar's enchantment? That way the message can operate under a different block instead of having to use the GameMode block. If this would work could any of you guys get me started with it? I'm really not sure which block should be / could be used to get this working... -
Elementary Scripting Question
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
That works better, but the only problem within my context is that the message literally only prints out once. Once the item is re-equiped the message does not print out at all. Any suggestions? Here is my code that I am trying to add the message to if it helps: I didn't include a doOnce variable / statement because it was giving me the aforementioned behavior. I want to add a message that displays a confirmation message everytime the NPC is added to the faction, to be precise. Here is an idea (nonworking with doOnce) of what I have in mind: -
While I don't think this question is extremely technical, I have just a couple questions about the messagebox and message functions. I am still learning the oblivion scripting language, so any clarification is much appreciated! Here are my issues: 1) When I use the message function, the message displays indefinitely until I go into menu mode. 2) Secondly, I know this is elementary, but when I use the messagebox function the message goes into an infinite loop. What do I add to the script so that it terminates properly? The messages are being used in an "object" script if that helps. I have also already looked at the cs wiki, but so far it has been no help. Any assistance would be greatly appreciated! Edit: I also forgot to mention that the message is executed under an "if" expression. So basically I want to limit the message to only a few seconds or make the messagebox terminate after "done" is pressed once.
-
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Ah, as you said yourself, no need to apologize! Well finally good news on my end, the script worked perfectly for both an NPC and the Player character!! I couldn't have asked for more, thanks to all of you guys for helping me out and especially you drake for finally sorting it all out! If I hadn't already, I would gladly give every one of you kudos. Again, many thanks! http://forums.nexusmods.com/public/style_emoticons/dark/thumbsup.gif -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Apologies Drake, I posted my comment and didn't see that you had posted until I had already posted! Anyway, I gave your script a shot but it didn't remove the NPC or the player from the faction unfortunately. Correct me if i'm wrong, but was the variable 'wearer' ever actually initialized? It seems to be an almost useless variable within the script! -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
First off, I posted directly before this, please read that post as it will probably better clarify this one. Anyway, I got around to plugging away with some ideas and came up with something (not necessarily pretty or efficient), however this method nonetheless works. I gave a script (found directly below as a spoiler) to the specific NPC to evaluate if they had the collar in their inventory. If not, they were removed from the faction. Here is the code: If anyone has a 'cleaner' suggestion to implement this, please give me your ideas! -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Sorry that it has taken me so long to reply, this week of university has kept me rather busy. Anyway to the issue at hand - I actually wondered if that was an effective method of getting the 'OnEquip' to actually activate on an NPC. Lanceor, your gamemode suggestion made quite a bit of sense, I'm really not sure why I didn't think about that myself; then again I am just learning Oblivion scripting! Anyway, I went ahead and used the new script you provided me with to test its mechanics out. The script worked fine to get both the NPC and player character into the faction. However, upon removing the collar the NPC did not get removed from the faction while the player character did. This is becoming very complex, but you guys have helped me make quite a bit of headway! If you guys could help me out just a little more, I'm sure we can get it figured out entirely! Edit: I forgot to include that 99% of my script testing prior to this has been reliant on the "Active Inventory" mod spell. I am approaching the subject from a bit different standpoint now in hopes that I can fix it to work alongside of this spell, as it is the most convenient means of giving/taking away items from an NPC. Edit 2: I would also like to add (in case i have not been very clear) that for the purposes of this script I only need it to work on NPC's and not necessarily the player character. If it functions fine for the player character that is fine but my primary concern is enabling function for NPC's. -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Actually, I was using the 'Active Inventory' spell found here to give the NPC the collar which the NPC would equip directly after I closed the "container" menu. If using a script is better, let me know because at this point i'm open to just about anything that will work. As for the 'GetContainer' bit, I meant that I don't understand why it works for the player but not NPC's, apologies if my wording was ambiguous! -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
That's what I was wondering about actually!! But I ran into another strange issue. But before I go any further here is the code at present: Strangely enough the script works on the player character but not on NPC's... I'm really not sure why though if 'GetContainer' sets the ref as the NPC itself -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
I typically use the spell from this mod to do it, however I tried giving one to a NPC in the editor with the same results. I'm really not sure where the issue is. -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Yes it is an object script and that is very very strange. I think that somehow the "GetSelf" call is not actually taking the NPC's reference because the script is too open? I'm guessing completely seeing as I'm all new to learning scripting in Oblivion. -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
I attempted that in the CS but got the same syntax error message of "Only ref vars and object references are allowed in this context." Perhaps some of the notes from this page could be of assistance to us? I also edited the script for testing purposes only to see if it worked on just the player: This code was successful; whenever I equipped the collar on the player character it was added to the faction correctly. However, I am still having issues with this applying to NPCs! Argh! -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
I realized that myself shortly thereafter! Here is the new code (still not working unfortunately) I went ahead and included the actual script name and faction name just to make it easier. Basically I want the NPC to only be a prisoner as long as they have a collar equipped. However, even this current script has yet to work http://forums.nexusmods.com/public/style_emoticons/dark/wallbash.gif -
"Factionalize" Clothing for NPCs
kingtitan replied to kingtitan's topic in Oblivion's Mod troubleshooting
Thanks for the quick response Hickory. I actually had been wondering about the load order thing, I noticed something about that earlier when trying to sort through the code. Anyway, I tested it and got this message: " Script 'Mycode', line 7: Syntax error. Invalid reference 'self' (only object references and reference variables are allowed in this context)." So what would be the next course of action? -
I hope the title is self explanatory, but if not here is what I am trying to do. I am currently trying to attach a script to a piece of armor/clothing in the construction set that, when equipped, would make the NPC part of the faction - as long as they are wearing that specific item. I am pretty familiar with C++, but Oblivion scripting is all new to me! Nonetheless, here is the script I have so far: For Clarification, the "2006dce" is the form ID of the faction in the construction set. However, this faction is custom which could be part of the problems that I am experiencing. So my problem is this: Whenever I have an NPC equip this piece of clothing, they do not join the faction. And I don't use the "EquipItem" command to do it either, I know that does not work (http://cs.elderscrol...dex.php/OnEquip). Could someone with a bit more scripting experience enlighten me on this please so that when the NPC puts on the clothing they become part of the faction until they take it off?
