Jump to content
MacBex

Can you still import greyscale regions?

10 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hello,

I have been trying to import a greyscale region terrain on the current Mac App Store version of SC4 without any success.  Is there a specific way to do this or is it no longer possible?

As a test (I do not want to play this region but create my own), I downloaded the following region as it is a greyscale image rather than an SC4M file:

Next I created a dummy region, replace the config.bmp file with one 62 x 30 (as the greyscale image is 3,969 x 1,921) and switched to it.  That loaded correcytly, so I then pressed Ctrl + Opt + Shift R to bring up the file selector for the JPG file.

I guess because of permission reasons, I was unable to see anything in the Users folder.  So I moved the Shikuka-cho.jpg file I downloaded into the Macintosh HD root.  I was able to select it, but after clicking okay (or double clicking) nothing happened other than the file selector disappearing.

 I am not sue what should happen, whether it displays as message or just locks up whilst it calculates the new map, but it was as though I had not done anything at all.

Then I wondered if maybe it is a sandboxed permissions issue.  So I moved the Shikuka-cho.jpg file into the region's folder, and made a shortcut in the Macintosh HD root to the Regions folder at ~/Library/Containers/com.aspyr.simcity4.appstore/Data/Documents/SimCity 4/Regions

But selecting the file in this location still has the same lack of effect.

Finally as a test I replaced the config.bmp file with one of a smaller size (48 x 20), to see if it would show an error because of the resolution being incompatible.  It did not, still nothing.

Am I doing something wrong?

I am running version 1.2.1 of SimCity™4 Deluxe Edition.app from the Mac App Store on a 2018 MacBook Pro running macOS Mojave 10.14.6

Thanks.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 

Disclaimer: I don't use a Mac so I've no first hand experience. *;)

However, I seem to recall a couple of things. The Mac version doesn't like shortcuts with ~ in them and that it needs the whole complete path (including the grayscale image file name) pasted into the file name field box rather than climbing up and down the folders.

I hope that helps.

  • Like 1
  • Thanks 2

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
10 minutes ago, CorinaMarie said:

First the Mac version doesn't like shortcuts with ~ in them and that it needs the whole complete path (including the grayscale image file name) pasted into the file name field box rather than climbing up and down the folders.

In case it additionally helps @MacBex (by the way, welcome to Simtropolis!) and here's a pic to show this...

For example:

Render Grayscale From Path.png

 

I'm also a Windows only user here too, and so it may also need to be forward slashes instead of back slashes with being on a Mac system.

Also there's some additional info in this topic which might be useful:

 

  • Like 1
  • Thanks 2

Quick Links

“SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

