Upload driven time to some database? Singleplayer campaign

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
BigBang1112
Posts: 230
Joined: 20 Jul 2015, 12:44
Location: Český Krumlov, Czech Republic
Contact:

Upload driven time to some database? Singleplayer campaign

Post by BigBang1112 » 05 Mar 2018, 22:53

I've been looking lately for a way to script the singleplayer race gameplay (like when you finish, your time gets submitted or you earn a medal) and I got really really confused how does that even work.
I like how it's done in title packs made using Maker tool - after finishing, your replay gets submitted somewhere for example. I'm not a fan of Maker tool so I would love to know how is that done using normal scripting.

I'm not here without anything as always - to show that I'm actually trying to find that information. So, those are my ideas:
- Make a gamemode that can handle the score submit. Hard to tell if that is the correct way... It could work in general but there should be a better way.
- CManiaAppPlayground - This class looks promising to me, although once again like with CManiaAppTitle, I don't know how I can access this class. If that's the way to do those things like the finish screen Maker has, I would really love to see how this class can be used. <3

I'm sorry that probably my question is messy, but I'm generally confused how things now work in MP4. We need this for the Reunited, which without this information can't even happen. So, we thank you a lot for answering, it will mean a lot. <3

User avatar
adamkooo2
Posts: 1247
Joined: 13 Jun 2014, 08:43
Location: Slovakia // Slovensko
Contact:

Re: Upload driven time to some database? Singleplayer campaign

Post by adamkooo2 » 06 Mar 2018, 12:35

Even with my poor maniascripting skill, I might help you. The command to save current progress is:

Code: Select all

Solo_SetNewRecord(Player.Score, EMedal);
It will save the medal to your campaign, show gained SkillPoints and saves to Nadeo database (if I understand right what you want :mrgreen: ). But you will get the MP3 UI and that's not the best, but you can use it now as a temporary solution
BigBang1112 wrote:
05 Mar 2018, 22:53
CManiaAppPlayground
I can't help you with that :/

BTW.
You can find whole maker-solo script here and see the commands you need: GameData/PackCache/TrackMania_Extras.zip/Scripts/Modes

Good luck with your project :)
/\rkady
Image

User avatar
BigBang1112
Posts: 230
Joined: 20 Jul 2015, 12:44
Location: Český Krumlov, Czech Republic
Contact:

Re: Upload driven time to some database? Singleplayer campaign

Post by BigBang1112 » 06 Mar 2018, 14:36

So, if that means the solo score saving is really done using gamemodes, that is enough information for me then!
Thanks!

User avatar
Eole
Nadeo
Nadeo
Posts: 1208
Joined: 26 Apr 2011, 21:08

Re: Upload driven time to some database? Singleplayer campaign

Post by Eole » 06 Mar 2018, 15:30

All the scripts included by the title maker are available on our gitbub repository. You can find the scripts managing all the medal/replay/save/... logic of the campaign inside.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

User avatar
BigBang1112
Posts: 230
Joined: 20 Jul 2015, 12:44
Location: Český Krumlov, Czech Republic
Contact:

Re: Upload driven time to some database? Singleplayer campaign

Post by BigBang1112 » 06 Mar 2018, 19:50

Nice! Thanks!

Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests