How to create your own gamemode?

Report bugs of MFPS 2.0 here
Post Reply
User avatar
Rofel
Contributor
Contributor
Posts: 46
Joined: Tue May 28, 2019 10:56 pm

Tue Oct 15, 2019 10:34 am

How to create your own gamemode in MFPS?
User avatar
InCodeWeTrust
Contributor
Contributor
Posts: 18
Joined: Wed Mar 27, 2019 10:05 am

Mon Oct 21, 2019 1:33 pm

To create a new game mode you will actually create it, which would require you to code the logic.
User avatar
Slava
New Member
New Member
Posts: 2
Joined: Tue Oct 22, 2019 11:38 am

Mon Oct 28, 2019 11:04 am

InCodeWeTrust wrote:To create a new game mode you will actually create it, which would require you to code the logic.
How to build it into the system?
User avatar
InCodeWeTrust
Contributor
Contributor
Posts: 18
Joined: Wed Mar 27, 2019 10:05 am

Thu Jul 16, 2020 7:04 pm

Slava wrote:
Mon Oct 28, 2019 11:04 am
InCodeWeTrust wrote:To create a new game mode you will actually create it, which would require you to code the logic.
How to build it into the system?
That all depends on what it is. For instance something simplier -> I wrote my own vital slider controller for various vitals like stamina health armor etc.

This required some hooks into these scripts:
bl_PlayerUIBank.cs
bl_PlayerHealthManager.cs

and for example: I changed the HealthBar type from Image to my new script PlayerStatSlider to hook into it. I try not alter the code base directly and if I do minimal to provide links to my mods to manipulate MFPS. This way you can update without losing too much of your own mods.

To approach a gamemode, I would first look at how one is currently handled. IE: Gunrace -> This is one of the simpliar game modes to examine and look at to approach creating your own. You need to create UI for this new game mode and add it to every game scene. Add it to lobby script and game data if needed for options and a game mode script that runs that gamemode for points or kills or whatever your tracking.

You really need to understand how MFPS works under the hood before you can extend it. Good news its coded pretty clearly and a big community behind it so if you get stuck I am sure you can just ask.
Post Reply