Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The DLL Project
#60
I'm not developing all day.Wink
So I'm happy to answer it all, hehe.

Marshall Wrote:Out of interest, how much of the RP2 'core' is done and how much work are you anticipating for DLLs?
The RP2 "core" (being YR++) is like the exe research, it cannot be "done". It would be done if I had the game's entire source code. Therefore, I won't be able to give you something like a progress bar for it.
For the first release, I plan this base to cover the most important classes, that is the whole AbstractType tree (all the INI defined stuff basically) and a good part of the AbstractTree (every ingame class) including the whole ObjectClass tree (everything visible).
You must be able to spawn and control units, animations, particles, warheads, etc, in order to make this any useful.
These things are progressing well. In this particular case I might say 66%.

Extra stuff like primitives drawing, SHP drawing and input handling are things I cannot give any progress about, I have nothing specifically planned for it.
You can handle mouse events now and add custom CommandClasses (functions you can bind to the keyboard), draw rectangles and SHPs and make text appear either in the MessageList (top left, like "Warning: Lightning storm approaching" or w/e) or just somewhere on the screen (tooltips, debug info).

The big big thing is callback functions.
Callbacks allow me to actually modify the game's code and add to it.
It is through callbacks that the DLL gets used at all. And I will need to define a lot of them to assure full control.
The largest bunch of callback code done is for SuperWeaponTypes, and in all you can already code your custom SW.

Marshall Wrote:Is there anything that members of the community are likely to be able to help with at this stage? I know nothing about C++ but I understood most of what that code example is doing.
Unfortunately no.
The compiler must compile all my class definitions and function callings and stack frames so that they look and work *exactly* like in the game's executable, thus this is still a kind of hacking process.
That code part is an example of things you will be able to do once we have a good YR++ base to work with.

Defining the callback functions is basically exactly the same thing I did before in order to add or modify functionality, ie this is hacking.

Marshall Wrote:Also, I gather that the intention is that all bug fixes (e.g. neutral MCVs IE) should be fixable through DLLs, or will certain changes that you have in mind require you to directly alter the executable?
The intention of the DLLs are that I don't have to tussle with all the ASM and hex and stack bugs and so on.

Almost everything that exe modifying could do can be done using these DLLs:
- Removing code, by simply jumping somewhere else.
- Modyfing code, by recoding the bit you want modified.
- Adding code.
- Modify rw data, by simply overwriting it.

What we can not do using DLLs is modify read-only data, but right now I cannot think of a point in RP development where that was necessary, except for dialogs.
The modified dialogs can be included in the DLL though, with a different ID than the original, and then you can just change that ID used in code.

In all, the only exe modification is my addition of the DLL loader code, and that does only get used if you run the game via Debugger.exe. If you run normally via gamemd.exe, no modifications are applied, which is a huge benefit IMO.

Marshall Wrote:Wait a minute, where do we determine HouseClass:: Player() ? I'm guessing that refers to the local client in which case that would desync in multiplayer?
You don't determine it, it already is.
HouseClass:: Player() returns a pointer to the current player, sitting at the very computer.
IE online, for you, it will return a pointer to your HouseClass instance, for your friend X, it will return a pointer to his HouseClass instance. For this code that means, whoever clicks will own the MCVs spawned.

HouseClass:: Player() needs to be a function because it reads from the game's RAM directly. And since it's possible that the pointer changes while the exe runs (eg you go back to the menus and start another game), it needs to always the return the pointer as of the time you call it.

Bobingabout Wrote:wait, you're calling it Ares? thats a peer to peer downloader... my brother uses it.
Yeah, I've heard of it.
If people want to download that filesharing client and all they get is some DLL file, they'll probably notice that something is wrong.

This is no official or commercial or that large project that it should create any confusion.
Since everyone is calling this RP2 anyway, who knows whether that name change will succeed at all...

EDIT:
Code:
virtual void vt_entry_50C(
    DWORD dwUnk,DWORD dwUnk2,DWORD dwUnk3,DWORD dwUnk4,
    DWORD dwUnk5,DWORD dwUnk6,DWORD dwUnk7,DWORD dwUnk8,
    DWORD dwUnk9,DWORD dwUnk10,DWORD dwUnk11,DWORD dwUnk12,
    DWORD dwUnk13,DWORD dwUnk14,DWORD dwUnk15,DWORD dwUnk16)
{
    PUSH_VAR32(dwUnk16);PUSH_VAR32(dwUnk15);
    PUSH_VAR32(dwUnk14);PUSH_VAR32(dwUnk13);
    PUSH_VAR32(dwUnk12);PUSH_VAR32(dwUnk11);
    PUSH_VAR32(dwUnk10);PUSH_VAR32(dwUnk9);
    PUSH_VAR32(dwUnk8);PUSH_VAR32(dwUnk7);
    PUSH_VAR32(dwUnk6);PUSH_VAR32(dwUnk5);
    PUSH_VAR32(dwUnk4);PUSH_VAR32(dwUnk3);
    PUSH_VAR32(dwUnk2);PUSH_VAR32(dwUnk);
    THISCALL(0x41C090);
}
THIS IS WHY NOBODY CAN HELP ME! Bang head against wall
[Image: jsfml.png]
Reply


