Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Leviathan on April 04, 2005, 07:25:57 AM

Title: Researsh
Post by: Leviathan on April 04, 2005, 07:25:57 AM
To create a map to have the same startup as Pie i need to set some basic researsh to allready be completed at the start, how do i do this?
Title: Researsh
Post by: Hooman on April 04, 2005, 06:08:47 PM
Use the _Player.MarkResearchComplete(int techID) function to do it. Use the number in the .txt file for that tech as the techID. An enum for all the techs in the default tech tree exists in the helper files (OP2Helper\EnumTechID).
ex:
Code: [Select]
Player[0].MarkResearchComplete(techCyberneticTeleoperation);

(Note that I used the class name _Player above, but I used a variable of that class type in the actual code: Player[0]. Don't confuse the two. You pretty much always want to use the later.)
 
Title: Researsh
Post by: Leviathan on April 05, 2005, 02:34:37 PM
Ok great, if anyone wants to know where to place the code goto InitProc in Main.cpp, inside the for loop add:

Code: [Select]
  Player[i].MarkResearchComplete(3401);	// Cybernetic Teleoperation
  Player[i].MarkResearchComplete(3305); // Research Training Programs
  Player[i].MarkResearchComplete(3304); // Offspring Enhancement
  Player[i].MarkResearchComplete(3303); // Health Maintenance

As you can see, these are the basic researshes which are set to done on High Res setting for multi maps.