The Forum is up for sale: XeNTaX Forum looking for new owner

PROJECT: MultiEx Plugin Support

Coders and would-be coders alike, this is the place to talk about programming.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

KorNet wrote:Yes certainly compiled I have put a plug-in in a folder data/rpm and to not be loaded why that: (
Can you find a reference in the debug.log file of MultiEx Commander (CTRL+L) when MultiEx has loaded?

Please attach the dll here, so Rahly and I can also take a look.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Sure

Code: Select all

MultiEx Commander - Debug Mode - Log File
-----------------------------------------
mc32, C:\Program Files\MultiEx Commander
4.2.0
-----------------------------------------
10.09.2005, 0:59:21
0:59:21[i]-  ]-WebUpdate: user selected :3
0:59:21[i]-  0:59:21- Main : Opening MRF file
0:59:22[i]-  -Main : AddRahlyPlugins->RPM at pluginmanager.dll for Rahly's Test Archive
0:59:23[i]-  -Main : AddRahlyPlugins->RPM at pluginmanager.dll for Beyond Good and Evil
0:59:23[i]-  -Main : AddRahlyPlugins->RPM at pluginmanager.dll for Prince of Persia
0:59:23[i]-  -Main : AddRahlyPlugins->RPM at pluginmanager.dll for Sid Meier's Pirates!
0:59:23[i]-  -Main : Mex_FindPlugins
0:59:23[i]-  -Main : Mex_FindPlugins->Searching
0:59:23[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\wad\Sacrifice.dll for Sacrifice
0:59:23[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\wad\Sacrifice.dll
0:59:23[i]-  -Main : RunAnalysis->Progid to connect to Sacrifice.archive
0:59:23[i]-  Sacrifice WAD Files Extractor
0:59:23[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\pak\Painkiller.dll for Painkiller
0:59:23[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\pak\Painkiller.dll
0:59:24[i]-  -Main : RunAnalysis->Progid to connect to Painkiller.archive
0:59:24[i]-  Painkiller PAK Files Extractor
0:59:24[i]-  PlugIn Called: Painkiller PAK Files Extractor version 1.4, type (2), importation(1), varsreturned(5), restypespec(0), cancreate(1)
0:59:24[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\idx\Survival.dll for Survival
0:59:24[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\idx\Survival.dll
0:59:25[i]-  -Main : RunAnalysis->Progid to connect to Survival.archive
0:59:25[i]-  Survival IDX/PAK format Extractor
0:59:25[i]-  PlugIn Called: Survival IDX/PAK format Extractor version 1.0, type (2), importation(0), varsreturned(3), restypespec(0), cancreate(0)
0:59:25[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\fpk\WWE.dll for WWE
0:59:25[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\fpk\WWE.dll
0:59:26[i]-  -Main : RunAnalysis->Progid to connect to WWE.archive
0:59:26[i]-  WWE Raw 2 FPK Files Extractor
0:59:26[i]-  PlugIn Called: WWE Raw 2 FPK Files Extractor version 1.0, type (2), importation(1), varsreturned(3), restypespec(0), cancreate(0)
0:59:26[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\d64\Commodore_64_disk_files.dll for Commodore_64_disk_files
0:59:26[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\d64\Commodore_64_disk_files.dll
0:59:26[i]-  -Main : RunAnalysis->Progid to connect to Commodore_64_disk_files.archive
0:59:26[i]-  Commodore 64 D64 disk format Extractor
0:59:26[i]-  PlugIn Called: Commodore 64 D64 disk format Extractor version 1.0, type (2), importation(0), varsreturned(3), restypespec(0), cancreate(0)
0:59:26[i]-  -Main : Mex_FindPlugins->PGN at C:\Program Files\MultiEx Commander\data\plugins\cnt\Rayman3.dll for Rayman3
0:59:26[i]-  -Main : RunAnalysis->Registering attempt of C:\Program Files\MultiEx Commander\data\plugins\cnt\Rayman3.dll
0:59:27[i]-  -Main : RunAnalysis->Progid to connect to Rayman3.archive
0:59:27[i]-  Rayman 3 CNT Files Extractor
0:59:27[i]-  PlugIn Called: Rayman 3 CNT Files Extractor version 0.9, type (2), importation(0), varsreturned(3), restypespec(0), cancreate(0)
0:59:27[i]-  - Main : Loading 
0:59:27[i]-  - Main : Creating Panels 
0:59:27[i]-  - Main : Setting Variables 
0:59:28[i]-  - Main : Preparing Datafile List Columns 
0:59:28[i]-  - Main : Setting Additional Variables
0:59:28[i]-  - Main : Loading SupportForm
0:59:28[i]-  - Main : Setting FileFilter
0:59:29[i]-  - Main : Enabling All
0:59:29[i]-  - Main : Creating New Instance
0:59:29[i]-  - Main : Showing Program
0:59:30[i]-  - Main : BASS Init called.
0:59:30[i]-  - Main : DevIL Init called.
Suspiciously
0:59:22[!]- RPM Parse FileInfo error
0:59:22[!]- RPM Parse FileInfo error
0:59:22[!]- RPM Parse FileInfo error
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Yes, ok, I see the plugin is not found. That means that Rahly's pluginmanager does not detect your plugin as a valid one. I think you should take this up with Rahly.

The Parse error is a bug. There is no error. I will fix that in a new release ;)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Perfectly... But here the source code of a ready plug-in does not need to be looked :D
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

KorNet wrote:Perfectly... But here the source code of a ready plug-in does not need to be looked :D
Correct, but I don't have that source code. Rahly does. Until he wakes up at his end of the world (the US), we'll probably be asleep (Moscow time :D ). Let's just wait for him.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

We wait Rahly... I Hope it to share the initial text of any ready plug-in :roll:
Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

Post by Rahly »

don't use "Skeleton" as your plugin name

4 things

1) plugin manager calls mpGetInterfaceVersion, and the interface version it returns MUST be 1.0

2) plugin manager calls mpGetPluginInfo, and this has to return valid information, this should be set up for you already

if the above is good, then its a valid plugin, please note that MrMouse ONLY displays formats, not actual plugin information, in this case, there can be zero or more formats, so it could be a valid plugin and seen

ok to be seen by MrMouse, you need to

3) plugin manager calls mpGetFormatCount to get the number of formats that the plugin supports

4) plugin manager calls mpGetFormatInfo to get the information of the plugin, this is zero based, for example, if mpGetFormatCount = 2 then mpGetFormatInfo will be called for formats 0 and 1

after this, MrMouse will show you the list of formats in the Rahlys Plugin Manager view.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Rahly can you will make a sketch of a plug-in if to you not difficultly?
Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

Post by Rahly »

i can release the code for the test plugin, which was my plan, but i have to talk to MrMouse first.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

Post by Rahly »

i can post example code for those functions though.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

I have disassembled not few game formats and it would be desirable to try to write plug-ins... As programs for extraction are written... I even created a theme such.. And and so the list

3D Mark 2003 - DAT
3D Mark 2004 - DAT
3D Mark 2005 - DAT
Colin McRally 2004 - BIG
Colin McRally 2005 - BIG
Cossacks - GSC
Crimsonland - PAQ
Dungeon Siege - BAM
Dungeon Siege - GAF
Dungeon Siege - DS
Dungeon Siege - TVC
Dungeon Siege - DSSAVE
Dungeon Siege - DSQSAVE
Dungeon Siege - DSPARTY
Dungeon Siege - DSMAPS
Dungeon Siege - DSRES
Dungeon Siege 2 - DSRES
Earth 2140 - WD
Earth 2150 - WD
FlatOut - BFS
Grand Theft Auto 3 - IMG
Grand Theft Auto 3 - SFX
Grand Theft Auto Vice City - ADF
Grand Theft Auto Vice City - IMG
Grand Theft Auto San Andreas - IMG
Grand Theft Auto San Andreas - MUSIC
Hitman Contracts - TEX
Jame Bond 007 - 007
Liero - SND
Majesty - CAM
DarkStone - MTF
Die By The Sword - ATD
Raindow Six - RSB
Rally Challange - RFF
Sacred - TEXTURES
Sacred - SOUNDS
Sacred - MODELS
Scorher - BIN
Silent Hill 2 - ASF
The Sims 2 - PACKAGE
Space Rangers - PKG
Space Rangers - GAI
Space Rangers - GUI
Space Rangers 2 Dominators - PKG
Space Rangers 2 Dominators - GAI
Space Rangers 2 Dominators - GUI
Syberia 2 - SYB
Vanguard Ace - DIR
Worms Armageddon - DIR
Worms World Party - DIR
Operation Flashpoint Cold War - PBO
Operation Flashpoint Resistance - PBO
Wacky Wheels - DAT
ZoneRaides - MAS
Macromedia Flash - EXE -> SWF
Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

Post by Rahly »

kewl, so do you want that example code?
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Certainly... I shall try to make a working plug-in of an example
z0omik@mail.ru
:)
Last edited by KorNet on Mon Sep 26, 2005 5:51 pm, edited 1 time in total.
Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

Post by Rahly »

mpGetInterfaceVersion

Code: Select all

function mpGetInterfaceVersion(var Major, Minor: Integer): LongBool;
begin
  Major := InterfaceVersionMajor;
  Minor := InterfaceVersionMinor;
  Result := True;
end;
this should be done for you already

mpGetPluginInfo

Code: Select all

function mpGetPluginInfo(var Info: TPluginInfo): LongBool;
begin
  Result := False;
  if Info.Size = SizeOf(TPluginInfo) then
    begin
    Info.Name := 'Sample Plugin';
    Info.Author := 'Rahly';
    Info.URL := 'http://dl748.com/';
    Info.Email := '';
    Info.Major := 1;
    Info.Minor := 0;
    Result := True;
    end
  else
    LastError := pERROR_INVALID_PARM_1;
end;
make sure you fill in the data with YOUR information

now for the formats information, i make a const variable to hold my data for easy additions

Code: Select all

const
  MyFormats: Array[0..0] of TFormatInfo =
    (
      (FileMask: '*.rta'; GameName: 'Rahly''s Test Archive'; Flags: SUPPORTFLAG_CREATE or SUPPORTFLAG_IMPORT or SUPPORTFLAG_EXPORT or SUPPORTFLAG_DELETE or SUPPORTFLAG_BYINDEX or SUPPORTFLAG_BYNAME or SUPPORTFLAG_HANDLEFILE or SUPPORTFLAG_TESTARCHIVE)
    );
mpGetFormatCount

Code: Select all

function mpGetFormatCount(): LongWord;
begin
  Result := Length(MyFormats);
end;
mpGetFormatInfo

Code: Select all

function mpGetFormatInfo(FormatIndex: Integer; var FormatInfo: TFormatInfo): LongBool; stdcall;
begin
  Result := False;
  if (FormatIndex >= 0) and (FormatIndex < Length(MyFormats)) then
    begin
    if (FormatInfo.Size >= SizeOf(TFormatInfo)) then
      begin
      FormatInfo.FileMask := MyFormats[FormatIndex].FileMask;
      FormatInfo.GameName := MyFormats[FormatIndex].GameName;
      FormatInfo.Flags    := MyFormats[FormatIndex].Flags;
      Result := True;
      end
    else
      LastError := pERROR_INVALID_PARM_1;
    end
  else
    LastError := pERROR_INVALID_FORMAT;
end;
the size check is for changes in format

I'll post the Test Plugin as soon as i talk to MrMouse
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Okey .. I am waitng . :)
Post Reply