Jump to content
wouanagaine

SC4Terraformer, a tool for regional handterraforming

983 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Oh! One other change to 'file writing'. I'm using CVS in such a way that I have to 'reserve' the right to edit a file. It doesn't *have* to work this way, and normally CVS does not. But in this specific instance, I don't want changes my wife makes to accidently overwrite a city that I have recently done work on. When you use CVS in 'editors' mode, you have to 'reserve' a file for permission to edit, and so CVS toggles the 'readonly' flag on a file. When SC4TF attempts to write to a file set readonly, Bad Things Happen. Actually, SC4TF simply locks up and any changes I have made to a specific city are lost since I have to kill SC4TF.

If possible, please add exception handling on city writes so if a file is set 'readonly', SC4TF will complain, "-city name- is set readonly, do I skip, retry or cancel the save?" Or something you feel is better in its place. This gives me a chance to tell CVS what city I forgot to reserve edit permission and then allow me to 'retry' writing to that specific city so I don't have to kill the SC4TF process and redo in SC4TF what was lost.

Thank you!

Addendum: I was just thinking, concerning the small cities. Could SC4 ship with the cities set 1/1/2000 with the clock off by default? Perhaps this could be thrown as a quick poll by anyone reading the thread, but I suspect that people would want the clock *off* by default as a typical starting point.

Oh! And concerning the 'above sea level water' issue... There is a 'road dot' thing, I can't remember what it's called but it is a road piece that fills exactly one tile. I've seen it in the Sunken Highway tutorial. If we could figure out the identity of that object, perhaps a 'paint with' tool could be created that uses those things. Then one could 'paint' rivers using SC4TF, go into SC4, remove 'road dots' and replace them with whatever it is the person wants. But you would have a means to know how it all fits from an SC4TF view.

Gotta go. Cheers!

Share this post


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

Downloaded it, but easy to recognize that I'm too old and slow for this obvious great tool. I'm dizzy just reading the thread. I definitely belong to the "Plug and Play" group. 

I don't want to make maps I just want to be able to render them into the game. I really do admire the abilities of you all.

Share this post


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

Originally posted by: wouanagaine 

SC4boy

This can be done by you 4.gif

quote>

 

Great, I'll give it a try!! Thx

Will this reset a city that has already been done? Say by exporting and then importing via .SC4M? How about on a current city? Can you reset a current city in any way?

Originally posted by: Romaq  Could SC4 ship with the cities set 1/1/2000 with the clock off by default? Perhaps this could be thrown as a quick poll by anyone reading the thread, quote>
 

wrt this issue, I'm against it.. it will completely screw up your game stats.. SC4 only understands 00 as the start year.

Share this post


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

On setting the clock 1/1/2000 clock-off, I wasn't thinking of resetting cities, as much as thinking of their start-off points. I suspect (though I wouldn't know for sure) that you would have to start a blank region which loads in the three template cities as mentioned, then import the SC4M file, then AND ONLY then you would get the starting point with all cities set 1/1/2000 with the clock off.

And because of the way I *think* the template cities work, it wouldn't foul up anything that already exists simply for the fact the templates only apply (I think) when you start with flat terrain *THEN* import or modify and save. Any cities already in existance will have whatever the clock was set to since it was last saved.

