Author Topic: Convecs?  (Read 3263 times)

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« on: October 31, 2005, 03:13:26 PM »
there was a post I had seen about starting a colony game with just convecs. when I was looking for it. But I was not able to find it again so I am assuming it is among the lost posts. So I will ask my question here.

How do I get a colony game to start with just convecs loaded with the base?

spirit

Edit: Never mind I just found it  http://forum.outpostuniverse.net/index.ph...wtopic=2150&hl=  

This was what I was after

Quote
Just create a vehicle set like you normally would:

CODE 
struct VehicleInfo VehicleSet[]=
{
   { 32,126, mapLynx, mapMicrowave, North},
   { 34,126, mapLynx, mapMicrowave, North},
   { 32,124, mapLynx, mapMicrowave, North},
   { 34,124, mapLynx, mapMicrowave, North}
};


Then insert them into the base set:

CODE 
struct BaseInfo Base1= { 0,0,  0,0,  0,0,  autosize(VehicleSet) };


Now, as you can see, i left the spots for buildings, walls and tubes empty (all 0's), and when used with CreateBase(0,31,-1,base1); it creates the units where you want them. 
« Last Edit: October 31, 2005, 03:28:59 PM by spirit1flyer »
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« Reply #1 on: October 31, 2005, 03:53:26 PM »
Okay I tried using this code but I don't think I did it right. So will someone show me where and what to change to start with just 5 convecs loaded with a base?

Code: [Select]
#ifndef BASEDATA_H
#define BASEDATA_H


#include <OP2Helper.h>
#include <BaseBuilder.h>


#define numof(array) (sizeof(array)/sizeof(array[0]))

#define autosize(array) numof(array), array





struct BeaconInfo beaconSet1[] =
{   { 10,  17, mapMiningBeacon, 1, 0, -1},
{  5,  17, mapMiningBeacon, 1, 0, -1},
{  -5,  17, mapMiningBeacon, 0, 0, -1},
{ 0,  17, mapMiningBeacon, 0, 0, -1},
{ 15,  17, mapFumarole, -1, -1, -1},
{ 20,  17, mapFumarole, -1, -1, -1},
};



struct BuildingInfo buildingSet1[] =
{
{ 0,  0, mapCommandCenter},
{ 7,  7, mapStructureFactory},
{ 7, -7, mapCommonOreSmelter},
{-7, -7, mapTokamak},
{-7,  7, mapStandardLab},
{-7,  0, mapAgridome}
};




struct TubeWallInfo tubeSet1[] =
{
{ 3,  0,  7, -4}, // Command Center to Smelter
{ 7,  1,  7,  5}, // Command Center to Smelter joint to Structure Factory
{-2,  0, -4,  0}, // Command Center to Agridome
{-7,  2, -7,  5} // Agridome to Standard Lab
};





struct VehicleInfo unitSet1[] =
{
{  4,  10, mapConVec,   mapNone, 3},
{  7,  10, mapConVec,   mapNone, 1},
{ 10,  -6, mapCargoTruck,  mapNone, 0},
{ 10,  -4, mapCargoTruck,  mapNone, 1},
{  8,  -4, mapCargoTruck,  mapNone, 2},
{ 12,  -6, mapRoboSurveyor,  mapNone, 7},
{ 12,  -4, mapRoboMiner,  mapNone, 7},
{  3,   1, mapEarthworker,  mapNone, 1},
{  3,  -1, mapRoboDozer,  mapNone, 7}
};







struct BaseInfo base[] =
{
{ autosize(beaconSet1), autosize(buildingSet1), autosize(tubeSet1), 0, 0, autosize(unitSet1) },
};


struct StartLocation startLocation[] =
{
{ 49,  14, &base[0]},
};

#endif
« Last Edit: October 31, 2005, 03:54:16 PM by spirit1flyer »
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Convecs?
« Reply #2 on: October 31, 2005, 10:11:41 PM »
Code: [Select]
struct VehicleInfo unitSet1[] = 
{
{  4,  10, mapConVec,   mapCommandCenter, 3},
{  7,  10, mapConVec,   mapStructureFactory, 1},
// etc. Add more ConVecs here with corersponding cargo

{ 10,  -6, mapCargoTruck,  mapNone, 0},
{ 10,  -4, mapCargoTruck,  mapNone, 1},
{  8,  -4, mapCargoTruck,  mapNone, 2},
{ 12,  -6, mapRoboSurveyor,  mapNone, 7},
{ 12,  -4, mapRoboMiner,  mapNone, 7},
{  3,   1, mapEarthworker,  mapNone, 1},
{  3,  -1, mapRoboDozer,  mapNone, 7}
};







struct BaseInfo base[] =
{
// Remove unwanted base/tube/wall arrays from the base layout
{ autosize(beaconSet1), 0, 0, 0,0, 0, 0, autosize(unitSet1) },
};

Basically those 2 edits.
 

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« Reply #3 on: October 31, 2005, 11:06:37 PM »
Thanks it works now  :)  
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Convecs?
« Reply #4 on: November 01, 2005, 02:04:49 PM »
spirit,
it's good to have a new coder with us, but please READ the op2helper file (as well as the other "SDK" files)
below is a copy of part of the OP2helper.h file:
Code: [Select]
struct VehicleInfo
{
   int x;
   int y;
   enum map_id type;
   enum map_id weaponCargo;
   int dir;
};
It shows you the params that VehicleInfo is expecting, and in what order:
first the x and y position, then the unit type, followed by the weaponCargo and then the direction the unit is facing.

weaponCargo meaning you enter the weapon of a tank, or the cargo of a convec. Do NOT use the weaponCargo setting with trucks, use the SetTruckCargo function instead. Also, if your convecs carry a kit with a weaponCargo by itself (specificly: a GP), set the cargo using SetCargo. Finally, for the SF: use SetFactoryCargo to access the 6 bays.

For other functions, classes and structures: if something is unclear, it's probably better to find the definition of it in the header files, and check the params. (All definitions can be found in *.h files)


Good to have you onboard!  (thumbsup)
Keep working on it, and you'll be making better DLLs in a few weeks/months time.
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 spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« Reply #5 on: November 01, 2005, 02:17:39 PM »
Quote
Do NOT use the weaponCargo setting with trucks


what happens?  :P

Quote
it's good to have a new coder with us, but please READ the op2helper file (as well as the other "SDK" files)
below is a copy of part of the OP2helper.h file:

I read those once but at that time I did not understand what they were saying I should now though  :unsure:


Quote
Keep working on it, and you'll be making better DLLs in a few weeks/months time.

yea I am already working on a new colony DLL with convecs to start the base with and maybe AI throwing a few units in the mix.
Does the any of the SDK files have instructions on how to spawn AI units from the side of the map?

spirit

Btw do I get to see the passworded room yet  :P  
no I am not asking until I at least make one with AI
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Convecs?
« Reply #6 on: November 01, 2005, 08:15:11 PM »
There aren't any instructions in the current SDK as to how to spawn AI attacks like that. But there is the definition of the functions to do it. You either have to figure out how to use them yourself, or look through the posts on here to figure out what people have done. The pinned DLL Programming thread has a lot of useful info on AI related stuff if I remember correctly. Sounds like you want to look into stuff relating to Groups and PinWheel.

Passworded room?  :huh:  Err, I mean, passworded room?  :ph34r:
J/k, I'm really not sure what you're talking about.
 

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« Reply #7 on: November 01, 2005, 10:16:09 PM »
Quote
There aren't any instructions in the current SDK as to how to spawn AI attacks like that. But there is the definition of the functions to do it. You either have to figure out how to use them yourself, or look through the posts on here to figure out what people have done. The pinned DLL Programming thread has a lot of useful info on AI related stuff if I remember correctly. Sounds like you want to look into stuff relating to Groups and PinWheel.

Passworded room?  Err, I mean, passworded room? 
J/k, I'm really not sure what you're talking about.

okay so I have to go looking is that it?  :lol:   Thanks for what you can give  :)

I was talking about the Outpost Universe Development Team forum  :P


spirit
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Convecs?
« Reply #8 on: November 01, 2005, 11:30:52 PM »
Ahh, I'd kinda forgotten about that. I sorta thought it was open for viewing by all, but I can't remember if it was only that way for a short while, or if it was only suggested that it be that way.

Of course there is really nothing that goes on in there anymore. It's been dead for forever. Certainly not much useful was ever put in there, at least not in terms of making levels. Mostly just ideas that never got off the ground. (Hence why nobody needs to know about them and get their hopes up  :lol: )
 

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Convecs?
« Reply #9 on: November 01, 2005, 11:38:26 PM »
Quote
Of course there is really nothing that goes on in there anymore. It's been dead for forever. Certainly not much useful was ever put in there, at least not in terms of making levels. Mostly just ideas that never got off the ground. (Hence why nobody needs to know about them and get their hopes up  )

nuts I was hoping for some code or something to be hidden in there  :P  
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Convecs?
« Reply #10 on: November 01, 2005, 11:42:50 PM »
It's mostly just project ideas in there. There is also some good hacking info too. Like how certain things work internally to Outpost2.exe. Most of it has found it's way out to here though. The stuff that hasn't probably isn't of much interest to most people. (Or just plain won't be released, like info about how the cheats worked).