Buy me a coffee

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thank you both,

    I posted the path with the ~ so I did not have to post my home folder on the forum, but I created the shortcut as a symlink, so it works at the file system level, which means it got expanded into the full path when created.

    Unfortunately the Mac version does not seem to allow you to copy and paste anywhere the game, nor can you drag and drop text into it.  I think the Mac port is the minimal effort to get the original Windows code to run so it does not hook into the normal parts of the OS like those.

    But I have tried typing out the full long path (including home folder) by hand, but the result is the same as selecting it.  That includes using colons instead of forward slashes, as they were the old pre-OS X way of specifying paths on a Mac.  And trying both methods with and without specifying the drive name first.

    No matter what I have tried nothing happens, and I think I have tried every possible combination.

    It is a shame in that other thread rcc31 never came back to say whether your instructions worked.  As that is what I have tried with no success.

    Incidentally, the New Folder button the file selector does work, so if they have enabled that feature it would seem odd to ignore reading a file.

    • Like 1
    • Thanks 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I constantly create new regions on a Mac. I am not using Mojave but I am using SC4 version 1.2.1. This Simtropolis thread from 2014 helped me figure it out. The path I manually type is in bold

    /users/computer-name/library/containers/com.aspyr.simcity4.appstore/data/documents/SimCity 4/filename.jpg

    note that everything is lowercase. Make sure your image file is in grayscale mode, usually I use photoshop to convert if it is not. Your config file needs to be the same size as your image file, but the game will tell you if the image file and config file don't match, which is nice because then you can go edit the image file to match the dimensions of the config file.

     

    oops one more important thing, the image file needs to be in the main SimCity folder, not in your regions or plugin or a separate folder, just like the directory I typed above notes. It doesn't work for me if it is in the Region folders even if I type that extension into the image loader thing. Sorry, I'm not familiar with some of the technical terms.


      Edited by live_cows  

    wrong extension path initially. Now correct.
    • Thanks 5

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    THANK YOU!  Following your instructions worked and I think I have worked out what is happening now.

    Apple's App Store requires apps be sandboxed for security, that means without specific permission an app can only read files located within its own container.  But because this makes the path to the file so long, if you put it in a sub folder, like Regions, it ends up being longer than the app can cope with.  So putting the file in the main SimCity 4 folder prevents the path being too long.

    Knowing that I have tested that it will work through a symlink in my home folder, and it can now read the file from the Regions folder that way.  More importantly, it means much less typing to import the greyscale file.

    To do that go into Terminal (Applications > Utilities > Terminal) and type the following command:

    ln -s ~/Library/Containers/com.aspyr.simcity4.appstore/Data/Documents/SimCity\ 4 ~/sc4

    This will create a folder called sc4 in your home folder that is actually a link to the one in the sandbox.  Then in the file selector you would only need to type:

    /users/computer-name/sc4/greyscale.jpg

    You can obviously replace the "sc4" with any other name of your choice at the end of the Terminal command.  But you can rename it in Finder at any time too.  And can move it into other folders, just as with any other file.

    Using a capital U for Users also worked in the file selector when I tested this, even though it did not when I used the full path.  Very strange.

     

    A few more advanced notes to add in case they help anyone else:

    Using a regular Alias does not work (Make Alias in Finder's File menu, or by holding Opt + Cmd when dragging).  I expected this as though they both look the same in Finder, with a curved arrow to the bottom left of the icon, they work in very different ways.

    The symlink does not have to be located within your home folder, but the file owner does need to be the same as the one running the app.  This is why it never worked for me when I created it in the root, as I changed the file permissions but not the owner.  But if you just follow the above that will not matter.

    And you might be able to bypass the sandbox and access a file located anywhere by granting the app Full Disk Access:  System Preferences > Security & Privacy > Privacy (tab) > Full Disk Access (left column), authenticate with the padlock icon then click the + icon and select the SimCity 4 app.  But I have not tested this as having a shortcut to the sandboxed folder is useful for quick access to regions and plugins, so it is easy to just keep the greyscale files in there than to change a security setting.

     

    • Like 8

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @MacBex

    Super! Glad you got it working from the useful info @live_cows posted from linking to that older topic.

    It's great there is a solution for Mac users like yourself, and also it's very thoughtful to post the additional details so it can help others in future too. If anyone reports their own map rendering trouble on Mac systems, we'll certainly keep this in mind for directing people to here. *:)

    • Like 1
    • Yes 1

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 9/9/2020 at 11:50 AM, MacBex said:


    It is a shame in that other thread rcc31 never came back to say whether your instructions worked.  As that is what I have tried with no success.

    Sorry I realized I never came back to report on this... I am pretty inconsistent at coming on Simtropolis, I need to get better! I never actually figured it out. The instructions were really clear but for some reason they did not work for me. 

    I just saw that you figured out how to get it to work, I am going to try the method you did and hopefully it works for me too. I have wanted to import grayscale regions for years now but got too frustrated trying to get it to work and I gave up.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Okay I tried this out and it worked for me!!! HUGE thank you to all of you for this helpful information, like I said I have been trying to do this for a few years now on and off with no luck. I am super excited to download and upload regions! @CorinaMarie @Cyclone Boom @MacBex and @live_cows thank you all so much.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @rcc31

    Excellent! *:thumb:

    Glad to hear it worked for you, and have fun with the many multitudes of mapping possibilities.

    • Like 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections