Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Eddy-B on December 03, 2004, 12:49:25 PM

Title: OP2 DLL Creation
Post by: Eddy-B 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 (http://forum.outpostuniverse.net/index.php?act=ST&f=5&t=797&hl=outpost2dll\.h&view=findpost&p=26944)

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 (http://forum.outpostuniverse.net/index.php?act=ST&f=5&t=797&hl=outpost2dll\.h&view=findpost&p=26941)

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 !
Title: OP2 DLL Creation
Post by: Eddy-B 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);
Title: OP2 DLL Creation
Post by: BlackBox on December 05, 2004, 12:39:57 PM
Ah thanks, I was wondering what that parameter did.

Good job so far !
Title: OP2 DLL Creation
Post by: Hooman 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).


 
Title: OP2 DLL Creation
Post by: Eddy-B 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 ! :)