• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Future of OTs, Game Scripting directly in Map Editor! (sharing my vision)

Would you care if this thing became reality?


  • Total voters
    19

Marcus

User.postCount++;
Joined
Nov 14, 2015
Messages
1,074
Solutions
10
Reaction score
392
Location
Sweden
So with all talk about CipSoft ways of probably making scripts in their MapEditor and people proposed we should try out something as well, with various of ideas which is both good and bad, I decided to open my mind about how it could be done, with some efforts from various people.
Thread of such discussion is for example @Ezzz found here.

(sorry for bad quality but it's just made to be an example)
I propose this:

The new "view item" window:
j3ayDwN.png


And when you click on one/several action options, you get 1 new window inside for each type of action:
M0WiHzR.png


In there you can write the script in LUA.
To make this the most professional way, the game engine must have additional "unique ids" in form of:
  • onmovein_uid
  • onmoveout_uid
  • onuse_uid
  • onuseex_uid
After that, RME saves actions into /data/world/actions.xml
and create 1 new LUA file in /data/world/actions/movein/100.lua
100 -stands for the unique "moveIn Id" provided in RME, whenever a new moveIn action is added to the game, RME will add the UID type to the item making sure it's uid++ (and double check so it's not already taken, similar like house-door ids).

With new sets of unique ids, we can add multiple actions to the same item without conflicts.

From there we'll have a lot of "messy" files in /world/ but as they're meant to be loaded in the MapEditor it wont matter too much.

With some effors from people working on MapEditors, and people who work with TFS sources, this could be done in no time really.

and it would really make managing and creating servers a lot easier as you'd be working on the MapEditor alone, and not MapEditor, Action + Move folders with multiple lua files open at same time + extra stuffs to keep track of all UIDs and Actionids you're using all the time.

All this is only my ideas, it will need some altering
etc, onAddItem as action as well.
and some other stuffs that could be modified to make it better and more "all-around"
 
Last edited:
We should first rewrite the map format. Its very outdated and I am sure there are better alternatives out there.
 
If not made correctly, it could be a pain in the ass to locate a single script

I don't feel comfortable about storing scripts inside the map binary file, that should be done as a data pack manager that would interact with the map editor, but still save files as .lua in a folder and have a tag inside the XML, the map editor would take care to properly load and save from the datapack.

No edits to TFS should be necessary so we don't break backwards compatibility.
 
If not made correctly, it could be a pain in the ass to locate a single script

I don't feel comfortable about storing scripts inside the map binary file, that should be done as a data pack manager that would interact with the map editor, but still save files as .lua in a folder and have a tag inside the XML, the map editor would take care to properly load and save from the datapack.

No edits to TFS should be necessary so we don't break backwards compatibility.

TFS would stay the same, just have extra unique ids that can be used, but you could still use the old system using action/unique id.
RME would load LUA files from within the map folder, so the actions wouldn't be stored in the actual map file, but as side-by files.
And pointed by the new unique ids, it would open LUA files if you view an item that has and special unique id, and it would load a file that uses the same number as name.

So in short, the unique ids would just be an "addon" in TFS but you could still use TFS as a normal OT with old action systems.
 
It can be useful for short and easy scripts. Cool idea.
 
Back
Top