Release Xiyue MapEditor - Akaras' mod updated by M2P

smoochy boys on tour

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
Don't delete entries lol. It's just git figuring how to merge code together.

Leave it as is or you're likely to just **** the whole thing up
 
  • Haha
Reactions: zedina

Alecs

SPQR
VIP
Jan 10, 2009
3,309
3
1,191
380
Europa
I think I could delete those two entries on my repo if I could figure out how. It seems you can only add, not remove or edit anything. I mean how stupid can it get?
I'm sure this tool used by millions of devs is just stupid.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
I've deleted the CMap Editor.sln since you said it wasn't needed
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
Yes, that was simply a duplicate of the 'Map Editor.sln' (I did text file compare on them), it didn't matter which you used to launch the solution in VS.

I have heavily edited my previous post because I made some progress. I deleted those two commits from my remote repository (now it has the same commits that Suprcode had before the Pull request I made last night.
It should be ready to receive the Akaras editor version 1.1 but I can't for the life of me figure out how to repeat what I did yesterday.

When I Push the files, it tells me to Fetch first. But when I do Fetch, I get this same message when I make another Push. This is in GitHub Desktop program. I get the same response in VS.
1633421828000.png

I found this royal advice but I just don't have Pull available (it is not selectable in menus)
1633422775179.png

Maybe there is some code difference between the remote and local code that I will have to reconcile by manual editing, same as I did to port the Suprcode changes to the Akaras' editor last week.
I would have thought the editor I try to push to remote does have those changes in but something must have changed. I am gonna sleep on it.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
Never delete commit lines, ever. It might not look useful to you, but its the only way git knows how branches and changes link up, and gives the next person who pulls your code the correct path.

Looking at your previous post - it sounds like you've messed up your repo by randomly deleting commits and forcing updates. Lessons to be learned there, if you can't do it in the UI, then it probably shouldn't be done.
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
Don't delete entries lol. It's just git figuring how to merge code together.

Leave it as is or you're likely to just **** the whole thing up
I deleted them using commands I found on GH discussion forum and GitHub accepted them, it worked.

1633423125683.png

The number in 'HEAD~2' specifies how many last commits (that is commits from the top) you want to remove (they are restorable too).
Thing is, if you won't be open to do this on your repo, then all my efforts in this directions will come to nowt. But I learned a lot, so it wouldn't be wasted if you won't do it.

This is my repo now, same as Suprcode was before you pulled in my request.
1633423617014.png
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
No commits will ever be deleted on the main repo - there's zero benefit and 100% likely hood to mess up the branch.

I'd recommend deleting your repo, forking the official branch - then you can continue correctly with a matching branch history.
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
Remember how I asked you about the '.' commits? Get ready for harder explanation in the future since I myself don't know why those two duplicate commits were made. If I had to do manual code changes updating now, those two commits would be like getting a tooth pulled. :censored:

Anyway, you could just as well start a new fresh repository and commit in the Akaras' v1.1 editor. Its not as if there is some precious history to preserve.

Not asking, just saying.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
Yeah I could have. But you've had a learning experience and now you know how to use git abit more.

The commits aren't just there for a user to follow and copy and paste from, it's a full chain of every change to a branch. Just look through the crystal commits and you'll see many commits are just duplicated or empty, and that's fine. No need to delete a commit just because you think it doesn't serve a purpose.
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
OK :)

Now that this editor is official, I wonder if somebody could help with one glitch it has.

If you happen to be placing back tiles, or have selected Brushing Tiles and you save the map using the very convenient and intuitive shortcut Ctrl-S,
after you OK that little confirmation panel that your map was saved, the Ctrl key remains active and as soon as you move your mouse, it sprays tiles or brushes with abandon until you either click Ctrl or Escape key.

It can be annoying to spill tiles on your map this way since they take many undos to remove and if you hold the undo button, it can pass into undoing your legit map and then you need to ReDo... For now, solution is to either remember to click one of those two mentioned keys right after confirming the saved map or remember to use the menu Save button in these situations.

The bug happens because the shortcut is made in winform properties setting (it makes it possible in some cases to specify the shortcut button) but setting it this way doesn't allow for some amends like to specify the modifying key should be released.

You can use such provision if the shortcut is made in code (I believe inserting the line 'e.SuppressKeyPress = true;' does that)

C#:
                case Keys.S:
                      if (e.Control)
                        Save();
                    break;

