Jump to content

Question about scripting


Recommended Posts

Guest deleted2027229
Posted

If I took an existing PEX file and deleted all its contents so it's a blank file, then renamed it to a PSC file of a vanilla source file, then placed it in the scripts folder, would that effectively delete that script from the game?

Posted

could be wrong, but afaik no, or at least not completely, because its instances within the save file would remain. Although not a certainty, this lack of actionable code could cause problems.

 

I mean, you could try it, and if it doesn't work (presuming you backed up the original script file), just drop it back into place and move on, "lesson learned".

Guest deleted2027229
Posted

I basically want to blank these scripts so "cleared" no longer appears when you clear a dungeon

 

defaultClearLocationOnActivate
defaultClearLocationOnDeath
defaultClearLocationOnDeathRefAlias

 

there is a mod but I'd rather do it via script if possible

Posted

Do not delete the contents. Instead, load up the respective PSC file for each one and comment out the single line containing SetCleared(). Save and compile. This will create overriding PEX copies in your Scripts folder and subsequently prevent those scripts from setting the cleared status. The events on those scripts will still run if called upon by other sources, they just won't do anything any longer.

 

Example:

 

  Reveal hidden contents

 

Guest deleted2027229
Posted

I blanked the files as a test but I still got cleared on the map, so how would your method work but blanking them doesn't?

Posted

It should work on a new game. An existing game would still have the original version baked in the save file for already loaded objects and revert to using that instead of any modified variant.

Guest deleted2027229
Posted (edited)

I tried it on a new game and still get the cleared tag. I copied other PEX files and renamed them to the three clear location scripts rather than compiled them from the CK. Any chance you could test these and explain why it's not working?

 

https://ufile.io/uu0t7l6t

Edited by WanderRA
Posted

You were unsuccessful in following Ishara's advice.

 

Your pex files are empty, which should not be the case.

 

In this state, the game will reject the new pex files and revert to the last known good version (from your save file).

Guest deleted2027229
Posted

Blank or no, shouldn't they still overwrite the vanilla source files? I have no save file as I am testing on a new game.

  • Recently Browsing   0 members

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