« [ Gamemode ] MHC | ManHunt City Server
[ #D~ Tools ] Map Editor

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Map Editor
« on August 16th, 2015, 12:24 PM »Last edited on July 20th, 2016, 09:58 PM
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#



(click to show/hide)


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



Changelog:-

Code: [Select]
-    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.

-    Changelog - v1.2.3
-    ► Fixed errors.
-    ► Fixed crash on loading map.
-    ► Fixed some other things regarding errors and crashes.

-    Changelog - v1.2.4
-    ► Now with free camera view! /cam to toggle!

-    Changelog - v1.2.5
-    ► Added text for Currently Holding Object Name and Model.
-    ► Added Auto Saving for maps, default auto save every minute.
-    ► Added autosave command! /autosave to toggle.

-    Changelog - v1.2.6
-    ► Map menu is now available! use /addobject without any id to enter map menu and select map while previewing!
-    ► Press CTRL to select & create the object.

-    Changelog - v1.2.7
-    ► Exports are now exported in a text file without any [SCRIPT] Tags, easy to add objects in script now!

-    Changelog - v1.2.8
-    ► Fixed locations as the database was bugged
-    ► Added /settime [hour] [minute] and /setweather [id] to set weather & time.
-    ► Added object control in object selection menu, use page up/down to move object higher/lower and arrow up/down to bring it near or far.
-    ► Added commands to get a list of all maps & locations. /getmaps & /getlocs
-    ► Changed the location of object selection menu
-    ► Added /view command to switch immediately to any object ID supplied when in object selection menu
-    ► Added commands /deletemap [name] and /deleteloc [name] to delete any map or location from database

-    Changelog - v1.2.9
-    ► Now supports XML outputs!
-    ► Fixed /desall, not removing all objects.
-
-   Changelog - v1.2.9
-   ► Now supports XML outputs!
-   ► Fixed /desall, not removing all objects.
-   
-   Changelog - v1.3
-   ► Updated to latest server version
-   ► Fixed a few very minor bugs
-   ► Added client-sided gui labels
-   
-   Changelog - v1.3.2
-   ► Fixed /desall @ Thanks to Omar for pointint it out!
-   ► Fixed /closemap working as savemap; Note that if you map but didn't save and did closemap, changes will be lost!
-   ► Added /selectobject || /editobject to edito the object ID specified; Useful for objects which can't be shot/collided @ Idea by [Serious]Sam.
-   ► Added /objects || /allobjects to get a list of every object created with its ID and model @ Idea by [Serious]Sam.

~ Happy mapping!
~ 300th post!
~ Regards, Doom_Killer!

Thijn

  • VC:MP Beta Tester
  • Posts: 1,689
[ #D~ Tools ] Re: Map Editor
« Reply #1, on August 16th, 2015, 12:37 PM »
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?

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Re: Map Editor
« Reply #2, on August 16th, 2015, 12:41 PM »Last edited on August 16th, 2015, 12:47 PM
Quote from Thijn on August 16th, 2015, 12:37 PM
First of all, nice work :)
Thanks :)
Quote from Thijn on August 16th, 2015, 12:37 PM
Like 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 August 16th, 2015, 12:37 PM
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
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 August 16th, 2015, 12:37 PM
Another 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

  • Sr. Member
  • Posts: 252
[ #D~ Tools ] Re: Map Editor
« Reply #3, on August 16th, 2015, 01:09 PM »
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 )

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,805
[ #D~ Tools ] Re: Map Editor
« Reply #4, on August 16th, 2015, 03:20 PM »
Quote from FinchDon on August 16th, 2015, 01:09 PM
Can 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.
.

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Re: Map Editor
« Reply #5, on August 16th, 2015, 03:38 PM »
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

  • Sr. Member
  • Posts: 252
[ #D~ Tools ] Re: Map Editor
« Reply #6, on August 16th, 2015, 03:46 PM »
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 )

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Re: Map Editor
« Reply #7, on August 16th, 2015, 04:18 PM »
Quote from FinchDon on August 16th, 2015, 03:46 PM
bro 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

  • Sr. Member
  • Posts: 252
[ #D~ Tools ] Re: Map Editor
« Reply #8, on August 16th, 2015, 06:05 PM »
Thanks
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Re: Map Editor
« Reply #9, on August 17th, 2015, 11:19 AM »
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.
Code: [Select]
-        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

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 809
[ #D~ Tools ] Re: Map Editor
« Reply #10, on August 18th, 2015, 06:31 AM »
Nice job man :)

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

Retired VC:MP Player/Scripter :P

KAKAN

  • Wiki Contributor
  • Posts: 3,347
[ #D~ Tools ] Re: Map Editor
« Reply #11, on August 18th, 2015, 09:41 AM »
Nice JOB!
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

kokia

  • Jr. Member
  • Posts: 86
[ #D~ Tools ] Re: Map Editor
« Reply #12, on August 22nd, 2015, 08:17 AM »
not working error is excepted "=" line 391, line 391 =
Code: [Select]
        if( Location ) return { SQLite_Release( Location ); return true }

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099
[ #D~ Tools ] Re: Map Editor
« Reply #13, on August 22nd, 2015, 08:49 AM »
Quote from kokia on August 22nd, 2015, 08:17 AM
not working error is excepted "=" line 391, line 391 =
Code: [Select]
        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

  • Wiki Contributor
  • Posts: 870
[ #D~ Tools ] Re: Map Editor
« Reply #14, on August 22nd, 2015, 10:23 AM »
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 :)
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter