What devs would like in MP4 for ManiaScript

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
Nerpson
Translator
Translator
Posts: 1555
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

What devs would like in MP4 for ManiaScript

Post 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) {
		Music.Audio.Play();
	}
}
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. :)
ImageImageImageImage
User avatar
Dommy
Translator
Translator
Posts: 1901
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: What devs would like in MP4 for ManiaScript

Post 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

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

Code: Select all

CMlColorCorrection
Real Brightness (0. - INF)
Real Saturation (0. - 1.)
Real HUE (0. - 1.)
Real Contrast (0. - 1.)
etc.
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

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

Code: Select all

CMediaClip
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 ShootMania_extras.zip
Ability to use pickups and Toads without custom title packs.

11. RemovePlayerArmor() in CSmAction context
See: viewtopic.php?t=31733
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
User avatar
Nerpson
Translator
Translator
Posts: 1555
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: What devs would like in MP4 for ManiaScript

Post 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.>;
QuadToAdd.ChangeImageUrl("http://memecrunch.com/meme/7SK8O/deez-nuts/image.png");
MainFrame.AddChild(QuadToAdd);
ImageImageImageImage
User avatar
Nerpson
Translator
Translator
Posts: 1555
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Nerpson »

14. Get characters in Texts like arrays

Code: Select all

declare Text MyText = "Lol bro";
log(MyText[4]);
This would return "b".
ImageImageImageImage
User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post 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.
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
Nerpson
Translator
Translator
Posts: 1555
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Nerpson »

19. Shorter incrementing

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

Code: Select all

declare Integer MyInt = 0;
MyInt++; // or MyInt--;
ImageImageImageImage
oliverde8
Posts: 1345
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: What devs would like in MP4 for ManiaScript

Post 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
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: What devs would like in MP4 for ManiaScript

Post 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

SendAction(OpenBuddylist|OpenSettings|...)
SendNotification(Title, Message, Icon) // recreated the behaviour in a script, but a native might be better
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
User avatar
Dommy
Translator
Translator
Posts: 1901
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Dommy »

23. CManiaPlanetPlugin documentation
If you know what i mean 8-)
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
User avatar
Nerpson
Translator
Translator
Posts: 1555
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: What devs would like in MP4 for ManiaScript

Post 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.
ImageImageImageImage
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest