Author Topic: Testing Maps  (Read 1682 times)

Offline Ominus

  • Newbie
  • *
  • Posts: 7
Testing Maps
« on: November 24, 2005, 07:05:47 AM »
is there a way i can test multiplayer maps without having to get someone to play with me, well i found a way but i'm wondering if there are more options available about this.
the way i test them is using the network gameplay, i make a game and then open the same copy of op2 again and connect to the game i made. :whistle: It works but i'm looking for an easyer way, let's say a bot of some kind. any help will be apriciated. thanks!  :)  

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Testing Maps
« Reply #1 on: November 24, 2005, 07:18:02 AM »
In MSVC+ goto file > Open Workspace, go into the you maps folder (probly a copy of hollvile folder) and select OP2Script. It will load all the files of that mission.

In Main.cpp scroll down untill you find this:
Code: [Select]
	CreateLastOneStandingVictoryCondition();
Change it so it looks like this (with two / in front), this makes the code not part of the dll, it coments it out (it goes green):
Code: [Select]
	//CreateLastOneStandingVictoryCondition();

Make sure your .map is in the OP2 folder.
In Main.cpp you will find at the top this:
Code: [Select]
char MapName[]  	= "mapname.map";	
Write the name of your map you saved in the map editor here.

In MSVC+ goto Build > Build OP2Script.dll. At the bottom it will say compiling, once done it will say
OP2Script.dll - 0 error(s), 0 warning(s)
Look in the ReleaseMinSize folder inside the DLL folder. There will be a file called OP2Script.dll here. Copy it to your OP2 folder.

Run OP2, press the D key (brings up a grey menu), press the R key (brings up the run script menu). Select OP2Script.dll from the menu, press OK. All the bases, units, tubes etc in the BaseData file will be loaded. Hoovile has four bases so four will load.


If you using the Mapper to create the dll code goto file genrate code and click ok with default. This makes the cpp file. I think you just copy the code in that file into the main.cpp file.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3237
Testing Maps
« Reply #2 on: November 24, 2005, 08:06:38 AM »
Yeah, just disable your victory and defeat conditions and the game'll let you play for as long as you want. In fact, it will force you to play FOREVER! BUwahahahaha!  :evil laugh:  
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials