Jump to content

Question about Decompiling / Editing / Recompiling


Undernier

Recommended Posts

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

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

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

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

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

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 mandatory
EndGroup

Group Properties
Actor Property Player = PlayerReference AutoReadOnly hidden
EndGroup


;-- 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

  • Recently Browsing   0 members

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