[ #D~ Tools ] Map Editor

Started by DizzasTeR, Aug 16, 2015, 11:24 AM

Previous topic - Next topic

DizzasTeR

Map Editor - Vice City Multiplayer

Hello gentlemen ( or ladies if any ), its finally done! What you have been waiting for is finally to be experienced by you, I present you my map editor. Since @DeViL_JiN started mapping for Empire Gaming, it was really hard as the software introduced to map for Vice City were kinda not compatible with VCMP as they would throw wrong rotation values. So I started my work to built an ingame map editor so its easier to map and test at the same time! Mapping together and backup your maps and edit them later whenever you want!

This map editor will also print a complete fine CreateObject statement with rotation in vector as well as a complete XML & .nut file with all the code written in them so you can easily copy and paste them into your script!

Interaction with Editor

Its easy make sure you read this carefully, the editor is really user-friendly and takes you no time to learn.

If you keep holding an arrow key the object will be continuously in motion, you don't need to tap keys to rotate or move them, just hold the key ;)

Maps Management:-
  • newmap [ Name ] - Creates a new map with the name provided { Name is always converted to lower case! }
  • savemap - Saves the currently opened map.
  • loadmap [ Name ] - Loads a map { Keep case sensitivity in your mind! }
  • exportmap - Export the map, outputs CreateObject statements on the console of the map currently opened.
  • closemap - Close any opened map { Unsaved changes may be lost! }
  • map - Tells you which map is currently being worked on.

Objects Management:-
  • addobject [ ID ] - Creates an object of the ID provided { Wrong ID may corrupt data! }
  • desall - Deletes all the objects created in the map which is currently opened.
  • delobj - Toggle on or off, when on touching objects deletes them.

Player Management:-
  • car [ Name/ID ] - Spawn a vehicle.
  • gotoloc/saveloc - Teleportation.

Player Keys:-
  • Arrow LEFT | RIGHT | UP | DOWN - Basic movements or rotation.
  • PAGE UP | PAGE DOWN - Z Movement/Rotation
  • CTRL + C - Clone object { The object you clone will have the exact rotation as the parent object, very useful for quick placements! }
  • R - Resets object rotation.
  • Delete - Deletes an object selected.
  • 1 - Switch between Rotation & Position Mode.
  • 2 - Speed variation.
  • Backspace - Stop controlling an object.
  • Object can be selected by shooting it once.

Objects Menu:-
  • You can enter the map selection menu by typing /addobject without any ID.
  • You can change the objects by tapping/holding arrow left/right keys
  • You can create the previewed object by pressing CTRL key.

Outputs:-
Once finished creating a map and its time for you to use it. You can use the export command as mentioned above. After you see the message that the map has been outputted successfully, you can go into /scripts/Maps/ and here you will find a .nut and .xml file with the same name as your map with all the codes inside.

Credits:-







- Video by @KAKAN
https://www.youtube.com/watch?v=e2UdmTlEYM8&feature=youtu.be#

Map Editor v1.3.3 BETA

[Spoiler=ARCHIVE - OLD VERSIONS]




Download: Editor v1.2.9


Download: Editor v1.2.8


Download: Editor v1.2.7


Download: Map_Editor_v1.2.6.zip


Download:

Download: Map Editor v1.2.4.rar


[/Spoiler]

Changelog:-
All changelogs are available in Editor.nut to reduce material from this post
~ Happy mapping!
~ 300th post!
~ Regards, Doom_Killer!

Thijn

First of all, nice work :)

Like pretty much every release here, I always have some things to point out :P

I'm not sure if I like your map saving system. Why not create 2 tables: maps and objects.
Quote- Maps
ID
Name

- Objects
ID
MapId
Model
x
y
z
rotx
roty
rotz

Another thing I like to point out, why save rotations as VARCHAR when you have the FLOAT datatype?

DizzasTeR

#2
Quote from: Thijn on Aug 16, 2015, 11:37 AMFirst of all, nice work :)

Thanks :)

Quote from: Thijn on Aug 16, 2015, 11:37 AMLike pretty much every release here, I always have some things to point out :P

You are definitely welcomed to point out things which can be improved.

Quote from: Thijn on Aug 16, 2015, 11:37 AMI'm not sure if I like your map saving system. Why not create 2 tables: maps and objects.
Quote- Maps
ID
Name

- Objects
ID
MapId
Model
x
y
z
rotx
roty
rotz

Uh, I don't like it that way, I preferred this way because all I have to deal with is to be able to save and load maps for later editings and other stuff.

Quote from: Thijn on Aug 16, 2015, 11:37 AMAnother thing I like to point out, why save rotations as VARCHAR when you have the FLOAT datatype?

Woops, my bad, I'll change them and update it ;)

Edit: @Thijn, done.

FinchDon

Nice Work Bhai ( Brother ) But Can You give link of SLC Sqlite Plugin?
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

.

Quote from: FinchDon on Aug 16, 2015, 12:09 PMCan You give link of SLC Sqlite Plugin?

===>>>



Quick suggestions.

  • Use SQLite_Exec(...) when you don't expect a result from a query such as INSERT, UPDATE, DROP etc.
  • User SQLite_Query(...) only when you expect a value to be returned such as a SELECT
  • No need to include the SQLite wrapper utility Database.nut and Message.nut when you don't use it and work directly with the functions.
  • Optional: Include a link in the script file to where people can download the plugin. As encountered above.

One more very important suggestion is to use SQLite_Release(...) on the values returned by SQLite_Query(...). Otherwise you introduce a memory leak.
.

DizzasTeR

Since its v1.0, I'll keep updating it to make it better and better, thanks for suggesting those, i'll get into it as soon as possible.

FinchDon

bro i checkout it its quit good but how i set it z coords up and down
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

DizzasTeR

Quote from: FinchDon on Aug 16, 2015, 02:46 PMbro i checkout it its quit good but how i set it z coords up and down

Page up and Page down, forgot to mention that.

FinchDon

For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

DizzasTeR

Update - v1.2
  • A silent update to v1.1 but after SLC's suggestions, improved the queries to free results and using SQLite_Exec for UPDATE, DROP, INSERT, using SQLite_Query for SELECT, releasing data after using a SELECT query.
  • Added Page UP | DOWN to keys list.
-        Changelog - v1.1
-        ► Changed datatype for rotations x, y, z to FLOAT.
-
-        Changelog - v1.2
-        ► Improved queries to reduce memory leakage.
-        ► Added Page UP | DOWN key in keys list.

First post links updated.

MacTavish


Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

oh no

kokia

not working error is excepted "=" line 391, line 391 =         if( Location ) return { SQLite_Release( Location ); return true }

DizzasTeR

Quote from: kokia on Aug 22, 2015, 07:17 AMnot working error is excepted "=" line 391, line 391 =         if( Location ) return { SQLite_Release( Location ); return true }

Yes ofcourse, I've mistakenly repeated return, I've pushed an update, should be fixed now, first post link updated to v1.2.1. Thanks for reporting.

Xmair

Just a small suggestion, here it is :-
Whenever the map editor is closed or a command is written, the objects are saved into a .ini with CreateObject and XML statements, this might help people who don't have much time.
Anyway, Good job, It's better than using KEd for me :)

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD