Jump to content

A supposedly simple (only a few lines) script isn't working.


Recommended Posts

Posted

It's a new script though. I just grabbed the contents of it and put it in my own. I'm confused why it would need it.

 

And I have no idea what activating dawnguard means.

Posted

Are you testing your script on a new game? If not, at the main menu open the console and type coc qasmoke this will put you in one of the testing cells that came with the game. From there console in the weapon you are working on and then test to see if it works.

 

If you need enemies to test it on and you have Dragonborn installed and active as well, then there should be some cages with dwemer controls in front of them. Those controls allow you to spawn different Dragonborn enemies that you can use to test your weapon with.

 

Most likely what is happening (provided you've filled the properties correctly) is that with the save game you are testing the weapon in question is already in your inventory and thus "fixed" and won't recognize the newly added script.

Posted (edited)

Ah, I've been using my testing file without much going on.

 

What if I drop the armor on the ground and pick it up again?

 

Edit: Yay! Dropping it on the ground and picking it up again worked perfectly! Thank you so sosooooo much!

Edited by Prismuth
Posted

You can try that. No guarantee that that will take. If dropping it creates a new instance (different in-game form id), then it might take. Otherwise try consoling in a new instance of the item.

Posted

I misunderstood. I thought that you were simply attaching the Dawnguard script to your armor, rather than copying the script contents into a new script.

 

"Activating" an esp or esm means that it is being loaded when you launch the game. BSAs are only loaded if an esp or esm with the same file name is an active mod.

 

As for the crashing, what else does the perk do besides reduce all damage to 0?

Posted (edited)

That one is a test. Other things it does is slightly raise the rate of some skill gain, slightly increase healing magic, and slightly decrease the amount of damage one takes from magic. My friend decided to try some stuff, and somehow his isn't crashing, BUT "Okay, as a test, I made a perk where one perk entry is +1000 armor rating when the keyword I made for the breastplate is activated, and another entry in the same perk for +666 armor rating that activates with GetEquipped tied to the circlet. When I equip the breastplate first, the circlet has the +1000 and the +666 and the other pieces have the +1000, and when I equip the circlet first, everything else gets the +666 bonus."

He's tried other stuff too, but I don't have descriptions of what those are.

 

I went back to older saves and it crashed upon inventory when activating the perk. Just didn't notice it before it seems.

 

Now he's figured out a way with passive invisible spells to give the effects.

 

Is lack of effect/spell tied to the perk/script too the issue?

Edited by Prismuth
Posted

In order to chase bugs it is important to be very explicit about what is going on.

 

When you say that the keyword you made for the breastplate "is activated," what does that mean? Does it mean that you apply the +1000 armor rating to only items that have that keyword (i.e. the condition is on the Item tab, using "HasKeyword")? Or do you mean you apply the +1000 to every piece of armor whenever the breastplate is worn (i.e. the condition is on the subject tab and uses the "WornHasKeyword" or "WornHasKeywordCount" condition)?

 

I have a guess as to what is going on, but without precise knowledge I can't be sure. My guess is that the +1000 is being applied to every armor piece you are wearing, as is the +666, and then all of those are getting multiplied by other factors based on whatever perks you have, and the resulting number is so high that it is causing a crash.

 

Another possibility is that you have a lot of armor pieces in your inventory, and calculating the new armor rating for every armor piece when you open the inventory is causing the game to crash.

 

But again both of these problems would depend on how exactly you have implemented the perks.

 

If it is easier, you can take some screenshots of the perk and relevant condition tabs rather than try to describe it.

Posted (edited)

I'm sorry, that was his explaination. I know it isn't a lot of armors doing it though, since it's just 4 for me. And his isn't the one crashing. He did something (IDK what) to make it not crash, BUT there's the overlap he's having trouble with.

 

I've honestly messed with my perks so much, I don't know what is correct or incorrect any more. For instance, I've tried having the pieces trigger on wornhaskeyword, haskeyword, and I think something about equipping too. I'm using perk entries, not the upper section, if that info is important.

 

I will try yet again to get a thorough explaination of everything he's tried. When he gets up that is.

Edited by Prismuth
Posted

I'm the helper friend that was mentioned. At first I was trying things based on the OnEquipped > AddPerk script, which was causing the perk to activate every time any piece of armor was equipped. This was not a problem for perk entries that have the "item" conditions menu, such as the entry point of "modify armor rating", as I was able to use the HasKeyword condition so that it only activated with that piece. However, with the way Prismuth wants the armor effects, not all of them have the "item" conditions available to them, such as ones that boost skill experience gains. The closest I came with that was using WornHasKeyword instead, which as you can imagine, would trigger if any item was equipped after the one meant to have the effect, since the condition would be true for as long as the piece with the keyword was equipped.

 

Now, I have not yet tried the Dawnguard method, but I have a couple clarification questions about that. Will it one, become a dependency for the mod, and two, allow me to specify that I only want the perk or perk entry activated when a particular armor piece is equipped? In the script that activates the perk, I tried using things like OnObjectEquipped instead of OnEquipped, but I couldn't quite figure out how to make it work.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...