Topic: Getting Engagment ID or Metaverse ID in scripts.  (Read 2766 times)

0 Members and 1 Guest are viewing this topic.

Tombstone

  • Guest
Getting Engagment ID or Metaverse ID in scripts.
« on: October 20, 2003, 04:40:49 pm »
Is it possible to get the "Engagement ID" within the mission scripts?  I can't seem to find a reference to it anywhere in the API.  If not, is it possible for other human players to get the metaverse ID of the host's ship in the scripts?  I need a way to uniquely identify a particular battle (only with multiple humans) for all players in that battle.

Thanks in advance.

Tombstone
 

FireSoul

  • Guest
Re: Getting Engagment ID or Metaverse ID in scripts.
« Reply #1 on: October 24, 2003, 05:07:52 am »
1- I don't know.
2- for which game? SFC2? 3?

Tombstone

  • Guest
Re: Getting Engagment ID or Metaverse ID in scripts.
« Reply #2 on: October 24, 2003, 08:39:45 am »
Thanks for responding.  It's for D3.

 

Tombstone

  • Guest
Re: Getting Engagment ID or Metaverse ID in scripts.
« Reply #3 on: October 24, 2003, 12:17:50 pm »
I think I may have found what I need, but I have no idea how or where to access it in the mission script.

DynaverseScriptInfo->fAllShips contains an array of tShipInGame structs which has a member fMetaDatabaseID.  Having said this, my questions are:

1)  When in the script should I access this?  I assume that it's at some point after the ships have been created in order for this member to be properly initialized.  Ideally, I'd like to get the MetaDatabaseID of the "host" players ship before the actual mission is playable.

2)  Where and how can I access it?  The only reference to DynaverseScriptInfo that I can find in the mission script is in InitializeStart, but the fMetaDatabaseID's are 0 at this point, so I don't think the script has created the ships and populated these structures yet.

Thanks again for you help.

Tombstone
 

Karnak

  • Guest
Re: Getting Engagment ID or Metaverse ID in scripts.
« Reply #4 on: October 25, 2003, 12:30:54 pm »
The ship's fMetaDatabaseID is located in the following class:

class tShipScriptDescription  
{
public:
   tShipScriptDescription();
   tShipScriptDescription( eTeamID teamID, const std::string& className, eClassTypes classType, const std::string& customName ,int32 metaDatabaseID);
   
   eTeamID fTeamID;
   std::string fClassName;
   eClassTypes fClassType;
   std::string fCustomName;
   int32      fMetaDatabaseID;
};

You can access this class from the parameter of each team's ::createnewship() method:

void tStarBaseSeedTeam::mCreateNewShip( const tShipScriptDescription& shipScriptDescription )

I hope that helps.
« Last Edit: December 31, 1969, 06:00:00 pm by Karnak »