Jump to content

Recommended Posts

Posted

HCE has, as of version 2007.022 the ability to send some game data out to external DLLs. I'll work up documentation as able. As implemented in 2007.022 every piece of data that AGSI allows us to export is being exported. We'll work with AGSI to increase the exported data items (for instance, number of missiles or planes in a unit would be nice, weapon launch events would be nice, etc.).

The DLL files will live in C:\Matrix Games\HCE\ExportDLLs\ in a default installation.

To disable a DLL, rename it so that the file extension is not .DLL, i.e. rename DataDump1.dll to DataDump1.dll.bak to turn it off.

The DLLs will slow the game somewhat depending upon how much processing each one does, some of them like DataDump1.dll make large files.

The DLLs also throw their errors back to the GE, so if there are bugs in the DLL, it will crash your game. This was common in my first generation of DLLs.

I have yet to optimize the GE for this process to reduce the amount of data sent and will do that as time permits.

Data exported by the DLL Interface in 2007.022 (version 1 of export specification):
// Functions to send the data to DLL
void dllexUnitLatLon(UnitPtr Uptr); (Position in decimal lat/lon of each unit)
void dllexUnitShowing(UnitPtr Uptr); (Visibility of each unit as viewed from each side)
void dllexUnitURegion(UnitPtr Uptr); (Uncertainty regions of each unit as viewed from each side)
void dllexUnitCourse(UnitPtr Uptr); (Unit heading in degrees)
void dllexUnitSpeed(UnitPtr Uptr); (Unit speed in knots)
void dllexUnitAlt(UnitPtr Uptr); (Unit altitude band)
void dllexUnitShowingSide(UnitPtr Uptr); (Unit side as viewed by each side)
void dllexUnitSink(UnitPtr Uptr); (Unit is sinking)
void dllexGameTime(long GTime); (Current game time starts at 10,000 and increments in seconds)
void dllexMsgLog(char *MsgLine); (Message Log line)
void dllexUnitToGroup(UnitPtr Uptr, GroupPtr GroupOld); (Unit changing from old group to new)
void dllexUnitNew(UnitPtr Uptr); (New unit, i.e. plane launched, missile, etc.)
void dllexUnitFree(UnitPtr Uptr); (Unit freed, leaves map)
void dllexScenLoad(void); (New scenario/save loaded, report info to DLL)

I should note in case anyone is into programming and wants to get right to writing a DLL, holler and I'll help, but more importantly the version 1 specification isn't set in stone yet for what data is exported and how it is exported.

Posted (edited)

DataDump1.dll version 2, interface version 1, for GE 2007.022

 

Writes all of the exported data to HC directory in a file named datadump.txt which is over-written each time the game is loaded.

 

WARNING: The text files can get very large!

 

Installation:

Extract ZIP with directories in tact to your HC directory, the DataDump1.dll will end up in an ExportDLLs directory.

HCExportDLL_DataDump1_v003.zip

Edited by TonyE
version 3 replacing v2 on 2008/07/16
Posted

GoogleEarth.dll version 1, interface version 1, for GE 2007.022

 

Runs a tiny webserver that serves a kml file to GoogleEarth on port 8180 to the local machine.

 

Installation:

Extract ZIP with directories in tact to your HC directory, the GoogleEarth.dll will end up in an ExportDLLs directory and a GoogleEarth directory will be created with each unit icon separated into its own file. See the Word document in the ZIP file for further instructions.

HCExportDLL_GoogleEarth_v001.zip

  • 9 months later...
Posted

In very simple terms that I can understand, what exactly is the purpose of this?

 

Is it to be used like a debugging tool that gives you info you need to track down an error?

Posted
In very simple terms that I can understand, what exactly is the purpose of this?

 

Is it to be used like a debugging tool that gives you info you need to track down an error?

 

No, it's the beginning of an external API allowing us to write "plug-ins" to complement, or maybe eventually override stock behavior.

It's a toy for programmers to bring new toys to the players and designers alike :)

Posted
In very simple terms that I can understand, what exactly is the purpose of this?

 

Is it to be used like a debugging tool that gives you info you need to track down an error?

 

No, it's the beginning of an external API allowing us to write "plug-ins" to complement, or maybe eventually override stock behavior.

