Forum Mod Bakery Docs

Questions

Posted in Support
Please login to contribute to the conversation.
Please note, these answers aren't for me, they're for someone else. It's just me who's asking for them.

  • How do you make Level X replace the first Level, and make it the only Level before the credits appear?
  • How do you code a race stage that ends with you losing the race, but the mission continues (basically what happens in Mission 2 of he Homer the Detective mod).
  • How to you create custom dialogue, either through actual voice, or through stage messages?
  • Can you make it so that you unlock a vehicle after ending a story mission?
[deleted user]
5 yrs ago (Statistics)
To replace the first level with level Y(Yeah, not X, Y), see this tutorial donutteam.com/forum/topic/730
To make it the only level in game, you need to add the RequiredHack=CustomStatsTotals line to your Meta.ini
And then create the CustomStatsTotals.ini. Then, open it, and add this piece of code
[Miscellaneous]
Levels=1
This will limit the selectable levels to only one
But the game will still continue after L1M7, and to prevent this, you'll need to create m8sdi and m8sdl MFK files
Then open the first file and add this piece of code
SelectMission("m8sd");
 
AddStage(2);
	AddObjective("timer");
		SetDurationTime(2);
		SetGameOver();
	CloseObjective();
CloseStage();
 
CloseMission();
This will roll the credits
If the game still continues, go to level.mfk, and add AddMission("m8"); line next to similar lines, so that the 8th mission gets added

Next question:
To create a race stage, you also need a race condition, so, to create an illusion of losing the race, simply make the opponent vehicle go faster, and remove the race condition
	AddCondition("race");
		SetCondTargetVehicle("cSportsU");
	CloseCondition();
You might also replace the objective with a follow objective, or with a simple timer objective, like I do in fake destroy stages

There's a great tutorial made by Sparrow on how to replace Dialogues, check it out here: https://donutteam.com/forum/topic/1351

Now, to do the same with stage messages, just use the timer objective with different message indexes, should be a bit easier than actual voice

Final question: I don't think that's possible at the moment

That's it, hope I helped! and I hope everything's clear
Thanks! I might use some of these when I create my own mod, although some of it is a bit unclear... For example, you stated:

"RequiredHack=CustomStatsTotals line to your Meta.ini
And then create the CustomStatsTotals.ini. Then, open it, and add this piece of code"


Would this be added to Meta.ini, or CustomStatsTotals.ini?

In addition, in various topics, I've read things like "add RequiredHack=[X] into meta.ini", with other parts of the post stating that the hack in question must be present in the mod. How do you add a hack to a mod?
[deleted user]
5 yrs ago (Statistics)
You need to add the RequiredHack line to Meta.ini
AND create the INI file called CustomStatsTotals, putting things there
Adding a hack to a mod is easy aswell, you just copy the name of the hack, paste it into the "RequiredHack=" line, remove every spaces and capitalize some letters(i.e. "additional script functionality" becomes "AdditionalScriptFunctionality"), that should do it
Alright. Thanks!