Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

  • 2 months later...

How am I supposed to use the MoveTo function? I created a Marker static in the CS and want to move it to the player's location with offsets (hence why i'm not just using SetLocation) so it is placed a few feet in front of the player. This is happening by way of a magic effect script. I created a property on the script and filled it with my Marker object. So the script I have looks similar to this...

Actor PlayerRef
Static property MyMarker auto

PlayerRef = Game.GetPlayer()
MyMarker.MoveTo(PlayerRef)     ;no offsets for now

But it doesn't compile and gives me the error....

MoveTo is not a function or does not exist

I'm not sure why it "doesn't exist" or is "not a function". I can replace MyMarker with PlayerRef in the function and send the player to other ObjectReferences locations. But putting the MyMarker property back in breaks it again. I can't figure out why. Any help?

 

EDIT: Apparently I was supposed to set the property as an ObjectReference, not Static and place a reference of it somewhere in the world. Then fill it with the World Reference name I gave it. Seems to work now.

Edited by SamHe11
Link to comment
Share on other sites

  • 1 month later...

Hello all :smile: Ive been looking for a mod where you can use a shield with a two handed weapon, like keeping the 2h animation and swing speed and damage but just letting you equip and use a shield for blocking. If anyone could help me out Id very much appreciate it

I don't think that is really possible. At least not with standard shields.

 

You could create a set of gloves/bracers that have a shield attached on the one side and give them a greater armor rating. The shield would then effectively be for show and not functional for blocking.

Link to comment
Share on other sites

  • 2 weeks later...

I'm in doubt. If I add a creature to a leveled list manually, my mod will be incompatible with any other mod editing the same leveled list. Instead I use a simple workaround; I'm adding the creature to the list via a one-time use of AddForm instead.

 

There might be an issue connected with this though; what will happen when uninstalling my mod? I've added an entry to a list, and I assume that entry isn't removed automatically when uninstalling? On the other hand, the creature form that was added will no longer exist, so it can't spawn anymore.

 

So the question: Will this result in a leveled list with an "empty entry" which means that it will spawn absolutely nothing when it normally should? Or will the leveled list practically return to its former state from before the creature was added?

Link to comment
Share on other sites

You know, that is a good question. You could try running Revert as part of your mod's uninstallation. But, what if another mod added stuff to the same leveled list via script? You might remove more than you expect thus causing other issues for the player. Which is one of the many reasons why it is stressed to never remove a mod mid-game.

 

But you shouldn't be afraid of manually editing the leveled list. Wrye Bash is very good at merging leveled list changes. All you need to do is state in your documentation that Wrye Bash is strongly recommended for creating a bashed patch to ensure proper merging of all leveled list changes across all mods.

Link to comment
Share on other sites

You know, that is a good question. You could try running Revert as part of your mod's uninstallation. But, what if another mod added stuff to the same leveled list via script? You might remove more than you expect thus causing other issues for the player. Which is one of the many reasons why it is stressed to never remove a mod mid-game.

 

But you shouldn't be afraid of manually editing the leveled list. Wrye Bash is very good at merging leveled list changes. All you need to do is state in your documentation that Wrye Bash is strongly recommended for creating a bashed patch to ensure proper merging of all leveled list changes across all mods.

I could do that, but I generally don't like making my mods dependant on anything - even if it's only in certain circumstances and even if it's common mod utilities like Wrye Bash and SKSE. If there really is a problem with adding forms to lists via script and then uninstalling, then I guess that's my best option though.

 

The revert method is actually what I've used so far - I hadn't even considered that this could conflict with other mods as well. That might be true. Thanks :)

Link to comment
Share on other sites

The most compatible way of handling leveled lists is to edit them directly not add things via script. We learned that the hard way back in the Morrowind days when Bethesda first created the functions to manipulate leveled lists.

 

Editing leveled lists via script is a huge problem if any mod (or the game itself) ever calls Revert on a list. Any items added by AddForm will be removed and there are no functions that let you check if a particular item is already in a leveled list so you have no way to know if some other mod has removed your item. You can actually add the same item more than once, so if you're not careful the list could end up with multiple copies of your item in the list too. It's also almost impossible for people to detect potential problems with their leveled lists if entries are being added during the running game.

 

Just edit the leveled list directly and skip the fancy scripting.

Link to comment
Share on other sites

Allright, thanks for clearing that up - I will go with the Wrye Bash recommendation way, since it doesn't seem like there's a better alternative. I'll also have to fix my already published mods where I've used the scripted method... damn, it felt so smart at the time ;)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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