Added plug-in support.
Current plug-ins:
Map Editor
SE4 modder.
SE4 shooter
Planned plug-ins:
Drushoka-Man
Shipset/raceset viewer/browser.
Emty mod shipset directories maker.
AI files fixer.
styletester remover (Shipset cleaner)
PBW game shipset check (Player sets)
Will need some help later on in what's going to be included in each plug-in, will return on that topic after 0.8 is released.
Any executable file can be run as plug-in by writing a simple textfile and placing in the plug in directory, then you can get the parameters you want from the companion!
So Excel or netscape can be a plugin, anything.
This is the current plugin format (More path and parameter options will be added, to handle mods etc):
----------------
Files must end with .PLG and be placed in the COMPANION_RESOURCE\PLUGIN directory.
The files have atleast 5 lines, name, path, parameters, enabled and info.
The name is the name that is displayed in the companion
The path is the path to the plugin executable
in the path you may put :
[EXEPATH] to be replaced by the path to the choosen games se4.exe in the companion.
No paths are ended with a '\' so you must include that.
The third line is parameters, those are the parameters you wish the companion to apss to you, and they will be passed in the order you declare.
Parameters can be:
[EXEPATH] to be replaced by the path to the choosen games se4.exe in the companion.
[SAVEGAMEPATH] current savegamepath
[PLAYER] current playernumber
[PLAYERS] number of players in chosed game
[GAMENAME] name of gamefile
[GAMETITLE] Title of current game
[PLAYERNAMES] all playernames in current game surrounded by "
[EMPIRENAMES] all empirenames in current game surrounded by "
Then a line if the plug-in is enabled or not, disabled plug-ins won't show up in the companion
And then some info on the plug-in.
Plugins can be managed through any text editor or the plug-in editor in the settings page in the companion.
-----------------
Example (mapedit.plg):
NAME:MapEditor
PATH:[EXEPATH]\SE4MAP.exe
PARAMETERS:
ENABLED:YES
INFO:
The original SE4 map editor.
It will start the editor that exists in the currently selected games SE4 Version main directory, ie if the current game uses ver 1.91 it will start the map editor in the directory that contains the SE4.exe for ver 1.91.
-----------------
Can't do any work on it now for the next 24 hours do, am at work
EDIT: Now that I think of it, it could be possible to add se4.exe as a plug-in and make it start games that way, no use but it could.
And the Mod launcher aswell, no use but it could
A plugin for se4.exe would look like this:
-----------------
Example (se4exe.plg):
NAME:Space Empires IV Gold
PATH:[EXEPATH]\se4exe.exe
PARAMETERS:"[SAVEGAMEPATH]\[FILENAME]" " " "[PLAYER]" "[MODNAME]"
ENABLED:YES
INFO:
Play current game as single player without password, but with the games selected mod.
-----------------
(I'll include this as a plug-in, just to confuse people
), the companion itself modifies the path.txt to enable mods, not by the command line.
Will have to try this one when I come home:
-----------------
Example (shrapnel.plg):
NAME:Shrapnel SE4 Forum
PATH:
http://www.shrapnelgames.com/cgi-bin...ubb=forum;f=23
PARAMETERS:
ENABLED:YES
INFO:
The Shrapnel SE4 forum where you will get all necessery help about anything!
-----------------
And ofcourse:
-----------------
Example (faq.plg):
NAME:SE4 FAQ (Frequently asked questions)
PATH:
http://www.shrapnelgames.com/cgi-bin...;f=23;t=005518
PARAMETERS:
ENABLED:YES
INFO:
The SE4 FAQ administred by Slick and Ruatha.
Any question regarding SE4, here is the answer.
-----------------
Any plugin (*.plg) files you want to see shipped with the release? A special link?
Post here or mail me.
To do (28/7):
//Set-up wizard
//Settings page
//Plug-in editor
// More plugin parameters
//Global error handler
//make del turn button in gamecomp
//mark players as dead when scanning file.
//Plug-in: empire upload, create new game, host upload, host download, change PBW game password,
//PBW settings from settings page
// doesn't count players left to uplaod correctly?
//earlier Versions of exe and savegames/Gam files
//Hide option for mods (Enabled in modinfo.txt) and games
//map editor changes path.txt
//Changes game in browser when downlaoding
//Changes game in browser when mail check
//Gamesort enable all options
//Rewrite OSD to delete text
//Fill in all default values
//Deadline alert form instead of showmessage
//Enable pop-up for nag-mail and misc PBW mails
28/7: When testing it on NT machine: don't write to registry, splash screen form causes error? or is it registry read?
[ July 28, 2004, 21:29: Message edited by: Ruatha ]