|
Post by Jeff on Jul 11, 2013 23:28:05 GMT
This code will fix missions that aren't compatible with mbp 1.14/1.20 because of directory settings. Moving platforms as well as interiors will work once upon doing this. Note: DOING THE WHOLE ENTIRE CLA WILL CAUSE MARBLE BLAST TO CRASH, THUS NOT ALL LEVELS WILL GET FIXED. ^^^ Please do not do it on a lot of files, the game engine don't like it. As I described to Andrew, the game has to read each mission file line by line, parse each mission file line by line, and write each mission file line by line. Code is under the MIT license, yada yada yada... You can get the code from this pastebin here as it keeps nice formatting =) pastebin.com/83J8i6ZDTo use, copy and paste that code into notepad/textedit, and save as missionFix.cs Then, place the file into yourmarbleblastdirectory/marble/ or yourmarbleblastdirectory/platinum/ then, open up Marble blast, and open the console (press ~) in the console type this: exec($usermods @ "/missionFix.cs"); The code will compile. Afterwards, to check it, type this into the console: fixMissions(); The code will do its thing, and it may take some time and even become unresponsive. Just let its do its thing. If it takes more than 5 minutes, then force quit marble blast and assume that it got most of the levels. MBP LB USERS:Afterwards, delete both the .cs and .dso file so that LBs will re-enable themselves in MBP.
Any problems, questions, concerns, or comments post here and I'll be happy to assist you. Thanks, Jeff
|
|
|
Post by Aayrl on Jul 11, 2013 23:30:00 GMT
This looks important. /Sticky.
~Aayrl
|
|
|
Post by Hi Guy on Jul 11, 2013 23:41:03 GMT
setModPaths("platinum;marble");
Apart from that, this looks like it could be very useful, especially with the naming changes in MBP 1.20+
|
|
|
Post by ProMarbler on Jul 12, 2013 1:22:27 GMT
On a Mac, if you goto your home and go into Applications or Applications/Utilities and open Activity Monitor, then find the MarbleBlast app and click "Inspect" on it, you should be able to click "Open Files and Ports" and look at the bottom of the list to see the files that are currently open in MarbleBlast. It should change to reflect the current open file, and disappear when it's done. Hope this helps! (in case it ever should freeze up) ----- This should give me the chance to resort all my level files, and then fixing (+ backing up) the saved times, so that the times are only in one directory and are merged together, so my times won't reset every time I want to add levels with consistent times. Will do later, of course.
|
|
|
Post by Jeff on Jul 12, 2013 2:34:16 GMT
Thanks for the tip pro marbler
|
|
|
Post by ProMarbler on Jul 12, 2013 14:25:01 GMT
A question. When I looked in the supposedly "fixed" files, I still saw "marble" references and the such in the mission files, and showed no evidence of being modified in Finder. But in the game, levels and moving platforms worked perfectly! With no errors in the console! I even made sure it was the same level. Game thought it'd be lovely to create new missions in my /Library/MarbleBlast/platinum/ file, equating to about 50MB of mission files... These also seem to override the missions in the game! (It added pictures from the game though, so its missions have pictures loaded inside the game directory.) Please have it write to itself instead, so it won't break my game and hog up my memory. (Not really, just annoying.) ----- Aside from that, it works just fine! No errors in the console, as I tried to say. Oh, and I did both CLA's and it only took a minute.
|
|
|
Post by Perishingflames on Jul 12, 2013 18:25:09 GMT
The game can't write to the application, everything you save is always done to the Library Marbleblast folder (e.g. Levels modified in the LE, prefs, demo recordings, etc). You can just copy and overwrite what's in the custom folder of package contents if you want, or use something like EasyFind to quickly find/replace "marble/ to "platinum/ with the package contents custom levels location pointed to.
|
|
|
Post by ProMarbler on Jul 12, 2013 19:35:56 GMT
I sort of suspected as much, I guess I have to go and move it myself. But it would be helpful for a note to be made. Does it copy all, or just the levels it modifies? Would it be possible to make a list of such things? ... And apparently Ctrl-L creates screenshots. Interesting. What else don't I know?
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 12, 2013 20:10:08 GMT
Where do you put the fixer in? I putted it in Platinum, did I do it correctly? It said in game it was missing the file.
|
|
|
Post by Jeff on Jul 12, 2013 20:11:39 GMT
yes put it inside of the platinum folder, and to execute it do:
exec("platinum/missionFix.cs");
or whatever you named the file.
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 18:01:03 GMT
I did the code correctly and it still says "Missing File: platinum/missionFix.cs!"
|
|
|
Post by ProMarbler on Jul 14, 2013 18:09:25 GMT
Make sure that the file is named "missionFix.cs" and not "missionFix.cs.txt or cs.rtf". You can check this by selecting the file, and pressing Cmd-I (or Menu: File --> Get Info), and editing the name under "Name and Extension". Click the new extension on the popup box if necessary.
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 18:27:35 GMT
It is named missionFix.cs, why is it saying it is missing the file?
|
|
|
Post by ProMarbler on Jul 14, 2013 18:56:33 GMT
Did you put it in quotes, and copy it word-for-word? Did you put it in the "platinum" folder in the game? Make sure that you didn't put it in the Library/MarbleBlast/platinum/ folder.
Afterwards, make sure you restarted the game!!
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 19:11:49 GMT
I put it in quotes, its in the platinum folder of the game.
|
|
|
Post by ProMarbler on Jul 14, 2013 19:16:20 GMT
exec("platinum/missionFix.cs");
After that, does it load the compiled script?
(or exec($usermods @ "/missionFix.cs"); )
Oh, and are you typing it into the terminal/console (via ~tilde or F11)?
And if you can, post a screenshot (CMD-SHFT-3)
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 19:24:35 GMT
What is the controls for a Mac OS X? And no, it just says after I type it in: "missing file platinum/missionFix.cs!"
|
|
|
Post by ProMarbler on Jul 14, 2013 19:32:22 GMT
Try the other script, maybe "platinum" just messes with the code.
(Second one in last post!)
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 19:39:24 GMT
I tried both scripts and I get same error.
|
|
|
Post by ProMarbler on Jul 14, 2013 19:50:56 GMT
Then the files must either be misnamed or not there, so assuming you saved it with TextEdit, it would have automatically added an extension (rtf) to the file! So open it in Finder, goto the file missionFix.cs, select it, and select File --> Get Info from the file menu. It should bring up a long box, which will have a name area. Click the arrow, make sure that the extension is NOT hidden, and remove any extra text in the name so that the name is exactly "missionFix.cs", and not "missionFix.cs.rtf" or .txt or anything else of the sort.
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 20:50:44 GMT
It doesn't have .rtf at the end. Why won't it work?
|
|
|
Post by ProMarbler on Jul 14, 2013 21:09:28 GMT
Okay... Try this. Download this file (it's safe!): missionFix.cs.dsoThen copy it into either Library/MarbleBlast/platinum/ or Marbleblast.app/Contents/platinum/ (or both!) Then run the exec command: exec("platinum/missionFix.cs"); Then execute the function in the top post. It should work.
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 21:42:54 GMT
Wheres the Library tab at?
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 21:54:46 GMT
It worked! But it created a copy of every mission in the game, beginner, intermediate, advanced expert, and in MBG too, and custom, what caused it to happen?
|
|
|
Post by ProMarbler on Jul 14, 2013 22:08:39 GMT
... Did you select the Custom Levels tab? It doesn't necessarily matter if the non-custom levels are copied or not, just that the custom levels have been patched. The files in the library will take preference over files in the game, so no need to copy them back over. (If you delete the non-custom levels, check to make sure it isn't actually a custom level, or else you'll have to do it again. ) And do the levels now work in-game? If so, state so in your topic.
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 22:34:30 GMT
The levels still don't work.
|
|
|
Post by ProMarbler on Jul 14, 2013 22:56:41 GMT
Okay. Open the console (~tilde or F11), and close it. Load a level (a few would also do). If you observe missing platforms, open it again and note all red text after "Executing (mission).mis" in it, and record it somewhere. Or open the console log located at Library/MarbleBlast/console.log and copy/paste the red errors (won't be red in the log, but the text will be the same) into a textfile, and paste the errors on here. Or you can post the console.log directly and then we can see.
Some other things... What levels did you download? Where did you get them? And did you install any associated skyboxes/shapes as well?
|
|
dlma
Beginner Marbler
[ss:Default Skin]
5%
Posts: 74
|
Post by dlma on Jul 14, 2013 23:28:44 GMT
The red text says its missing a certain interior.
|
|
|
Post by ProMarbler on Jul 15, 2013 1:36:10 GMT
Okay, so when the script runs its course, if one was to restart and run the script, it seems that it would read over the files in the Library (in platinum/, of course!), trying to look for matching strings. Also, it copies not just missions/, but missions_mbg/ and ~_mbp/ as well, as well as some skybox test files I didn't even know exist. Might want to make it just read in the missions/ folder, just to be safe. I do not know how dlma managed to duplicate his files, I've tried and I got nothing of the sort.
For you above, tell the specific level and the specific interior(s). Then we can track it down.
Maybe the duplication has to do with the OSX version. Woo.
Oh and I caught open files saying "no more information"! Cool! :D
|
|
|
Post by Jeff on Jul 16, 2013 0:38:38 GMT
dlmaYou use mac. I use windows. I don't know how mac stores its files, but it sure as heck worked fine for me on windows, and pro marble had it working for him (a mac user). You both use mac. He told you how to fix it. If you both use the same OS, then how the heck can it work for him and not for you. The code is writen in a cross-compatible scripting language. Read what he said, and try it. There isn't anything more I can do for you as it worked for him, it tells me that it is a user error.Also, I want to remind everybody about this section to the code: // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE.
|
|