Undernier Posted December 9, 2020 Share Posted December 9, 2020 Hi everyone, For the short story, I am trying to patch Nuclear Winter 2287 for Frost. I ran into an issue which would require me to edit one line of code from one of Nuclear Winter's scripts. The script in question is called Database.pex and is linked with other various scripts from NW (either used by or extends). I have finally managed to decompile the pex file and edit the line I needed to. However, I am stuck when it comes to recompiling this one file. I have tried a few things but I haven't coded in a while and frankly am totally lost. Could anyone point me toward the right direction? Thanks! Link to comment Share on other sites More sharing options...
NoCashNoExp Posted December 9, 2020 Share Posted December 9, 2020 I am not sure from your question whether you don't know how to compile scripts or you have a syntax error in your modification. If your issue is compiling the script, open up CK, click on Gameplay menu -> Papyrus Script Manager then search for your script and right click compile. Link to comment Share on other sites More sharing options...
Undernier Posted December 9, 2020 Author Share Posted December 9, 2020 It's both actually. Maybe a more precise question would be, where do I place the decompiled script in order to be able to recompile it? At first, I tried to leave it in the same directory where the .pex file was but, that way I don't find it in the script manage screen. It shows the pex, but the "has source" column marks "no" ... Link to comment Share on other sites More sharing options...
NoCashNoExp Posted December 9, 2020 Share Posted December 9, 2020 It's both actually. Maybe a more precise question would be, where do I place the decompiled script in order to be able to recompile it? At first, I tried to leave it in the same directory where the .pex file was but, that way I don't find it in the script manage screen. It shows the pex, but the "has source" column marks "no" ... Put it at Data/Scripts/Source/User/ This is where source code is stored. Link to comment Share on other sites More sharing options...
Undernier Posted December 9, 2020 Author Share Posted December 9, 2020 ok, I assume I need to follow the same directory structure as the original mod. Here it's /NuclearWinter/Gear/Database.pex. So I created /Scripts/Source/User/NuclearWinter/Gear/and put Database.psc there. I finally got the option to compile but now It doesn't seem to find other scripts that it relies upon. For example, the first thing is, it extends NuclearWinter:Core:Required The first error I get is that it can locate this script ... I tried copying the entire NuclearWinter script directory in Source/User/ but it still couldn't find Core:Required. Do I need to decompile every scripts from that mod in order to modify just one file? Link to comment Share on other sites More sharing options...
NoCashNoExp Posted December 9, 2020 Share Posted December 9, 2020 Unfortunately, I think you need to decompile them. Link to comment Share on other sites More sharing options...
Undernier Posted December 9, 2020 Author Share Posted December 9, 2020 Ok thanks! I feel I'm getting somewhere ... although I'm getting new errors now. I get.../Required.psc(17,25): no viable alternative at input 'PlayerReference'.../Required.psc(17,7): Unknown user flag playerreference Regarding that script: ScriptName NuclearWinter:Core:Required extends NuclearWinter:Core:Module hidden;-- Properties --------------------------------------Group Context nuclearwinter:context Property Context Auto Const mandatoryEndGroupGroup Properties Actor Property Player = PlayerReference AutoReadOnly hiddenEndGroup;-- Variables ---------------------------------------Actor PlayerReference;-- Functions ---------------------------------------Event OnInit() PlayerReference = Game.GetPlayer() Parent.OnInit()EndEvent I'm afraid I have no idea what those errors mean ... Link to comment Share on other sites More sharing options...
NoCashNoExp Posted December 9, 2020 Share Posted December 9, 2020 Could you send me the full script in private? This snippet looks fine honestly but I am not sure. Link to comment Share on other sites More sharing options...
Recommended Posts