Author Topic: /loadmod  (Read 2063 times)

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
/loadmod
« on: January 30, 2008, 01:19:26 PM »
I've been reversing Renegades to see how the '/loadmod' parameter works, but this is a tedious job. So, how does it work?

(I've searched the wiki and the forums, but I wasn't able to find anything about it)

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
/loadmod
« Reply #1 on: January 30, 2008, 03:03:20 PM »
/loadmod FOLDER looks for DLL's and other game files to load from Outpost2\FOLDER before looking in the main game directory. No, this doesn't work with the exe, obviously. :P

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
/loadmod
« Reply #2 on: January 30, 2008, 06:19:34 PM »
I'm lead to believe Hacker/Blackbox wrote it. Or at least knows a lot about it.

Code: [Select]
Outpost2 /loadmod folderName
should try to load the dll: folderName\op2mod.dll


Not sure if it's capable of loading multiple DLLs, thought that would be a nice feature.
 

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
/loadmod
« Reply #3 on: January 30, 2008, 06:51:25 PM »
Quote
Not sure if it's capable of loading multiple DLLs, thought that would be a nice feature.
I think it does load modded game DLL's (like Renegades has modded resource DLL's) in the mod folder. Things like color.bmp and I think even vols work, too.

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
/loadmod
« Reply #4 on: January 31, 2008, 06:51:05 PM »
Would like full info on this for all to see would be great.

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
/loadmod
« Reply #5 on: February 01, 2008, 12:37:17 PM »
What I've discovered:

"Outpost2.exe /loadmod Folder" loads "Folder\op2mod.dll".

"op2mod.dll" should have three exported functions: "mod_init", "mod_run", and "mod_destroy", that are called when OP2 initializes, runs and quits. All functions don't take any parameters and returns nothing (void).

It replaces any OP2's dll that has the same internal name for the one tha is inside the mod's folder.

I know more, but I'm not at home (and my notes are inside my computer)  :P .