SC4D Homepage
BSC File Exchange
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length


Author Topic: How to move a map over, just a little bit.  (Read 3603 times)

0 Members and 1 Guest are viewing this topic.

Offline Teddy

How to move a map over, just a little bit.
« on: April 23, 2016, 07:27:24 AM »
So, I've been thinking about changing the region I'm using for my little MD into something smaller and more manageable. One problem I have is that things don't quite line up the way I want.

Take this map, for example

http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2877

In particular, this little bit right here:


It'd be great if I could just shuffle the entire map over by about half a small city tile, so that this bit does not poke into the next tile...

...but how on earth would I do that?

Also on the list of possibilities is this map file:
http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2828
The Capital of Malta is on that bit on the big island that sort of sticks in and out; looks like a bay that someone put a peninsula in. The problem here is it's on an angle, and SC4 does not like diagonals very much. As such, I could simply use this map, but rotate it so that this area is "straight" and not diagonal...

...but how on earth would I do that?


If both were greyscale, I could kludge something together using an image editor. They are, after all, both islands, and I could just add some black pixels on the border and do whatever I need to

However like most of the best maps, these are not greyscale maps, and instead, are made using the mapping program. Even with greyscale maps, I likely could improvise something, but would be right back here 5 mins later because something didn't work, or I broke this or that.


So, how exactly can I do these things, if I can do these things at all?


Sim City 4 Devotion Forums

How to move a map over, just a little bit.
« on: April 23, 2016, 07:27:24 AM »

Re: How to move a map over, just a little bit.

Offline vortext

Re: How to move a map over, just a little bit.
« Reply #1 on: April 23, 2016, 07:38:47 AM »
Changing the alignment of a region to better suit the layout is best done via the greyscale image indeed. To get the greyscale, open the region in the Terraformer were you'll find an export button in the global tools menu. It's set to export SC4M file by default but can be changed to greyscale png in the dropdown menu. Once you've lined things up to your liking, use the Terraformer once more to import said greyscale and render the region.


time flies like a bird
fruit flies like a banana

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #1 on: April 23, 2016, 07:38:47 AM »

Re: How to move a map over, just a little bit.

Offline Teddy

Re: How to move a map over, just a little bit.
« Reply #2 on: April 23, 2016, 07:43:52 AM »
humm. I've not been able to get terraformer to work on my computer just yet, but I'll keep trying. I'm also wondering about editing the greyscale itself, is there any proper way to do this, a program, or a guide to use; or do you just grab a random editing program and go to town?

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #2 on: April 23, 2016, 07:43:52 AM »

Re: How to move a map over, just a little bit.

Offline vortext

Re: How to move a map over, just a little bit.
« Reply #3 on: April 23, 2016, 07:56:59 AM »
Right, Terraformer requires some DLLs, in addition to the SC4PIM python bug fix. Alternatively you could probably export the greyscale by using SC4Mapper2013 as well, though strangely I never got that to work on my pc.

As for editing the greyscale, any software will do though some things to keep in mind. First the greyscale is very dark so I usually drop an adjustment layer on top to increase the brightness to see what I'm actually doing. Just don't forget to remove it afterwards or you'll end up with an insanely high terrain (which can be an interesting result on its own :D).

Also, the greyscale needs to have specific dimensions to match the config bmp. iirc it's 256x256 pixels for a large city tile, 128x128 for medium and 64x64 for small, and then add 1 pixel to the overall dimensions for the border. Then again it's been a while since I messed with greyscales so I could be wrong here, and the terraformer does actually prompt to resize the greyscale if it's the wrong dimensions.
« Last Edit: April 23, 2016, 07:58:35 AM by vortext »

time flies like a bird
fruit flies like a banana

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #3 on: April 23, 2016, 07:56:59 AM »

Re: How to move a map over, just a little bit.

Offline cogeo

Re: How to move a map over, just a little bit.
« Reply #4 on: April 23, 2016, 08:11:26 AM »
I had proposed this feature to wouanagaine, for exactly this raeson - same goes for rivers, mountains etc. The proposal even included selecting a small(er) area of a larger map (many maps posted on the LEX/STEX are very good, but at the same time so large that they are unplayable). IIRC, he said he would do it. So maybe check the features of the latest SC4M version a little more in-depth, it's probably implemented already.

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #4 on: April 23, 2016, 08:11:26 AM »

Re: How to move a map over, just a little bit.

