Liberty Unleashed

Scripting => Script Releases => Topic started by: Knucis on June 26, 2014, 09:19:33 pm

Title: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 26, 2014, 09:19:33 pm
What is this?
Well, since there is not a map editor for LU (that I know of), I've decided to work on one.
It's extremely simple, nothing too fancy, but does the job.
I didn't test it that much, only with myself (and rarely Thijn) so expect it not being perfect.
So, in simple terms: it's an object placement editor for LU that includes a map loader/saver so you can easily share maps with the community!

Can I have some pictures?
(http://i.imgur.com/fvlDBnZ.jpg)
(http://i.imgur.com/ZQS5b8K.jpg)

What did I just see?
What you saw was the in-game editor. It's quite easy to understand, and you'll be making maps in no time.
The commands are:

Code: [Select]
/addob <model id> - Creates an object.
/removeob <object id> - Removes an object.
/moveob <object id/exit> - Enters the editor.
/nearob <range> - Messages you all the objects within the range given.
/savemap <mapname> - Saves all the objects in the world into an XML file (so you can load later)
The editor has 5 control modes:
Code: [Select]
1 - X/Y object movement.
2 - Z object movement.
3 - X/Y object rotation.
4 - Z object rotation.
5 - Camera movement.
It also includes a "sensitivity" features that enables you to control the precision of the movement.

How do I load a custom map?
Alright, for this you need to understand how the XML files work with this script.
This is how the LOADER.xml should look like when you download the script:

Code: [Select]
<!-- This is the loader file. You can manually load your maps here./-->
<!-- Just add a new line inside the <loader></loader> with the following code: /-->
<!--Map name="file name here" /-->
<loader>
    <Map name="example" />
</loader>
All it's doing is loading the "example" map. Which in return looks like this:
Code: [Select]
<example>
    <Object model="1356" x="79.34" y="-960.147" z="25.66" rx="0" ry="0" rz="0" world="0" />
</example>
So all you have to do to install another map is to edit the LOADER.xml file by adding a new line with the map's name:
Code: [Select]
<!-- This is the loader file. You can manually load your maps here./-->
<!-- Just add a new line inside the <loader></loader> with the following code: /-->
<!--Map name="file name here" /-->
<loader>
    <Map name="example" />
    <Map name="mynewmap" />
</loader>
You'll need to have the mynewmap.xml file inside the "Maps/" directory and you're good to go :)

Map names must be one word ONLY.

Where do I get it?
Github (https://github.com/BestaChe/GamesparksMapEditor)
Mediafire (http://www.mediafire.com/download/vhyc9dt8fcd4wfa/GamesparksMapEditor.zip)


How do I install it?
Simply drop everything into your server folder! And then edit your content.xml inside the LU folder.

(I highly recommend you not to load the MapEditor on public servers. I didn't add any restrictions. You have been warned.)
DO NOT LOAD BOTH SCRIPTS.

Thanks, and please let me know if it has some bugs, I will try to fix them :)
Happy mapping!
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 26, 2014, 11:19:38 pm
Wow! LOL!  :o

Edit: Why not add a message with the object ID when you creates the object?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 01:04:05 am
Edit: Why not add a message with the object ID when is you creates the object?
Will update it tomorrow ;)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 01:15:11 am
Hmm, again problem.

1) The map loader fails.
2) When is called 'onPlayerSpawn' by any player gives an error. (The index Pos doesn't exist)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 01:37:20 am
Hmm, again problem.

1) The map loader fails.
2) When is called 'onPlayerSpawn' by any player gives an error. (The index Pos doesn't exist)

1) How does it fail? Be more specific. Works fine here...
2) What the hell? I don't even call onPlayerSpawn on my script!
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 02:12:53 am
Hmm, again problem.

1) The map loader fails.
2) When is called 'onPlayerSpawn' by any player gives an error. (The index Pos doesn't exist)

1) How does it fail? Be more specific. Works fine here...
2) What the hell? I don't even call onPlayerSpawn on my script!

1) The objets aren't loaded...
2) Yeah, i know, but when I don't load the scripts works... in my PC and the VPS same.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 02:18:26 am
Hmm, again problem.

1) The map loader fails.
2) When is called 'onPlayerSpawn' by any player gives an error. (The index Pos doesn't exist)

1) How does it fail? Be more specific. Works fine here...
2) What the hell? I don't even call onPlayerSpawn on my script!

1) The objets aren't loaded...
2) Yeah, i know, but when I don't load the scripts works... in my PC and the VPS same.
1) How does your Maps/ directory looks like (and what's inside the LOADER.xml file)
2) That's incredibly weird, something must be interfering with your script... Are you loading the MapLoader or the MapEditor?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 03:31:09 am
Hmm, again problem.

1) The map loader fails.
2) When is called 'onPlayerSpawn' by any player gives an error. (The index Pos doesn't exist)

1) How does it fail? Be more specific. Works fine here...
2) What the hell? I don't even call onPlayerSpawn on my script!

1) The objets aren't loaded...
2) Yeah, i know, but when I don't load the scripts works... in my PC and the VPS same.
1) How does your Maps/ directory looks like (and what's inside the LOADER.xml file)
2) That's incredibly weird, something must be interfering with your script... Are you loading the MapLoader or the MapEditor?

1) XML with the objects. In LOADER.xml the map (the name of the xml)
2) MapLoader only.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 03:35:57 am
1) XML with the objects. In LOADER.xml the map (the name of the xml)
2) MapLoader only.
Mind posting the contents of both please (map.xml and LOADER.xml)? So I can test it on my end...
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 03:44:28 am
1) XML with the objects. In LOADER.xml the map (the name of the xml)
2) MapLoader only.
Mind posting the contents of both please (map.xml and LOADER.xml)? So I can test it on my end...

Code: [Select]
<Crime City>
    <Object model="1696" x="-1622.62" y="-785.8" z="2.98" rx="3" ry="1" rz="32" world="0" />
    <Object model="1696" x="-1626.64" y="-733.075" z="4.775" rx="0.75" ry="358.5" rz="34" world="0" />
    <Object model="3146" x="-1634.86" y="-652.25" z="10.975" rx="1" ry="359.5" rz="302.5" world="0" />
    <Object model="724" x="-1556.45" y="-1009.55" z="10.965" rx="0" ry="0" rz="0" world="0" />
    <Object model="725" x="-1281.63" y="-976.95" z="8.59" rx="0" ry="0" rz="0" world="0" />
    <Object model="822" x="-1359.8" y="-906.5" z="12.495" rx="359" ry="359.5" rz="196" world="0" />
    <Object model="952" x="-1626.52" y="-1087.6" z="16.84" rx="0" ry="0" rz="356" world="0" />
    <Object model="1033" x="-1575.38" y="-1038.1" z="10.84" rx="359.75" ry="0.25" rz="0" world="0" />
    <Object model="1393" x="-1584.8" y="-957.2" z="10.84" rx="357.5" ry="0" rz="172.5" world="0" />
    <Object model="1393" x="-1584.8" y="-988.55" z="10.84" rx="0" ry="0" rz="178.625" world="0" />
    <Object model="1347" x="-1548.8" y="-948.8" z="10.53" rx="0" ry="0" rz="0" world="0" />
    <Object model="1347" x="-1548.8" y="-944.8" z="10.61" rx="0" ry="0" rz="0" world="0" />
    <Object model="1318" x="-1570.88" y="-930.663" z="10.11" rx="0" ry="0" rz="0" world="0" />
</Crime City>
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 12:53:42 pm
1) XML with the objects. In LOADER.xml the map (the name of the xml)
2) MapLoader only.
Mind posting the contents of both please (map.xml and LOADER.xml)? So I can test it on my end...
It's not working because the map name is "Crime City", aka, has two words. Rename it into one word only please.

EDIT: Rename the Crime City.xml to crimecity.xml, then:
Code: [Select]
<crimecity>
    <Object model="1696" x="-1622.62" y="-785.8" z="2.98" rx="3" ry="1" rz="32" world="0" />
    <Object model="1696" x="-1626.64" y="-733.075" z="4.775" rx="0.75" ry="358.5" rz="34" world="0" />
    <Object model="3146" x="-1634.86" y="-652.25" z="10.975" rx="1" ry="359.5" rz="302.5" world="0" />
    <Object model="724" x="-1556.45" y="-1009.55" z="10.965" rx="0" ry="0" rz="0" world="0" />
    <Object model="725" x="-1281.63" y="-976.95" z="8.59" rx="0" ry="0" rz="0" world="0" />
    <Object model="822" x="-1359.8" y="-906.5" z="12.495" rx="359" ry="359.5" rz="196" world="0" />
    <Object model="952" x="-1626.52" y="-1087.6" z="16.84" rx="0" ry="0" rz="356" world="0" />
    <Object model="1033" x="-1575.38" y="-1038.1" z="10.84" rx="359.75" ry="0.25" rz="0" world="0" />
    <Object model="1393" x="-1584.8" y="-957.2" z="10.84" rx="357.5" ry="0" rz="172.5" world="0" />
    <Object model="1393" x="-1584.8" y="-988.55" z="10.84" rx="0" ry="0" rz="178.625" world="0" />
    <Object model="1347" x="-1548.8" y="-948.8" z="10.53" rx="0" ry="0" rz="0" world="0" />
    <Object model="1347" x="-1548.8" y="-944.8" z="10.61" rx="0" ry="0" rz="0" world="0" />
    <Object model="1318" x="-1570.88" y="-930.663" z="10.11" rx="0" ry="0" rz="0" world="0" />
