[Release] Xiyue MapEditor - Akaras' mod updated by M2P

Join Discord

Far

tsniffer
Developer
May 19, 2003
19,801
29
2,203
400
I love how you always come to these strange assumptions about how things work :ROFLMAO: . No mining has nothing to do with map lighting.

Lights on map range from 0-9. Crystal used to offer ranges from 0-99, however it was removed due to too many people complaining about not liking dimmed light.

basically each one is a different size, however all offer same intensity (full white)
 
Last edited:
  • Like
Reactions: mir2pion

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
Mining came to mind only when I had written the above post shortly before going to bed, so I added it in the query because if indeed it would be light and I didn't specifically ask about it, you would not mention it simply because I didn't ask about it. Programmers are like that, logical to fault LOL

There was this famous physicist Dirac who in Q&A after lecture would pass on answering you and go to next questioner if your 'question' was actually a statement, like pple often frame (imply) their questions. Exactly like a running program. :geek:

I recall now that mining is set in server configuration, or whatever. Not important if it is not light.
But it is typical of what I just said - you didn't mention how it is set because I only asked if it is light, so you answered in the programmers fashion of True or False, not volunteering to add in a human fashion how it is set otherwise.

As to light, I suppose then, the values above 9 then default to it (in size). I asked because I want to add a brief info regarding it on the light setting panel.

Now it is also clear why fishing starts with 100 and if I am right about defaulting value, it is also the biggest light size (which really only lights up shore farther out). I suppose others before me asked if fishing light values could be made exempt from lighting up the map, probably it would be no simple code change or it would have been done, right?
 
Last edited:

Far

tsniffer
Developer
May 19, 2003
19,801
29
2,203
400
No if light value is above 9 then that means no light.

Also lol, yes I do try to answer with minimum effort. It's better for you to learn than for me to just explain how everything is done.

Fishing light values shouldn't be showing light. I checked the code and anything above 9 is ignored for light values.
 

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
I see, I didn't fish on servers for some time so if I didn't see light on water, I would have assumed there is no fishing on it. Plus these days on most servers you never see a water surface anyway apart from the canal in BW LOL

BTW I set my testing maps with daylight always on, so didn't notice that there is no light. I made some changes in how you set light, that's why I asked in the first place. I'll see if I can put brief info written on the light setting panel.
 
Last edited:

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
1) Default Grid (Shortcut G) is now BigTile size mesh, the original SmTile size grid is on shortcut Ctrl-G.

BigTile grid is more practical for setting down back tiles and also for aligning objects.

Even better for aligning is the third grid style, SuperGrid that is 2x2 BigTile or 4x4 SmTile size grid, on Alt-G shortcut. It is much easier to follow with eye the line along the grid vertex points to align lamp posts, pillars and such like.

Here you can see grids being switched on in succession, to superpose on those previously displayed.
First 2x2 big Tiles grid in cyan color, second adds big Tile grid in purple and the third adds to it the original SmTile grid.
Clipboard-20220123 Grid Examples.jpg

Clipboard-20220122.jpeg SuperGrid is still useful if zoomed out when standard grid would be too dense to be of any use.

BTW FPS drop much more when SuperGrid is switched on compared to the two other grid sizes because it has different (line vs cube) draw method (if I recall it right, it is four fold FPS drop over the other grids).
Originally grids had set FPS limit 25 at which point it was meant to stop displaying but instead it just starts to cycle off/on. I lowered it to 8 FPS which allows for useful zooming out without the grid starting to flicker while the map is still decently scrollable. The more you zoom out, the more tile cells come into view and the grids put proportionally more load on resources. That was the idea behind placing a FPS limit on it.

2) Arrow keys movement is changed from 5 to 4 SmTiles jump per click which insures that large grids keep even xy coordinates in the upper left corner (useful for placing or deleting back Tiles). To this end, I also dared to change WASD key movement from 1 SmTile per click to 2. I find that very practical scrolling speed and don't see any negatives it might bring about.

Now you only 'lose' the even coordinates in top left corner of big tile grid if you use Enter to jump to bottom right of the map when it has odd tile size or if you scroll the map using mouse wheel.

Mouse wheel scrolls map when cursor hovers over scroll bars, in that case each wheel 'turn-click' moves the map by one SmTile. I found one other way to scroll map with mouse wheel, if you hover over the Editor Layer drop down menu (without it being rolled down), the wheel scrolls the map up/down by two SmTiles, that is by big Tile jumps.
It made me wonder if the map could be mouse wheel scrolled even when cursor hovers over the map itself... maybe someone might know why it scrolls when over that editor layer menu and exploit that to make it work when the cursor is over the map also? It would be just vertical scrolling unless your wheel has side scrolling too, it feels quite intuitive to use mouse wheel to scroll map.

3) Grasping All Three Layers is available (Ctrl-F6).

Selecting the grasping and placing the object back on map requires some knowledge how back tiles work (as Far outlined above). Basically to get predictable and successful result, you need to start grasping on both even coordinates and end on both odd ones. The new big tile grid size along with map scrolling by 'even jumps' makes that easy. And as I said above, successful placing back on map is not done with mouse on even coordinates but one tile to the right of that (x odd #, y even #).

4) Back and Front Limits can be not only deleted but also placed on map in bulk. Select the desired area using grasping selection (either kind, Front or F&M) and use Context menu command to either delete or place these Limits in bulk. UnDo command works with this (unlike for bulk deleting layer tags).

5) Middle layer animation is now available, only Mir3 maps had it so far and now we have it too. :geek:

6) The same bulk placing also works for Lights and Animation (F&M).
Especially handy for fishing tags where you can lay down and change at will fishing tag values in bulk or remove them by setting light to zero. UnDo works here also.
Bulk animation editing was motivated by Mir3 maps where one dungeon has animated skulls and sand traps with 16 or even 20 animations tags each, all working in tandem. For some reason, the animation is too hyper at zero tick, changing tick setting to 1 looks much better. But imagine trying to change tick speed twenty times on such animated graphic. Now that the whole object with twenty animated tiles can be edited by opening the animation panel just once, it is an easy job.

1642929951451.png

Possibly some interesting effects might be achieved with this bulk animation like setting up some larger animated flame arrays or other crazy stuff.

The original way of putting light and animation on a single tile is preserved.
When placing these by area selection method, you should be aware that the editor keeps last selection area in memory, so if you selected something previously, like grasping an object to move it, and later decide to place light or animation using 'selection area' context menu choice without making new selection just prior to that, it will place the light/animation tags in that selection area you made last (which now may not be in view and you won't even notice what you did...).
But if you place animation in the old way, it will always put down just that one, on a single tile that you right clicked to bring up the context menu, provided you chose in that menu the 'Set Current Coordinates Front (or Middle) Animation Attributes', not the menu choice with 'Selection Area' in its name. Fortunately, these actions can be UnDone if need be. This is why I left the original way of setting light/animation in place.


Middle animation has some odd things about it, possibly blend is not used on mir3 maps or the middle animation code has some glitch preventing its use? If you toggle front animation to middle and back to front, you lose the blend setting (easily reset but it tells that middle blend is possibly not used or broken) Also, blend 'b' is shown in tags for frames 8 and up only and it shows even if not having been checkmarked in setup panel.


7) Front and Middle Layers inversion (swapping) on the fly, both directions. Also works for Front and Middle animation. An object built on front layer can be converted to middle layer object (or vice versa) in a blink, just by selecting it using grasping rectangle and choosing a command from the Context menu.

