Author Topic: OP2 DLL Creation  (Read 1992 times)

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
OP2 DLL Creation
« on: December 03, 2004, 12:49:25 PM »
I started this thread to post anything i found out while creating OP2 DLL's. Of course anybody can post additional findings here !  :D
So far; i've got these additions to Outpost2DLL.h:

Following replaces the existing PatrolRoute structure:
Code: [Select]
struct OP2 PatrolRoute {
  int unknown1;
  LOCATION *waypoints;
  int unknown[10];
};
Go to orignal posting

Following replaces the existing trig_res enum definition:
Code: [Select]
enum trig_res {
  res_food  = 0,
  res_common_ore,
  res_rare_ore,
  res_kids,
  res_workers,
  res_scientists,
  res_colonists
};
Go to orignal posting

This is something i found out today:
Code: [Select]
// Damage Types
#define damage_100 1
#define damage_75 2
#define damage_50 3
Use these definitions for the 4th parameter of CreateDamagedTrigger. Setting it to 1 (or damage_100) will generate a trigger when 100% of the fightgroup is destroyed. damage_75 will trigger at 75% and damage_50 at 50% destroyed. Don't use any other values; 0 will not trigger at all, anything larger than 3 will trigger always !
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
OP2 DLL Creation
« Reply #1 on: December 04, 2004, 03:44:21 PM »
Parameter 11 of CreateEscapeTrigger can be changed to cargoAmount

OP2 class Trigger __fastcall CreateEscapeTrigger(int boolEnable, int boolNoRepeat, int playerNum, int x, int y, int width, int height, int refValue, enum map_id unitType, int cargoType, int cargoAmount[/u], char const *triggerFunction);
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
OP2 DLL Creation
« Reply #2 on: December 05, 2004, 12:39:57 PM »
Ah thanks, I was wondering what that parameter did.

Good job so far !

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4952
OP2 DLL Creation
« Reply #3 on: December 05, 2004, 01:23:53 PM »
That kinda leaves me wondering what the difference between refValue and cargoAmount is then. I thought that was controlled by refValue. (Not that I remember ever using this function).


 

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
OP2 DLL Creation
« Reply #4 on: December 05, 2004, 05:13:44 PM »
lol - i don't either, hooman, but i figured it was missing one - and i had nothing better to do !

the refValue in combination with unitType specifies the number of units (for ex. cargo trucks), then the cargoType/cargoAmount combi is for the actual cargo: trck_Food 1000 if a 1000 tons of food (im not sure this is PER truck or all together)..


oh, and thanx hacker ! :)
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz