Re: Marble Blast Gold Game Modes (.mis mods) « Reply #31 on May 25, 2010, 2:58pm »
Name: Racing Style Function: Turns the level into a racetrack; you have to go around it a certain number of times. Notes: There are a few things about the level you have to change:
1. No finish or gems should be in the level. 2. Add a property to the MissionInfo (along with gold time, etc.) called "laps," equal to the number of required laps. (The comma is for grammatical purposes.) 3. Add several HelpTriggers spaced periodically throughout the level. These mark the path you must take, and they must be large enough that the marble is guaranteed to pass through them. Make them nice and thick as well, so that lag isn't an issue. If a trigger is skipped, the consequences are dire. The first trigger should be a short distance in front of the start pad. 4. Instead of text variables, add a variable called "number" to each trigger corresponding to its number (from 1 to how many triggers there are) in the desired order. 5. Add a variable called "last" to the last trigger (not the start/finish/first trigger, the one before it) and set it to 1.
Code:
$seekingNumber = 1; $currentLap = 0;
function onMissionReset() { $seekingNumber = 1; $currentLap = 0;
// Reset the players and inform them we're starting for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) { %cl = ClientGroup.getObject( %clientIndex ); commandToClient(%cl, 'GameStart'); %cl.resetStats(); }
// Start the game duration timer if ($Game::Duration) $Game::CycleSchedule = schedule($Game::Duration * 1000, 0, "onGameDurationEnd" ); $Game::Running = true;
ServerGroup.onMissionReset();
// Set the initial state setGameState("Start"); }
function HelpTrigger::onEnterTrigger(%this,%trigger,%obj) { // If this is not race-related... if (!%trigger.number) { addHelpLine(%trigger.text, true); return 0; } // Okay, it is then. if ($seekingNumber != %trigger.number) return 0; // They need to be visited in order if ($seekingNumber == 1) { $currentLap++; if ($currentLap > MissionInfo.laps) { ClientGroup.getObject(0).player.setMode(Victory); messageClient(%this, 'MsgRaceOver', '\c0Congratulations! You\'ve finished!'); PlayGUI.stopTimer(); serverplay2d(WonRaceSfx); startFireWorks(ClientGroup.getObject(0).player); $Game::StateSchedule = schedule( 2000, 0, "endGame"); return 0; } addHelpLine("Lap" SPC $currentLap @ "/" @ MissionInfo.laps,true); } if (%trigger.last) { $seekingNumber = 1; return 0; } $seekingNumber += 1; }
EDIT: Also, Matan, I wouldn't assume anyone actually reads the license agreement anyway.
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #37 on May 26, 2010, 1:57pm »
I'm now accepting requests. If anyone wants to see a specific mod(e) that can be put in a .mis file, let me know.
Also, Matan, I can easily make (I've done it before) a Quota-style modification, but I'm not sure if you'd let me post it. It's completely original (I thought of it before PQ was announced, just not by using the .mis file), and it's all my own code.
Perishingflames Council Member All hail the gods of metal[ss:Default Skin] member is offline
Joined: Oct 2006 Gender: Male Posts: 3,971 Location: Atlanta, USA
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #38 on May 26, 2010, 2:06pm »
Definitely not a .mis mode, but how about something that checks if all interiors exist on mission load? So you can tell if you are missing any interiors. Would pop up a message, missing: interiorx/y/z if you are missing any.
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #39 on May 26, 2010, 2:28pm »
Name: Repetitive Repitition Function: You have to do the level multiple times. The MissionInfo should have a "numberRuns" variable, set to the number of times you have to do the level, so you have to do it multiple times. Messages are displayed each time, so that when you do the level multiple times, there will be multiple messages. If you go OOB, you have to start over and do the level multiple times again. This also makes you do the level multiple times. Notes: Same old thing about the script; I don't think some of these need it, though, so let me know. Also, on the second try up, the camera might point in a different direction at the start, but I'm not sure why or how I can fix it. If you know, tell me, unless you're a mod, in which case you can just edit this code.
Name: Be Consistent Function: I'm hoping it's okay to post this, as I don't know what the Consistency mode in PQ will be; this is only a guess. You do the level twice; the second time it tells you what time you got the first time, and your final time is the difference between the two runs' times. If you OOB or similar the second time, you start over completely. Notes: Set your qualify and gold times to account for the strange time basis; if there is a qualify time, it might be 10 seconds on a medium-sized level, for example, and the gold time might be 3 seconds or even 1.
Code:
$useConsistent = 1;
function destroyGame() { // Cancel any client timers for (%index = 0; %index < ClientGroup.getCount(); %index++) cancel(ClientGroup.getObject(%index).respawnSchedule);
// Perform cleanup to reset the game. cancel($Game::CycleSchedule); cancel($Game::StateSchedule);
$Game::Running = false; $useConsistent = 0; }
function onMissionReset() { $numTimes = 1; $origTime = 0;
Suggestions: can you make the false start mode so that rather than penalizing you for pushing buttons, it penalizes you for leaving the start pad?
Any way to make the racing style mode have "Checkpoints" like in many race games, where if you don't reach a checkpoint in time you lose?
Be Consistent is somewhat strange, it would be better if it took an average of your two times, maybe even with an option to do it more than twice...
Picklecow10, hate to say it but you've been out coded.
LOL not yet. I havn't even posted a moderatly good set of codes on this site; unfortunatly my best ones are for hacking MBP online and can't be released
Anyways, if you took false start mode and use this function:
function GameConnection::onLeavePad(%this) { if (%this.player.getPad() == $Game::StartPad) { if ($Game::State $= "Ready") { //Code Goes Here } if ($Game::State $= "Set") { //Code Goes Here } } }
The function should activate when the player leaves that start pad, as long as the game's current state is "Ready" or "Set".
I would edit it myself, but I'm on vacation right now and connected to a wifi network a few houses down the street... It literally takes me about three minutes to load a new webpage. If I get a change later I'll take a look and try to incorporate it.
Or whirligig, you can add it in yourself of course.
[EDIT]: I forgot to mention; I got these to work openly on MBP a few weeks back.
@RD, would it be OK if I post a modified main.cs.dso file? It just adds the function that I have at the beginning of this thread. And the function just resets the controls if they were modified in a .mis mod.
No practical value besides what could be achieved before, besides the fact that after using a mod you don't need to restart the whole game.
@FrySauce I was reading through this thread earlier and your post made me laugh, lol. "Oh, and the .cs.dso's are supposed to be unmoddable, thats why MBP used only .cs.dso, and no .cs " LOL supposed to be
« Last Edit: Jun 12, 2010, 2:53am by picklecow10 »
Hello, Calvin speaking. I'd like to order a large pepperoni pizza.
offline Respected Marbler Warning Level - 5% [ss:Default Skin] member is offline
Go communists!
Joined: Aug 2009 Gender: Male Posts: 1,193 Location: Очевидно, не так ли?
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #46 on Jun 12, 2010, 6:39am »
Some ideas for bringing stuff to MBP: - release your Quota - Have a level where your time counts down, and you have to get as many gems as possible. Make lots of gems spread over a gigantic map or something, without a finnish pad. - Only be able to jump a certain number of times - "Speed" levels - you can't go over a certain speed or have to go a certain speed to either fining or open an MP or whatever. - And I'll take one last one from sporlo to dig it out... Quote:
Marble Target, like Monkey Target in Super Monkey Ball 2 for GameCube. Tall ramp, one helicopter, land closest to the center as possible and get scored based on distance. Collect gems for points on your way there. Marble control input is shut off after the helicopter dies, just like in Monkey Ball. Perhaps you could collect in-air items such as shock absorbers or super bounces or maybe hit triggers to switch the friction of the landing target.
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #47 on Jun 12, 2010, 11:11am »
@FrySauce, nice coding. Havn't tested it, but it look like it should do allright. Also, touching the start pad after every gem you get, isn't that essentially the same as touching the end pad after the regular game mode? Or maybe I just interpreted that wrong.
@Pablo, lol Thanks, hopefully I'll be around a little longer this time.
@Yuri Kahn, lol Super Monkey Ball would be Awesome!!! I think that setting that up would take both a .mis mod and a new mission.
You'd need sort of low gravity and disabled jump (.mis mods) and maybe a few more tweaks in the defaultmarble section. Until you press a certain key, your gravity would return to normal.
Gems could be positioned in the air and used to add on to the score. Home-Made Powerups could be added easily enough. -Star = Score Times 2 -Magnet = Marble doesn't move when land (that would be done via super-high friction)
I think I figured out a good way for the score to work. I'll look into it...
And I defiantly know how to check where you added and incorporate it into a variable in the .mis file. So if you land in the low score, the variable = 100, and if you land in the highest score, your variable = 1000.
I'm not the best level creator ever, but I can defiantly take care of the .mis file after it's made. I'll try to make a crude version of the level and post it so you guys can look at it and hopefully one of you can fix it up. A Lot
Don.Gato Professional Marbler [ss:Prolassic] member is offline
The meaning of Salvador Dalis works: Fuck Reality
Joined: Feb 2008 Gender: Male Posts: 380
Re: Marble Blast Gold Game Modes (.mis mods) « Reply #49 on Jun 12, 2010, 5:39pm »
lol, I didn't write the code, I just changed the score operation...
The thing I suggested would be like having to go to the finish after every gem, and then going back for the next one, when you have all the gems and finish you are done.
the target is possible, I am pretty sure. maybe either concentric rings of start/finish pads modified to give a certain score, or just circular .dts's?
Whirligig, could you possibly combine the finish at the start pad and the race mode so that after you do your laps you have to finish at the start rather than at the "last" trigger?
lol, I didn't write the code, I just changed the score operation...
The thing I suggested would be like having to go to the finish after every gem, and then going back for the next one, when you have all the gems and finish you are done.
the target is possible, I am pretty sure. maybe either concentric rings of start/finish pads modified to give a certain score, or just circular .dts's?
Whirligig, could you possibly combine the finish at the start pad and the race mode so that after you do your laps you have to finish at the start rather than at the "last" trigger?
For the target mode, I was thinking of not using a finish altogether. I'd set it up using triggers over each of the finishing sections. If you hit one trigger, a variable = 1, if you hit another, it equals 2, and so on. In the end it will use that variable to factor in the score.
To finish, it would wait until the marble's current speed = 0 (stopped) and then wait a few seconds before displaying the score (in true Monkey Ball style )
One question though: If you miss the target completely, should it just be out of bounds and the level restarts, or you get 0 points like in Monkey Ball?
Name: Flipping Crazy Function: Instead of jumping, the spacebar (or whatever key you have assigned) flips the gravity, similar to in games like Dead Hat or VVVVVV. (Note however that in VVVVVV, you can only flip if you're touching the ground. This does not apply in this mod. I was thinking of doing it by checking the marble's vertical velocity, but I figured that would be overcomplicated and glitchy. If you disagree, or you know another way to do it, let me know.) Notes: You'll need the script at the beginning of the first post in this topic. Don't use in conjunction with Gravity Modifiers.
// Target the players to the end pad and let them lose for( %index = 0; %index < ClientGroup.getCount(); %index++ ) { %player = ClientGroup.getObject(%index).player; %player.setPad($Game::EndPad); %player.setMode(Normal); } } function destroyGame() { defaultmarble.gravity = 20; $Pref::Server::TimeLimit = 20; // Cancel any client timers for (%index = 0; %index < ClientGroup.getCount(); %index++) cancel(ClientGroup.getObject(%index).respawnSchedule);
// Perform cleanup to reset the game. cancel($Game::CycleSchedule); cancel($Game::StateSchedule);
If anyone is trying to use this while still affecting future levels, replacing the destroyGame by this should fix it:
Code:
function GameConnection::onClientLeaveGame(%this) { if (isObject(%this.camera)) %this.camera.delete(); if (isObject(%this.player)) %this.player.delete(); exec("~/server/scripts/game.cs"); initServer(); initClientb(); eval("function jump(%val){mvTriggerCount2++;}"); }
Using onClientLeaveGame rather than destroyGame allows for replaying the level after finishing (thanks to PerishingFlames). And this should redefine jump to it's normal state (which for some reason doesn't happen if you run initClientb/initServer). You can actually leave out the initClientb & initServer if you're only using this mode. Tell me if you still got trouble with it.