(note for eager testers - animation tags need to be placed on either Front or Middle tag for them to be converted. If placed on back tiles where neither of those tags are present, they won't convert (its got nowt to animate either DOH :D).

The shortcut keys shown here to left of the orange line don't work, for now anyway. Those were made in winform properties and for some reason they just don't work. Their advantage is nice alignment on the menu that is not easy to achieve when they are added manually. After I figure out how to make these shortcuts in code, these will provide visual guidance even if they won't actually be used. But I suppose this context menu is so easily accessible that those shortcuts are not really needed.

Actually I have a notion why these shortcuts don't work. It is for the same reason I failed to make shortcuts in code - there is nothing to hook into for those processes, so to speak. :eek:
1642926260671.png

The rest are smaller tweaks:

Object tab now displays more of those bigger objects (expanded the view to right and bottom window edge). There is some large empty margin on the left into which those bigger objects could be moved to see even more of them but I can't find the setting.

Libraries images are now displayed in a tight grid, thanks to Far's help. Many more are now in view and it is easier to see what objects are in there this way.

Help tab now has scrolling page. For some reason, the first time it is opened, the text is all selected. But it looks nice in those black/blue colors and actually makes the entries more readable, like an 'outline' view.

F4 now again opens ShandaMir3 libraries and TileCutter was moved to 'Y'. That's because I've seen those libraries around, no idea if they are identical to WemadeMir3's (Wemade's are categorized in folders, Shanda's are in flat view).


1642909288521.png

Release #4 - pending

M2P
 
Last edited:

Jev

When I'm Gone
Staff member
Moderator
Jul 21, 2020
1,575
7
653
135
Worthing, West Sussex
Link keeps dying. Please find a way to upload permanently.

(Google Drive//Dropbox//Github etc)

If not I'm currently pushing the map viewer and the source code to my Google Drive
 

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
Amended means making it more user friendly with menus and icons, most of which duplicate access to features that mapping geeks were able to access previously but were hidden from more casual users.

You can safely replace your editor version with this one, there is no reason whatever to keep using any previous version (or the original Xiyue on which this version is based) or any other editor revision (iJam, Pete107...) for that matter.

1656921839148.png

Swapped shortcuts for full zoom in and out in a single keypress, the / & * on numberpad. / now fully zooms out and * zooms in to make it more logical. The slash resembles minus and the star is like the plus sign. Minus and plus zoom out and in in several steps.

The animation cell info panel now opens/closes via shortcut Del, the Ctrl-F9 still works but the modifier key was awkward to use (still works alongside Del).

L is a new shortcut for Light Tag display, Ctrl-L places light tags on selected area (can select area using either 4 & 6 shortcut keys). Selecting just one tile defaults to the original 'single coordinate selection' which was where mouse right clicked when opening the context menu. This option to set light on a single tile is still there to use but the area selection now makes it redundant.
Note: when placing fishing 'light', it is not detected by info panel as fishing until the map is saved and re-opened (it has always been like that but worth noting here).

Shortcuts for layer deleting has been moved from Ctrl-`,1,2,3 keys to more logical Ctrl-7,8,9,0 keys (because the keys 7,8,9 select deleting single tags per mouse click). Ctrl-0 uses big tile brushing but '0' is intuitive choice for deleting all three layers (making a 'hole' in map).

There is a new menu for making map images and the entries are named so that when you make all four map image sizes of a given map, they arrange in the map folder in increasing map image size (_BigMap.png is the smallest, successive sizes are each twice as large as the previous size). If you are wondering why _MiniMap is not followed by _LargeMap but by _XLargeMap and _XXLargeMap, that is to maintain alphabetic and image size order the same. I am open to suggestions.

All layer deleting can now be UnDone :cool:. Note that deletion deletes all selected tags in a single fell swoop but UnDoing restores that in a single tile by tile process. When restoring deleted tags on larger areas, it helps to hold down Z, the shortcut for UnDeleting.

When restoring deleted big tiles on back layer, it may seem like the UnDelete doesn't work but that is due to the nature of big tiles. Their tag is in upper left quadrant and restoring single big tile via UnDo first restores the three tile quadrants that don't have tags before it gets to the fourth which is the tag for the whole big tile. So you may see 'no action' on UnDelete while pressing Z three times and the big tile only gets restored on fourth press of the UnDo key.

For example, restoring a column of five deleted big tiles takes 11 UnDoes before the first bottom big tile in that column shows up. Then the rest of the tiles show up on every second UnDo action.

Middle tags are now magenta color. That tag has never been used for anything and now that we can invert F&M layers and the problem with the client displaying middle layer image strips has been solved (still needs to be implemented in the client source), it will get more use and was needed to tell the two tag kinds apart.
-------------------------------------------------------------------------------------
Release #4 Amended - Crystal Mir2 Map Editor Binary v1.4 [2022_07_03] [MediaFire link]

[This second download includes the program supporting dlls for new Map Editor users.]
Release #4 Amended - Crystal Mir2 Map Editor Binary v.1.4 ! Includes Supporting 'dll' Libs ! [2022_07_03] [MediaFire link]

If you didn't use Map Editor previously, you need to download from this second link. Besides the 'exe' files it also includes the supporting files that the program needs to run.

And if you need those supporting files, you might also need further info what else the editor needs to be able to edit maps.

Place the program with its supporting files in the top of mir2 client directory (where Client.exe is). It needs to load tiles from libraries located in
Data\Map\WemadeMir2\Object.Lib (and Shanda libs etc)
Also after it runs first time, it creates Objects folder in Data\ to store saved Object.X files.

If you run the editor outside mir2 client, on the first run it will create Data\Objects directory structure.
To this Data directory you need to add Map folder (next to Object folder) that contains Wemade and Shanda libraries (make a copy of Map folder found in CrystalMir2Client\Data\'Map').
Don't confuse this Map folder with that one in the Mir client top folder structure which has the same name and contains the actual maps (*.map files).

There are maps around here that need other libraries which are not included in the default Crystal Mir2 client and in that case loading such map in the editor will give you blank white space where the map is supposed to display. If you know where to get the additional library, place it with ShandaMir2 libraries since this directory is coded to accept up to 79 Object.Lib libraries total, so that is 49 extra libraries over the default 30 supplied with the Crystal client.

For the actual Map Editor operation, you can use shortcut H to open Help tab where all shortcut keys are listed. Many commands are also accessible from mouse right click on the map which opens context menu.
 
Last edited:

Valhalla

Nexus Mir Developer
Dedicated Member
Nexus
Game Master
May 29, 2015
1,278
2
221
110
127.0.0.1
Amended means making it more user friendly with menus and icons, most of which duplicate access to features that geeks were able to access previously but were hidden from more casual users. Plus there is fine tuning of too many details to mention, like rewriting menu items and various cosmetic improvements (like the font on vertical tab bar is now more legible).

You can safely replace your previous editor version with this one, no reason to keep using any previous one or any other editor version.

View attachment 28191

Swapped shortcuts for full zoom in and out in a single keypress, the / & * on numberpad. / now fully zooms out and * zooms in to make it more logical. The slash resembles minus and the star is like the plus sign. Minus and plus zoom out and in in several steps.

The animation cell info panel now opens/closes via shortcut Del, the Ctrl-F9 still works but the modifier key was awkward to use (still works alongside Del).

L is a new shortcut for Light Tag display, Ctrl-L places light tags on selected area (can select area using either 4 & 6 shortcut keys). Selecting just one tile defaults to the original 'single coordinate selection' which was where mouse right clicked when opening the context menu. This option to set light on a single tile is still there to use but the area selection now makes it redundant.
Note: when placing fishing 'light', it is not detected by info panel as fishing until the map is saved and re-opened (it has always been like that but worth noting here).

Shortcuts for layer deleting has been moved from Ctrl-`,1,2,3 keys to more logical Ctrl-7,8,9,0 keys (because the keys 7,8,9 select deleting single tags per mouse click). Ctrl-0 uses big tile brushing but '0' is intuitive choice for deleting all three layers (making a 'hole' in map).

There is a new menu for making map images and the entries are named so that when you make all four map image sizes of a given map, they arrange in the map folder in increasing map image size (_BigMap.png is the smallest, successive sizes are each twice as large as the previous size). If you are wondering why _MiniMap is not followed by _LargeMap but by _XLargeMap and _XXLargeMap, that is to maintain alphabetic and image size order the same. I am open to suggestions.

All layer deleting can now be UnDone :cool:. Note that deletion deletes all selected tags in a single fell swoop but UnDoing restores that in a single tile by tile process. When restoring deleted tags on larger areas, it helps to hold down Z, the shortcut for UnDeleting.

When restoring deleted big tiles on back layer, it may seem like the UnDelete doesn't work but that is due to the nature of big tiles. Their tag is in upper left quadrant and restoring single big tile via UnDo first restores the three tile quadrants that don't have tags before it gets to the fourth which is the tag for the whole big tile. So you may see 'no action' on UnDelete while pressing Z three times and the big tile only gets restored on fourth press of the UnDo key.

For example, restoring a column of five deleted big tiles takes 11 UnDoes before the first bottom big tile in that column shows up. Then the rest of the tiles show up on every second UnDo action.

Middle tags are now magenta color. That tag has never been used for anything and now that we can invert F&M layers and the problem with the client displaying middle layer image strips has been solved (still needs to be implemented in the client source), it will get more use and was needed to tell the two tag kinds apart.


Release #4 Amended - Crystal Mir2 Map Editor v.1.4 [2022_07_03]
i think i love you.

got a link to the code for this release anywhere or am i just blind?
 
Last edited:
  • Like
Reactions: mir2pion

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
@Jev
That GH link doesn't have the current version, not sure what is up there anymore. Far didn't like my copycat coding 😼 I think that version with more than one 'minimap' size making didn't make it up there.

But that Mega download link works. Maybe can't access it due to some location restrictions. It is a fairly 'mature' version and maybe you or someone could upload it to mirfiles?
Added second download from Media Fire
 
Last edited:

Jev

When I'm Gone
Staff member
Moderator
Jul 21, 2020
1,575
7
653
135
Worthing, West Sussex
@Jev
That GH link doesn't have the current version, not sure what is up there anymore. Far didn't like my copycat coding 😼 I think that version with more than one 'minimap' size making didn't make it up there.

But the link works. Maybe can't access it due to some location restrictions. It is a fairly 'mature' version and maybe you or someone could upload it to mirfiles?
Added download from Media Fire
If you can update the link that’ll be great
 

2dope

Golden Oldie
Golden Oldie
Mar 15, 2005
514
14
125
Sorry for the stupid question but in regards to this - "You only need to put Map folder in Data (with the Wemade & Shanda libraries inside it" Where do I get these files from? Thanks
 

Far

tsniffer
Developer
May 19, 2003
19,801
29
2,203
400
They're all on the public patcher. It provides all files from all variants
 

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
Sorry for the stupid question but in regards to this - "You only need to put Map folder in Data (with the Wemade & Shanda libraries inside it" Where do I get these files from? Thanks

Do you have standard Crystal client? If you run the Map Editor from it, than you already have Data folder in there with everything else that the editor needs to open maps (in editor you can open maps from any other location too, as long as they use the default Crystal libraries).
--------------------------------------------

@Far, he is referring to my short 'Guide' how to start using the Map Editor for those not familiar with it. I added it today just bellow download link (in post #89 above)

Also added second download option to get the exe files along with supporting dlls. I assumed all getting the editor files would already have them and know what to do.

I edited the guide for more clarity and placed the more advanced tips on editor use in another spoiler (spoiler within the spoiler, am I the first one to do that? :cool: ).
 
Last edited:

2dope

Golden Oldie
Golden Oldie
Mar 15, 2005
514
14
125
Do you have standard Crystal client? If you run the Map Editor from it, than you already have Data folder in there with everything else that the editor needs to open maps.
--------------------------------------------

@Far, he is referring to my short 'Guide' how to use the Map Editor for those not familiar with it. I added it today just bellow download link (in post #89 above)

Also added second download option to get the exe files along with supporting dlls. I assumed all getting the editor files would already have them and know what to do.

I edited the guide and placed the more advanced tips on editor use in another spoiler (spoiler within the spoiler, am I the first one to do that? :cool: ).
You're a legend, thanks mate :) Been a long day. Thank you.
 
  • Like
Reactions: mir2pion

mir2pion

TL;DR
Dedicated Member
Feb 21, 2013
2,592
288
124
I've come across a weird thing in the Map Editor - in some cases when I was inverting front<->middle layers, they would fail to invert.

I traced the failure specifically to ShandaMir2 smTiles.Lib libraries - tiles from these libraries (smTiles.Lib to smTiles9.Lib) will not invert. All other libraries, WemadeMir2/3 and ShandaMir3 all can be inverted, just ShandaMir2 smTiles cannot. The other tile kinds from ShandaMir2, the Objects#.Lib allow layer swapping no problem.

Otherwise everything works, can place ShandaMir2 smtiles on new map on front or middle layer no problem but selecting them (F4 or F6) and inverting (Ctrl-I) won't budge either of them from their respective layers (the one placed on front layer or the other placed on middle layer).

Something is different about this whole library category. Swapping layers code simply rewrites the tags, those with front attributes are changed to middle ones and vice versa. There is nothing done in this layer swapping process regarding which library those tags came from. That shouldn't matter but apparently it does matter in the case of ShandaMir2 smTiles libraries category.
 
Last edited:

Far

tsniffer
Developer
May 19, 2003
19,801
29
2,203
400
Do front and middle both support the same data type? Might be that front uses ushort and middle is uint or something. Haven't checked, but might explain it