file Expert (or any other) mode

  • StewMan46
  • StewMan46's Avatar Topic Author
  • Offline
  • Professional Marbler
  • Professional Marbler
More
08 Jun 2014 18:35 #1 by StewMan46
Expert (or any other) mode was created by StewMan46
I was wondering if there was a way to make an Expert (or any other) mission list in any mod. Please help.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
08 Jun 2014 22:24 #2 by HiGuy
Replied by HiGuy on topic Expert (or any other) mode
Sure thing!
Luckily for you, the game's code takes care of mission types in an extendable manner, so adding an expert mode is trivial.

There's only a few things you need to do to get an "Expert" mode working:
  • Create an expert directory in marble/data/missions/ where the game will search for expert missions.
  • In your playMissionGui, add a button for your Expert difficulty.
  • Set the button's command to:
    $MissionType = \"expert\"; buildMissionList();
    Replace "expert" with whatever difficulty you plan on adding, but don't forget to keep the backslashes before the quotes!

Let me know if this works for you, or if I need to explain anything better.
-HiGuy

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}
The following user(s) said Thank You: StewMan46

Please Log in or Create an account to join the conversation.

  • StewMan46
  • StewMan46's Avatar Topic Author
  • Offline
  • Professional Marbler
  • Professional Marbler
More
09 Jun 2014 15:29 - 09 Jun 2014 15:29 #3 by StewMan46
Replied by StewMan46 on topic Expert (or any other) mode
Ok, I get that bit, but how would you get it to build the mission list if using the Choose Gui (chooseGui.gui) or any other gui.
Last edit: 09 Jun 2014 15:29 by StewMan46.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
09 Jun 2014 16:36 #4 by HiGuy
Replied by HiGuy on topic Expert (or any other) mode
If you're making your own custom GUI then I guess you'd have to use your own code to find the missions. As far as I know, chooseGui (by default) is an incomplete difficulty selector screen (unless you mean startMissionGui, in which case you're in for a BARREL of fun). The only thing I can really recommend at this point is a for-file loop:
for (%file = findFirstFile("*/missions/expert/*.mis"); %file !$= ""; %file = findNextFile("*/missions/expert/*.mis")) {
//Do something with %file ...
}
Sorry if I couldn't help much, but I can't really help with custom interfaces/code without prior knowledge of your setup.

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

Moderators: AayrlKalle29Regislian