Messages In This Thread
The DLL Project - by pd - 26.12.2007, 20:37:16
RE: The DLL Project - by TheMan - 26.12.2007, 22:34:40
RE: The DLL Project - by pd - 26.12.2007, 22:53:56
RE: The DLL Project - by Marshall - 28.12.2007, 10:39:11
RE: The DLL Project - by Renegade - 27.12.2007, 21:37:39
RE: The DLL Project - by MCV - 28.12.2007, 20:47:59
RE: The DLL Project - by gordon-creAtive - 28.12.2007, 23:11:24
RE: The DLL Project - by pd - 29.12.2007, 21:48:17
RE: The DLL Project - by TheMan - 29.12.2007, 22:26:11
RE: The DLL Project - by Electro - 29.12.2007, 22:27:42
RE: The DLL Project - by Marshall - 29.12.2007, 22:57:40
RE: The DLL Project - by pd - 29.12.2007, 23:06:56
Rather offtopic but... - by gordon-creAtive - 29.12.2007, 23:38:39
RE: The DLL Project - by TX1138 - 30.12.2007, 00:54:11
RE: The DLL Project - by Guest - 30.12.2007, 02:29:35
RE: The DLL Project - by Blade - 30.12.2007, 18:25:46
RE: The DLL Project - by MCV - 30.12.2007, 19:10:44
RE: The DLL Project - by pd - 30.12.2007, 19:52:00
RE: The DLL Project - by gordon-creAtive - 31.12.2007, 15:26:51
RE: The DLL Project - by pd - 07.01.2008, 12:31:49
RE: The DLL Project - by Blade - 07.01.2008, 14:49:55
RE: The DLL Project - by gordon-creAtive - 07.01.2008, 17:27:50
RE: The DLL Project - by pd - 07.01.2008, 19:22:08
RE: The DLL Project - by gordon-creAtive - 07.01.2008, 20:21:46
RE: The DLL Project - by pd - 07.01.2008, 22:22:46
RE: The DLL Project - by Marshall - 07.01.2008, 22:40:33
RE: The DLL Project - by Bachsau - 10.01.2008, 23:54:22
RE: The DLL Project - by Guest - 11.01.2008, 10:59:41
RE: The DLL Project - by DCoder - 11.01.2008, 11:08:00
RE: The DLL Project - by pd - 16.01.2008, 16:03:16
RE: The DLL Project - by pd - 18.01.2008, 11:31:34
RE: The DLL Project - by MCV - 18.01.2008, 17:36:08
RE: The DLL Project - by DCoder - 18.01.2008, 20:12:09
RE: The DLL Project - by pd - 18.01.2008, 20:40:52
RE: The DLL Project - by DCoder - 19.01.2008, 10:00:31
RE: The DLL Project - by pd - 19.01.2008, 12:50:39
RE: The DLL Project - by pd - 11.02.2008, 02:58:43
RE: The DLL Project - by Marshall - 11.02.2008, 10:52:08
RE: The DLL Project - by pd - 12.02.2008, 11:32:14
RE: The DLL Project - by Black Shadow 750 - 12.02.2008, 11:48:08
RE: The DLL Project - by TheMan^ - 19.02.2008, 17:38:29
RE: The DLL Project - by gordon-creAtive - 20.02.2008, 18:47:22
RE: The DLL Project - by DCoder - 20.02.2008, 20:09:38
RE: The DLL Project - by Guest - 27.02.2008, 23:00:59
RE: The DLL Project - by gordon-creAtive - 28.02.2008, 20:29:45
RE: The DLL Project - by pd - 28.02.2008, 21:52:14
RE: The DLL Project - by Blade - 29.02.2008, 00:34:45
RE: The DLL Project - by pd - 29.02.2008, 00:41:54
RE: The DLL Project - by Bobingabout - 29.02.2008, 11:16:07
RE: The DLL Project - by Guest - 23.03.2008, 18:09:34
RE: The DLL Project - by pd - 06.04.2008, 12:52:28
RE: The DLL Project - by Marshall - 06.04.2008, 13:16:05
RE: The DLL Project - by gordon-creAtive - 06.04.2008, 14:45:59
RE: The DLL Project - by pd - 06.04.2008, 19:49:39
RE: The DLL Project - by DCoder - 06.04.2008, 21:04:14
RE: The DLL Project - by pd - 08.04.2008, 08:30:22
RE: The DLL Project - by pd - 10.04.2008, 22:46:34
RE: The DLL Project - by Marshall - 10.04.2008, 23:35:03
RE: The DLL Project - by Bobingabout - 11.04.2008, 10:09:57
RE: The DLL Project - by pd - 11.04.2008, 10:54:10
RE: The DLL Project - by Marshall - 11.04.2008, 18:49:35
RE: The DLL Project - by pd - 11.04.2008, 19:41:23
RE: The DLL Project - by pd - 28.04.2008, 14:00:02
RE: The DLL Project - by Guest - 18.05.2008, 20:56:51
RE: The DLL Project - by pd - 18.05.2008, 20:59:24
RE: The DLL Project - by Dupl3xxx - 20.05.2008, 16:37:47
RE: The DLL Project - by gordon-creAtive - 26.06.2008, 15:38:57
RE: The DLL Project - by pd - 27.06.2008, 00:18:57
RE: The DLL Project - by MRMIdAS - 27.06.2008, 04:20:48
RE: The DLL Project - by gordon-creAtive - 27.06.2008, 00:25:20
RE: The DLL Project - by gordon-creAtive - 27.06.2008, 09:34:04
RE: The DLL Project - by gravity20m - 06.02.2009, 00:55:51
RE: The DLL Project - by MRMIdAS - 06.02.2009, 01:32:25
RE: The DLL Project - by Guest - 06.02.2009, 13:22:36
RE: The DLL Project - by new guy - 30.06.2009, 02:47:31
RE: The DLL Project - by MRMIdAS - 30.06.2009, 03:49:53
RE: The DLL Project - by hogo - 01.07.2009, 12:07:21
RE: The DLL Project - by Nikademis Von Hisson - 27.08.2009, 12:49:14
RE: The DLL Project - by Lt Albrecht - 28.08.2009, 19:32:07



Users browsing this thread: 1 Guest(s)