Shicoco Posted July 6, 2011 Share Posted July 6, 2011 I have tried creating a mod (not really a mod, just saved right to Knights.esp, yes, I did backup everything), and I'm having trouble. The mod aims to allow the player to switch the relics between the Heavy Armor and the Light Armor varieties via the armor stand.scn NDArmorStandSCRIPT short button short messageNumber ; 0 = initial message ; 1 = swap message begin OnActivate if IsActionRef player == 1 set messageNumber to 0 MessageBox "This stand is specially built to hold the Crusader's Relics.", "Place All Relics", "Take All Relics", "Exchange Armor Relics", "Swap Relics", "Cancel" endif end begin gamemode set button to getButtonPressed if button > -1 if messageNumber == 0 if button == 0 ; drop all relics onto stand if ND00.HelmetCarried == 1 setstage ND00 10 endif if ND00.CuirassCarried == 1 setstage ND00 11 endif if ND00.GreavesCarried == 1 setstage ND00 12 endif if ND00.GauntletsCarried == 1 setstage ND00 13 endif if ND00.BootsCarried == 1 setstage ND00 14 endif if ND00.ShieldCarried == 1 setstage ND00 15 endif if ND00.SwordCarried == 1 setstage ND00 16 endif if ND00.MaceCarried == 1 setstage ND00 17 endif elseif button == 1 ; pick up all relics from stand if NDArmorStandHelmREF.getDisabled == 0 setstage ND00 20 endif if NDArmorStandCuirassREF.getDisabled == 0 setstage ND00 21 endif if NDArmorStandGreavesREF.getDisabled == 0 setstage ND00 22 endif if NDArmorStandGauntletsREF.getDisabled == 0 setstage ND00 23 endif if NDArmorStandBootsREF.getDisabled == 0 setstage ND00 24 endif if NDArmorStandShieldREF.getDisabled == 0 setstage ND00 25 endif if NDArmorStandSwordREF.getDisabled == 0 setstage ND00 26 endif if NDArmorStandMaceREF.getDisabled == 0 setstage ND00 27 endif elseif button == 2 ; change dialogue set messageNumber to 2 MessageBox "Would you like to exchange the armor relics?", "Yes", "No" endif elseif button == 3 ; swap dialogue set messageNumber to 1 MessageBox "Which Relic do you want to swap?", "Swap Helm", "Swap Cuirass", "Swap Greaves", "Swap Gauntlets", "Swap Boots", "Swap Shield", "Swap Sword", "Swap Mace", "Cancel" endif elseif messageNumber == 1 if button == 0 ; swap helmet if ND00.HelmetCarried == 1 setstage ND00 10 elseif NDArmorStandHelmREF.getDisabled == 0 setstage ND00 20 endif elseif button == 1 ; swap cuirass if ND00.CuirassCarried == 1 setstage ND00 11 elseif NDArmorStandCuirassREF.getDisabled == 0 setstage ND00 21 endif elseif button == 2 ; swap greaves if ND00.GreavesCarried == 1 setstage ND00 12 elseif NDArmorStandGreavesREF.getDisabled == 0 setstage ND00 22 endif elseif button == 3 ; swap gauntlets if ND00.GauntletsCarried == 1 setstage ND00 13 elseif NDArmorStandGauntletsREF.getDisabled == 0 setstage ND00 23 endif elseif button == 4 ; swap boots if ND00.BootsCarried == 1 setstage ND00 14 elseif NDArmorStandBootsREF.getDisabled == 0 setstage ND00 24 endif elseif button == 5 ; swap shield if ND00.ShieldCarried == 1 setstage ND00 15 elseif NDArmorStandShieldREF.getDisabled == 0 setstage ND00 25 endif elseif button == 6 ; swap sword if ND00.SwordCarried == 1 setstage ND00 16 elseif NDArmorStandSwordREF.getDisabled == 0 setstage ND00 26 endif elseif button == 7 ; swap mace if ND00.MaceCarried == 1 setstage ND00 17 elseif NDArmorStandMaceREF.getDisabled == 0 setstage ND00 27 endif endif elseif messageNumber == 2 if button == 0 setstage ND00 30 endif endif endif end The first time around, I had it check to see if all the armor was on the stand...after that didn't work I cut that out and just had it set the quest stage to 30. Still doesn't work. The menu is working fine in game. I'm just not getting the heavy armor. Here is stage 30: if ND00.UseLightArmor == 1 set ND00.UseLightArmor to 0 else set ND00.UseLightArmor to 1 endif The other stages work by referring to the ND00SCRIPT (I think, I'm very new to this) and giving heavy armor if UseLightArmor is 0 and light armor if it is 1. What am I doing wrong? Link to comment Share on other sites More sharing options...
David Brasher Posted July 6, 2011 Share Posted July 6, 2011 (edited) There are easier ways to do what you are trying to do. I would recommend not messing with that elaborate multifunction script. You could have something else transmute your heavy armor to light armor. You could put a custom chest with a script down in the undercroft. You could place a piece of heavy armor in it and it would turn into a piece of light armor. The scripting would go sort of like this: Begin Gamemode If GetItemCount NDArmorHeavyCuirass1 == 1 || GetItemCount NDArmorHeavyCuirass2 == 1 || GetItemCount NDArmorHeavyCuirass3 == 1 || GetItemCount NDArmorHeavyCuirass4 == 1 || GetItemCount NDArmorHeavyCuirass5 == 1 RemoveItem NDArmorHeavyCuirass1 1 RemoveItem NDArmorHeavyCuirass2 1 RemoveItem NDArmorHeavyCuirass3 1 RemoveItem NDArmorHeavyCuirass4 1 RemoveItem NDArmorHeavyCuirass5 1 AddItem NDLL0ArmorLightCuirass 1 EndIf End Edited July 6, 2011 by David Brasher Link to comment Share on other sites More sharing options...
Shicoco Posted July 6, 2011 Author Share Posted July 6, 2011 First off, I want it to be through the armor stand...second...I don't think this would work, but I should check to see if it does work. When the armor is placed on the stand, the game simply removes all possible variants of the armor. However...when you take armor from the stand, the game checks a value in ND00Script to see whether to give you the heavy or light variant of the armor. Meaning if you pulled heavy armor out of the chest you mentioned, and you're scripted to have light armor, when you put the armor on the stand and pull it back off, you're going to have light again. There's something I'm missing. There's another script somewhere or something that I'm just plain missing. I just tried bypassing the quest, having the script change the ND00.UseLightArmor value directly, and still no dice. I'm not sure how everything works...does it save the value to the player's save or something? Link to comment Share on other sites More sharing options...
Shicoco Posted July 7, 2011 Author Share Posted July 7, 2011 bump Link to comment Share on other sites More sharing options...
David Brasher Posted July 8, 2011 Share Posted July 8, 2011 (edited) Please expound upon your design parameters. Does armor need to only switch from heavy to light? Does armor sometimes need to switch from light to heavy? What is the target audience? The game detects whether light armor or heavy armor is most appropriate for your character. Why would a player want the less-appropriate kind of armor? It sounds as if you also want to have the armor stand store armor as well as transmute it. Is that correct? The fragment of a script I gave you does indeed work in another mod. I just changed the details to make it appropriate for this situation. I have not tested this rewritten script fragment, but it worked before it was rewritten. The script I gave you does not check the variable that marks whether or not you are signed up for heavy armor or light armor. It draws directly from the light leveled list. Yes you are correct that you would not want to put the armor on the stand if you had gone to the trouble to transmute it. There is no quest stage 30. What are you talking about? Is this a stage you added to your version? Are you using a modded .esp you downloaded? It sounds like perhaps the solution to your issue is simpler than we are making it out to be. If you don't like being a heavy armor person and want to be a light armor person, set up this line of code to execute once in one of your scripts: Set ND00.UseLightArmor to 1 So in this example result script from stage 22, a value of 1 will make it so the first condition is met and its code will be executed and the program will jump to the endif and bypass the second condition and its executable code. if ND00.UseLightArmor == 1 player.additem NDLL0ArmorLightGreaves 1 else player.additem NDLL0ArmorHeavyGreaves 1 endif Edited July 8, 2011 by David Brasher Link to comment Share on other sites More sharing options...
Recommended Posts