Jump to content

How can I look at the scripts of other mods


Malakar

Recommended Posts

Is there a way for me to look at the source code of mods through the ESP?
I'm asking because I want to kind of create my own Sexlab Solutions addon but I don't know much about modding. I was hoping to be able to analyze solutions source code to learn how to replicate its functionality. Sadly the link to the API tutorial in the official slab thread doesn't work anymore.

If that's not possible I have to somehow figure it out some other way. Papyrus doesn't seem hard to understand, my java and c++ knowledge certainly helps there.

Link to comment

Hi,

Yes, you can. The first thing you need is CreationKit. After downloading Creation Kit from Steam, you also get a .rar file in your Skyrim\Data folder named "Scripts.rar" or something like that. Extract the files.

Now you got a new directory \Skyrim\Data\Scripts\source\ - here you can find all source codes you need.

I also recommand SKSE that givs even more native functions and the possibility to create c++ scripts.

 

In CreationKit you can now create a new "Quest". Close the window again and reopen it. There is a little bug in CK so you must close the window first, before you can edit it correctly. You will see even more taps now. The last Tab is the Script Tab. Right click in the blank list and select "Add". In the window that pops up you can select the first item "New script" that will create a new Script.

give it a name and make it extends to Quest.

Now you can edit it in the internal editor (or you download another editor, like the Editor I've made some years ago "PapyrusED" you can find on LoversLab and on NexusMods.)

After editing, you must compile the script. This optimizes your script, creates an OP Code of it, and stores it in a ".pex" file (the source files are ".psc")

 

 

You maybe ask yourself "why a quest"? - In skyrim most things are based on Quests because this gives the best possiblity and most options. You can decide if this should be run right from the beginning, or depending on an Event .... All dialogues are based on a Quest Object" even the "Hallo"

 

"Papyrus", the script language that is used, is pritty close to Basic. When compiling the scripts it genates OP Codes, String tables, and stuff.

SexLab got the source code open. You can take a look into. There are a few mods out there that doesn't have open source. Then the only thing you can do is decompiling it. Because the string table is stored in the .pex file, it's possible to get the complete source code, but without any comments or empty lines and stuff. Even variable names from inside a function are stored in the .pex file.

Link to comment

If a mod's source scripts aren't directly available, the Champollion utility is able to decompile them: http://www.nexusmods.com/skyrim/mods/35307/?

 

Nice thanks. Already decimpiled some of the pex files. BTW I just noticed that Solutions LE comes with the source files in the "Scripts" directory lol duh. Well the champollion utility might come in handy in the future.

 

Looks like the API guide would come in handy.

Is the API guide available somewhere? http://www.loverslab.com/topic/17711-sexlab-frequently-asked-questions-faq/

The link mentioned in the FAQ just spits out an error 502 http://git.loverslab.com/sexlab/wikis/home

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use