</crimecity>

and then edit the LOADER.xml and add
Quote
<Map name="crimecity" />
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Thijn on June 27, 2014, 01:02:33 pm
If you want you can use an underscore (_) to simulate some kind of space.
Something like Crime_City should in theory work.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 01:04:20 pm
If you want you can use an underscore (_) to simulate some kind of space.
Something like Crime_City should in theory work.
Yes, underscores should be fine.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 01:11:19 pm
1) XML with the objects. In LOADER.xml the map (the name of the xml)
2) MapLoader only.
Mind posting the contents of both please (map.xml and LOADER.xml)? So I can test it on my end...
It's not working because the map name is "Crime City", aka, has two words. Rename it into one word only please.

EDIT: Rename the Crime City.xml to crimecity.xml, then:
Code: [Select]
<crimecity>
    <Object model="1696" x="-1622.62" y="-785.8" z="2.98" rx="3" ry="1" rz="32" world="0" />
    <Object model="1696" x="-1626.64" y="-733.075" z="4.775" rx="0.75" ry="358.5" rz="34" world="0" />
    <Object model="3146" x="-1634.86" y="-652.25" z="10.975" rx="1" ry="359.5" rz="302.5" world="0" />
    <Object model="724" x="-1556.45" y="-1009.55" z="10.965" rx="0" ry="0" rz="0" world="0" />
    <Object model="725" x="-1281.63" y="-976.95" z="8.59" rx="0" ry="0" rz="0" world="0" />
    <Object model="822" x="-1359.8" y="-906.5" z="12.495" rx="359" ry="359.5" rz="196" world="0" />
    <Object model="952" x="-1626.52" y="-1087.6" z="16.84" rx="0" ry="0" rz="356" world="0" />
    <Object model="1033" x="-1575.38" y="-1038.1" z="10.84" rx="359.75" ry="0.25" rz="0" world="0" />
    <Object model="1393" x="-1584.8" y="-957.2" z="10.84" rx="357.5" ry="0" rz="172.5" world="0" />
    <Object model="1393" x="-1584.8" y="-988.55" z="10.84" rx="0" ry="0" rz="178.625" world="0" />
    <Object model="1347" x="-1548.8" y="-948.8" z="10.53" rx="0" ry="0" rz="0" world="0" />
    <Object model="1347" x="-1548.8" y="-944.8" z="10.61" rx="0" ry="0" rz="0" world="0" />
    <Object model="1318" x="-1570.88" y="-930.663" z="10.11" rx="0" ry="0" rz="0" world="0" />
</crimecity>

and then edit the LOADER.xml and add
Quote
<Map name="crimecity" />

Now works, thx.



And what about the event 'onPlayerSpawn' ?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 01:14:01 pm
And what about the event 'onPlayerSpawn' ?
I have no idea what's causing it, as I said, it might be your script interfering...
MapLoader or MapEditor does not call "onPlayerSpawn" to cause an error.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on June 27, 2014, 03:13:06 pm
And what about the event 'onPlayerSpawn' ?
I have no idea what's causing it, as I said, it might be your script interfering...
MapLoader or MapEditor does not call "onPlayerSpawn" to cause an error.

I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 27, 2014, 03:36:41 pm
And what about the event 'onPlayerSpawn' ?
I have no idea what's causing it, as I said, it might be your script interfering...
MapLoader or MapEditor does not call "onPlayerSpawn" to cause an error.

I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
Good :)!
That just proves my point, it's something to do with your script :p!
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Thijn on June 28, 2014, 04:32:59 pm
In order to fix bugs quickly, please post a screenshot of your console next time. The callstack and locals gives a lot of information to why something fails.

I'm glad you got it fixed.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on June 28, 2014, 09:43:16 pm
In order to fix bugs quickly, please post a screenshot of your console next time. The callstack and locals gives a lot of information to why something fails.

