LibXmlRpc Improvements

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: LibXmlRpc Improvements

Post by w1lla »

For TrackMania:

LibXmlRpc.PositionPlayer in Race. Now its not shown or gettable anywhere. Otherwise please add it in the following callback LibXmlRpc_OnWayPoint.

,
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: LibXmlRpc Improvements

Post by Eole »

undef.de wrote:Then there is a need for a trigger like LibXmlRpc_GetWarmUp to get LibXmlRpc_WarmUp as it is available in TM.
Done and available on GitHub after this commit.
undef.de wrote:And a settings cache for not reset given settings on a map restart: http://forum.maniaplanet.com/viewtopic. ... 13#p232113
Done for LibXmlRpc_BlockCallback, UI_SetProperties and LibScoresTable2_SetStyleFromXml. But restarting the map didn't reset the settings for me. What is the problem exactly with SetModeScriptSettings?

@W1lla :
You want to get the player's ranking when he crosses a checkpoint? In Time attack it should be the player's ranking at the checkpoint for his current run and not the rank of his best run?
Otherwise you can get a player ranking with the "LibXmlRpc_GetPlayerRanking" method.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post by undef.de »

Eole wrote:
undef.de wrote:And a settings cache for not reset given settings on a map restart: http://forum.maniaplanet.com/viewtopic. ... 13#p232113
Done for LibXmlRpc_BlockCallback, UI_SetProperties and LibScoresTable2_SetStyleFromXml.
Thanks, checked and confirming that they are working. :thumbsup:

Eole wrote: But restarting the map didn't reset the settings for me. What is the problem exactly with SetModeScriptSettings?
I can't remember why, but since your post http://forum.maniaplanet.com/viewtopic. ... 34#p221734:
Eole wrote:When voting/forcing a restart map the whole script is restarted, so most of the script variables loose their current value and take the default one. A map change doesn't restart the script and so doesn't cause the same problem. It's the case for all game modes on TrackMania and ShootMania.
i was sending a "SetModeScriptSettings" on a Map restart. But now these settings are retained for me too... hmmm. So there is no need for changes.

But just found another notice from me in my code about your above posting: "Rounds_SetPointsRepartition" in Rounds.Script.txt are reseted to defaults on a Map restart. This i have to send again, to have my custom settings. It would be nice to have a caching function for this too. :)
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: LibXmlRpc Improvements

Post by Eole »

undef.de wrote:But just found another notice from me in my code about your above posting: "Rounds_SetPointsRepartition" in Rounds.Script.txt are reseted to defaults on a Map restart. This i have to send again, to have my custom settings. It would be nice to have a caching function for this too.
Available on GitHub.
kremsy wrote:Thanks for your improvement!
undef.de wrote:Yes agree, adding a warmup flag to LibXmlRpc_BeginRound and LibXmlRpc_EndRound would be helpful.
Would be good if this could be done as well to make everything cleaner and destroy unnessessary complexity of these things.
I'll try to see what I can do, but I'm not sure it will be possible. For example in Elite a lot of initializations are done in the beginround and beginturn sections. It's only in the middle of beginturn that the mode check if it needs a warmup or not and start one immediately. So when LibXmlRpc_BeginRound is sent we still have no idea if the mode needs a warm up or not.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post by undef.de »

Eole wrote:
undef.de wrote:But just found another notice from me in my code about your above posting: "Rounds_SetPointsRepartition" in Rounds.Script.txt are reseted to defaults on a Map restart. This i have to send again, to have my custom settings. It would be nice to have a caching function for this too.
Available on GitHub.
Thanks works 100% for me. :thx:
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: LibXmlRpc Improvements

Post by Eole »

1) The turn and round sections are optionals parts of the basic mode. Some modes don't send the BeginRound and BeginTurn, some send only one of the two and some others send both.

2) Yes.

3) In Elite when you see a +2 it's because the game add two shooter points together if they are close enough. You do a +1 -> +1 but the game combines them and displays +2. The only game mode where the shooter points won't be 1 is Royal.

4) It should be the case. I checked on my side and I receive EndTurnStop after Elite_EndTurn. Maybe I don't understand what you're asking?
Elite_EndTurn.png
Elite_EndTurn.png (18.61 KiB) Viewed 726 times
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests