[TOOL] RimEdit (v.2.1)

Started by Darker, January 05, 2014, 06:48:42 PM

Previous topic - Next topic

Darker


The RimEdit
Warning:


  • Due to a bug in google chrome, you might not be able to save games. In some maps, Google chrome tab CRASHES! (and displays an error). Please try Mozilla Firefox, it's a good browser.
  • Please press CTRL+F5 when you have problems with editor and try again. Sometimes, even if I update the scripts, the wrong ones are cached in your browser.
  • If a map does not work, pack ut using 7zip and upload it here!

Introduction
I'd like to present you an independent, JavaScript based web editor for RimWorld maps. This editor focuses on terrain editing - edit fog of war, roofs, tiles and rock. The fact that is Javascript based means, that it runs in web browsers - no installing needed, no executables in your PC.

This is a new version of the preview, since the original one was destoyed by one of the forum moderators. Since now, I'm making backups of every modifications.

Try it now in your browser! or Edit it on github!


Features:
Overview:
The most important feature that the editor provides, and the feature I'm focusing on is the ability to edit the terrain, roofs, rock and the fog of war. I'm using plain colours to render the terrain:

Using the Visibility tool, various layers can be displayed (click links to view screenshots):
Roofs - Rock


Saving:

When you're done editing, you can save the map by pressing S. The dialog will appear after a while (the browser may needs a few moments to get the virtual download ready):


Don't worry about the strange code in the file name - this happens because it's a virtual file. It's not being downloaded in fact and everything happens in your PC. This also means you can download the editor using Ctrl+S in your browser and run it offline. As well, you can edit it if you want.

The command line:
With the recent version 2.1 (not that the number meant anything) I've introduced command line. The command line allows you to do quick changes in the map - so far it's mostly useful for removing things in areas or whole map. The console can be controlled just like any other console. 
Be sure to read help and help-syntax.

The Pawn editor:
Though this is not my primary goal, my editor also provides basic means of pawn editing. For this purpose, I made a pawn editor:

You can edit only the very basics of the pawns, however you can clone them. The reason for this feature being so poorly developed is the inconsistency of Rim map format regarding pawns. I'll focus on this more when the things will stop changing so fast.

Change log:
Here's the full changelog. It used to be more well-arranged before AcDie interfered with this post.

version 2.1.1 - Fixing bugs that mysteriously appeared in the code.
  • Fixed bug where pressing s in the console would initiate saving

version 2.1 - In this update, new feature was added - the editor command line. The command line allwos you to do quick changes in the map - so far it's mostly useful for removing things in areas or whole map. The console can be controlled just like any other console. Only there's a difference that if you press tab, the auto-completed command will require you to press -> to confirm. Otherwise it dissapears.
Be sure to read help and help-syntax.
  • Added cls command to the command line
  • Fixed the random rule-lines appearing in editor upon zooming
  • Fixed the problem with invisible tiles at the corner of the screen (rounding issue)
  • Added some of the 363 tiles to the editor
  • Changed tools so that parent toolbuttons can be selected, when they are, their child is selected. Quicker tool switching.

version 2.0 - This new update does not implement any new features. Instead, I made whole application way faster. Lot's of lag was removed by using <canvas> to render the map. I can't test the editor however, so I released a public beta version to see whether it works or not

version 1.5 - So a new feature was added to the editor: pawn editor. It's still unfinished, but allows you to do the following:
  • Turn any pawn (human or animal) incapacited.
  • Remove any pawn from the game permanently
  • Edit skill levels for humans (both colonists and raiders)
  • Turn animals mad
  • Change team of any pawn (turn raiders to colonists)

version 1.0 - I have played around a lot, so now the editor supports following stuff:
  • Edit all tiles
  • Remove or change roofs
  • Add debris and rock, including minerals
  • Change fog of war (VERY usefull for making custom scenarios)
  • Hide or show separate layers of scenery
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

pbgben

