file Expert (or any other) mode

  • StewMan46
  • StewMan46's Avatar Topic Author
  • Offline
  • Professional Marbler
  • Professional Marbler
  • Posts: 369
  • Thank you received: 46
08 Jun 2014 18:35 #1
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
  • Lead Developer
  • Lead Developer
  • PQ Developer Emeritus
  • Posts: 1333
  • Thank you received: 604
08 Jun 2014 22:24 #2
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:
    Code:
    $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

This signature is real code
Code:
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
  • Posts: 369
  • Thank you received: 46
09 Jun 2014 15:29 - 09 Jun 2014 15:29 #3
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
  • Lead Developer
  • Lead Developer
  • PQ Developer Emeritus
  • Posts: 1333
  • Thank you received: 604
09 Jun 2014 16:36 #4
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:
Code:
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.

This signature is real code
Code:
function clientcmd12dothepq() { commandToClient(LocalClientConnection, '34onthedancefloor'); }

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

Moderators: Doomblah
Time to create page: 0.781 seconds
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.