Share this post


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

    Setting the clock from the template is easy, as I said before you just have to replace the template from your own system. if you copy a template with already built city, it will create the same city all over. If you want to start at year 100 then just run your game up to 100 year then save and copy the save game as the template.

    The template is copied when a city savegame does not yet exist, or when you want to revert to "god mode" when asking in SC4TF

    Romaq, I will add file exception, the easiest way for now is that I add a column in the 'City lock' dialog that show you if the city is read only or not and that you can check/uncheck to remove/add the readonly attribute

    Development will certainly start late this week or next week. Feel free to add more suggestions

    Take care

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Hey, Im trying to use the terrorformer to recreate a city.

    I found a map of the city I want but im unsure of the scaling I should be using.

    Current map is 1cm = 1km so that is 100000:1 correct?

    So I zoom down on part of the map at 195%. Then I take a section of 1000x1000 and then enlarge that by 1.281 to increase to 250% zoom or 40000:1

    Now what dimensions do I place in terraformer to make it as accurate as possible on simcity. eg. each sqare is as close to 16m or whatever it is in real life.

    Cheers

    Share this post


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

    Muntted

    1000x1000 will not be a correct size for SC4 or SC4TF, you will need a image of size :

    (Number of small city in width * 64 )+1 by (Number of small city in height * 64 )+1

    the other factor you will have to deal with is the elevation one.

    I think that there is some pinned thread about accurate map recreation in the map forum. It shows you how to get a proper jpeg file from various sources.

    Hope it helps

    Share this post


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

    The problem with the map you are using comes in with 'How many Dots Per Inch (DPI) or Dots Per Centimeter (DPC) are you using?' I'm having this trouble with DEM maps too. 1:24000 or 1:100000 doesn't really 'mean' anything until you can say '1:100000 scanned at 300 DPI'. From THAT point, you can start doing math. I won't cover the math here, unless asked. But a 1:100000 map scanned at 300 DPI resolution needs to be reduced 54.237288135593220338983050847458% to have each pixel equal 15.625 meters per pixel. Proof: 118 pixels on the map = 1 'real life' km. 118 * .54237288135593220338983050847458 = 64, and 64 tiles make up one small city which is one km each side. 1 km / 64 tiles = 0.015625, or 15.625 meters per tile, which is where I come up with precisely 15.625 meters per pixel.

    Anyway, I hope this helps. At some point, I'm going to have to break down and figure out what the resolution is on the free DEMs I get from http://data.geocomm.com/catalog/US/61046/28/group4-3.html and sort out how to extract 16 bpc images out of 'em. At some point we can come up with a tutorial for 'pick any point in the world and render an accurate 128 km x 128 km region out of it'. It will still need to be edited for terrain below sea level, and have above sea level water tiles placed on it, but we are getting there.

    EDIT: Yeah, what Wouanagaine said is correct. The image size MUST be in the form of (X  km * 64) + 1 by (Y km * 64) + 1.

    Cheers!

    Share this post


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

    Curious... Is there any way to change the city lot sizes in the program?

    Share this post


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

    Romaq thx for explaining further and doing math for us 2.gif

    Lattala, what do you mean ? changing the layout of the cities ? this can be done in any image editor, just edit the associated config.bmp

    You will find usefull information about how to do it in the mapping forum

    Take care

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Sorry, but how do you change the size of the cities? I've tried making my own bitmaps but it only says that the region had an invalid bitmap. Im stuck with regions with all small cities.

    Share this post


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

    This is in the mapping forums and is controlled by the config.bmp .. do a search for it

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Ah I've found the section, apparently it elluded my eyes between the modding sections. Excuse me, and try to be more polite next time, you are responding to an actual person you know.

    Share this post


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

    GrayWolf115: Yeah, I got *THWACKED* for asking a question already in the README.HTML, and properly so. I think the topic of 'How do I reconfig config.bmp with SC4TF' should be an explicit tutorial, with the hopeful expectation that one may say 'Please go to this link (insert link here) as that is a frequently asked question, and you may Read The Fine Manual we have on precisely how to do that... WITH PHOTOS!'. That's something I believe I could write up rather well, actually. The problem with Simtropolis is that it is hard to make meaningful one could remember. I don't know if it would *help*, but I could 'loan' a section of mik-maq.com for SC4TF tutorials and links references. The downside is that mik-maq.com isn't Simtropolis.com, and this place really is the best place to store such info.

    Hrm... Ok, I've set up http://www.mik-maq.com/sc4tf as a Wiki. One need only join mik-maq.com AND said person needs to inform me they are interested in contributing to the SC4TF Wiki, and I'll grant them edit permission. For the moment, however, I need to edit the thing as I did a 'cut and paste' of things from another section to get it up.

    Anyways, if it isn't useful, my SC4TF wiki will die from lack of interest, and properly so. If, however, it is found to be of use then it will stay up until such a time as it is proper to 'move' it to a Wiki (or other such area) on Simtropolis.

    Cheers!

    Share this post


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

    Thank you Romaq.

    That site will be a good place in my opinion for tutorials, for the time being.

    Here is the SC4TF way of changing config.bmps:

    Unfortunately there is no easy way to do this.

    Step 1 - With an already saved map,  open it in SC4TF.  (for me I try only change the config.bmp after my entire region is created)

    Step 2 - Create a .SC4M file with the Export button from Global tool.

    Step 3 - Create a new region folder on your My Documents/Sim City 4/Regions folder and copy a config.bmp from an older region folder.

    Step 4 - Edit your config.bmp with any image editor like MS Paint.

    Step 5 - Open the new region foler with your editted config.bmp in SC4TF

    Step 6 - Using the Import button from Global tools import the .SC4M and then click file save.

    You have now changed the config.bmp and may delete your old region's folder.

    JPlumbley

    Share this post


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

    Done. I have to go over my 'WorldMachine' tutorial and bring that into there as well. Contributions and suggestions are quite welcome. SC4TF has been a godsend to me.

    Share this post


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

    Don't forget, a Wiki really comes alive when more than one person is contributing directly to the wiki site. My idea of 'realistic fantasy terrain' very much involves WorldMachine, and that's the tutorial I'll be posting next on the wiki. But anyone who wishes may contribute to the http://www.mik-maq.com/sc4tf wiki. The very best person to post those tutorials and guides would be the person who initially wrote them. That also helps ensure credit goes where credit is due. And since there's more of everyone else than there is of me, that'll also get much, much more useful stuff into the wiki than I can with cut & paste from random spots in the threads.

    Share this post


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

    hi everyone

    here is a patch for v09c that will add the folling features :

    - sliders of min/max height have been inverted

    - readonly files are successfully detected, you will be prompt to retry or skip the saving

    - only save of modified cities

    - terragen file import ( the scale + min heihgt in the import dialog does not need to be filled as they have no sense with terragen file ). The terragen file should match the dimension of the region

    to get thoses changes, download the zip file, unzip it where you have installed SC4TF v.09c ( the one from the modds section ). it should add the following files to your folder :

    SC4TerraformerApp.pyo

    datReader.pyo

    DlgCities.pyo

    to make sure you have the correct updated version, the status bar should display SC4Terraformer v10a

    This is only for very hardcore users, this has not been tested. This is primary intended to Romaq and jplumbley and anyone who wants and knows what 'testing' means.

    Further development will include the SC4M file addons ( include config.bmp + comment from the author ) and windows positionning + correction of the formula when importing 8bit image


    Romaq

    Good idea for the wiki, still I'm wondering if a dedicated thread to SC4TF Tutorials won't suffice ? or in the omnibus ?

    Take care !

    Share this post


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

    Thank you Wouanagaine. I will look into this and test asap.

    EDIT:  Simple testing seems to be working fine.  The save is much faster, this is with only a minimal amount of changes to terrain, when a bigger overhaul is done it still shortens the save time but not nearly as much.  Loading times not affected(shoudnt have been affected anyways).  I didnt test with an already created city in SC4, only with a region being made before contact with SC4.  Results shouldn't differ.  

    Not sure what the read-only save or skip is for... Please explain what I need to do to test this.

    JPlumbley

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Hey I'm having some trouble with this program and I thought I'd show it here. I'm making the region for a cj I'm going to be starting on but for some reason the edges of the cities won't line up correctly when I view and save them in SC4 to see them normally in region view. I've checked the readme and at 25 pages long, I have skimmed the thread although I think I may have missed something if this was covered before.

    KrissyrianMtns-1157417749.jpgKrissyrianMtns-1157417735.jpg

    At first I had trouble importing this region in SC4 which I created in the Terraformer. So I copied a region.ini file from another region, changed the name inside and used that an it worked, except with this problem. Later I deleted the .ini but the region loaded exactly the same.

    Funny thing is that when I ctrl-alt-shift-r'ed I loaded the bitmap but nothing at all would happen after that prompting me to try to do it manually.

    Share this post


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

    Hmm, that is a little odd, but I can assure you that this is a problem that is unique to SC4, and not SC4TF. Are you running at a resolution higher than 1280x960? If so, SC4 has trouble with city thumbnails at such high resolutions, so you may need to lower it before saving.

    Share this post


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

    B]Wouanagaine: Thanks! I'm testing it out now. I have SC4TF in CVS so I can do bad things to SC4TF (including patches) and be able to revert. Also, a dedicated 'SC4TF Tutorials' thread or a spot in the Omnibus would likely do just as well, or perhaps even better as a part of Simtropolis and what Simtropolis has to offer. It is my opinion a Wiki is a better format than a message thread, but having the tutorial/ how-to material in a venue you support is more important than the format. I simply put the Wiki up to get things going. And of course, from my perspective if it is not on my website I don't have to deal with any issues or conflicts that come up. I like having issues and conflicts be someone else's problem. >4.gif

    JPlumbley: The 'readonly skip/ retry' issue came up with CVS set in 'watch' mode. The purpose of 'watch' mode is to forbid changes to files stored in CVS from being made by more than one developer at a time, which is critical when you have more than one person working on an SC4 region. To 'help' the developer remember to request 'edit' permission on a file, CVS sets a file 'readonly'. The developer can still toggle the readonly flag and make changes anyway, but CVS deals with the issue at a later stage.

    The point is, some cities in my region are set readonly because I *want* to forbid changes to them except as part of a process. To test, simply pick a city in your region out as one you want to freeze in the file manager (explorer). Right-click on the city, select 'properties' and click 'Read-only' in the attributes box. Then attempt to make changes to that city using SC4TF, and it should come up with the response. The goal from my point of view is to have a means to recover in SC4TF if something is set readonly, and I forgot to ask edit permission before I did my editing. Before this change, SC4TF would hang and the only option I had, mistake or not, was to kill SC4TF and loose any changes regardless of what has or hasn't been saved yet.

    Anyway, I'll be busy tryinging out the patch. Cheers!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    hmm, haha ok I think I know what the culprit is. See I've always run SC4 at lowest settings with horrible lag, and just recently built a new computer. Now I play at max settings at 1600x1200 just b/c I can lol. I think I'll turn it down a bit and see what happens.

    Share this post


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

    Hi GrayWolf115,

    If changing your settings doesnt work, I have a small theory.

    Did you overwrite an already created region with the city tiles saved? This normally would have no effect on your new region but maybe you have a freak accident and it created two of some of your city tiles and stacked them. I have seen this before when installing a CTRL+ALT+SHFT+R region over another one. One idea I have for you is create a completely new region folder, and copy only the config.bmp into it, then use File-Save in SC4TF. This should make it work fine. If not Im out of ideas 3.gif

    Good luck.

    JPlumbley

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Thanks for the advice, but I changed my res to a more reasonable setting and its all fine now 4.gif

    Thank you for the advice.

    Share this post


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

    ok, good to see it works now for you GrayWolf115

    Big bug ( not a bug but a stupid interpretation of examplar from my side )

    When importing an 8-bit grey scale image you should always set the Min Height to 0

    When importing an 8-bit grey scale image that does not require any import plugin, the scale factor should be set to 3

    I really do not remember from where I take the 2.4 value

    The min height ( 20m by default in the terran examplar ) seems to be used by SC4 when you're doing terrraforming in SC4

    Take care

    v1.0b should be ready for testing tomorrow

    Share this post


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

    Please check the 'size' exception handling on the *.TER import. I attempted to import an 8193 x 8193 size *.ter, and it appeared as if the import file was simply being ignored. I converted the *.TER to *.PNG and was warned that the 8193^2 file does not fit the 4097^2 region, and if it should be scaled.

    I'm documenting the work because of an email wanting to know 'how big does SC4TF handle'. Well, if SC4TF handles larger than 128^2 Sq. km. regions, I'm not sure such a large region is actually *playable*. But I'll post a link to my results likely tomorrow morning when I can finish the thing.

    Cheers!

    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


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    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