I'm glad you got it fixed.
Pretty much this.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: alex360 on July 05, 2014, 09:35:25 pm
And what about the event 'onPlayerSpawn' ?
I have no idea what's causing it, as I said, it might be your script interfering...
MapLoader or MapEditor does not call "onPlayerSpawn" to cause an error.

I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on July 05, 2014, 11:11:01 pm
I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
heh? What's wrong?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on July 06, 2014, 11:13:14 pm
I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
heh? What's wrong?

He had the same problem.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on July 07, 2014, 12:58:25 am
I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.
heh? What's wrong?

He had the same problem.
Well, yes, but what was the error? You're not being specific enough.. I need to have the error in order to be able to fix it!
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on July 08, 2014, 01:10:04 pm
I don't know the problem but... I added the MapLoader to my system of accounts, commands, and now works, without errors.


heh? What's wrong?


He had the same problem.

Well, yes, but what was the error? You're not being specific enough.. I need to have the error in order to be able to fix it!


(http://merkel.ga/error.bmp)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on July 09, 2014, 12:58:34 am
What's the code in line 807?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on July 09, 2014, 10:33:16 am
What's the code in line 807?

Random spawn
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on July 09, 2014, 03:16:32 pm
What's the code in line 807?

Random spawn
*slow claps* I still need to know what functions you call or what not... Otherwise I wouldn't know whether it's my code's fault or not...
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on July 09, 2014, 07:11:34 pm
What's the code in line 807?

Random spawn
*slow claps* I still need to know what functions you call or what not... Otherwise I wouldn't know whether it's my code's fault or not...

Fuu, load skin of the account (array), armour spawn(shop) (array), random spawn (array), set weapons, unmute.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Thijn on July 09, 2014, 07:44:30 pm
Then that has nothing to do with this script.
Where did you add the script element in your Content.xml. Before or after your main script?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Merkel on July 09, 2014, 08:58:56 pm
After lol
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: SugarD on September 20, 2014, 11:53:47 pm
Can someone please update this to work with 0.1.0.16? :)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: sasha19323 on September 21, 2014, 10:02:08 am
Version for LU >0.1.0.15: click (https://dl.dropboxusercontent.com/u/85589430/GamesparksMapEditor.zip)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Knucis on September 21, 2014, 07:27:51 pm
Can someone please update this to work with 0.1.0.16? :)
Yeah I will soon, been kind of busy now.. I also plan to add some more fixes and features ;)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: SugarD on September 22, 2014, 01:44:23 am
Can someone please update this to work with 0.1.0.16? :)
Yeah I will soon, been kind of busy now.. I also plan to add some more fixes and features ;)
Thanks!
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: synapse on June 02, 2016, 04:16:28 pm
Can someone upload working version?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: sasha19323 on June 03, 2016, 02:10:32 pm
Can someone upload working version?
Version for LU >0.1.0.15: click (https://dl.dropboxusercontent.com/u/85589430/GamesparksMapEditor.zip)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: synapse on June 05, 2016, 11:27:37 pm
(http://s10.ifotos.pl/img/Capture1J_saqanea.jpg) i have this error.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Atheros on June 19, 2016, 10:14:45 am
http://www.filedropper.com/mapeditorkopia_1 (http://www.filedropper.com/mapeditorkopia_1)

here is new link

note: i added also /execute command and /cam ( from juppi )

i didnt edit the map editor, only added some few scripts

have fun.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: [TW]TheBlackCat25 on October 11, 2016, 04:44:16 pm
It doesn't redirect to the download page, just to the main page, can you upload to Mega's servers or anything like this pls? Does will be great, thanks
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: SugarD on January 19, 2017, 07:35:38 pm
There is a link to the GitHub project. You should be able to download it directly from there.
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: RealAnderi on February 24, 2017, 04:52:27 am
Guys I need the latest link of this script. SugarD what do u mean by GitHub?
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Vortrex on February 25, 2017, 10:55:23 am
Here you go!
https://github.com/BestaChe/GamesparksMapEditor (https://github.com/BestaChe/GamesparksMapEditor)
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: [TW]TheBlackCat25 on February 25, 2017, 08:50:19 pm
Thanks
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: LUmtap on February 25, 2017, 09:14:12 pm
Version for LU >0.1.0.15: click (https://dl.dropboxusercontent.com/u/85589430/GamesparksMapEditor.zip)
dont work
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: DamageCreation on February 26, 2017, 01:53:59 pm
Link has been removed ;/
Title: Re: [Map Editor] Gamesparks' Map Editor
Post by: Vortrex on February 26, 2017, 03:31:13 pm
Look at my reply ... it's a few posts up.