Jump to content

Question about scripting


Guest deleted2027229

Recommended Posts

Guest deleted2027229

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?

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

Guest deleted2027229

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

Link to comment
Share on other sites

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:

 

 

From:

scriptName defaultClearLocationOnActivate extends ObjectReference
{Sets the reference's location 'Cleared' when it is activated. In conjunction with defaultCounter, useful for clearing a location with multiple bosses.}

Event OnActivate(ObjectReference obj)
	Self.GetCurrentLocation().SetCleared()
EndEvent

To:

scriptName defaultClearLocationOnActivate extends ObjectReference
{Sets the reference's location 'Cleared' when it is activated. In conjunction with defaultCounter, useful for clearing a location with multiple bosses.}

Event OnActivate(ObjectReference obj)
	;Self.GetCurrentLocation().SetCleared()
EndEvent

 

 

Link to comment
Share on other sites

Guest deleted2027229

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?

Link to comment
Share on other sites

Guest deleted2027229

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
Link to comment
Share on other sites

Guest deleted2027229

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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