But the problem is, S is part of WASD movement and using it as a shortcut in code is not allowed (it won't compile) because "the switch statement contains multiple cases with the label value '83' "
 
Last edited:

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
CTRL shouldn't have been used for that anyways as it takes over alot of "editing" habbits, i find myself continually pressing CTRL+Z to undo, I would personally make it work by holding left click to draw (and it happens per new cell met, so you don't spam your undo history).

Also for the map movement, WASD is alright but damn...add scrollbars. Also another massive one is the tools list being a drop down, this should be a seperated toolbar thats moveable (with icons / tooltips).

oh and the fact you gotta have half your screen eaten up by the tiles menu when that should be seperated too...
 

Akaras

LOMCN Developer
Developer
Jan 14, 2014
704
158
165
I think I added scrollbars to the map tab... :) WASD always did my head in when trying to navigate a map but was okay for fine tuning your position
 
  • Like
Reactions: Breezer

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
i find myself continually pressing CTRL+Z to undo, I would personally make it work by holding left click to draw (and it happens per new cell met, so you don't spam your undo history).

Standard (redo)-undo (Shift-)Ctrl-Z is too complicated considering the frequent use of undo/redo when working with maps. You get used to it fast. Make a wrong change, hit Z to undo it... In the map editor, for the most part, you are not working with standard program or keyboard anyway.

BTW I swap Ctrl with Alt on my keyboard after every windows reinstall to put Ctrl closer to ZXCV (and even ASF).
Should have been made like that but MS had to do it differently from Apple.

I believe with the rest, you have iJam's editor in mind.

WASD movement keys are OK, they are perfect and I wouldn't like them changed to arrows as I once said. And over time I found when I needed to move around map, I was dragging scroll bars rather then using Jump. So even if I am all for maximizing map view, I wouldn't do away with them.

As to that map saving.
I used gui property of the menu Save command to set Ctrl-S and that works except for that sticking Ctrl key. A while back I came across a code page where the code for these panels (winforms) is automatically written as you change the forms and I remember there was a warning not to edit that page (obviously). But I can't find it again, I would try to slip in that line 'e.SuppressKeyPress = true;' and see if that would work.
Otherwise I would be OK with leaving it like this.

1633572026751.png
Post automatically merged:

I have a brilliant idea how to get around this Ctrl key. How about brushing tiles with Alt? Saving map has to stay as is, it is a second nature to use Ctrl-S and it is used very frequently (I suppose by everybody) to save your steps.

Also thought about B and that would probably be even better choice but it has placing Back limits on it and that is also logical. B puts down Back limit, F Front limit and C Clears both limits. That's all you need to work with limits, I wouldn't want to lose that B key to Brushing.

A side note:
There is also a separate choice for clearing front or back limits but in practice, you don't really need those two functions. Later those limit shortcuts could be made to place a larger limit block (say 11x11 like what iJam's editor has, no idea why it was made just that size, like not 10x10). And if that could be made into a true brush by holding Alt, that would then be all you might want regarding limits. But just making it placing a tile square like iJam's editor does would be ok too.
 
Last edited:
  • Like
Reactions: Martyn

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
Standard (redo)-undo (Shift-)Ctrl-Z is too complicated considering the frequent use of undo/redo when working with maps. You get used to it fast. Make a wrong change, hit Z to undo it... In the map editor, for the most part, you are not working with standard program or keyboard anyway.

BTW I swap Ctrl with Alt on my keyboard after every windows reinstall to put Ctrl closer to ZXCV (and even ASF).
Should have been made like that but MS had to do it differently from Apple.

I believe with the rest, you have iJam's editor in mind.

WASD movement keys are OK, they are perfect and I wouldn't like them changed to arrows as I once said. And over time I found when I needed to move around map, I was dragging scroll bars rather then using Jump. So even if I am all for maximizing map view, I wouldn't do away with them.

As to that map saving.
I used gui property of the menu Save command to set Ctrl-S and that works except for that sticking Ctrl key. A while back I came across a code page where the code for these panels (winforms) is automatically written as you change the forms and I remember there was a warning not to edit that page (obviously). But I can't find it again, I would try to slip in that line 'e.SuppressKeyPress = true;' and see if that would work.
Otherwise I would be OK with leaving it like this.

View attachment 26425
Post automatically merged:

