Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] RPG Map Editor

Discussion in 'Assets and Asset Store' started by CreativeSpore, Nov 6, 2014.

  1. teru0528

    teru0528

    Joined:
    Jun 8, 2015
    Posts:
    3
    >Hi there,
    >I found the problem and it will be fixed for next release.
    >Meanwhile, add the two extra lines in the method AutoTileMap.LoadMap:


    Thank you support!
    Take a little time to update so we try to check in v1.24.
     
  2. ryanflees

    ryanflees

    Joined:
    Nov 15, 2014
    Posts:
    59
    Thanks for the tip.

    And another suggestion. I'm using another third party joystick to control the player movement.
    But this function in CharBasicController is "protected".
    void UpdateMovement( float fAxisX, float fAxisY )
    I changed it to public. Since I try not to modify the scripts as much as possible to avoid conflicts when upgrading the package.
    So there betther be an interface or public fuction for the character controller so we could move the player from outside.
     
  3. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes. I am thinking about having a look to the other subsystems and make some improvements. Meanwhile you can make it public. It won't be a problem at all as it's an small modification.
     
  4. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version 1.2.5!

    Change log:
    • Improved PhyCharBehaviour by adding handles for editing collision rectangle
    • Fixed memory leak when loading a new map
    • Changed Layer for Sorting Layer in map layer configuration
    • Saving map data properly when "save during play" option is enabled. Not overwriting other map when going back to editor.
     
  5. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Hey creative I come back from a travel (for work , I'm technically sleeping right now XD ahahha ), anyway , this is a great update (layer system) , now we can do many more things whit the asset and I think I'll start to produce some maps :D , I just waited this update to start using the asset in my project.

    I have a question , will be implement a method to change a tile in a layer position by the xy_position ( or there is already some way since I have not had time to examine the code ? I did not followed the asset for approximately a month XD) , like:

    change_tile_type_by_ID_in_xy_position ( AutoTileMap_GameObject , x_position , y_position , layer_number_where_you_whant_to_change_the_tile , new_ID_of_the_tile );

    Using the method like this:

    change_tile_type_by_ID_in_xy_position (AutotileMapGameObject , 14 , 1 , 4 , 2 );


    Personally I will use this code massively.
    In any case thx creative, and thank you for completing this important update.

    P.S. In RPG Maker I just used an event system:


    Just to know if there will be , if not I'll try to take a look in the next days XD.
    Cya! ( P.S. Not a request , just to know :) ).
     
    Last edited: Jul 1, 2015
  6. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,

    Yes you can use the method AutoTileMap.SetAutoTile for that.
    For the fog system you can create a new layer and just change from black tile to none (tileIdx = -1) when player is closed.
    Check the RpgMapHelper class for useful methods about taking the tile where the player is and from there change the tiles around as well.
     
    Peaceful-man likes this.
  7. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Thx very much creative :D .
     
  8. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    You are welcome ;)
     
    Peaceful-man likes this.
  9. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Ok I started to use it (I saw your video and read the pdf :D , I hope I didn't miss something), the asset work very well for now :D.
    I have 2 questions :
    There is a way to clear a tile when it is drawn (if you want to fix some errors)? (later without CTRL+Z)
    A button to clear the tile where you click? (Something like "Data -> Clear Map..." , but for a single tile ) Or we should use one slot of the tiles to put a transparent tile (like RPG Maker if I'm not wrong)?

    ----

    tecnically should be like :

    Code (CSharp):
    1. TileLayers[mapLayer.TileLayerIdx][i] = null;

    (for the selected layer) + (clicked ID) + (if we are pressing a button or the eraser is selected).

    or using :


    Code (CSharp):
    1. AutoTileMap.SetAutoTile
    to null


    Correct ? I'll try to create it temporary :D.
    ----

    Actually there are no brushes or something like bucket to fill area correct ? (not a big problem)
    But I found that now we can use the right mouse button to select a part of the map and copy , great to be exploited as a brush of rectangular shape.


    Thanks in advance , if I'm able I'll show you some maps created with your asset :D (I'm recreating them from RPG Maker).
    If someone starts to produce maps and shows them can be a good thing for the popularity of the asset. If people are able to do certain things whit a product, then other people will buy this product .
     
    Last edited: Jul 2, 2015
  10. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Best choice would be SetAutoTile using tileIdx -1 because this also updates neighbour tiles when removing autotiles.
     
    Peaceful-man likes this.
  11. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Perfect, achieved in a very spartans way :D (just to test), thx for the -1 tile explanation:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using CreativeSpore.RpgMapEditor;
    4.  
    5. public class eraser : MonoBehaviour {
    6.  
    7.     private AutoTileMap test;
    8.  
    9.     public bool eraseActive = false;
    10.  
    11.     public int layerToErase = 0;
    12.  
    13.  
    14.     // Update is called once per frame
    15.     void Update () {
    16.  
    17.         if (eraseActive == true) {
    18.  
    19.         if (Input.GetKeyDown (KeyCode.D)) {
    20.                 EraseTile ();
    21.         }
    22.  
    23.  
    24.         }
    25.     }
    26.  
    27.  
    28.     void EraseTile(){
    29.  
    30.         Vector3 position = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    31.  
    32.         test = gameObject.GetComponent<AutoTileMap>();
    33.  
    34.         test.SetAutoTile (RpgMapHelper.GetAutoTileByPosition(position , 0 ).TileX, RpgMapHelper.GetAutoTileByPosition(position , 0 ).TileY, -1, layerToErase, true);
    35.  
    36.  
    37.     }
    38.  
    39.  
    40. }
    However I have never understood why in RPG Maker they never put the eraser :D.


    Anyway using this code I was thinking one thing......should be easy to implement a method to create the size of the bush , using a custom input size (the user will put in a box the size of the x and y for the ellipse or the rectangular) + the selection of the custom shape (ellipse or rectangular) and when the user will press in a position the left mouse button the X Y tile position will be taken and all the around tiles position calculated whit a loop :D to paint on all of them .
    Maybe I 'll try to do this later on , now I would like to try make some maps ;D .

    -----

    P.S. And thx very much for the input of the fog, I was originally thinking to implement this in another way but your way is simpler and better :D.
     
    Last edited: Jul 2, 2015
  12. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Your script is quite good, but it would be simpler if you add these lines in the AutoTileMapGui.Update method:
    Code (CSharp):
    1.  
    2. if( Input.GetKeyDown(KeyCode.Delete) )
    3. {
    4.     m_selectedTileIdx = -1;
    5. }
    6.  
    You are right about doing a brush with different shapes. I was thinking about improve the brush to allow save templates and be able to load them trough script and in the editor.
    I will try to add something like that in a future version.
     
    Peaceful-man likes this.
  13. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Thx very much , it's much more better and simpler your script, I also used the bool (like if an eraser was selected , photoshop emulator :D):

    Code (CSharp):
    1.  
    2. if( eraserActive == true )
    3. {
    4. m_selectedTileIdx = -1;
    5. }
    to avoid to press every time the delete key :D when you change the layer and a new tile will automatically set or if for error I press the right mouse :D.

    -----

    About the fog in the game , there's only one problem , when I use this function:

    Code (CSharp):
    1.             test.SetAutoTile (RpgMapHelper.GetAutoTileByPosition(position , 0 ).TileX, RpgMapHelper.GetAutoTileByPosition(position , 0 ).TileY, newIDTile, layerWhereChangeTile, true);
    2.  
    when I delete the fog whit an event, then the deletion work perfectly , but is permanent when I stop the game (the map is automatically saved, soo I need to redo the fog on the layer :/ ).
     
    Last edited: Jul 2, 2015
  14. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, that is becase you have checked the option of saving map on play. Uncheck it from settings tab in Autotilemap inspector
     
  15. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Thx again, solved and tested to clone the rpg maker map:


    I just need to add the distance to deactivate the fog and the map need the lights effects.
    The map that you see should be improved , but in theory is the start of the game where you join inside the story through the PC :D. The map should be full of ester eggs :D just for a fun start , when it's done I'll show something done whit the asset .
     
    Last edited: Jul 3, 2015
  16. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    It's a good start. You can also increase the ratio of visibility but right know it looks great.

    I am thinking about a better system of fog by changing vertex color of tiles in the tile chunk mesh.
    It could be extended to lights as well.
    I will probably add this feature to the asset in the next update.

    Go on with your game, It will be exciting to see the first game made with this asset :D
     
  17. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    Thanks you very much for the kind words and thank you for the next update ( another update very useful for the asset and for the users projects ), I'll try to do my best to create the best first user project :D and I'll update whit some videos and screenshots :D.
     
    Last edited: Jul 3, 2015
  18. Luschie

    Luschie

    Joined:
    Apr 19, 2014
    Posts:
    14
    Hi!
    I think your asset is fantastic
    I would really like to see an example how to do map transitions, for example a transition between a village and the inside of a house. It would help me a lot if you could implement some example for that in the next release.
     
  19. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Cool! If you need any improvement or any help with it I'll be glad to help you as much as possible :D
     
  20. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks for your commentary. I am glad you liked it :)
    I will try to make a transition demo in next update.
    You can do it in the same map, by teleporting the player and camera to a different position. Or making the player not destroyable on loading
    Code (CSharp):
    1.  
    2. // Make this game object and all its transform children
    3. // survive when loading a new scene.
    4. function Awake () {
    5.     DontDestroyOnLoad (transform.gameObject);
    6. }
    and loading the target scene and teleporting it to the right place.
    I wanted to do this earlier in the asset, but it would be cool to show the target area and be able to select the target tile and I was thinking the best way to do this.
     
  21. j1e3s5

    j1e3s5

    Joined:
    Aug 23, 2014
    Posts:
    18
    nice work so far on this asset :) i was wondering if there was a way to erase though, as currently i am selecting blank spots on the map then copying them over to erase, but this erases everything on ALL layers. having a single erase to use on a layer only would be very nice :) but either way nice asset i am enjoying it :)
     
  22. Luschie

    Luschie

    Joined:
    Apr 19, 2014
    Posts:
    14
    Thanks for trying to include a transition demo in the next release,

    If you teleport the player and camera to a different position on the map, for example into the inside of a house, wouldn't there be a problem with the minimap?
     
  23. Peaceful-man

    Peaceful-man

    Joined:
    May 19, 2014
    Posts:
    30
    If I can help.

    Technically there should be 2 options :
    -the house is another map and you'll see the minimap of the house ( but i think you can also deactivate the minimap, but i think is no sense).
    -the house is a part of the map and you'll see in the minimap the house + external things.

    Personally I think the best way in this case is another map for every house ( to fix problem easily after the release) + some teleports for every floor in the house.

    Anayway about the problem I don't think because it's like when you move the player, but in this case you move the player far.
    This is what i suppose XD , hope this can help.
     
    Last edited: Jul 7, 2015
  24. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I will add this feature by pressing DEL key in next release. Right now, you can select a transparent tile in the tileset to get the same effect.
     
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Peaceful answered good to that question.
    Probably after adding the fog of war in a future release, it would be possible to hide the house interior until you discover it.
    You can also modify the minimap refresh system to refresh only a part of the map so other parts are hidden until you discover them.
     
  26. osisucks

    osisucks

    Joined:
    Nov 13, 2013
    Posts:
    1
    Hey CreativeSpore, the asset looks really cool and has lots of interesting features. That said, I was wondering how feasible would it be to use it to create the maps for a 2D platformer/sidescroller type of game. Can you think of any tricky business that would make it harder to adapt the asset's use? Can the collision system in place handle a different character controller, moving platforms and stuff like that as is?

    The plan would be to use it's runtime capabilities to allow players to create/modify their own levels and share them.

    Thanks!
     
  27. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,

    Well, you could probably use it as well for a platform game. But collisions are managed differently, not using a collision mesh. This work faster than usual collisions for multiple objects, but not with Unity collisions.
    You should adapt the controller to this kind of collisions or create a collision mesh using the TileChunk mesh generated by the TileChunkPool. You can use GetAutotileCollision to get the collision type and create the collision mesh.
     
  28. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Last edited: Jul 12, 2015
  29. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version of RPG Map Editor V126 now available! 30% off

    With a new Character Animation Editor and lot of changes and improvements:
    • New Character Animation Editor for RPG Maker XP and VX character sets
    • Fixed PhysicCharBehaviourEditor rectangle edition
    • Improved RpgMapHelper.cs
    • Del key in play editor now select empty tile in the paint brush
    • Fixed brush visibility in editor when sometimes it was disappeared
    • Fixed skipping of last pixel in tiles when setting UVs of tiles
    • Fixed bugs when using a size of tile less than 32
     
    Last edited: Jul 16, 2015
    netravelr likes this.
  30. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Hi, nice little asset !

    I'm just playing with it around; i'm a little confused; how can I for example add a 'trigger' ? Like if the player is in front of a door then i'd do some actions (teleport inside the house) etc ...

    I only see one big 'TileChunk', i've tried to create an Empty Game Object with a BoxCollider 2D as a trigger but it doesn't trigger.

    Sorry for my 'n00b'ness; just getting started but eager to learn :)

    Thanks !
     
  31. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi PeteLaChatte,

    Don't worry about asking. Everybody starts learning from scratch :)

    I didn't implement triggers yet, but you can create one using a BoxCollider 2D if you add a rigidbody and a collider to the player object.
    You can also place a door over a tile and check in the player is in the right position using RpgMapHelper.GetTileIdxByPosition(transform.position)
    This method returns the index of a tile under the given position. So if the player and the door have the same index, they are in the same tile.
     
    Last edited: Jul 22, 2015
  32. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Thanks for the very quick reply ;)
    I've managed to achieve it.

    Now, i want to have 2 Maps in a single scene like outdoor, and 'in house'
    I created an empty game object holding the first AutoTileMap object and then created another one, but i cannot edit the second one, somehow always ends up editing the first tiles first.

    Is this the proper way to do it ? Or what is the 'best practice' in this case ?
    For the detection, i'll just change player's transform to the 'target' place what is best here also ? Thanks

    Thank you again for your kind assistance

    PS: A tutorial "with" voice would be great :)
     
    Last edited: Jul 23, 2015
  33. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    You are welcome :)

    I'm glad you managed to do it. But you can't have two maps, only one per scene. You need to place the interior in the same map ( you can use a portion of the map for interiors separated from the exterior ) or you have to create another map in another scene.
    For translation of a player, you can use a button to activate the transition and then moving the player by setting the player transform.position to the target object transform.position.
    Take care of setting only x and y, but not z, or the player z position will be set as the target object and could be wrong. By default, player z position is -0.5f.

    I will try to make a video tutorial with voice. Meanwhile, I will start posting tutorials showing how to do things and tips in my new blog www.creativespore.com.
     
  34. Jonathan-Westfall-8Bits

    Jonathan-Westfall-8Bits

    Joined:
    Sep 17, 2013
    Posts:
    252
    First off I would like to say your product is amazing. The support you give to your clients on the forums is top notch too.
    Not only that but the fact that when you make updates you always think of what would help costumers out the most is great.
    I was wondering if you can share with us what you have in mind next.
     
    CreativeSpore likes this.
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks for that Cecilcruxis,
    This kind of commentaries motivates me to continue working on this asset :)
    Right now I am woring on Fog Of War. Improving some aspects of the asset I did fast and are not as polished as I wanted. And making a demo with map transitions, long time requested by the community.

    Here you can see an screenshot of the Fog Of War.
    I will make it with double of resolution you can see in the screenshot and after that I will make some tests for adding dynamic lighting to the tile layers.

    screen_fogOfWar.png
     
    Last edited: Jul 23, 2015
  36. Jonathan-Westfall-8Bits

    Jonathan-Westfall-8Bits

    Joined:
    Sep 17, 2013
    Posts:
    252
    Looking pretty good, can't wait to see it in action.
     
  37. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Awesome ! Can't wait for the new release !

    btw: thank you so much; i've managed to do what i wanted, although by the time I finish you'll do it better. You do an awesome job; keep it up keep it up !

    If you need 'beta testers', i'm in !

    Cheers !
     
  38. Jackoo

    Jackoo

    Joined:
    Jul 26, 2015
    Posts:
    2
    Hi, CreativeSpore. I am starting on my 2d zelda-like action game, I am having some newbie questions and I hope you can give me some advice.
    I want to change the way Player is interacting with enemy object. Instead of passing through and overlapping each other, I want them to have collisions. I tried adding Ridigbody2d and collider2d to both player and enemy, but then when I move my player toward the enemy they are pushing each other, which is not the way I want it to be.
    Is it possible that I can apply a tilemap attribute (like Wall, fence) to the enemy, so that PhysicCharBehaviour will handle the collisions?

    Thanks.
     
    Last edited: Jul 26, 2015
  39. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi Jackoo,
    Check the Is Trigger check box in the collider2d to avoid them pushing each other. It's the better solution.
     
  40. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks for your offer of beta testing. I am almost done with the fog of war and will be available soon for testing.
     
    Last edited: Jul 26, 2015
  41. Jackoo

    Jackoo

    Joined:
    Jul 26, 2015
    Posts:
    2
    I guess I can explain better with videos provided.

    So when isTrigger checked, I can now detect when the two units are colliding, but they will pass through each other.


    If I just add Rigidbody2d and collider2d to both Player and Enemy, but without isTrigger checked, they will push each other when they are touching.



    This is what I want to achieve:


    Right now I can partially do that by checking Player's Rigidbody2D isKinematic, while leaving Enemy's unchecked. While enemy cannot push Player, Player can still push enemy..

    I want to know if somehow Player can treat a moving object like a static AutoMapTile unit, using RPG Map Maker's PhysicCharBehaviour class to handle the collisions? Or if you can recommend a better way to handle such case?

    Thank you.
     
  42. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Looks yummy :)
     
  43. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I think you can achieve what you want by adding moving constrains to the rigidbody component. If you check Freeze Position and Rotation you can avoid the player or enemy to be moved.
     
  44. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    fog or war looks great :) good work on that asset! :)
     
    CreativeSpore likes this.
  45. module

    module

    Joined:
    Dec 30, 2012
    Posts:
    5
    Probably already answered.. but.my searches found nill. So here goes.. is it possible to rotate the map 90 degrees.. and still have it remain edit-able? (not runtime, just usual unity editing:))
    Thankyou.. and thankyou for an awesome tool. Very cool.
     
  46. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I don't thing that would be possible. You can try to modify the asset to allow that, but it could be complicated to achieve.
    Why do you need to do that? Maybe there is another solution for your problem.
     
  47. module

    module

    Joined:
    Dec 30, 2012
    Posts:
    5
    I would like to use Unity's inbuilt pathing system upon editable maps:) Yea their may be a way .. for some reason that's flown over my head.. :)

    EDIT: I'd like to also place 3D objects upon the map.. and edit around where I placed them (within a working unity navmesh.. with characters etc.)
     
    Last edited: Jul 30, 2015
  48. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I would be easier if you rotate 3D models and navmesh.
     
  49. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version 1.2.8 will be released soon!

    It has the new kind of layer Fog Of War allowing to add fog of war to the map and minimap, so you don't know what is out there :D until you find out.

    Check it out in this video:


    The price will be set back to 45$ as soon as it is approved.
     
  50. module

    module

    Joined:
    Dec 30, 2012
    Posts:
    5
    Cant actually rotate the navmesh in Unity and have it still remain functional. That's the weird part.
    Anyhow I seem to have found a solution with rotating the scene to match the rpg map.. do my editing.. then place back when I want to re-bake the navemesh.. and then rotate the rpg map >data< to match up with rest of the scene:)
     
    Last edited: Jul 31, 2015