Development Documentation for Building Hooks for Armada 2

Talk about anything related to old versions of Armada.
1, 2
posted on January 3rd, 2011, 1:11 am
Are there any plans to release documentation on how to build a hook.dll file for Star Trek Armada 2?
posted on January 3rd, 2011, 10:02 pm
It would definitely be interesting. But since these are C++ based AFAIK, there would be only a few people who could use it. I don't think the devs are going to spend time for something like that.  :(
posted on January 3rd, 2011, 10:11 pm
i thought they wrote fleetops in delphi?
posted on January 3rd, 2011, 10:16 pm
I have no idea, since I don't know how it works  :sweatdrop: I just know that A2 was written in C++.
posted on January 3rd, 2011, 10:18 pm
ah yes, i heard a2 was written in C++

but optec said explicitly that fleetops was written in delphi, i just dont know if that includes the hook.dll file, since a list of what uses delphi wasnt given and i have a poor understanding of such things.
posted on January 3rd, 2011, 11:13 pm
Delphi can't be that much different from C++.  Can it?
posted on January 3rd, 2011, 11:35 pm
Last edited by Megadroid on January 3rd, 2011, 11:37 pm, edited 1 time in total.
Yes, yes it can.

As an aside MMM is written in C++ but uses a different method of getting into A2 (via the mission dlls, as opposed to the way fleetops does it (hooking the exe)). This is one of the reasons FO and MMM can co-exist; they get along nicely most of the time.
posted on January 4th, 2011, 12:15 am
i think it also corresponds with MMM primary function that it is loaded as a mission dll. wouldn't be much use for it to be loaded at armada 2 launch, or would it? :). it could be accomplished though to load a second hook dll. problem is to avoid that these don't get in the way of each other when the second one targets to hook or extend existing functions like the fleet operations dll too.
armada 2 is written in ms visual c++ 6.0, the fleet operations hook dll is written in delphi (pascal). c++ and pascal can be very similar, it depends on how the languages are being used. in the end it doesn't matter much anyway which language the exe or hook dlls are written in as the armada 2 exe is just assembly in it's compiled form :)
posted on January 4th, 2011, 12:22 am
For now, let's assume that the language is irrelevant.  Would it be possible for someone to make a developers documentation on how to build A2 hooks?  Even bare minimum would be a good start.  Like how to get the DLL to load when Armada 2 starts and how to add and program class labels or ODF commands.  Maybe as simple as a few open-source examples of a working hook DLL.
posted on January 4th, 2011, 12:27 am
many tutorials exist on how to write hooking dlls in general. some knowledge about assembly is required for hooking the functions itself. a tutorial or a source sample about how to add weapons or similar to armada is not practical as such hooks are quite complex and very case specific.
posted on January 4th, 2011, 11:14 am
DOCa Cola wrote:i think it also corresponds with MMM primary function that it is loaded as a mission dll. wouldn't be much use for it to be loaded at armada 2 launch, or would it? :).


I quite like it being localised to a mission. I can operate based on being started once and closed once at known points which is nice. Also neither you or I have to deal with MMM and FO squabbling :)
posted on January 4th, 2011, 12:11 pm
DOCa Cola wrote:many tutorials exist on how to write hooking dlls in general. some knowledge about assembly is required for hooking the functions itself. a tutorial or a source sample about how to add weapons or similar to armada is not practical as such hooks are quite complex and very case specific.


Dammit, Intel x86 Assembly is pure horror.  :(
posted on January 4th, 2011, 7:57 pm
DOCa Cola wrote:many tutorials exist on how to write hooking dlls in general. some knowledge about assembly is required for hooking the functions itself. a tutorial or a source sample about how to add weapons or similar to armada is not practical as such hooks are quite complex and very case specific.

Could a single ODF command example be done?
posted on January 4th, 2011, 11:09 pm
TChapman500 wrote:Could a single ODF command example be done?

I don't believe that you understand what you're asking. Unless you can understand and follow the decompiling of a program into assembly code, injecting code into that program, and recompiling it then any sort of "tutorial" is going to be over your head.
posted on January 5th, 2011, 1:40 am
It would also likely take days to write such a tutorial.
1, 2
Reply

Who is online

Users browsing this forum: No registered users and 2 guests