Jump to content
Eagle114th

SF2 - Advanced Moddings (DLL Files editing)

Recommended Posts

Welcome to the Strike Fighter 2 (SF2) Advanced Modding thread!

A quick reminder:

We mod ethically, honoring ThirdWire’s life passion in creating SF2. All projects here are strictly freeware, transparent, and require a legit copy of SF2 to use any modified DLL files.  This thread also serve as the modder resource library that can assist us finding what we seek for advanced modding.

Hello everyone! This thread is dedicated to advanced modding, focusing on DLL file editing using tools like Ghidra and other debugging/reverse engineering tools.

We have the rules here:

- All projects must remain freeware. Payware is a hard NO!

- No links or discussion about pirated SF2, period!

- We encourage everyone to share knowledge, collaborate, and keep the community spirit alive!  

We have the great desires to expand the engine beyond the current limitation,  from custom HUDs to radar behaviors, etc...

This post will be updated through time with more information.

Let's have a happy modding!

Edited by Eagle114th
  • Like 4

Share this post


Link to post
Share on other sites

I have spent the week learning how to use Ghidrea, contemplating on how to find the right information, in order, to make sense out of what is shown as disassembled / decompiled functions and variables.

WIth AI help, I am able to come up with an idea:

1) Find the class name that is called by associated functions

2) Find the function with associate strings for possible keywords

As first step of building the modder resource library.

In the link below, you will see vast number of folder with three types of .txt files:

_CLASS_FUNCTION_LIST.txt
_STRING_LIST - 1.txt
_STRING_LIST - 2.txt

And inside each folders, for example: FLIGHT -> AVIONICS 60, you will see the files:

AVIONICS60_CLASS_FUNCTION_LIST.txt
AVIONICS60_STRING_LIST - 1.txt
AVIONICS60_STRING_LIST - 2.txt

These files give modders a big head start by helping pinpoint the location of relevant functions, and that's the step one.

For next steps, it is up to anyone here.  I am here to provide what I can product from the ghidra tools.  I will continue to update the resource library as I grow the understanding of Ghidra tools and codes shown in it.

SF2 -Resource Library v1.0.zip

Hoowever, I am working an interesting next projects: I just recently realized, after seeing how Ghidra symbolized the native C++ into C Pseudocodes and is working on Name Demangling (Converting C++ mangled symbols back to readable C++ codes).  Here is an example:

?MyFunc@@YAHH@Z -> int MyFunc(int))

For now, here is notes that AI generated with me while studying various codes:

(NOTE: the note below is incomplete.  Will be updated eventualy.)

CODES NAME DEMANGLING NOTES.txt


Cheers!

Edited by Eagle114th
  • Like 5

Share this post


Link to post
Share on other sites

HOLY MOLY!!!

I made another breakthrough as I learn more about the tools with Ghidra, as well creating new script python for output (text files)

What I recently used is known as RTTI, which stands for Run-Time Type Information.  It helps recovering the class names, shows inheritance and virtual function tables (vtables), and making it possible to link function ack to the classes they belong to!

For example, from

Quote

Class: avnHUDTD_RadarClass
  avnHUDTD_RadarClass @ 10005260
  vfunction2 @ 100016a0

Class: avnHUDRadarRangeClass
  avnHUDRadarRangeClass @ 10007cd0
  vfunction4 @ 100016c0

Class: avnHUDRadarTargetTASClass
  avnHUDRadarTargetTASClass @ 10007dd0
  vfunction4 @ 10001720

Class: avnHUDRadarTargetHeadingClass
  avnHUDRadarTargetHeadingClass @ 10007f40
  vfunction4 @ 10001780

Class: avnHUDRadarTargetVcClass
  avnHUDRadarTargetVcClass @ 10007fc0
  vfunction4 @ 100017e0

Class: avnHUDRadarTargetAltClass
  avnHUDRadarTargetAltClass @ 10008040
  vfunction4 @ 10001840
  scalar_deleting_destructor @ 1000af90

Class: avnHUDImageClass
  avnHUDImageClass @ 100019b0
  vfunction2 @ 10001b20
  vfunction4 @ 10001bb0
  vfunction5 @ 10001c40
  vfunction6 @ 10001cb0
  vfunction3 @ 1000ac60

ETC...
ETC...
ETC...

Looks like I will be doing the same for each DLLs and will update the Modder Resource Library.  This is another huge steps, which helps us big times!
 

  • Like 6

Share this post


Link to post
Share on other sites

My friend your work is amazing ! :smile:

The DLLs seem to be the core of SF2.

So how do you plan to use directly them in order to improve the current "July 2013" game version ?  

After these first steps do you plan to create a dedicated team to test them before "produce" them ?

P. 

Share this post


Link to post
Share on other sites

Hello my friend!

Excellent questions, and this is steps I am working on:

1) Finish working on compiling the text files with list of Class and function associated with them.

2) Analyze and make the list of already available codes for full reference of usage for each tyipes of .ini for cockpits and avionics related

3) Start experimenting modifying the DLL files and see if it works on SF2.

I do not have the team.  I hope, eventually someone will start the team.  
 

Eagle114th

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and 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..