Jump to content

[LE] VMAD or Form List, which is quicker?


Kapteyn

Recommended Posts

I don't think you have your if statement correct. All it's checking is if the form entry at index 0 can be cast as a GlobalVariable. It doesn't check the value of it which I think is what you probably intend for it to do.

Oops, you're absolutely spot-on. I have a button on the MCM for this exact thing, clicking it does naff all because... what you said.

 

So yes, I've cast it as an integer...

GlobalVariable Enabled = FLST_SpawnWolf.GetAt(0) As GlobalVariable

If Enabled.GetValueInt() > 0

The form list is still being referenced in the same way, so nothing has changed.

 

This one definitely works, the things are no longer spawned when I flip the global.

 

So let's think about the properties. I use TES5Edit mostly so excuse me for referencing the VMAD again, it's just the simplest way for me to describe things. If I've got a few properties on that sheet then isn't the script going to do pretty much the same thing as looking at a form list? Isn't that sheet actually creating a list of forms anyway to give to the script? So is it really adding any more work to do the exact same thing? The only difference I can understand with the VMAD is that the properties are automatically parsed when the script is called, but if a form list is used then its contents are not called unless the script explicitly references them. So actually, is it not less work to use a form list? Or have I got my head the wrong way about this?

Edited by Kapteyn
Link to comment
Share on other sites

FormLists versus Properties...

 

The Creation Kit does not flag as persistent Object References that are put to FormLists that are stored in script properties. Indeed. So I'm sold on that, where it matters. (Otherwise I'd have to capture them with cumbersome conditioned aliases, I think, to avoid having persistence flag changed).

 

You may want to try and see if there is a difference in what happens after updating a plugin changes some values. Don't know exactly about FormLists, but existing property values won't be updated in existing running scripts I believe.

Link to comment
Share on other sites

I was thinking almost the same thing, except I'm going to make a save game, remove the plug-in and then check what the save cleaner has to say about it. Okay...

 

Putting the MCM aside because that will inevitably result in errors if it's gone...

 

I'm not seeing any orphaned script classes. I am seeing an old levelled actor and an activator (the two are linked).

 

So the activators are being stored, this is probably not something I want. I delete them, so why are they in the file?

 

Ah, that one was a property... it's been moved to a form list now. So yeah, it was the only activator in the save file, the other ones which were created were not being stored. So form lists are the way for me to go because these activators are deleted as soon as their script has done it job.

Edited by Kapteyn
Link to comment
Share on other sites

Something I didn't mention before that pertains to the errors that could occur. Not having proper checking would cause the script to error out and fail. Which might have the desired effect of not spawning something. But it also will cause the temporary activator from deleting itself since the script will abort at the error. Just something to remember which goes back to my peeve of error checking.

Link to comment
Share on other sites

Well, I'm a sole modder so I don't have to worry about having to catch errors other people might cause, and it's unlikely my scripts would be used in other mods. So frankly, I'm not really too concerned with error-checking - if it was a website then yeah, I'd be obsessing with validation. Anyway, never mind all that - what I'm most concerned with is general latency and preventing save bloat.

Link to comment
Share on other sites

Any time you create an object, even if it is deleted, there will be some level of leftover save bloat. Without doing the testing of creating a lot of test objects (I like the number of 10,000) with both methods to compare how big a save would be afterwards. Who knows? I'm curious to know myself but currently have other things on my plate so I can't go write the test to find out.

Link to comment
Share on other sites

What about explosions? Do they ever leave any kind of references?

 

The whole point about this is... every single animal I encounter will fire a spell, this in turn triggers a script which creates an activator - this again fires another script which runs more checks. Ultimately, if certain conditions are met a bandit spawn will occur. So what I'm doing for every single animal, is creating a bunch of activators - we're talking about a lot of new objects being created and I can see this being a problem in late game when the save game is already bloated. I'm not concerned about the bandits, how likely they will spawn how by many can be tweaked and I suppose the game will deal with them as it does with any dynamic encounters - I'm just thinking about these activators.

 

Should I use explosions instead?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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