I have a brilliant idea how to get around this Ctrl key. How about brushing tiles with Alt? Saving map has to stay as is, it is a second nature to use Ctrl-S and it is used very frequently (I suppose by everybody) to save your steps.

Also thought about B and that would probably be even better choice but it has placing Back limits on it and that is also logical. B puts down Back limit, F Front limit and C Clears both limits. That's all you need to work with limits, I wouldn't want to lose that B key to Brushing.

A side note:
There is also a separate choice for clearing front or back limits but in practice, you don't really need those two functions. Later those limit shortcuts could be made to place a larger limit block (say 11x11 like what iJam's editor has, no idea why it was made just that size, like not 10x10). And if that could be made into a true brush by holding Alt, that would then be all you might want regarding limits. But just making it placing a tile square like iJam's editor does would be ok too.


I ain't reading all that.

Nope CTRL+Z is deffo the only undo command I'll ever be used too...and most designers (that use Windows I guess).

I don't have iJams editor in mind, I have every editor in mind, pretty much everything on the editor is super backwards.

Although I am deffo not prepared to try and explain how it should be.

As for drawing continually by holding Ctrl. What's wrong with holding the mouse click in...again, like every other editor out there.

I'm curious, how many level design programs have you used ? Not mir related.
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
I won't be reading all that either but if it seems all backwards, maybe because it came from China? :unsure:

I am open to criticism but it needs to be on improving what we have here, namely this particular editor version and also, not uprooting it all.

Map editor is unique in that undo is used extremely heavily when working with maps (most heavily when building from libraries). Clicking plain Z to undo is the best option here, even if non-standard. It only removes the first modifying key step, Ctrl-Z -> Z and Shift-Crtl-Z -> Ctrl-Z, easy to remember.

There is way too many unavoidable custom shortcuts anyway and you get into it after few hours of working in the editor.

Maybe the biggest message I got from LOMCN over the years is, if you don't like something, you can always change it yourself.
 
Last edited:

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
One major feature of this release #3 is separate layer data deletion from selected map area.

1640509465616.png 1640509518539.png

Another big change is the removal of scroll bars that turned out to be a tricky operation I had to pass off to Akaras :geek:
Map scrolling is now done using NumPad keys.

After some testing, I settled on 8, 5 & 4, 6 keys imitating WASD movement keys and each key press 'jumps' by 26 tiles horizontally or 20 tiles vertically.
NumPad2 scrolls down at twice the rate of NumPad5 key.

The four corner numbers, 7, 9, 1 & 3 scroll the map in diagonal directions. The map movement really approaches standard scrolling when map is zoomed out to some extent.
In fully zoomed in state, each key press moves the map by about half the average screen view distance and the scrolling becomes smoother as you zoom out to gain bigger view of map.

Numpad0 moves map to 0:0 origin while NumPad Enter jumps to bottom right extreme map corner.
NumPad/ Zooms In fully in one key press while NumPad* Zooms fully Out This obviates the need for Shift+ & Shift- shortcuts but those are still working.

-------------
View menu is now accessible from the map Context menu. That makes all menu choices (including items without shortcuts) easily accessible in the NoMenu editor version and seems to be more conveniently accessed this way even in the editor's standard version.
Both menus are cleaned up and more logically arranged (I hope).

1640550721574.png


This screenshot shows off the NoMenu geeky editor version :geek: as well as the new Cell Info panel which is now split into three panels of smaller size, each containing only the info most often used at a given stage in a map building. The panel shown here is called Cell Library Info in the View menu.
Map Editor v1.2 NoMenu Edition - w Cell Info.jpg

The other two panels are named Cell Animation Info (Ctrl-F9) and Cell Coordinates Info (Ins). Middle layer animation is currently not active and so greyed out).
1640552563437.png 1640552607034.png

The small Cell Coordinates Info panel is useful when making a selection and saving it as Object.X for subsequent placing it on map.
To have control over what gets copied (and saved with Object.X) on Back layer, the selection needs to start at even x, y coordinates. When placing an Object.X on map, mouse tip coordinates must again be even x,y numbers in order that Back tiles get placed (or get placed correctly). The small Coordinate Info panel is very handy in such cases to have control over the process.

Note: the three Cell Info panels can be shown all three at the same time and the order of how the Libraries and Coordinate panel (in particular) superimpose seems to be random from compilation to compilation. It is only 'cosmetic' thing but good to know about to avoid possible confusion.
1640558788980.png
----------------
In addition to MiniMap making, there are now three more options to make various size Map Images for map cataloging purpose. This means to make images that are ~ full screen size of average monitor resolution.

