OpenXcom Forum
OpenXcom Forks => More Forks => Topic started by: ohartenstein23 on October 26, 2020, 12:26:44 am
-
I'm making available an alpha release of a map editor for OXCE that I've been working on! This tool is intended for helping modders and other interested community members to make small-scale changes on existing MAP/RMP files in a mod from within OXCE - for large scale map creation the MapView tool maintained by kevL (https://github.com/kevL/OpenXCOM.Tools) is a better choice.
Attached to this post are 64-bit Windows and Ubuntu 22.04 builds of OXCE with the map editor included - any other operating systems would need to be compiled from my source code, which can be found on GitHub (https://github.com/ohartenstein23/OpenXcom/tree/battlescape-editor). It is currently built on top of OXCE 7.8.6. Any updates to OXCE or bug fixes for the editor will have to wait until the next feature release of the editor. Installation is done in the same way as for OXCE (https://openxcom.org/forum/index.php/topic,5258.0.html), and I would recommend keeping the installation of the editor separate from the OXCE version you use for regular play/modding.
*** IMPORTANT CAVEAT: This is an incomplete feature and not a part of official OXCE releases. Do NOT bother Meridian with bug reports or requests regarding this map editor. ***
Extensive documentation of the editor and its features is contained in the build downloads below. For the features currently available and the kinds of feedback I'd appreciate on this build, I'm including a bit from the first page of that documentation:
This is the documentation for an alpha release version (05 February 2021) of the Map Editor for Open X-Com Extended (OXCE). The alpha release versions are intended for demonstration and testing of the basic functionality of an in-game map editor. Feedback on the user interface and functionality are appreciated as are bug reports, but bug fixing support will likely be slow and tied to new feature releases. Please read through the following list of included and planned features before making suggestions for further development. It is also not intended to replace MapView but rather to provide supplementary map editing with minimal setup outside installation of OXCE. The primary features in this release are
- Editing of maps included in the currently loaded set of mods
- Creating new maps from the terrains defined in the currently loaded set of mods
- Editing single tiles at a time by adding, changing, or removing objects within the tile
- Editing single AI nodes at a time by adding, moving, changing, and removing them and their links
- Switching between tile and AI node editing modes
- Undoing and redoing single tile/node edits
- Saving edited .MAP and .RMP files in the current OXCE user folder
- Sample ruleset for implementation of the edited .MAP and .RMP files in the openxcom.log file
- Opening the main Map Editor Menu for creating/selecting a new map to edit directly from the Editor Interface.
- Editing multiple tiles/nodes at a time by both rectangular selection and paintbrush-style selection tools
- Copying, cutting, and pasting selections of multiple tiles/nodes at once
- Find and replace tools for searching and editing tile and node content
- Searching of text lists in the Map Editor Menu
- Find and replace tools for searching and editing tile and node content
The following features are planned for future releases:
- Option to attempt to match MCDs across maps when pasting tiles
- Creating new maps with custom terrains from a selection of terrain data sets (.MCD files) from the currently loaded set of mods
- Direct loading of .MAP files from a specified directory using a supplementary file to indicate which terrain data sets to use
- Resizing maps
- Improved Map Editor main menu
- Testing map being edited in the battlescape before saving and importing changes due to tile destruction
-
Release changelogs:
01 November 2020 (https://openxcom.org/forum/index.php/topic,8711.msg133538.html#msg133538)
06 November 2020 (https://openxcom.org/forum/index.php/topic,8711.msg133687.html#msg133687)
-
wow. good luck o23
-
This is a great thing to have! Please, keep moving with this amazing tool! Here is my first impression:
1) It is much better to have in-game rendering, rather than its simulation with map editor. Working with this I will know for sure that my map would look like the thing I'm currently working on.
2) Having an in-game resolution really helps! It is much easier to detect small mistakes on the map when looking from a game perspective, especially when working on a big map.
3) It runs way more smooth. Currently, I'm working with a huge mapblock (50x70x5) and map editors lags kills me. In your editor it's perfect. Tomorrow I will proceed with your editor, it's way faster and definitely much enjoyable!
4) In-game feel - when working in the map editor I am "working". I love modding and level design in particular, but it still. I was not working for a log time, just tried a few things. But all that feeling that is created by using vanilla-style UI and game rendering makes me feel more like I'm DMing a D&D session and I am in process of set up a dungeon on the table from tiles, and it is a part of a game we are playing with my friends. Hard to explain, but I like your environment much better than working in window forms.
5) Browsing mod's maps. It still not perfect, you know, there could be some more additions to that within terms of UX, but it's already better - you just choose a mod and the map, instead of those additional manipulations with editor settings I always hated.
6) God bless you, Undo button!!!11
It is a great progress for an alpha, I'm sure you have some things in your backlog and I really hope you will continue this amazing project!
UPD:
I can confirm the first impression. Tho mapmaking is not the most critical part of my current project I'm working on, it's still important. So I have to add - handy UI and much faster placing of new tiles in the general workflow for me compensate lack of filling and cut/copy/paste functions. It's obvious, that they would be very welcome, but now this editor is my main mapping tool and after a few days of working there I don't want to return back to MapView 2. All my experience is recorded (tho, it's all in Russian, sorry). The process is much more enjoyable, I guys have to try it, it's like some magic opens when you get the flow of it because in-game rendering feels like playing, especially when the shadow of the upper floor is calculated!
Pls, keep moving with this awesome project!
-
wow. good luck o23
Thanks kevL!
snip
Glad you're enjoying using it Finnik, and thanks for the feedback and bugreports on discord.
I'm releasing an update with the ability to select multiple tiles and nodes at a time for editing, check the first post for new downloads (https://openxcom.org/forum/index.php/topic,8711.msg133353.html#msg133353). There are some new user options too that go along with the selections and based on feedback I've received.
It also includes a fix for UFO doors opening and remaining open when placing them where a tile was previously. This was just a cosmetic bug, the doors would be closed properly if the map was loaded into the battlescape.
Next up on the feature list is copy/cut/paste, probably followed by find/replace buttons. At that point, most of the features for the editor itself will be done and I'll move on to better file management support.
-
And now we are talking! Just tried it fast - feel super cool! I'd suggest posting somewhere a list of changes and new features that update brings - for example, we can now select, and use Shift to add to selection and ctrl to deselect - users can miss it with updates. Also, I can't find what Shift+Ctrl does.
Can we use Esc to clear the selection? Like if there is a selection Esc clears it and if there is no selection - it opens Options?
-
Guess I could add a list of changes as I release them in this thread. Here's what the latest release brought:
- Drag-select with the mouse to pick multiple tiles/nodes for editing
- Modifying how you select tiles/nodes with Shift and Control keys
- Fix for UFO doors opening and remaining open (just a cosmetic bug)
- User options for drag-select modes
- User options for setting the maximum size of the tile selection panel
- User option to close the tile selection panel after you click
You can clear the selection by left-clicking outside the map. I'd rather not overload the Esc button too much, but I can add another hotkey to clear the selection, probably default 'X' for now.
Control + Shift together only selects tiles within the area you've already selected. Think opposite of what Control alone does - it won't affect tiles outside the previous selection.
-
I don't have as much real feedback as Finnik has (most because I'm still playing around with it and I'm quite happy with the current build, my suggestions are already on the to-do list anyways), but I've been promoting your tool on my dev team and they love it so far. We all are rooting for you and your project! Looking forward to seeing more of it!
-
Glad you and your team have been enjoying using it.
Another release is ready, this time cut/copy/paste functions have been added. Again the first post has the files to download (https://openxcom.org/forum/index.php/topic,8711.msg133353.html#msg133353). The new features for this release are:
- Press Control + A to select everything, X to clear selection
- Press Delete to remove selected tiles/nodes
- Cut, copy, paste functions added
- Pasting tiles respects selection of mode button and tile part filter
- Paste clipboard persists when loading maps to allow copying from one map to another
- Option to select undone/redone tiles/nodes
- Option to select pasted nodes/tiles
-
So cool!
Option to attempt to match MCDs across maps when pasting tiles
Resizing maps
Testing map being edited in the battlescape before saving and importing changes due to tile destruction
Those are the most promising currently, resizing is quite a needed tool, I already had to return to MapView to do it there. I would also welcome shading change directly in the editor to see online how to place lights (and it should respect OXCE lightning model). Also, it would be nice if not editing, but just reading MCD properties.
-
It is a pity that there is only a win64 version. Well, I'll wait for the win32 version.
-
Very well...
-
A new release is ready, the first post has the files to download (https://openxcom.org/forum/index.php/topic,8711.msg133353.html#msg133353). The new features for this release are:
- Finding/replacing tiles and nodes
- Quick search through the maps/terrains in the main menu
- Possible fix for crashes when loading a new map with a selection of tiles or nodes active
- Fixed pressing cut or delete multiple times with nodes selected continuing to decrease the number of active nodes incorrectly
- Fixed number of active nodes being incorrect when loading a map
- Fixed linking exit connections within the same map when loading
- Fixed node information panel displaying wrong type, switching flying and small units
- Fixed right-clicks adding to path-style drag selections
- Fixed display of node spawn priority not being able to go to 10
- Possible fix for right-clicks on map happening through the MCD selection panel
- Fix for keyboard shortcuts de-selecting tile filters causing the map to scroll until mouse movement
As part of the fix for displaying nodes, you may have to check any maps you've made with the tool where you limited nodes to flying units only or small units only. The bug switched the display of those two values in the code, so you may have to switch them. Fortunately the new find and replace can help fix that!
-
Woo, cool! Thank you!
-
TFTD maps cannot be opened. Crash with error: "Sprite Set MapEditorIcons not found". Tried varies version of TFTD - no results.
If this error is resolved, please provide a way to download the latest versions. Or explain what I am doing wrong. Attached a log file to the message.
-
Don't need the log to tell you what's not working - I only drew sprites for the Map Editor UI for UFO.
If you want to use this in TFTD, then you'll need to add the UI sprites either through a mod or by adding it to the "standard" folder in your installation. This means:
1. Making a copy of the image file located at standard/xcom1/Resources/Extended/UI/mapeditor_icons.png, editing it to the TFTD palette, and placing it either in the standard/xcom2 folder or your own mod.
2. Referencing this new image file in a ruleset file, either in standard/xcom2/extraSprites.rul if you put the image in the standard folder or somewhere in your own mod, containing the following lines:
extraSprites: # must be somewhere under the extraSprites header
- type: MapEditorIcons
width: 320
height: 240
subX: 32
subY: 40
files:
0: Resources/Extended/UI/mapeditor_icons.png #this is for putting it in the standard folder, change it to wherever you put the image
-
Thank you so much. The obvious is incredible. It never occurred to me, that they actually didn’t exist. :o
It works. If not difficult, please include these changes in next stable release.
-
I wasn't planning on drawing TFTD sprites until I had a full release candidate. However, if you have a standalone mod that gets it working, I'll update the first post with a link to it.
-
You told that there is an issue with drawing light sources and shade like the game does it (including advanced light path algorithms). What is the actual problem, if it still persist?
-
One of TFTD map results in an crash by unexpected error. Apparently this is a rout-mistake of the developers of the game itself. Is there anything you can do to handle errors like this correctly? Or is it a special case, that does not require intervention? In any case, this is not a problem, as long as there are other map editors that can be used to fix the .RPM file. Just in case, I am attaching files, although in theory this error can be reproduced on any standard ones.
-
@ohartenstein23
looks like 4ky's issue (above^) is an out-of-bounds node(s). But i just want to note (in case you're unaware of this) that several TFTD route-files have noderanks that are set to an invalid value ... ie. 9 when the limit is 0..8
/iirc
not sure how ( or if ) you want to handle those
-
You told that there is an issue with drawing light sources and shade like the game does it (including advanced light path algorithms). What is the actual problem, if it still persist?
The problem was that updating lighting for the entire map is computationally expensive, and the editor can call for lighting updates rather quickly. To prevent slowdown from that, I believe I only call for updates in the (x, y) column of tiles when a tile is added or removed. Also, I haven't added any way to check the map with different global shade values.
One of TFTD map results in an crash by unexpected error. Apparently this is a rout-mistake of the developers of the game itself. Is there anything you can do to handle errors like this correctly? Or is it a special case, that does not require intervention? In any case, this is not a problem, as long as there are other map editors that can be used to fix the .RPM file. Just in case, I am attaching files, although in theory this error can be reproduced on any standard ones.
@ohartenstein23
looks like 4ky's issue (above^) is an out-of-bounds node(s). But i just want to note (in case you're unaware of this) that several TFTD route-files have noderanks that are set to an invalid value ... ie. 9 when the limit is 0..8
/iirc
not sure how ( or if ) you want to handle those
As kevL said, some RMP files in TFTD have invalid node values and positions. The editor doesn't have any extra validation yet, so you'll have to use another tool like MapView or a hex editor to correct those before my code will be able to handle that map. I'll add it to my list to for for my next update.
-
The problem was that updating lighting for the entire map is computationally expensive, and the editor can call for lighting updates rather quickly. To prevent slowdown from that, I believe I only call for updates in the (x, y) column of tiles when a tile is added or removed. Also, I haven't added any way to check the map with different global shade values.
Well, to me would be good any kind of solution - when changing tile, or even with hitting some button to calculate shades, and in that mode you can't edit the map, just observe it. Could be a new mode together with tile/nodes. Any solution would better than saving map, moving it from save to mod, closing and reopening the game and launching battlescape.
-
Well, to me would be good any kind of solution - when changing tile, or even with hitting some button to calculate shades, and in that mode you can't edit the map, just observe it. Could be a new mode together with tile/nodes. Any solution would better than saving map, moving it from save to mod, closing and reopening the game and launching battlescape.
Updating whole map lighting on changing a tile is a slowdown that I don't want to introduce into the editor. I will have an option to better preview the map in the future without needing to load it into a mod.
-
Updating whole map lighting on changing a tile is a slowdown that I don't want to introduce into the editor. I will have an option to better preview the map in the future without needing to load it into a mod.
Ok, I see you reason. What about my idea to make a 3ed mode (together with tiles and nodes) with preview of lightning, where i can choose shading, but i will not be able to edit tiles, so no recalculation but lightning on changing this mode setting from its menu?
-
Looks like Map Editor with it's current release is not compatible to recent OXCE version. For instance, it fails to load the mod with recently changed `aggroSound: []` property, that was changed to an array.
Any chance Map Editor would be updated to handle that?
-
Any chance to have an update? Released version does not support changed `aggroSound: []` property and fails to load mod... I tried to build your current branch myself (looking to update it), but it fails to build with multiple errors in map editor part :'(
-
I am attempting to compile it myself, but I face some compilation errors, that I can't handle. Maybe you guys can provide me a tip?
Source: https://github.com/ohartenstein23/OpenXcom/tree/battlescape-editor
Visual Studio 2019
It looks like many (if not all) new map editor's stuff is not linked, how can I fix those?
-
You do not include every file to solution
-
You do not include every file to solution
Thanks, that helped! =) apparently, it looked like @ohartenstein23 does not use VS code, so .sln file misses important definitions.
https://github.com/Finnik723/OpenXcom/tree/battlescape-editor
-
Thanks, that helped! =) apparently, it looked like @ohartenstein23 does not use VS code, so .sln file misses important definitions.
I use VS Code, but have CMake configured to include all the files.
Small update in the original post: brought up to more recent OXCE version, added some TFTD support.
-
yay! thank you!
-
One thing the documentation is missing is installation instructions.
-
One thing the documentation is missing is installation instructions.
First post, second paragraph, fourth sentence.
-
Hi, I found an issue while trying to make a new map, namely trying to scroll through MCD bits in the selection tool makes the editor crash with a segmentation fault.
Happens only with X-COM Base elements from TftD, other tilesets are fine. I can open existing maps just fine, too. Tried swapping OG TftD files from different sources, seeing if it works better on native Windows rather than Wine and Manjaro, same error.
Since I'm computer illiterate I pass the log file onto you lot.
-
Thank you for providing all the relevant language strings in the manual. It really helps my Frankenstein's Monster of an installation.
For the curious, I manually inject all of the relevant strings (in EXEs of course, I'm not insane) into the en-GB.yml files so that I can run vanilla, 2P, Brutal Ai, and now this all in the same folder with separate config files pointed to by the -config command.
-
Thank you for this great tool! It's very easy to use even for a noob.
One question: when I save a modified map (from a loaded MOD), it always save it at the same directory as save files. Is there any way to change this? I would like the loaded map would save on the same place, overwriting old version of the map.
Instead, I have to go to the save directory, copy map and rpm from there, and then paste onto MAP folder in MOD.
"Save as" doesn't work, as map have already a name. iI know I can change save path to the one of the map I'm editing, but I would like not to do, as I should change again when map editing is done.
Also "File Browser" doesn't seem to work. I find the MAP/RMP files (outside of the game/mods directory tree) and when I select the map and press OPEN button, nothing happens.
Thanks in advance.
-
The File Browser and saving to locations other than the savegames are planned features. Saving to that specific folder is a placeholder for now.
-
Hope the project will continue to develop. I've got a feature request - filter in MCDs list when selecting what to place by tile type (floor, n wall, w wall, object or no filter) based on what we select for placement (top right corner). I know there are some rare cases when you need to place an object in the slot of the wall, so this filtering should be enabled with option.
Is it hard to do? For now, I don't see much trouble.
That would greatly help with working with huge (close to the limit) terrains.
-
Hope the project will continue to develop. I've got a feature request - filter in MCDs list when selecting what to place by tile type (floor, n wall, w wall, object or no filter) based on what we select for placement (top right corner). I know there are some rare cases when you need to place an object in the slot of the wall, so this filtering should be enabled with option.
Is it hard to do? For now, I don't see much trouble.
That would greatly help with working with huge (close to the limit) terrains.
Shouldn't be hard, just time-consuming to ensure the filtering resets when necessary and that it doesn't have other side effects elsewhere.
I updated the code base to match recent OXCE to do some testing for Meridian, so if you want to compile a new version with recent OXCE changes, source is here: https://github.com/ohartenstein23/OpenXcom/tree/battlescape-editor
I'll provide compiled binaries if and when I get around to new features.
-
Thank you so much!
I'm using your map editor extensive, may I provide some more feedback?
Route editor shows the number of the node as one of three numbers on it. But the number itself is really pointless info to me. Instead, I would like to see patrol priority right on the node, not in its property only. Sometimes on making ufo-like map I miss route node with patrol priority 0, and when alien hit it, it runs away from ufo; this is unwanted behavior.
I'm really looking for new features - saving and file browsing looks promising (found it in test build), playtesting the map would be super useful. Also, I looked at your globe editor - it would be a mind blower once done.
And again, I love your tool, using it a lot.
-
D you have a stable source code version? I'm facing multiple errors trying to compile it by my own using VS 2019 :'(
-
Shouldn't be hard, just time-consuming to ensure the filtering resets when necessary and that it doesn't have other side effects elsewhere.
I updated the code base to match recent OXCE to do some testing for Meridian, so if you want to compile a new version with recent OXCE changes, source is here: https://github.com/ohartenstein23/OpenXcom/tree/battlescape-editor
I'll provide compiled binaries if and when I get around to new features.
Hello,
I just wanted to let you know that i forked your -fantastic- editor to add some features I'm working on. Specifically I wanted to add support for map files which use tile's IDs > 255 (so you can include A LOT of tiles for terrain designing)
I've forked your project here: https://github.com/FlaubertNHR/OpenXcomPruebas/tree/battlescape-editor_MAP-MAP2
I have made sure to make clear your original authorship of the project. Thanks for your work!!
-
Thank you so much!
I'm using your map editor extensive, may I provide some more feedback?
Route editor shows the number of the node as one of three numbers on it. But the number itself is really pointless info to me. Instead, I would like to see patrol priority right on the node, not in its property only. Sometimes on making ufo-like map I miss route node with patrol priority 0, and when alien hit it, it runs away from ufo; this is unwanted behavior.
I'm really looking for new features - saving and file browsing looks promising (found it in test build), playtesting the map would be super useful. Also, I looked at your globe editor - it would be a mind blower once done.
And again, I love your tool, using it a lot.
I'll look into making which numbers are shown on the nodes a user option; I think my original decision was to match the information shown in the MapView program.
The globe editor was mostly just a proof-of-concept/academic exercise, don't know if I'll actually pick it up again.
D you have a stable source code version? I'm facing multiple errors trying to compile it by my own using VS 2019 :'(
You'd have to go back a commit or two. I'm working on finishing up the loading by file browser and will push that once it's complete.
Hello,
I just wanted to let you know that i forked your -fantastic- editor to add some features I'm working on. Specifically I wanted to add support for map files which use tile's IDs > 255 (so you can include A LOT of tiles for terrain designing)
I've forked your project here: https://github.com/FlaubertNHR/OpenXcomPruebas/tree/battlescape-editor_MAP-MAP2
I have made sure to make clear your original authorship of the project. Thanks for your work!!
Good to hear that you find the editor worth forking! I will warn you that anything in it is subject to change; I consider it maybe an alpha version at best right now.
Are you aware of the verticalLevels feature? https://openxcom.org/forum/index.php?topic=5316.0 (https://openxcom.org/forum/index.php?topic=5316.0)
I designed it in part to help circumvent the 255 MCD limit by layering maps on top of each other.
-
Good to hear that you find the editor worth forking! I will warn you that anything in it is subject to change; I consider it maybe an alpha version at best right now.
Are you aware of the verticalLevels feature? https://openxcom.org/forum/index.php?topic=5316.0 (https://openxcom.org/forum/index.php?topic=5316.0)
I designed it in part to help circumvent the 255 MCD limit by layering maps on top of each other.
No, I didn' notice that feature. It's very interesting. A was thinking a way to add several crafts to base defense and I see you have implemented it already!!!
Thanks again for your work
-
I'll look into making which numbers are shown on the nodes a user option; I think my original decision was to match the information shown in the MapView program.
This would be the best solution. Can you also unhardcode ranks? In `alienRace` ruleset I can define as many ranks as I want, but I can't define placing for extra ranks. Probably, a yaml setting file with map of number to name values to define this dropdown with custom ranks could be done?
The globe editor was mostly just a proof-of-concept/academic exercise, don't know if I'll actually pick it up again.
This is very sad to hear. I played a bit with it and I can say there is no better way to define globe setting that with in-game globe. What about making some MVP?