Sounds good, Ill take a look and perhaps we could work together to produce a good tool. I'm currently working on a tool to edit the save file.

Darker

I'm now implementing some basic gamesave editing. I'm doing my best to keep my scripts highly commented and I'm also keeping rendering and logic apart, when it's possible. So I will be glad to share the job with anyone.

Also, if you have an idea how to render map and UI in C++, I can handle all the parsing.
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Darker

#3
Manually changed roofs:

Many tiles replaced:


[attachment deleted by admin: too old]
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Darker

A simple pawn editor has been added.

[attachment deleted by admin: too old]
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Ender

you've quite the burgeoning save file editor there, pretty well made for being rough design, i'm excited to see what this finishes into!
The voices in my head tell me to burn colonists....

ItchyFlea

#6
Bugs/Issues/Comments: (No particular order)
• What you've got listed as tile 31 crashes the game upon load, even if only 1 tile of it is placed.
• The pawn editor, when a pawn is changed to be psychotic, the team setting should also be changed to psychotic.
• Also in the pawn editor, it allows the entry of skill levels higher than 20. This makes the game behave strangely, resulting in the game becoming unresponsive in less than 30 seconds.
• Rock/Slag debris do not show in the editor

I do like the Fog of War editor. I've already got an idea that will make heavy use of it.  :)
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Darker

Tile 31 was actually just a test button - i was trying what happens when I place nonexistent tile (or triing whether there are hidden tiles).
I'll remove it, it's useless and confusing.

The possibility of only changing psychotic team or behavior was intentional. If you have normal animal in psychotic team, it will randomly attack others but won't engage colonists base. That can be usefull, so I've not placed restriction here.

I'll find out how to only allow numbers 1-20 in the level.

Oh damn... I have forgotten to upload new rock/debris definitions. I have changed the system slightly, because rock/debris ID's will probably change very often.
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Plasmatic

Would it be possible to add/remove geysers with your editor?, that would be awesome :)

Coenmcj

#9
I Decided to have mess around with this but when I clicked save it made a file called "Download" which is barely 58 B, instead of the 5,934 KB it started out as.

EDIT: When opened the only line of code in there is

<?xml version="1.0" encoding="utf-8"?><Map>undefined</Map>
Moderator on discord.gg/rimworld come join us! We don't bite

Darker

#10
Coenmcj:
Damn, yes, sometimes this happens in google chrome. But so far, I haven't figured why it happens :( I'm really sory about that.

I actually thought it was fixed, but it isn't obviously.

Plasmatic:
There is still lot of work to do to render thing map properly. I need to figure out how to position them at right places.
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Coenmcj

#11
It's no problem, I'll just hop on over to IE Firefox for a while

Any vague ideas why chrome is doing that though?

Edit 2: It may seem that switching the raiders straight to colonists while they're in the middle of a staging period was a bad idea. they seem to be mildly insane, taking potshots at each other, yet still controllable. but they can't open or use any doors or buildings. but arresting them seems to of done the job.
Moderator on discord.gg/rimworld come join us! We don't bite

Ender

Quote from: Coenmcj on January 11, 2014, 08:43:04 PM
It's no problem, I'll just hop on over to IE Firefox for a while

Any vague ideas why chrome is doing that though?

I use chrome and it didn't do it to me at all, if that is useful at all.
The voices in my head tell me to burn colonists....

Darker

That's the BAD thing about it - sometimes it happens, sometimes not. Finding such errors is very hard thing, and usually matter of some luck too.

QuoteBut they can't open or use any doors or buildings.
This is because they need "Door key" item. You can't see this item in the game, yet ever colonist has it. And also, if you turn colonist to raider, he'll have no problem opening doors in your base. Inventory is still changing, so I won't implement any tool for this until Tynan has it stable.
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

roonerspism

#14
oddly your mineral stone becomes nutrient paste after the game starts up.
edit: by the way I was on Firefox if it makes a difference.