Alt-M BigMap makes half MiniMap size that is the BigMap size map image. Use for very large maps,
M MiniMap makes MiniMap - map image size between BigMap and L & XL
Ctrl-M Large makes map image double MiniMap size
Alt-Ctrl-M XLarge makes map image quadruple MiniMap size
1640564318345.png
XLarge is for making images of small maps ~ 150 to 500sq tiles (smaller maps of house interiors still come out quite tiny)
Large is for map images between ~ 300 to 600sq tiles size
MiniMap makes decent size map images ('decent' for map image catalog) from map size ~500 to 700sq tiles maps
BigMap is for very large maps ~700sq tiles and bigger. These maps cause Map Editor collapse when taking MiniMap map image (or L & XL)

Also, even when you can make map image of these large maps of MiniMap size or L & XL, they come out too huge in pixel and MB size for practical cataloging purpose.
These are in essence the reasons why alternative sizes of map image making were needed.

------------------
The rest of changes are panel size changes in Libraries Tabs, various panels translated and adjusted, one example is this one for door settings and other numerous minor changes like the About panel can now be dismissed by Escape key.
1640559104228.png 1640559146217.png

-------------
After some struggle to keep the Save Map shortcut on Ctrl-S where it collided with Tile Brushing, I had to move it to Alt-S (alternatively, moving Tile Brushing to Alt key turned out problematic too).
As a compensation, you can now open Save Map dialog by a single key press '~' (located just bellow Escape key). `~ key used to act as alternative to Escape key but it is no longer needed.

As before, the binary NoMenu editor version is included for mapping daredevils who know all their shortcuts and appreciate all the space for map view they can get. The source is for the standard editor version.

(The link in the first post is also edited)
Release #3 - Mir2 Map Editor v.1.2 [Master & Binary 2021_12_26]
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
Why the removal of scroll bars? Surely it would be better to have them and just add keybinds for WASD and numpads etc.

Personally I always initially use the scroll bars to drag where I need to as it's much quicker
 
  • Like
Reactions: Breezer

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,091
502
175
The numpad beats dragging the scroll bars. I used to drag them too but numpad turned up to be much better way. Akaras also didn't raise any objection, obviously it was plain to him that the numpad is far superior way to move about map.

Also scroll bars partly obscured map panel, they partly covered extreme bottom tile row and right extreme tile column (as you can see if you display grids). The map panel was reduced in size to make space for the scroll bars but that still resulted in those 'defects' at bottom, right margins.

I hope you will change your mind on this after you give it a spin if you didn't yet. By the time you aim mouse tip on the scroll bar little square and usually you need to drag both X & Y bars, you are better off to let the mouse go and hit that numpad key with finger.

At full size view (zoomed in), it is better to click the keys but if zoomed out a bit, you can hold the key down and it moves the map speedily but not so fast you couldn't stop where you want

In NoMenu editor version, you now have beautiful clean window with even bigger map view than before.

I would leave uploading to github for later after pple had chance to give it a spin and hopefully you will go with the change.
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
I'd just say it's a standard design choice to allow mouse use for everything. Many people have keyboards which don't have a keypad (my laptop doesn't have one) and then those without keyboards or those who don't instinctively think of using a keyboard to scroll - the app has basically become unusable (we had 10s of help questions when akaras released his scrollbarless viewer, and I remember tons on an old mir3 viewer without them.

The edge tile rows are hardly an issue as players cant even see them.

Feel free to pull request still, I said from the start I'm not going to dictate design choices with this app as I'm not making changes to it. As long as the code is to a reasonable standard that's all I ask.


Edit:
Just had a quick play with it, and its much less intuitive without the scrollbar. You also have no indication of where you are on the map any more, and the num pad jumps too much that you loose track of your position. With the scroll bars you saw you were half way across the map, and I'd always use that on map 0 - i'd drag the scroll to the center as i knew thats where Bichon was, now i have to guess what part of the forest I'm in to know which way to scroll.

I've also looked at the source, and I couldn't accept it as is. You've got 4 duplicated methods for creating a minimap. That needs to be 1 method and you pass in parameters for the variables which changes. The only thing which has changed is the 1 line at the bottom (and the large minimap doesn't even need that line as you're dividing by 1).
 
Last edited:
  • Like
Reactions: Sanjian