Game Development Community

How to change default mission startup for play and edit?

by Zeph · in Technical Issues · 05/05/2006 (3:59 am) · 2 replies

Just got the game engine and RTS starter packs... Already used the demo... I decided to start my world using the prebuilt FPS starter kit. however I would like my world/land to be as in the tutorial completly flat with a fresh clean stlate, but i wouldlike the code to remain the same since its more advanced, and will give me a more solid foundation to start from.

I already change the Folders name, but when I hit F11 or F12, and or load the game I get sent to the default mission which is Stronghold.mis.
Is there a way that I can change this to say flat.mis or MYGAME.mis so I can bypass having to load my mission everytime?
Any help pointing me to the right folder and .cs file would be greatly appreciated. Thank You.

#1
05/11/2006 (7:27 pm)
Zeph, it sounds like you may be executing the game scripts in the original folder rather than your new one. Two ways to skin this cat AFAIK..

Lets assume you copy starter.fps/ to myGame/

1) you can create a shortcut against the executable and in the shortcut properties, add to the end of the "target" field: -game "myGame"

2) in example/main.cs
change: $defaultGame = "starter.fps";
to: $defaultGame = "myGame";

If you've created new missions and saved them in the correct location ( \data\missions\ ) they should appear listed in the "mission select" dialog box when torque starts. You may have to change the name, in the top of your *.mis file. Then you can just select your mission on startup.

If none of these solve your problem - try refining your explanation. Hope this helps though.

regards,
Steven
#2
05/12/2006 (1:09 pm)
Ok this was the problem.. In the tutorials references to change the origional main.cs folders name was fine. The problem was within the folders main.cs
Example: C:\Torque\SDK\example\enchantedrealms.rpg\ "main.cs"
This is the function within the folder 2nd main.cs
function onStart()
{
// Initialize the client and the server
Parent::onStart();
initServer();
initClient();
$Editor::newMissionOverride = "tutorial.base/data/missions/flat.mis"; // This is what needed changing so the default mission wouldnot load every single time due to this over ride...

Even though the tutorial states to change the first main.cs, however theres happens to be a second main.cs within the folder with the default path to the default mission which needs to be changed as well. Other wise the Engine will load the origional folder tutorial.base flat.mis and look for the mission there, and load its default.


Thanks for the reply, You made me think of what the possibilities could be and I forgot there were 2 main.cs one within each folder... Guess the peanut rattled in my head... I had a similar problem with 3d game studio before, but there was only one main but the mission was referenced elsewhere in another .wdl file.