Jump to content

Can replacing scripts on Actors mid game cause game corruption?


PJMail

Recommended Posts

I modify the script in my mod (attached to an existing Actor - a vertibird) a LOT while debugging it. Each time I rerun the game from the same save and see how it goes.

No extra properties are added, but obviously new internal variables maybe. The script is not running at the save point (but is waiting on events).

 

Can some changes to such scripts cause game corruption?

 

After a while I get really weird effects happening - as if some internal heaps are being contaminated.

 

My current one is passengers on board the Vertibird catch fire when it lands.

Previously I had all PA wearing passengers exiting their PA before boarding.

Another time my PA frame (only) would dissappear when I exited (looks very strange as all the rest of the PA is still there but you can see my bare distorted body inside).

Sometimes the vertibird just heads of horizontally at walking pace completely oblivious to terrain levels. I could go on.

And yes, sometimes I get repeatabled CTD's after some action (not on startup though).

 

Whatever the effect, it happens repeatedly if I restart from the exact same save (that I have been using all the time).

If I go back to the previous pex version it doesn't happen.

The pex change is trivial and doesn't generate any errors.

I always add new variables at the end of my variables list (I have no idea how the complier allocaites internal heap space).

 

We all must do this during testing - so what is a definite no no in script editing? And why?

Edited by PJMail
Link to comment
Share on other sites

I should also comment I have extensive knowledge on compilers/memory allocation/interpreters, and pex looks like interpreted pseudo code with on the fly heap allocation (to me).

Those are normally very tolerant of being updated on the fly.

I am asking for other peoples observations and their experience (rather than some 'ten commandments' sort of thing).

 

Thanks.

Link to comment
Share on other sites

I have never ever experienced stuff like you describe, and I update a lot of scripts, too.

To be honest, I was at first thinking you might be making fun of my bug report on your FPV page - Especially the part where you said your chars catch fire. Far out, man!

 

The only really bad gotcha I ever found is that running loops get baked into saves and things get iffy real quick when these running loops don't terminate as they should, for any whatsoever reason.

As for unattached, lingering scripts, most often some event registration or reference property was not cleared properly. But these usually disappear when you remove their pex, as the code can't be loaded any longer.

Running loops are different because the code is on a running stack (which gets written to the save), so even if you remove the pex, the loop will still execute.

Some clever mod authors exploit this to provide automatic uninstall functions that run *after* the mod has been completely removed.

 

 

As for the bizarre behaviour you're seeing, I remember you said something about testing an option of aligning the vertibird for the gunner. And that, when you used this option, the vertibird would go nuts. Something similar at play here perhaps?

Link to comment
Share on other sites

I've used resaver to verify no running scripts in my save - and I know the bird is just waiting for an activate event - so it seems crazy to me too thus widdening the audience.

For fun I will add a screen shot to the end of my mod picks - you will see what I mean by passengers on fire...

 

I am testing the mod where you can be pilot - but this is just small code changes (don't equip the turret etc) and I was still being gunner so really testng backward compatibility.

 

Crazy stuff.

Link to comment
Share on other sites

Also been trying to change the front guns based on the attached omod.

Sounds simple (and I have added new attach points to other nifs no problems) but it simply will not work on Vertibird's front gun Nifs.

These are just weapons, attached via their own attach points to the VB, and I just added a P-Barrel parent attach point to their nifs to match the C-Barrel ones on the omod.

Have the mod attachment keyword, the attach point keywords, etc. All works for normal weapons. Not for vertibirds. No end of crazys.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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