Maniascript ingame debugger?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Maniascript ingame debugger?

Post by reaby »

Ok, there's some interesting new script thingies, like:

Code: Select all

Dbg_WarnOnDroppedEvents = True;
Void 	Dbg_SetProcessed (CMlScriptEvent Event);
Text 	Dbg_DumpDeclareForVariables (CNod Nod, Boolean StatsOnly);
also I remember there was at some point possiblity to enable profiler for script timings and memory usage...
So in case i would like to debug if certaint serverside manialink slows down, how to do this most effecient way ?

Also would be very nice to send event-based data across manialinks for server sided widgets...

Currently I found a way by passing 2 variables declared for localplayer, one with changing id and one with the actual data needing the update.
Then I compare on each loop if the id has changed from last value, if it is, update data to all widgets listening for that variable.
But I'm not sure if it drops performance... and if it does, I would like to know how much?

How about persistence variables on maniaplanet 4, I see alot of that not working anymore.
Which types still supports for saving data ?
User avatar
Miss
Posts: 2151
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: Maniascript ingame debugger?

Post by Miss »

For profiling I believe you have to use the "tuningstart", "tuningend", "tuningmark" keywords.
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Maniascript ingame debugger?

Post by reaby »

so it is keywords, not method calls ?
I have no idea how this works. If someone knows how this all works, please write a tutorial, so it would help others as well!!
User avatar
Miss
Posts: 2151
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: Maniascript ingame debugger?

Post by Miss »

Maybe this thread helps explain it?
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Maniascript ingame debugger?

Post by reaby »

Many thanks :thumbsup: ^^ explains nicely how it supposed to work.
User avatar
Dommy
Translator
Translator
Posts: 1866
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: Maniascript ingame debugger?

Post by Dommy »

reaby wrote: 23 Nov 2017, 22:04Also would be very nice to send event-based data across manialinks for server sided widgets...

Currently I found a way by passing 2 variables declared for localplayer, one with changing id and one with the actual data needing the update.
Then I compare on each loop if the id has changed from last value, if it is, update data to all widgets listening for that variable.
But I'm not sure if it drops performance... and if it does, I would like to know how much?
I would suggest declaring things for This. It allows you to share variables across instances of the same context, CMlScriptIngame in this case.

Code: Select all

declare Integer[Text] CurrentMapRecords for This;
Doing something like above in several layers should allow you to transport data easily. If this doesn't work, you may go for persistent for LocalUser.
reaby wrote: 23 Nov 2017, 22:04 How about persistence variables on maniaplanet 4, I see alot of that not working anymore.
Which types still supports for saving data ?
They still work, however storage may exceed the limit at some point. It works for primitive types only, like Text, Integer, Real, Boolean, Vec2, Vec3 (and arrays of these).
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Maniascript ingame debugger?

Post by reaby »

Many many many thanks dommy and miss for this fast replies and help :thx:
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest