PREVIEW3-MP4 banner

Maniaplanet 4 Preview #3 – Editors

This week, this article highlights the new creation possibilities for the players. Maniaplanet 4 will bring new tools and noticeable improvements on existing Tools. This way, it will be easier for creators to create and enrich their own games. They will also need less technical knowledge.

On the program: the modules, the editors and the plugins, the title makers, the Manialink, the ManiaScript and the documentation.

Modules

Maniaplanet 4 will introduce the notion of Modules. You should consider Modules as “super librairies”, allowing to add features to gamemodes, editors and manialinks very easily.

Example of module: skill shop
It’ll be possible to add a skill shop in a gamemode. To do this, the creator of the mode must indicate the skills for sell and their buying price. Then he must use the script to handle the bound between the buying act of the player and the shop. Next, the shop will manage automatically the consequences on the players as well as his game interface without the need for the creator to go to the script.

skill_store

Others types of modules are available, like a customizable scoretable, an inventory or also menus for the manialinks.

scoretable

One of the biggest interest of the module is that they’re easily shareable. Indeed, each module is saved in a “.Module.Gbx” file. Like this, if you create a gamemode that needs a skill shop for example, instead to create it yourself, you can choose one from the community and integrate it in your gamemode.

Editor of editors

The new Maniaplanet update will unveil the Editor of editors, allowing to create its own editors for Maniaplanet.

An editor must be based on an existing edition engine (example: Map Editor, Item Editor, etc.) and use one or several plugins manage its behaviour.

With the editor of editors, you can create variations of existing editors.

Example 1:
The Map Editor from Trackmania Turbo is a variation from the Trackmania² Map Editor.

Example 2:
The new Mesh Modeler Editor (allowing to create 3D object directly in Maniaplanet) can be used as a base to create a Voxel Editor:

Moreover there is a new “Pixel Editor” based on the 2D Editor, which will allow you to make shield or stickers for cars for example.

editor_pixel-editor

Title Makers

Title Makers are a new types of titles that players will be able to create. These titles will allow other users to more easily create titles from those ones.

For example, it’ll be possible to create an “Invasion Maker” Title which will allow to easily create several Invasion titles from different authors, diversifying the content by creating a new campaign, adding new items in the map editor or offering other style elements like menus.

With the release of Maniaplanet 4, all the Trackmania² environments, including Lagoon, will be based on the Trackmania² Title Maker that we’ll provide as an example.

The Manialink going on version 3

Two major modifications to the Manialink are noticeable. First the axis “z” of “pos” (formely “posn”, now depreciated) has been deleted and replaced with the attribute “z-index”. This change is important since it modifies a lot the depth’s management in the Manialink.

mp4_z-index

<frame id="BG" pos="0 0" z-index="0">
    <quad id="RED" pos="-43 -4" z-index="1" bgcolor="FD0000FF"/>
    <quad id="BLUE" pos="-29 7" z-index="2" bgcolor="0013FDFF"/>
</frame>
<frame id="MIDDLE" pos="0 0" z-index="1">
    <quad id="GREEN" pos="7 -7" z-index="-99" bgcolor="20FD00FF"/>
    <quad id="WHITE" pos="0 0" z-index="99" bgcolor="FFFFFFFF"/>
</frame>

<label id="TEXT" pos="-32 2" z-index="2" text="MyText" textsize="60" textcolor="000" size="14 3"/>

In this example will appear, from the most visible to the least visible: TEXT, WHITE, GREEN, BLUE et RED.

Indeed: At the root level of the manialink we have 3 controls: TEXT with a z-index of 2, MIDDLE with a z-index of 1 and BG with a z-index of 0. TEXT is at the front, then we have all the content from MIDDLE, and at the end the content of BG.

Globally, with this feature, there is no more need to add up the z from the related frames to order their controls. It also enforces the necessity of rigour while creating frames and merging controls.

The second major change is the new attribute “scriptaction”, which allows to directly transfer (without the need to go throught the ManiaScript of the Manialink) the events from a control to the ManiaApp. this will be useful for the plugins, the modules and the editors.

Others changes have been done like posn and sizen which are now depreciated for pos and size, the clipping of the frames with size and align or also pincorners which allow to put the quads in perspective.

The ManiaScript

Autocompletion

The Script Editor will enjoy several improvements like the support of the autocompletion. This autocompletion allow the automatic code writting completion by searching the correct entries in the API, librairies functions and keywords.

If you type “MyPlayer.”, the list will show the members of the related class as well as the functions and all other related members. You will just need to press ctrl+space to invoke the autocompletion. Moreover the autocompletion suggestions are contextual: if you start to write “declare”, the suggestion will be the types and the classes.

Performance Tool

The Script Performance Tool will allow you to know:

  • The number of instructions which have been executed for the selected script
  • The memory usage
  • The number of layers for the scripts having a graphical interface

The scripts using a lot of memory will appear in blue in the debugger.

To watch the performance more carefully, a new tool exists in the form of two functions: tuningstart() and tuningend(). Instructions between the two functions will be monitored and you will be able to extract the data in a report showing each line of code with its processing time.

Tuning

The debugger itself has been improved to display in a more explicit way errors or places causing issues. If the script encounters a blocking execution issue, the debugger will display the entire callstack even if one of the errors is located inside a library.

Finally, several improvements including the runtime and the compilation of the script have been made, which can make the loading faster.

Revamp of the documentation

And to help in these changes, the Maniaplanet documentation has been one more time entirely revamped, in its design and its organization.

doc

See you soon for the next Maniaplanet 4 preview!