Jump to content

How do you use F4SE?


Recommended Posts

I'm sorry if this is answered some where, but I've been running at this and getting no where.

What I understand so far (at least I think I do >_>) Is their are 2 parts to f4SE

1: Added scripts in the plugin papyrus scripting API
I think this because people have said it.

2:the ability to write code in C and have it read by the game.
I think this because I have seen other mods that have a f4se folder with a .DLL file in them.

I get part 1, more stuff to use in scripts, but I can't seem to figure out part 2.
I can't even get a workstation set up, I'm using Visual studio 2019, loading the solution in f4se source in fallout 4s game folder, and adding my own folder to it. but parts of the f4se code are errors and I haven't even don anything yet. Mostly #include things like... I don't have it in front of me but it was like
#include <Slobj.h>
or something....

I guess WHAT I'M ACTUALLY ASKING is:
I think theirs a component of F4SE I have to setup in visual studio (or some other similar program) to use, and I am totally lost as for how to do that, and have found no answer online or in readme files (thier was something in the f4se readme but I think that was about setting up your first plugin no the workspace).
So Does any one know anything that can point me in the right direction? A tutorial or something I'm missing?

Sorry if this doesn't have nearly enough info, I'm tried and writing this too late at night, and honestly don't 100% know what I'm talking about. I can add more info if asked (or at least try >_>)

Thanks in advance.

Edit: Oh almost forgot.
I don't know if this will help but, Here's what I'm trying to do with the visual studio f4se stuff.
Basically I thought I saw the f4se code use something to call the time and date from the computer. I want to use that, store the date and time as a value (or several) in the code, and copy them into global values in a creation kit plugin. that's my plan to learn f4se. though it doesn't seem totally relevant when I can't get my foot in the door...

Edited by JunkV3nd0r
Link to comment
Share on other sites

https://forums.nexusmods.com/index.php?/topic/7759433-help-needed-compile-a-cpp-file-into-a-dll/

A lot of good info in here on what needs to be done to set up the compiler to start scripting plugins. Pretty much just follow whatever wolfmark says in it

 

https://github.com/xanderdunn/skaar/wiki/SKSE%3A-Getting-Started

 

I know this is for SKSE, but this will help as well.

 

Lastly, I downgraded from VS2019 to VS2017 simply for the toolkit availability. v140 for VS2015 is what I ended up relying on, and if I remember correctly, it was either not available in 2019 or just a pain in the butt to get. It was easier to pick up VS2017 and run it.

Link to comment
Share on other sites

  • 2 weeks later...

Ok so I have set up a workspace, and removed the errors form the 3 files in the plugin example project, put every time I try to build it throws like 100 "'StaticAssertFailure<false>" errors at me. and I have no idea what those are o_O

(I mean a google search says that their code that tells the builder that something is wrong and to cancel building (Which makes it feels like I'm being tripped up by the developers as I'm crossing the finish line even though I know that isn't true X_X))

But to make matters worse I don't know how to use visual studio's error list to actually FIND the origin of the problem. I'm self taught and that only other point of reference I have is modding mine craft in java, and back then the first, or one of the first parts of the error would show where the error originated form, then their would be a bunch more errors, which I assumed where all the places the original error messed up along the way.

SO the problem here is it seems every error leads to some random line of the f4se code, which I know is fine because it compiles if I remove the Plugin example project form the solution. so I don't actually know how to find the problem. SO I'm a little stuck.

I also don't know how this forum works or if anyone notices that I add replies to my topics so... theirs that...

unlike last time I'm not totally blown over by the problem yet, so I'll keep googling for a bit.

Edit:
Remembered that I could use process of elimination to find the errors, I pretty much erased all the code in all 3 files and their where STILL 5 errors. I don't understand how that works....
They where in:
pluginexmple.lib
exports.def
main.obj
cl

X_X

Edit 2:
So I made a new project, set it in the same folder that f4se source was in, and just copied the 3 files into it. now their are 500 errors, and a lot of errors in the files.
SO I guess thiers a lot more going on then just the files O_O
Visual studio/C HOW DO YOU WORK!!!! DX

Edited by JunkV3nd0r
Link to comment
Share on other sites

I didn't bother with the example plugin since it was designed around SKSE. Wolfmark, in the nexus thread I linked, had the OP recompile F4SE off the source code, which is what I did. After I was able to get F4SE recompiled, I started into a new solution and made JUST a bare bones plugin that only ran F4SEPlugin_Query() and F4SEPlugin_Load() in main.cpp Once I got all of that running right, then I started fleshing out my plugin.

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

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