It's a toy for programmers to bring new toys to the players and designers alike :)

 

Ok. So its a way to add player made mods, in simplistic terms. Gotcha.

 

Keep in mind my programming skill is like a -1000. So some things I really don't understand.

Posted

Speaking as non-programmer who plays Harpoon simply for enjoyment, I think it adds to the fun. It also might be helpful in Scenario design.

 

Buddha

  • 2 months later...
Posted

Okay, got a new one I'm hoping you guys can test for stability. It is a precursor to hopefully replacing the Unit window. The file is attached, unzip to your ExportDLLs folder. When you run the game this DLL will throw up a window with a button to show you information about the units visible in the Unit window (at present it only has information for exactly localized units). It also makes a text file in your HC directory called "hcunitwin.txt".

 

Yes, I do know it is annoying that it stays on top of the other windows...

 

Anyway, I'm looking for feedback on whether it crashes your game or causes any other big hardships. It will slow your game down somewhat. The log files aren't too huge so I don't think they'll run you out of space or anything.

 

Must be used with GE 2008.053 (or newer?).

 

Posted
Okay, got a new one I'm hoping you guys can test for stability. It is a precursor to hopefully replacing the Unit window. The file is attached, unzip to your ExportDLLs folder. When you run the game this DLL will throw up a window with a button to show you information about the units visible in the Unit window (at present it only has information for exactly localized units). It also makes a text file in your HC directory called "hcunitwin.txt".

 

Yes, I do know it is annoying that it stays on top of the other windows...

 

Anyway, I'm looking for feedback on whether it crashes your game or causes any other big hardships. It will slow your game down somewhat. The log files aren't too huge so I don't think they'll run you out of space or anything.

 

Must be used with GE 2008.053 (or newer?).

Tony,

 

Looks good. No crashes so far. The always on top part isn't a problem as far as I can see since it can be minimized to the TaskBar and quickly accessed from there. Maybe in some future form it can be integrated into the Windows Pull-Down menu. While most of the column headings are fairly easy to figure out, a listing of what each means and what info is contained wouldn't be amiss, maybe in the form of a text file included in the ZIP file? Since the window is always on top when open, the transparency is appreciated.

 

Buddha

Posted

Thanks for the feedback Buddha.

 

New version attached (this must be used with 2008.054 GE). Unzip the whole ball of wax with directories in tact to your HCE directory. (so that you'll end up with a HCE\UnitWin directory as well as the updated DLL in ExportDLLs directory.

 

As with the prior one, this only shows units visible in the Unit window that are exactly detected. Looking again for stability reports and responsiveness of the globe reports. z and x keys to zoom in and out (depending upon what you last clicked).

 

Posted
Thanks for the feedback Buddha.

 

New version attached (this must be used with 2008.054 GE). Unzip the whole ball of wax with directories in tact to your HCE directory. (so that you'll end up with a HCE\UnitWin directory as well as the updated DLL in ExportDLLs directory.

 

As with the prior one, this only shows units visible in the Unit window that are exactly detected. Looking again for stability reports and responsiveness of the globe reports. z and x keys to zoom in and out (depending upon what you last clicked).

 

Tony,

 

2 things to report. The map section of the new display always opens in a W.Africa location, regardless of the scenario location. Easily solved by scrolling the display to the proper location.

 

Secondly, and more important. Selecting File/New from the pull down menu causes an immediate crash when the new game scenario is selected. It is therefore necessary to shut down and reload the game in order to change scenarios.

 

Buddha

Posted

Acknowledged. That's a bummer on the crashing. I must have only tested opening saves from the same battleset. Will remedy for the next try.

Posted

New version attached (this must be used with 2008.055 GE). Unzip the whole ball of wax with directories in tact to your HCE directory. (so that you'll end up with a HCE\UnitWin directory as well as the updated DLL in ExportDLLs directory.

 

From yesterday's build added SonoBuoys (it will show them all, not just the ones in the HC unit window).

Hopefully fixed the crash Buddha found when changing battlesets between scens (or even starting a new scen).

Added a couple of other inconsequential tidbits.

 

Next up is either uncertain units or heading arrows (and maybe saving of settings, that absence is starting to annoy me)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...