Guest deleted2027229 Posted August 23, 2023 Posted August 23, 2023 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?
anjenthedog Posted August 23, 2023 Posted August 23, 2023 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".
Tlam99 Posted August 23, 2023 Posted August 23, 2023 With this method you generate tons of orphaned references.All those the script is attached to.
Guest deleted2027229 Posted August 23, 2023 Posted August 23, 2023 I basically want to blank these scripts so "cleared" no longer appears when you clear a dungeon defaultClearLocationOnActivatedefaultClearLocationOnDeathdefaultClearLocationOnDeathRefAlias there is a mod but I'd rather do it via script if possible
IsharaMeradin Posted August 23, 2023 Posted August 23, 2023 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 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() EndEventTo: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
Guest deleted2027229 Posted August 24, 2023 Posted August 24, 2023 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?
IsharaMeradin Posted August 24, 2023 Posted August 24, 2023 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 August 25, 2023 Posted August 25, 2023 (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 August 25, 2023 by WanderRA
Qvorvm Posted August 25, 2023 Posted August 25, 2023 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 August 25, 2023 Posted August 25, 2023 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.
Recommended Posts