Because someone had to do it!
SRB2 Golf is a gametype heavily inspired by 2.0's exe mod XSRB2 by Inuyasha, where you could transform the game into a fun match of mini-golf!
This mod aims to facilitate the creation of golf courses with support for multiple holes per course, a complete scoring system using putts and rings, position-based checkpoints,badly and barely reworked physics, low putts and high putts akin to Kirby's Dream Course and, of course, multiplayer support!
There are still more features to be added to the mod, but I am opting to release it as-is as an incentive to keep working on it into the future (peer pressure is some pretty powerful stuff) and to drum up interest in map-making for golf courses!
-CONTROLS-
The "Simple" and "Strafe" control styles are supported, but a couple of players have reported errors with them. If you come across any errors please report them to me directly on Discord.
-IMPORTANT INFO-
-FAQ-
-CREDITS AND THANK YOUS-
Inuyasha, both for creating XSRB2 and allowing me to port his golf maps over to my mod!
Golden, for being a great lua teacher and nice dude overall!
Amperbee, for helping me figure out a pretty big bug in my code!
Xelork, for being that shiny beacon of positivity I can always rely on!
The entirety of the SRB2 Brasil discord community, for putting up with my endless bull for months on end!
SRB2 Golf is a gametype heavily inspired by 2.0's exe mod XSRB2 by Inuyasha, where you could transform the game into a fun match of mini-golf!
This mod aims to facilitate the creation of golf courses with support for multiple holes per course, a complete scoring system using putts and rings, position-based checkpoints,
There are still more features to be added to the mod, but I am opting to release it as-is as an incentive to keep working on it into the future (peer pressure is some pretty powerful stuff) and to drum up interest in map-making for golf courses!
-CONTROLS-
- SPIN: Enter a putt state. While in this state, press spin again to putt, or jump to cancel your putt.
- CUSTOM 1: Toggle "high putt" mode. Your directional arrow should flick upwards, and your next putts will now take you upwards in an arc.
- PREVIOUS / NEXT WEAPON: Set how fast the putt bar charges.
- Going lower than speed 1 will toggle manual mode, where you can manually set the power of your putt.
The "Simple" and "Strafe" control styles are supported, but a couple of players have reported errors with them. If you come across any errors please report them to me directly on Discord.
-IMPORTANT INFO-
In order to play golf maps you'll need to create a multiplayer session for yourself and select the newly added Golf game mode from the game mode list.
This is a limitation in SRB2 that I am looking into, but right now it seems the only way to add the game mode directly into the single player menu would require the creation of an .exe mod, which is more trouble than it's worth for one small menu change.
This is a limitation in SRB2 that I am looking into, but right now it seems the only way to add the game mode directly into the single player menu would require the creation of an .exe mod, which is more trouble than it's worth for one small menu change.
In order to create a course, your map will need holes, course warp coordinates, a course par, a line in the level header specifying your map is a golf map and, optionally, a custom color for the player's putt bar for that map. We will go through each one of these below, but to set the game type to golf all you need to do is change this line in your level header:
Moving on...
After everything is in place, make sure to give your map a Go_ prefix in its filename and you're all set to go!
Moving on...
Holes are created in the same way as any level end sector. Simply assign an area with Special 8192 and that area will be considered the end of a course.
This is all you need to do to create a course with one hole. If you wish to add more, read on!
To create more holes, you will need to add the golf mod .pk3 file as a resource. This should add the thing type 3500, the golf marker, to your thing list.
This marker indicates where a player will be headed after touching a hole. Its position will indicate the player's new X, Y and Z position, their angle, as well as when they should be warped there. This is extremely important, as it will determine in which order your course will play out!
The player's next marker is decided through the marker's angle, in this way:
This is all you need to do to create a course with one hole. If you wish to add more, read on!
To create more holes, you will need to add the golf mod .pk3 file as a resource. This should add the thing type 3500, the golf marker, to your thing list.
This marker indicates where a player will be headed after touching a hole. Its position will indicate the player's new X, Y and Z position, their angle, as well as when they should be warped there. This is extremely important, as it will determine in which order your course will play out!
The player's next marker is decided through the marker's angle, in this way:
- A marker deciding the second course a player will head to will need no special changes to its angle value. In other words, you're free to set the angle the player will spawn at and leave it like that.
- A marker deciding the THIRD COURSE AND ONWARDS will need to have their angles changed. After touching a hole in the second course, the mod will then start looking for a new golf marker that has the player's angle [ +360 * (HOLE NUMBER - 2) ]. This may sound confusing, but it's honestly pretty easy to wrap your head around. here's an example:
- After course 2, start counting up from 1. That means course 3 will be 1, course 4 will be 2, course 5 will be 3 and so on. Multiply this number by 360, then add in the angle the player will be at when they spawn. that's it!
Course 3 >> (360 * 1) + player angle Course 4 >> (360 * 2) + player angle Course 5 >> (360 * 3) + player angle Course 6 >> (360 * 4) + player angle . . . Course N >> (360 * (N - 2)) + player angle
A "par" is the optimal number of putts needed to clear a course. This number will determine how many points a player will get when they reach a hole, so make sure to give each course a fair par! IMPORTANT: A par 1 will still give players the hole in one bonus if they complete your course in one putt, so try giving your courses a par of at least 2.
To give a map with only one course a par, all you need to do is edit the map's level header to include this line:
This will determine the par for the one hole in your map. Now, if your map has more than one course you will need to add a par for every hole, separated by a ; symbol, like this:
Easy!
To give a map with only one course a par, all you need to do is edit the map's level header to include this line:
This will determine the par for the one hole in your map. Now, if your map has more than one course you will need to add a par for every hole, separated by a ; symbol, like this:
Easy!
By default, a level will have no putt bar color and will instead use a character's skin color as the bar color and their inverse skin color as the charging bar color. color color color color. Here is sonic in a map without any colors specified, using a blue putt bar and an orange charge bar:
If you want to use custom colors in your map, add these lines to your level header:
the numbers used are taken from SRB2's skin colors, so use that as your reference when picking your bar colors. The colors used above are bronze and moss, resulting in these bar colors:
Skin colors and their numbers can be checked here: https://wiki.srb2.org/wiki/List_of_skin_colors
If you want players to keep their shields after completing a hole, add the line
This will allow players to keep their shields into the next courses. This feature is OFF by default.
If you want to use custom colors in your map, add these lines to your level header:
the numbers used are taken from SRB2's skin colors, so use that as your reference when picking your bar colors. The colors used above are bronze and moss, resulting in these bar colors:
Skin colors and their numbers can be checked here: https://wiki.srb2.org/wiki/List_of_skin_colors
If you want players to keep their shields after completing a hole, add the line
Lua.CarryShield = true
to your level headerThis will allow players to keep their shields into the next courses. This feature is OFF by default.
After everything is in place, make sure to give your map a Go_ prefix in its filename and you're all set to go!
playersforgolfexit
- Sets how many players need to complete all courses in a map before a level end timer of 2:30 minutes appears. Set to 3/4 by default.
- Can be set to 'all' , '3/4' , '1/2' or '1/4'
-FAQ-
- XSRB2's Aether Shrine golf course, ported with Inuyasha's permission then edited to better fit the mod
- Support for using shield powers while spinning in the air and letting map makers decide if a shield should be kept or not between holes
- Tweaked spectator mode allowing players to examine the course ahead without losing course progress
- Multiplayer support, with map change countdowns after enough players finish a map
- Support for map creation with multiple courses
- Shot trajectory prediction
- New camera angles to better adjust your shots (don't count on it)
- Better support for co-op maps in golf mode
- A tutorial map
- More QoL changes
- Even more stuff to come! Maybe! Who knows! Definitely more bugs!
Yes! Although playing the mod like that is not officially supported yet given how co-op maps are built to accommodate an entirely different play style, making them highly softlock-prone.
To play other maps while using golf controls, load a golf map then open the game's console and type in:
To play other maps while using golf controls, load a golf map then open the game's console and type in:
map [desired map number] -force
Snolf is a character wad, and as such creating golf courses based on the little guy would come with some limitations that would need to be solved on a per-map basis. The idea here is to provide a tool for map makers and a fun game mode for all SRB2 characters above all else.
-CREDITS AND THANK YOUS-
Inuyasha, both for creating XSRB2 and allowing me to port his golf maps over to my mod!
Golden, for being a great lua teacher and nice dude overall!
Amperbee, for helping me figure out a pretty big bug in my code!
Xelork, for being that shiny beacon of positivity I can always rely on!
The entirety of the SRB2 Brasil discord community, for putting up with my endless bull for months on end!