Page 1 of 4

What devs would like in MP4 for ManiaScript

Posted: 29 Aug 2015, 12:27
by Nerpson
Hello there!

It's been quite a while since I find cool ideas to get ManiaScript to the max hype level. So here's my brain dump about this. Friends devs, feel free to add some of yours bellow.

1. Allow declaration of classes, enums

Code: Select all

Class CBonus {

	declare CBonus::EBonusType Type;

	declare Integer Level;

	// Constructor
	CBonus(CBonus::EBonusType _Type, Integer _Level) {
		This.Type = _Type;
		This.Level = _Level;

	// Constructor overloading
	CBonus(CBonus::EBonusType _Type) {
		This.Type = _Type;
		This.Level = 1;

	Void ApplyBonusTo(CSmPlayer _Player) {
		switch (This.Type) {
			case CBonus::EBonusType::Stamina: {

				if (_Player.StaminaMax < 3 - This.Level)
					_Player.StaminaMax += MathLib::ToReal(This.Level);

				else if (_Player.StaminaMax < 3)
					_Player.StaminaMax = 3.;

			case CBonus::EBonusType::Armor: {

				if (_Player.ArmorMax < 10 - This.Level)
					_Player.ArmorMax += MathLib::ToReal(This.Level);

				else if (_Player.ArmorMax < 10)
					_Player.ArmorMax = 10.;


Enum EBonusType {
	Stamina, Armor;
As you can see, this code looks like Java. Variables are declared on the top of the class, I think there's no need to have private or public variables. To call the object's attributes, you can use the This keyword. Constructors are the same as Java. No return type, it's a method named liked the class.

The enum is just a simple list of names, separated with commas and ending with a semicolon.

Bellow is an example to instantiate a CBonus object.

Code: Select all

declare CBonus Foo <=> CBonus(CBonus::EBonusType::Armor, 2);
I thought that this is clearly not useful to have another keyword new like Java.

2. More control on <camera>, <audio>, <music>, <video> in ManiaLinks

Code: Select all

declare CMlAudio Music <=> (Page.GetFirstChild("audio") as CMlAudio);

while (True) {
	if (!Music.Audio.DownloadInProgress && !Music.Audio.IsPlaying) {
Here, I would like that <audio> and <music> can be used in ManiaScript as CMlAudio having an CAudioSound attribute Audio. Same for video, in order to allow us to play, pause, stop, control the volume of the video.

For <camera>, having multiple camera support would be cool. :)

Re: What devs would like in MP4 for ManiaScript

Posted: 29 Aug 2015, 14:38
by Dommy
3. XmlRpc for CManiaPlanetPlugin
Use external application to connect with plugin and control Windows Media Player, OBS, etc.
Facebook Connect for Evidence

4. More control for Audio and Quads
Ability to play more than 1 sound as music, equalizer, lame format support (MP3), FLAC support.

Code: Select all

Real 30Hz
Real 60Hz
Real 120Hz
Real 240Hz
Real 480Hz
Color correction for quad/video.

Code: Select all

Real Brightness (0. - INF)
Real Saturation (0. - 1.)
Real HUE (0. - 1.)
Real Contrast (0. - 1.)
Global opacity for CMlFrame.

5. TrackMania maptypes validation constrants not overridden by "Race" and multiple spawns, items in TM
Landmarks system like in ShootMania.

Code: Select all

CTmMapLandmark, CTmMapPlayerSpawn, CTmMapCheckpoint, CTmMapFinish
Dynamic objects for TrackMania scripts (make CSmObject as a common class CObject in CMode instead of CSmMode).

6. Access saved MediaTracker clips as CMediaClip
Ability to attach (alias, add to array) CMediaClip to CUIConfig to play it on player screen, adjust play point and speed, like Audio sound.

Code: Select all

declare MyScreenEffect = ClipsList_Add("Effect.Clip.gbx");

Code: Select all

Integer Priority
Real PlayCursor
Real PlayLength
Real PlaybackSpeed
Boolean IsPlaying
Void Play()
Void Stop()

Code: Select all

CMediaClip[] CUIConfig::MediaTrackerClips
7. Camera management for both TM and SM
Ability to change player camera in SM throuh script as enumerator.

Code: Select all

ESmCamera CUIConfig::SMForceCameraType [FirstPerson, ThirdPerson, Free]
Ability to force camera type in TM scripts.

Code: Select all

Boolean CUIConfig::TMLockFreeCamera
Integer CUIConfig::TMForceCameraType [0, 1, 2, 3, 4]
8. Apply different cars for players and allow to create own vehicles in the Items Editor
Set one of the default cars in TMAll titles.

Code: Select all

CTmMode::EVehicle [CanyonCar, StadiumCar, ValleyCar, LagoonCar]
CTmMode::SetPlayerVehicle(CTmPlayer, EVehicle)
const EVehicle CTmPlayer::CurVehicle
Ident CTmPlayer::ForceModelId

Code: Select all

declare Ident MyCarId = IItemList_Add("Vehicles\\GuerroCar.Item.gbx")
Player.ForceModelId = MyCarId;
9. Remove shitty vanilla limits in SMStorm title
You cannot change player weapon while spawned in vanilla modes. RLY?

10. Combo itens, Toad skin in
Ability to use pickups and Toads without custom title packs.

11. RemovePlayerArmor() in CSmAction context
See: viewtopic.php?t=31733

Re: What devs would like in MP4 for ManiaScript

Posted: 31 Aug 2015, 13:22
by Nerpson
12. Add in the CMlEntry class an enum for the textformat

Code: Select all

Enum CMlEntry::ETextFormat {
default, password, newpassword;
Then, we will be able to do this:

Code: Select all

declare CMlEntry Entry <=> (Page.GetFirstChild("entry") as CMlEntry);
Entry.TextFormat = CMlEntry::ETextFormat::Password;
13. Add the possibility to add controls in manialink

Could be cool to do this through CMlFrame instances.

ML is a CMlManager (CMlScript attribute, like Http, Audio or Xml) which returns instances of the controls asked.

Code: Select all

declare CMlFrame MainFrame <=> Page.MainFrame;
declare CMlQuad QuadToAdd <=> ML.CreateQuad();

QuadToAdd.RelativePosition = <0., -10., 2.>;

Re: What devs would like in MP4 for ManiaScript

Posted: 02 Sep 2015, 17:56
by Nerpson
14. Get characters in Texts like arrays

Code: Select all

declare Text MyText = "Lol bro";
This would return "b".

Re: What devs would like in MP4 for ManiaScript

Posted: 02 Sep 2015, 23:52
by w1lla
15. (Menu_Competitions: Not available or is lost in the process.) Where did it go? It was a feature but i believe nadeo failed on this part and its useless now in the code. Hopefully nadeo revives it, otherwise other people will begin to create own parts to create own tournaments.

16. (XmlRpc: Send if a player is using HMD or Stereo or None. Can be handy for developers)

17. Cache (Not sure if this is available but caching in files like .xml or .txt) Caching data so its easier to see if data is acquired properly or not!

18. Trackmania: Set match index's likewise how many matches, maps are being played.

Re: What devs would like in MP4 for ManiaScript

Posted: 07 Sep 2015, 22:54
by Nerpson
19. Shorter incrementing

Allow us to do C like incrementing (and decrementing):

Code: Select all

declare Integer MyInt = 0;
MyInt++; // or MyInt--;

Re: What devs would like in MP4 for ManiaScript

Posted: 08 Sep 2015, 19:17
by oliverde8
20. Funtion/Method pointers

Like in C be able to create variables that points to functions. So that we can pass the in parameter and such.

21. Better way if interacting between multiple windows sent by the dedicated
When we have to do the same code that detects when a player has crossed a CP in 5 different windows sent by the dedicated :roflol:

We tried to put all in one window but lool, the window was to big with all the code storing the Local Records, Dedimania records all Checkpoints information and the dedicated fails to send it.

If one windows could be "library" and be used by other windows. So other windows could register functions to be called (feature 20) and the library would call them if possible.

while we are at it dump maniascript and replace with LUA

Re: What devs would like in MP4 for ManiaScript

Posted: 09 Sep 2015, 19:54
by zocka
22. More Manialinkbrowser features
Something like

Code: Select all

Boolean CMlAddressbar::Autohide
const Text CMlAddressbar::Url
const Text CMlAddressbar::QueryString
Text CMlAddressbar::Fragment
or some other interface for these things plus

Code: Select all

SendNotification(Title, Message, Icon) // recreated the behaviour in a script, but a native might be better

Re: What devs would like in MP4 for ManiaScript

Posted: 09 Sep 2015, 20:52
by Dommy
23. CManiaPlanetPlugin documentation
If you know what i mean 8-)

Re: What devs would like in MP4 for ManiaScript

Posted: 10 Sep 2015, 14:17
by Nerpson
24. New primitive types

Add us some unsigned integer and some IEEE 754 types like float to pass the 32bit integer limit of 2 147 483 647.

Also could be cool to have Char.