Resource:Editor/Plugins: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Reverted edits by Marcin778 (talk) to last revision by Woovie)
Line 1: Line 1:
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
{{Resource page}}
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
== Introduction ==
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
The editor provides functions and commands to interface with external resources.  Normally creating elements or any such actions outside the editor makes them unseeable or unmanipulatable.  By importing elements, the editor is made to be compatible and is able to manipulate them, and save them into its map resource.  In practice, this allows basic development of plugins, or allowing manual compatibility to external resources.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
== Commands ==
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
An "import" command is exported in order to allow users to import the elements of a specified resource:
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
<syntaxhighlight lang="lua">import <resourceName></syntaxhighlight>
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* '''resourceName:''' The name of the resource you wish to import from.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
The elements from the resource will then be imported.  A practical use is for the importing of custom models.  While the editor is unable to load custom models itself, by importing models from a resource which can, a custom map can be created.  For example, the following steps could be performed in order order to modify custom map sth-aztec
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* Start the editor
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* Start (Not Open) sth-aztec manually.  This will start the map and load the custom models.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* Type "import sth-aztec" and the objects will be imported into the editor
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* The map will now be loaded
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
== Functions ==
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
The '''editor''' resource also exports an ''import'' function.  This replicates the command, but also allows importing element datatypes.  Essentially this allows resources to have control over importing without having to have permission from the editor itself..
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
<syntaxhighlight lang="lua">bool import ( element rootElement/resource resourceToImportFrom )</syntaxhighlight>
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* '''rootElement:'''  The root element of which you wish to import (The root itself and all children will be imported)
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
<p>'''OR:'''
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
* '''resourceToImportFrom:'''  The resource pointer of which you wish to import.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
== Editor plugins ==
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
====Editor Loop Generator====
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
[[Image:LoopGenerator.jpg|thumb|Loop generator working with the editor.|400x250px]]
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
An example use for this is the loop generator plugin, adapted from Offroader23's work on ''offedit''. 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
This resource adds custom gui which can be used to create perfect loops out of standard objects.  After perfoming this, it uses the exported ''import'' function and allows the editor to manipulate them.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
Download no longer available, hosted site closed.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
====Editor racemap loader====
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
This plugin will load objects from your race maps without the need for conversion.
Extrem liże hazowi dupsko a Barcioo liże cipsko Trinowi
 
Download no longer available, hosted site closed.
 
====Roller Coaster Generator====
With this plugin, you can create easily roller coaster like maps.
[[Roller Coaster Generator|Learn more by clicking here.]]
[[ru:Resource:Editor/Plugins]]
 
====Object Movement Generator====
An attempt to help some people create moving objects (using moveObject function) more easily.
 
Download [http://community.mtasa.com/index.php?p=resources&s=details&id=1224 here]

Revision as of 18:38, 1 January 2017

Introduction

The editor provides functions and commands to interface with external resources. Normally creating elements or any such actions outside the editor makes them unseeable or unmanipulatable. By importing elements, the editor is made to be compatible and is able to manipulate them, and save them into its map resource. In practice, this allows basic development of plugins, or allowing manual compatibility to external resources.

Commands

An "import" command is exported in order to allow users to import the elements of a specified resource:

import <resourceName>
  • resourceName: The name of the resource you wish to import from.


The elements from the resource will then be imported. A practical use is for the importing of custom models. While the editor is unable to load custom models itself, by importing models from a resource which can, a custom map can be created. For example, the following steps could be performed in order order to modify custom map sth-aztec

  • Start the editor
  • Start (Not Open) sth-aztec manually. This will start the map and load the custom models.
  • Type "import sth-aztec" and the objects will be imported into the editor
  • The map will now be loaded

Functions

The editor resource also exports an import function. This replicates the command, but also allows importing element datatypes. Essentially this allows resources to have control over importing without having to have permission from the editor itself..

bool import ( element rootElement/resource resourceToImportFrom )
  • rootElement: The root element of which you wish to import (The root itself and all children will be imported)

OR:

  • resourceToImportFrom: The resource pointer of which you wish to import.

Editor plugins

Editor Loop Generator

Loop generator working with the editor.

An example use for this is the loop generator plugin, adapted from Offroader23's work on offedit.

This resource adds custom gui which can be used to create perfect loops out of standard objects. After perfoming this, it uses the exported import function and allows the editor to manipulate them.

Download no longer available, hosted site closed.

Editor racemap loader

This plugin will load objects from your race maps without the need for conversion.

Download no longer available, hosted site closed.

Roller Coaster Generator

With this plugin, you can create easily roller coaster like maps. Learn more by clicking here.

Object Movement Generator

An attempt to help some people create moving objects (using moveObject function) more easily.

Download here