Closed GlenMartens closed 2 years ago
You should include Permissions.as
and use Permissions::PlayHotSeat()
to check if the user has permissions to play hotseat. I think it's normally possible to play even on Starter edition, but since the permission exists it's probably worth checking against.
To include Permissions.as
, add this to your info.toml
:
[script]
imports = [ "Permissions.as" ]
I did what you said, i check the permission when the button 'Start Better Hotseat' is pressed. But i also think Starter access can also play Hotseat. I also added the openplanet id to the toml file. Here is the updated file: BetterHotseat.zip
Nice! This all looks good, but I'd like to double check - are the maps that get played customizable, or is it only the campaign maps?
No the campaign, totd and club maps cannot be selected. The maps can only be selected from those that are in the Documents/Trackmania/Maps folder, so all maps have to be downloaded from trackmania exchange. This is because my plugin looks at the maps that are selected in the local network mode.
Oh it doesn't matter, Local network cant be launched without a paid access plan while the normal Hotseat mode can be played with starter access, but i'm guessing you can't play downloaded maps without standard access, otherwise you could download all the tracks. So i also added OpenplanetHasPaidPermissions() to my plugin and added perms = "paid" to my toml file. Maybe i will add the possibility to play the campaign tracks at another time, but for now this is fine. Here is the latest version: BetterHotseat.zip
I also have already made a draft page with some information: https://openplanet.nl/files/143
For local maps (eg. files in the Maps folder), you should use Permissions::PlayLocalMap()
. Generally, prefer using the individual permission functions (instead of OpenplanetHasPaidPermissions()
or the perms
value in info.toml
). I might deprecate the perms
value at some point too, as there were some problems with it when the game is running in offline mode.
I removed the perms
value from info.toml
and I replaced OpenplanetHasPaidPermissions()
with Permissions::PlayLocalMap()
. Where do I find all the possible methods of Permissions
so i can look at them the next time I change something ? Thanks for all the help :) it is much appreciated. The new file:
BetterHotseat.zip
Permissions.as
is located in your game directory, eg: D:/Games/Trackmania/Openplanet/Scripts
.
Plugin description
This plugin aims to improve the Hotseat mode by a lot by showing all ghosts, keeping local records and allowing for cuustom names.
Did you provide a
perms
meta value or a#perms
preprocessor option?no
Did you use
Permissions.as
?no
Attach your plugin
BetterHotseat.zip