Difference between revisions of "User talk:Dran"
imported>DragoonWraith (some answers) |
imported>Dran (Global Variables) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
I've formatted your Talk page to make things easier to follow (so I could answer things better). I hope this isn't a problem for you (it's generally rude to mess with someone's User pages) - if so, I can undo what I did, just let me know.<br /> | |||
[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 15:29, 13 September 2007 (EDT) | |||
== Recharge Box == | |||
I'm working on a Recharge Box. Is there a way to get a container to activate a Varla Stone? | I'm working on a Recharge Box. Is there a way to get a container to activate a Varla Stone? | ||
Line 11: | Line 16: | ||
If you have any advice for me... | If you have any advice for me... | ||
Dran | [[User:Dran|Dran]] | ||
:First, some points on Wiki markup. You should put code in the little code boxes - to do this, either start each line with a space (even the blank lines), or else put <nowiki><pre></pre></nowiki> tags around the code. Note that you cannot use other types of markup within pre tags, but you can if you use the space method. Also, sign your name with <nowiki>~~~~</nowiki>. | :First, some points on Wiki markup. You should put code in the little code boxes - to do this, either start each line with a space (even the blank lines), or else put <nowiki><pre></pre></nowiki> tags around the code. Note that you cannot use other types of markup within pre tags, but you can if you use the space method. Also, sign your name with <nowiki>~~~~</nowiki>. | ||
Line 23: | Line 28: | ||
:Also, aren't Varla Stones removed when you use them? I think you shouldn't need that RemoveItem line. | :Also, aren't Varla Stones removed when you use them? I think you shouldn't need that RemoveItem line. | ||
Anyway, let us know how that works out, and if you have any more questions, feel free. | :Anyway, let us know how that works out, and if you have any more questions, feel free. | ||
:[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 12:24, 5 September 2007 (EDT) | :[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 12:24, 5 September 2007 (EDT) | ||
::Thanks so much for the input. It is so timely. I am such a novice at this. Originally I tried to put a very small NPC with recharge capability inside a statue with the idea that the Player could talk to the statue and launch the Recharge screen. The NPC would not stay there. | |||
::The reason for the RemoveItem is so the player cannot use the box to collect Varla Stones but not puting in device that needs charging. Currently I am using a Healing Activator that adds a Varla stone to the Player's inventory, equips it and then removes it just in case there was nothing to recharge. The problem is that if the player had a Varla stone and then uses Recharger, he looses his device. | |||
::Again, Thanks for your support. | |||
::[[User:Dran|Dran]] | |||
:::Use [[GetItemCount]] to find out if the player had any Varla Stones to begin with, and if so, keep track of the number of Varla Stones he has - if you attempt to use one and no Varla Stones are removed, then you know the player has no enchanted items that need recharging. | |||
:::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 15:29, 13 September 2007 (EDT) | |||
== Toggle Collision & Flying == | |||
I have experimented with Toggle Collision and flying. I would like to create a mod that would allow this without allowing the player to fly through solid objects. Has anyone worked on this? | |||
[[User:Dran|Dran]] | |||
:Yeah, Levitation has been done in several mods. As I recall, Supreme Magicka had the most functional version, you may want to look at that. | |||
:You cannot simply use ToggleCollision, however, so you have to engage in some jury-rigging to get it to work. | |||
:[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 15:29, 13 September 2007 (EDT) | |||
== ModAV == | |||
I'm suffering from a curiousity. My intention was to cause an effect to have a magicka cost. I run the script | |||
Begin OnMagicEffectHit FOSP | |||
Player.removeitem gold001 30 | |||
player.modav magicka -300 | |||
End | |||
the first time I execute this script, it works as I had expected. Player magicka was reduced by 300 and a message said the gold had been removed. Magicka began to recharge as normal. I let it recharge to the full base value. | |||
The second time the script ran the Magicka was reduced, but did not regenerate. In fact, it froze at the new level 300 below the base value. Other spells contine to function, but magicka only regenerates to 300 below the base value. Repeated use of the script continued to reduce the magicka, by 300 each time and it would not recharge to the base value. | |||
I have tried resting 24 hours. I have tried using consol command (modav) to restore to the base value - won't do it. I have used the consol to change the base value (setav). This works, but the maximum value of magicka that I can acheive is still 300, or 600 below the real base value. | |||
I am such a complete novice at this. Any ideas would be very helpful. | |||
[[User:Dran|Dran]] | |||
:The issue you're talking about is described in the [[ModActorValue]] page - basically, ModAV works differently in script compared to how it works in the Console, and the script version is inconveniently permanent. You could use [[:Category: Oblivion Script Extender|OBSE]]'s [[ModActorValue2]], or else you could use a potion or spell with a Drain Magicka effect on it. | |||
:[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 15:29, 13 September 2007 (EDT) | |||
Once again, thanks for your help. I'll try this. ModActorValue2 seems like the simplest fix. I read the docs on it. | |||
Also, I'll try to find Supreme Magicka. Oblivion is so perfect for a flight spell. The view from a hundred feet up are spectacular. | |||
[[User:Dran|Dran]] | |||
First of all let me again say thanks for all your help. So far all of my Scripts are working very well and I have the advice I received to thank for this. | |||
Well, I looked at Extreme Magicka. Wow, that's some serious stuff. I was hoping for something a little simpler. I have experimented with the Setpos z - Not really flying, more Falling with Style. I suspect that there may be a way to Stop the falling, possibly for a very long time. Any Recommendations? I gather the damage would accumulate, but I think I can rest the falling damage timer just before impact. | |||
[[User:Dran|Dran]] | |||
== Variables == | |||
Is there a way to get variable data availble outside a single script. I am working on a new approach to the alchemy station. The script first checks to see which of the four pieces activated it. In all but cases where activation is by something other than the Mortise a variable is set to 1 to indicate that the device has been selected.. When the Mortise is activate it checks the variables to determine if they are to be added to the player's inventory. | |||
Well, this doesn't work. It seems that as each new activation of the script, the variables are set to zero. In a normal program, I would use a global variable, but it seems in the TES system, Global variables come with a lot of baggage. | |||
[[User:Dran|Dran]] |
Latest revision as of 14:05, 18 September 2007
I've formatted your Talk page to make things easier to follow (so I could answer things better). I hope this isn't a problem for you (it's generally rude to mess with someone's User pages) - if so, I can undo what I did, just let me know.
Dragoon Wraith TALK 15:29, 13 September 2007 (EDT)
Recharge Box[edit source]
I'm working on a Recharge Box. Is there a way to get a container to activate a Varla Stone?
aaRechargeBox.additem 194 1 aaRechargeBox.equipitem 194 aaRechargeBox.Removeitem 194 1
Doesn't seem to work - Any ideas?
Second approach was to delete the item and add a replacement. To do that I need to know what the item is and I don't know how to do that.
If you have any advice for me...
- First, some points on Wiki markup. You should put code in the little code boxes - to do this, either start each line with a space (even the blank lines), or else put <pre></pre> tags around the code. Note that you cannot use other types of markup within pre tags, but you can if you use the space method. Also, sign your name with ~~~~.
- Secondly, never use FormIDs in scripts. You only use those in the Console. In the script editor, use the EditorIDs. In this case, "VarlaStone".
- Anyway, hmm... that's an interesting question. Perhaps you should try to switch the container for an NPC? You'll have to Kill the NPC for the player to have access to his inventory, and then Resurrect him to use the Varla Stone. You should be able to do this all while he is Disabled. I haven't tried this, but it seems like it ought to work.
- Varla Stones may be hardcoded to work only with the player however, which would make this much more complicated. In that case, you would need to use RemoveAllItems to move the player's items to a temporary container, then use it on your container to move those items back to the player, have the player equip the Varla Stone, and then use RemoveAllItems again to move everything back where they started (in aaRechargeBox and on the player).
- Also, aren't Varla Stones removed when you use them? I think you shouldn't need that RemoveItem line.
- Anyway, let us know how that works out, and if you have any more questions, feel free.
- Dragoon Wraith TALK 12:24, 5 September 2007 (EDT)
- Thanks so much for the input. It is so timely. I am such a novice at this. Originally I tried to put a very small NPC with recharge capability inside a statue with the idea that the Player could talk to the statue and launch the Recharge screen. The NPC would not stay there.
- The reason for the RemoveItem is so the player cannot use the box to collect Varla Stones but not puting in device that needs charging. Currently I am using a Healing Activator that adds a Varla stone to the Player's inventory, equips it and then removes it just in case there was nothing to recharge. The problem is that if the player had a Varla stone and then uses Recharger, he looses his device.
- Again, Thanks for your support.
- Use GetItemCount to find out if the player had any Varla Stones to begin with, and if so, keep track of the number of Varla Stones he has - if you attempt to use one and no Varla Stones are removed, then you know the player has no enchanted items that need recharging.
- Dragoon Wraith TALK 15:29, 13 September 2007 (EDT)
Toggle Collision & Flying[edit source]
I have experimented with Toggle Collision and flying. I would like to create a mod that would allow this without allowing the player to fly through solid objects. Has anyone worked on this?
- Yeah, Levitation has been done in several mods. As I recall, Supreme Magicka had the most functional version, you may want to look at that.
- You cannot simply use ToggleCollision, however, so you have to engage in some jury-rigging to get it to work.
- Dragoon Wraith TALK 15:29, 13 September 2007 (EDT)
ModAV[edit source]
I'm suffering from a curiousity. My intention was to cause an effect to have a magicka cost. I run the script
Begin OnMagicEffectHit FOSP Player.removeitem gold001 30 player.modav magicka -300 End
the first time I execute this script, it works as I had expected. Player magicka was reduced by 300 and a message said the gold had been removed. Magicka began to recharge as normal. I let it recharge to the full base value.
The second time the script ran the Magicka was reduced, but did not regenerate. In fact, it froze at the new level 300 below the base value. Other spells contine to function, but magicka only regenerates to 300 below the base value. Repeated use of the script continued to reduce the magicka, by 300 each time and it would not recharge to the base value.
I have tried resting 24 hours. I have tried using consol command (modav) to restore to the base value - won't do it. I have used the consol to change the base value (setav). This works, but the maximum value of magicka that I can acheive is still 300, or 600 below the real base value.
I am such a complete novice at this. Any ideas would be very helpful.
- The issue you're talking about is described in the ModActorValue page - basically, ModAV works differently in script compared to how it works in the Console, and the script version is inconveniently permanent. You could use OBSE's ModActorValue2, or else you could use a potion or spell with a Drain Magicka effect on it.
- Dragoon Wraith TALK 15:29, 13 September 2007 (EDT)
Once again, thanks for your help. I'll try this. ModActorValue2 seems like the simplest fix. I read the docs on it.
Also, I'll try to find Supreme Magicka. Oblivion is so perfect for a flight spell. The view from a hundred feet up are spectacular.
First of all let me again say thanks for all your help. So far all of my Scripts are working very well and I have the advice I received to thank for this.
Well, I looked at Extreme Magicka. Wow, that's some serious stuff. I was hoping for something a little simpler. I have experimented with the Setpos z - Not really flying, more Falling with Style. I suspect that there may be a way to Stop the falling, possibly for a very long time. Any Recommendations? I gather the damage would accumulate, but I think I can rest the falling damage timer just before impact.
Variables[edit source]
Is there a way to get variable data availble outside a single script. I am working on a new approach to the alchemy station. The script first checks to see which of the four pieces activated it. In all but cases where activation is by something other than the Mortise a variable is set to 1 to indicate that the device has been selected.. When the Mortise is activate it checks the variables to determine if they are to be added to the player's inventory.
Well, this doesn't work. It seems that as each new activation of the script, the variables are set to zero. In a normal program, I would use a global variable, but it seems in the TES system, Global variables come with a lot of baggage.