Game Development Community

dev|Pro Game Development Curriculum

Make T3D Read Binary Mission DSO Files (For Release Builds)

by Kevin Mitchell · 01/09/2013 (9:48 pm) · 5 comments

This is something I found while trying to compile a release version for a demo. Apparently the engine creates a protected binary version of the mission file but when you try to use it in release it will not open. This will fix that.

In consoleFunctions.cpp line 1896
Find:
bool compiled = dStricmp(ext, ".mis") && !journal && !Con::getBoolVariable("Scripts::ignoreDSOs");

Change it to:

bool compiled = (dStricmp(ext, ".mis")||!Con::getBoolVariable("Scripts::ignoreMisDSOs")) && !journal && !Con::getBoolVariable("Scripts::ignoreDSOs");


In main.cs or where ever you like add this:

// Set the name of our application
$appName = "RPG Templete Full";

// The directory it is run from
$defaultGame = "scripts";

// Set profile directory
$Pref::Video::ProfilePath = "core/profile";

// Added a flag to not ignore or not ignore the mission DSO Files
$Scripts::ignoreMisDSOs    =false;   

function createCanvas(%windowTitle)


Now when you build your release you can filter out the .mis files.

I made this a flag in case some people want to keep the mission files so the DSO's will not be executed.


Have fun and happy programming!

#1
01/10/2013 (1:26 am)
Thanks Kevin, this is very useful. I did run in the same problem and fixed it in script, but this is a cleaner solution.
#2
01/11/2013 (3:27 am)
Maybe pull request it? Seems like a feature with having in the master branch
#3
01/11/2013 (4:49 am)
My take on it is this. The DSO is still in the code for the binary creation of a mission file. Its the same encryption flow as a .cs.dso file. If you change the .mis.dso to a .cs.dso it loads with no issue. There is no comment as to why .mis.dso's should not be used. Also i have not found any thing noted about issues with it.

So far I have had no issues from the beta testers about the mission missing objects or anything like that. Plus i know there were request for this in 2008-2009 so maybe it was never finished in the product line.
#4
01/11/2013 (7:43 am)
Just to note:
CoD single player does not encrypt their mission files - or any of their scripted gameplay logic for that matter - they're just compressed inside non-password protected zip/pak files.
#5
01/11/2013 (2:41 pm)
That's a fun modi game. Plus that why its an option. Not everything you save to files you would want someone to edit easily.