Offline Teddy

Re: How to move a map over, just a little bit.
« Reply #5 on: April 23, 2016, 11:22:49 AM »
I had proposed this feature to wouanagaine, for exactly this raeson - same goes for rivers, mountains etc. The proposal even included selecting a small(er) area of a larger map (many maps posted on the LEX/STEX are very good, but at the same time so large that they are unplayable). IIRC, he said he would do it. So maybe check the features of the latest SC4M version a little more in-depth, it's probably implemented already.
AFAIK I have the most recent version of SC4M. It is extremely limited. I only see buttons like "load region" "create region" and so forth. I do not really see any "features" beyond, I suppose, "edit config.bmp"


EDITED TO ADD
Okay. Apparently "export region" also just saves images. I tried using a PNG but that did not work for me, however, an RGB did. Unfortunately, the original region had gaps or holes in it, but, I was able to modify things



I added 32 pixels around the entire image using MS paint and flipping the image before adding the pixels on the proper sides.

Next I will try rotating a picture and seeing how badly that screws everything up.
« Last Edit: April 23, 2016, 11:37:58 AM by Teddy »

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #5 on: April 23, 2016, 11:22:49 AM »

Re: How to move a map over, just a little bit.

Offline Teddy

Re: How to move a map over, just a little bit.
« Reply #6 on: April 23, 2016, 11:51:30 AM »
Sorry to double post, but I do have the answer to my question, and wanted to be clear on that. Not only can you move maps over, as detailed above, you can rotate them as well



The trick(s):

Take your desired map. Save as an RGB image. Open in MSPaint. Select a background colour, ideally something on or near the edges of your image. This works great with water for islands. Otherwise you'll need to take away land. Check your properties, and add 32 pixels to the height and width, or, if using a land region, take away 32 pixels of height and width.

Next, flip the image. First vertically and then horizontally. Or do it horizontally and then vertically if you wish, so long as you use both once.

Then add (or take away) another 32 pixels for both height and width.

Lastly, flip everything back.


You can do any sort of adjustment you want, so long as the total number of pixels you are adding (or taking away) on each, the width and the height, equals 64. Hence you can do 12 and 52, 1 and 63, 23 and 41, etc.



For rotation, simply open the file in any image editor that can rotate photos (I just grabbed a random free one I found by googling) and rotate the desired angle. Next, open that image and ensure the background (your image will be surrounded by triangles, all pointing outward) matches your "background colour" that you desire. Note: this can be VERY hard to do with land tiles. After that you simply want to open the file in MSPaint, move it about so it's near the upper-left corner, and chop off all the extra space you have. In order to make sure everything works, ensure your final width and final height equal something divisible by 64, plus 1. A calculator should tell you it is XX.015625. For example, 1857/64=29.015625
If you don't have this .015625 you need to add or take away pixels until you do.


As such, this is how you "move a map over, just a little bit"

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #6 on: April 23, 2016, 11:51:30 AM »

Re: How to move a map over, just a little bit.

Offline cogeo

Re: How to move a map over, just a little bit.
« Reply #7 on: April 23, 2016, 01:06:12 PM »
Ummm, does this really work? Maybe, but still, you export the region as BMP, and this alone is problematic, because you convert it to a 8-bit image (unless you export it as a 16-bit one, and use an image-processing application capable of editing 16-bit images - MS Paint is NOT). You know, the ability to store the map data in 16-bit format was one of the main reasons for making SC4M/TF. Using 8-bit grayscale images (the format SC4 can render by pressing Ctrl+Alt+Shift+R) has serious shortcomings. The image can only represent 256 discrete height values - with about a 1/8th the range being below water - and therefore you get height limitations and an ugly "steps" effect in your rendered region. You can use a "Height Mod" to overcome the height limitation, but this exacerbates the steps effect.

Anyways, found the discussion thread. Take a look here. It's under the SC4Mapper Board, and pinned!

Sim City 4 Devotion Forums

Re: How to move a map over, just a little bit.
« Reply #7 on: April 23, 2016, 01:06:12 PM »

 


If you experience visual glitches in our site, we strongly suggest you to use Firefox to browse the forums. Also a 1024*768 or higher resolution is highly recommended to view this site

SMF 2.0.13 | SMF © 2016, Simple Machines
TinyPortal © 2005-2011
SMFAds for Free Forums

Page created in 0.357 seconds with 68 queries.