Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The DLL Project
#36
Yeah, you named quite a few possible contradictions there.

If one DLL sets a return address, the breakpoint won't be called anymore, I think I've stated that sometime already, in my last post I forgot that.
The question is when does somebody actually need to set a return address?

Anyway, many things you're talking about I'm actually aware of, the return address, same action or other values, critical property changes. Of course not every DLL will be compatible to every other DLL,
like mods aren't always compatible to each other (UT2004 has exactly the same problems!).

Therefore it's pretty important for people to know what a DLL changes, if it is designed to be compatible to others, which mines for example are to be.


To the first points:
DCoder Wrote:What if a DLL needs per-object variables like cBuilding::timesThisHasBeenCaptured ?
If one DLL accesses that very variable, it's stored in the game, not in that one DLL.
Once you changed it, it's changed for the other DLLs as well, unless it's declared in that DLL.

A problem is of course that one DLL can not access another DLL, unless that other DLL has export functions designed to communicate with others (I plan on doing this with mine).

DCoder Wrote:What if I want a crate that makes every single unit on the map cloaked for two minutes, and, naturally, not lose the actually cloakable units' cloak when uncloaking everything else afterwards? I imagine the callback on MyTimerExpired will need to iterate the units and reload their Cloakable status from the INI, meaning certain INI changes will work mid-game and potentially desync.
Every Techno (Vehicles, Infantry, Aircraft, Buildings) is linked to a TechnoType, which holds the "Cloakable" tag, thus is doesn't have to be reloaded. Also the veteran/elite abilities are accessible via TechnoTypes.

Most ingame classes have a corresponding type class.
Infantry (ingame) - InfantryType (INI)
Anim - AnimType
Terrain - TerrainType
The list goes on long.

The type classes can be referred to as templates for the ingame classes.

DCoder Wrote:What if I want a new AI Script Action/Trigger Event/Action ? [And two developers reuse the same Action number?]
In this case, I'll probably define callback function which return a boolean value, as in "handled" or "not handled".
If handled, it will set the return address(*), if not, it won't, and it's a possible next DLL's turn.

(*) Yes, this means that if two DLLs use the same value, only the first one loaded (at the moment this goes alphabetically) will receive it.
This is why I will most definitely release lists about such values I use.

DCoder Wrote:What if I want to lift the built-in array length limits like ScriptType/TaskForce length?
You might have realized already that not everything will be doable using just the callbacks.
For instance, I'm not planning to add callbacks for every single use of a property (like the scripttype array), which means you'd have to create your own in such a case.

Coding-wise, you'd do this by
a) actually adding it to the ScriptTypeClass, which would require you to increase the amount of memory allocated for the ScriptTypeClasses before being constructed, or
b) keep a map (or similar) which assigns each ScriptTypeClass pointer to a custom structure which holds the additional information, while the assignment should be a reaction on the construction event (likewise when the object gets destructed, you drop the assignment).

I used to stick to method (a) in the RP times, but for the DLLs I'm most likely going to use method (b).
In both cases you'll have to modify every single usage of the modified properties and make it point to your newly allocated structure.
This is the type of case that will require you to set a return address, ie your DLL will be in danger to be compatible to others (concerning ScriptTypes).


DLLs truly make adding easier than modifying existing stuff, quite the opposite of exe hacking. Whether that's good or bad, we'll see. Confused
[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)