SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => SC4Mapper => Topic started by: Quesh on January 08, 2008, 07:50:47 AM

Title: SC4Mapper : Trouble at launch
Post by: Quesh on January 08, 2008, 07:50:47 AM
First, thanks for all tools wouanagaine they are very good :thumbsup:
But I have never been able to operate SC4Mapper, the problem is the following:

Here is the log that it creates every time :

Traceback (most recent call last):
  File "SC4MapApp.pyo", line 1006, in OnClose
  File "SC4MapApp.pyo", line 1009, in ShowMain
  File "SC4MapApp.pyo", line 278, in __init__
UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 2: \ at end of string



PS: I use the last version of SC4Mapper and I have a PC with Windows XP SP2
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on January 09, 2008, 12:33:28 AM
Can you please :
-give me the full pathname to SC4Mapper from the root of the harddrive
-give me the full pathname to MyDoc\Simcity4 from the root of the harddrive

And make sure you have the latest version, as I suspect I have already fix a bug like this

Take care
Title: Re: SC4Mapper : Trouble at launch
Post by: Quesh on January 09, 2008, 04:32:20 AM
Quote from: wouanagaine on January 09, 2008, 12:33:28 AM
-give me the full pathname to SC4Mapper from the root of the harddrive

D:\SimCity 4\SC4Mapper

Quote from: wouanagaine on January 09, 2008, 12:33:28 AM
-give me the full pathname to MyDoc\Simcity4 from the root of the harddrive

D:\SimCity 4

The folder "My Documents" is on other disk that Windows, ie "D:"  ;)

Quote from: wouanagaine on January 09, 2008, 12:33:28 AM
And make sure you have the latest version, as I suspect I have already fix a bug like this

Yes I'm Absolutely sure  ;)
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on January 09, 2008, 05:48:49 AM
Can you test with SC4Mapper beeing in program files instead of 'My Documents'?
And also did you properly install SC4 or moved/copied files to D:
Title: Re: SC4Mapper : Trouble at launch
Post by: Quesh on January 09, 2008, 07:21:06 AM
Quote from: wouanagaine on January 09, 2008, 05:48:49 AM
Can you test with SC4Mapper beeing in program files instead of 'My Documents'?

I tested by installing the tool in "Program Files", however, there is always the same mistake  &mmm

Quote from: wouanagaine on January 09, 2008, 05:48:49 AMAnd also did you properly install SC4 or moved/copied files to D:

I install properly this tool, no moved or copied  &mmm

You have already encountered this error?
If so, it was because of what?
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on January 12, 2008, 01:22:04 AM
-Je vais chercher des infos dans la base de registre, qui ne sont pas inscrite si tu as copié au lieu d'installer
- Il y a des problemes avec l'unicode/python et le caractere '\'  que j'essaie visiblement en vain de regler.
-Visiblement l'utilisation de Vista augmente ce genre de probleme


-I'm looking for info into registery base, which are not set if you've not installed the game
-There are some bugs with unicode/python and the '\' character, which I'm still trying to figure how to get rid of

Title: Re: SC4Mapper : Trouble at launch enfin ça marche l'interface
Post by: SIM CITY 4 RUSH HOUR on January 12, 2008, 04:51:28 AM
Oui regarder l'image suivante dans ma session nommée SIM CITY 4 sous Windows Vista 32 bits (https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg523.imageshack.us%2Fimg523%2F1003%2Fsc4mappersouswindowsvisfh1.png&hash=c603e12a628a23b865244c10aed6ca61eb1b48dd) et qui comme vous pouvez le voir j'ai déplacer le dossier Documents équivalent de Mes documents, sur un autres dossiers que celui users du ou des compte(s), dossiers des Utilisateurs ici il s'agit du disque dur E:\ dossier E:\SIM CITY 4\Documents mais ça peut être le disque dur C:\ avec un nom de dossier sans caractère spéciaux bien sur si c'est ça qui bloque alors!

Cordialement SIM CITY 4 RUSH HOUR
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on January 12, 2008, 12:32:22 PM
Si tu as deplacé 'Documents' en utilisant 'clic droit sur Documents/propriete/onglet Emplacement' ca devrait etre ok. Dans le cas contraire ca peut expliquer les problemes

Title: Re: SC4Mapper : Trouble at launch
Post by: Quesh on January 14, 2008, 10:39:13 AM
Quote from: wouanagaine on January 12, 2008, 01:22:04 AM
- Je vais chercher des infos dans la base de registre, qui ne sont pas inscrite si tu as copié au lieu d'installer
- Il y a des problemes avec l'unicode/python et le caractere '\'  que j'essaie visiblement en vain de regler.


-I'm looking for info into registery base, which are not set if you've not installed the game
-There are some bugs with unicode/python and the '\' character, which I'm still trying to figure how to get rid of

C'est des problèmes de chemin comme par exemple c:\\ .... ?
Je m'y connais pas beaucoup mais j'ai déjà eu des problèmes semblables avec des listes de lecture et j'ai remplacé le "\" par un "/" et cela à marcher à mon grand étonnement  :o

That way problems such as c:"\"\"Program files"\" .... ?
I will not know a lot, but I had similar problems with reading lists and have replaced the "\" by a "/" and it was good to my amazement: o
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on January 14, 2008, 11:37:18 AM
Yes, internally in the code I'm using '/' instead of the double \\. But it looks like there is a special case somewhere in the code that I've overlook
Title: Re: SC4Mapper : Trouble at launch
Post by: Imhotep on April 01, 2008, 04:35:45 AM
Salut à tous! J'ai exactement le même probleme que Quesh, et j'aimerais savoir si vous l'avez resolu...(et si oui, comment...). Merci

Hi! I have exactly the same bug as Quesh, et and I just want to know if you got the solution... Thanks
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 11, 2008, 03:16:28 AM
I just switched to Vista 32bit and have the same issue.

The splash screen arrives but nothing else but the application process keeps running in task manager

My installation is:
Simcity 4: D:\SimCity 4
SC4Mapper: d:\SimCity 4\3rd Party Programs\SC4Mapper

I just downloaded this version off of the file exchange here on SC4devotion so I assume I have the latest one.

I have also uninstalled it, and reinstalled it to the default directory of C:\Program Files\SC4Mapper
But it produces the same thing.
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 15, 2008, 04:52:50 PM
I'm having the exact same problem citybuilder.

I'm running Windows Vista 32 Bit.

C:/SC4Utilities/SC4Mapper

When I open the application I see the NHP Intro and then it all disappears.  The process is running on my task manager...but I can't use it.  Any suggestions?!
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 15, 2008, 06:06:09 PM
The only suggestion I can make until the author of the program figures out what's going on (if he wants to that is) is to use the sc4terraformer it will open up the sc4map files anyway, but of course doesn't do it as quickly and easily as the SC4Mapper program does.  It's what I've been doing until there is an update in windows or with the program to fix the problem with it.
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on April 15, 2008, 11:39:51 PM
There is almost 0 chance I'll fix it, as my laptop has been stolen with the source code :(

The only fix is that you don't have a starting 'N' or 'U' or 'T' ( case insensitive ) in your windows account, so that your 'My Documents' folder won't contain a \n or \u or \t in the full folder path
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 16, 2008, 06:57:29 AM
Quote from: wouanagaine on April 15, 2008, 11:39:51 PM
There is almost 0 chance I'll fix it, as my laptop has been stolen with the source code :(

The only fix is that you don't have a starting 'N' or 'U' or 'T' ( case insensitive ) in your windows account, so that your 'My Documents' folder won't contain a \n or \u or \t in the full folder path


I apologize for my lack of intelligence on this issue, but I'm not sure what that means. 
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on April 16, 2008, 07:21:33 AM
What is your username on Windows ?
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 16, 2008, 08:40:49 AM
It's just my name..........there are no N's, U's, or T's in my name.
Title: Re: SC4Mapper : Trouble at launch
Post by: ScottFTL on April 16, 2008, 02:06:27 PM
Quote from: wouanagaine on April 15, 2008, 11:39:51 PM
There is almost 0 chance I'll fix it, as my laptop has been stolen with the source code :(

The only fix is that you don't have a starting 'N' or 'U' or 'T' ( case insensitive ) in your windows account, so that your 'My Documents' folder won't contain a \n or \u or \t in the full folder path

So SC4Mapper will not work for anyone running Vista because My Documents has been changed to C:\Users\%USERNAME%\Documents so there is always a \U in the full folder path.

Luckily, SC4Terraformer runs just fine under Vista.
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on April 16, 2008, 02:16:10 PM
SC4Mapper works under Vista, my laptop was under Vista, and SC4Mapper ran fine on it

So it may be just \t or \n , don't remember as I can't read the sources anymore :(
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 16, 2008, 08:03:42 PM
I'm sorry to hear your laptop was stolen I know how that feels, it's like a total invasion of your privacy and your life at least it was for me when mine was stolen now we have some tracker devices put on all our laptops around here so that they can be tracked if they ever connect up to the internet with them.

Anyway, that would be why it doesnt work with vista then since visats my documents are kept in C:\Users\CB\Documents  With the U in it Users unfortunately.

I wonder if there is a trick that can be done to change Users to something else in windows and have it know.  Or better yet just move my documents folder to another place like I use to in windows like move it to my F:\ drive as F:\Docs\My Documents might work, I'll give it a shot and see what happens with that.

Because the path to my documents was C:\Users\CB\Documents under windows vista so the only t and n and u are not in my username but in the path that windows vista uses.  Im moving my documents to my F drive  (specifically F:\Docs\ ) right now with none of those letter in it as far as i can tell so far so we'll see if that helps anything  if not no biggie I usually move my documents off of the C drive for safe keeping in case of a reinstall of the OS anyway.
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 16, 2008, 08:23:05 PM
I'm pleased to report that test was successful.

Moving my documents from vista to another folder that doesn't have the word Users or the other letters in them worked perfectly, my new documents home is F:\Docs and SC4Mapper loads up like it should.

THanks for the bit of wisdom regarding why it doesn't work, as it now works like it shoudl for me again!  WWhooooot! wHOOOOOTT!
  &apls   :thumbsup:    :sunny:

i'M BACk to importing maps since I didn't keep any from my XP install documents folder Im making all new citys in vista on all new maps again and now happily using sc4mapper to import them again.
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on April 17, 2008, 12:15:57 AM
 :thumbsup:
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 17, 2008, 07:10:04 AM
Well crap........on my laptop I apparently only have a C: and D: drive.....no F drive.

I'm still stuck using the same old crappy default regions :(
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 17, 2008, 07:29:56 AM
Quote from: Trackman20 on April 17, 2008, 07:10:04 AM
Well crap........on my laptop I apparently only have a C: and D: drive.....no F drive.

I'm still stuck using the same old crappy default regions :(

No your not.  Just move the my documents folder (Im assuming your running vista) to something like D:\Docs and that's that.  It doesn't have to be the F:\ drive, that's just my middle drive with the most space so I used that one.  Moving the documents folder anywhere even on C should work as long as you don't put any of the letters explained in the earlier post in the names of your folders, so keep it simple and move your my documents to like d:\docs or even just c:\docs and then give it a try.  If it still won't work for you, then just move them back to where they were although it doesn't matter where they are windows knows.
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 17, 2008, 07:40:39 AM
Do I copy "My Documents" or do I cut the folder and place it in my c:/doc folder? 

Sorry again for my ignorance........I just don't want to mess anything up.

Here is where my file is located for SC4Mapper............

"C:\Program Files\SC4Mapper\SC4Mapper.exe"
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 17, 2008, 08:38:22 AM
No, right click on your MY dOCUMENTS folder and choose properties, then in one of the tabs there will be a spot that allows you to move it.  Therewill be a 'location" tab, it's in that tab that you can choose where to move it to.  If you don't do it this way, then no programs would know where to find it.

Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 17, 2008, 08:43:35 AM
IT WORKED!!!!!!!!!!!!!!!!!!1

Amazing
Title: Re: SC4Mapper : Trouble at launch
Post by: City Builder on April 17, 2008, 09:08:09 AM
Quote from: Trackman20 on April 17, 2008, 08:43:35 AM
IT WORKED!!!!!!!!!!!!!!!!!!1

Amazing

Congrats, Im glad it worked out for you too.  Just remember when you're thumbing through your hard drive trying to find your My Documents folder it's where you just put it.  It always takes me a while to remember where I can find it if IM in windows explorer looking for it, although the MY Documents icon if you have one on your desktop will take you directly there, I just don't keep icons on my desktop.

Anyway, congrats, glad this helped more than me.
Title: Re: SC4Mapper : Trouble at launch
Post by: Trackman20 on April 17, 2008, 09:48:20 AM
I'm going to work on my new region right away......this is very exciting haha.
Title: Re: SC4Mapper : Trouble at launch
Post by: spectrumtech on July 21, 2008, 05:29:34 PM
Thanks for the helpful comments Wou and CB. :)
Title: Re: SC4Mapper : Trouble at launch
Post by: Pinoy31 on October 05, 2008, 11:35:37 AM
Hi, I was reading the comments from above and I tried to follow what you said to move the sc4mapper to "d" drive, but for some reason I have Windows Vista, and under my properties to move there is no location tab, so i did is copy the folder and moved it to "d" drive. now its not working when I tried launching it. Did do something wrong?? my SC$mapper still on "C" drive under program files, and then I moved the folder and copied it to "D" drive and placed it under programs. ??? so did i messed up??
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on October 06, 2008, 12:08:33 AM
I think the above comment was referring to move your 'My documents' folder to d:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg407.imageshack.us%2Fimg407%2F5474%2Fscreenshot052hj3.jpg&hash=9d6b88d3176dc7b96a566309f67f3412a706367c)

It will not only help SC4Mapper or anything SC4 related, but it will prevent some nasty things if your c: drive get broken. At least you'll get anything "safe" even if you can't boot windows so you can safely reinstall vista without loosing all your stuff ( adress book, favorites etc for example )



Title: Re: SC4Mapper : Trouble at launch
Post by: sflights on November 09, 2008, 02:28:39 AM
Hmm, each time that I try to change the location of the documents folder to D:/My Documents, I get an access denied on my computer. Is there another way to do this?
Title: Re: SC4Mapper : Trouble at launch
Post by: skoobie on January 05, 2009, 03:51:04 AM
On most computers, the D: drive is the cd/dvd drive. If you know you have more than one hard drive, and one of those hard drives is the D: drive, then you shouldn't have any problems moving the "My Documents" folder. The drive letters used for your hard drives may be different; mine are C: (system), T: (torrents), Z: (backup). If you don't have multiple hard drives, then move the folder to the root of the C: drive (e.g. C:\My Documents). Never move the "My Documents" folder manually (i.e. cut and paste), as this will mess up a lot of things.

Here are the instructions again (CB was the first to post instructions):
Right click on the "My Documents" folder, then goto Properties. In the dialog box that pops up, click on the "Location" (under XP it's "Target") tab. Then, click the "Move..." button, and click yes to move your files. Then, click the "Move..." button, and select the folder that should become the new "My Documents" folder. Finally, click the "Apply" button, and click "Yes" in the message box.

PS: Sorry Wou, I have to say this as a fellow programmer; no user should have to resort to modifying their system, like moving the "My Documents" folder, to get an application to work. For myself and others to have to do this, just degrades the value of the application. With that said, in the future try and avoid such mistakes because you've created some excellent apps and contributed so much to the SC4 community.
Title: Re: SC4Mapper : Trouble at launch
Post by: Nexis4Jersey on January 05, 2009, 06:39:00 AM
i have a problem with SC4 Mapper , on vista it won't launch i follow the steps , and still didn't work >:( :bomb: Can't we just make a new SC4 Mapper version for Vista & Mac?  ()what()
Title: Re: SC4Mapper : Trouble at launch
Post by: anandus on February 16, 2009, 01:39:41 AM
Will it also work if I include the different folder in the Documents library?
Edit:
Including a folder (Like D:\Simcity) in the Documents library does not work, unfortunately :(

(I'm not really happy with moving 'Documents' out of the user folder. It's in the userfolder for a purpose, right? ;) )
Title: Re: SC4Mapper : Trouble at launch
Post by: bigdope404 on March 03, 2009, 07:35:27 PM
Hello

I am having some problems with SC4 Mapper
Every time I load it I can see it running in the process Tab in the Windows Task manager.
However it never ends up loading.

The SC4mapper.exe says this
Traceback (most recent call last):
  File "SC4MapApp.pyo", line 1006, in OnClose
  File "SC4MapApp.pyo", line 1009, in ShowMain
  File "SC4MapApp.pyo", line 278, in __init__
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 25-26: malformed \N character escape
Traceback (most recent call last):
  File "SC4MapApp.pyo", line 1006, in OnClose
  File "SC4MapApp.pyo", line 1009, in ShowMain
  File "SC4MapApp.pyo", line 278, in __init__
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 25-26: malformed \N character escape
Traceback (most recent call last):
  File "SC4MapApp.pyo", line 1006, in OnClose
  File "SC4MapApp.pyo", line 1009, in ShowMain
  File "SC4MapApp.pyo", line 278, in __init__

My computer is a laptop with XP SP3

Any help would be greatly appreciated

Thanks

Nolan
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on March 04, 2009, 12:25:04 AM
Dang, again that bug :(
to bad I can't fix that without the source like I fixed the loading of certain config.bmp files

Well try to move your "My documents" folder elsewhere like in root of the harddrive, it will prevent the problem

Quote from: anandus on February 16, 2009, 01:39:41 AM
(I'm not really happy with moving 'Documents' out of the user folder. It's in the userfolder for a purpose, right? ;) )
Windows will happilly fool you and you will still see it under userfolder in explorer, only if you ask for the real path, you'll see it is elsewhere
It is also a safe measure to move it elsewhere, on another drive, in case you have to reformat your OS drive you won't lost your 'My documents"

Title: Re: SC4Mapper : Trouble at launch
Post by: anandus on March 04, 2009, 01:05:54 AM
Quote from: wouanagaine on March 04, 2009, 12:25:04 AM
Well try to move your "My documents" folder elsewhere like in root of the harddrive, it will prevent the problem
Windows will happilly fool you and you will still see it under userfolder in explorer, only if you ask for the real path, you'll see it is elsewhere
It is also a safe measure to move it elsewhere, on another drive, in case you have to reformat your OS drive you won't lost your 'My documents"
Oh, I know. I just want to preserve my userfiles in my userspace.
It's an old Linux-habit, I guess :)
Title: Re: SC4Mapper : Trouble at launch
Post by: carkid1998 on March 04, 2009, 09:25:52 AM

I can't use I either and I'm desperat to us a map!!!!!! &cry2 :'( :'( ()sad() :(
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on March 04, 2009, 11:51:14 AM
Maybe with a description of the problem or even better with the log file, I can help you. But so far I hardly see how I can
Title: Re: SC4Mapper : Trouble at launch
Post by: carkid1998 on March 05, 2009, 07:50:24 AM

well I see the Nhp productions info then it dissapears however task manager says it is running ()what() ()what()
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on March 05, 2009, 07:57:21 AM
find the sc4mapper.exe.log which should be in sc4mapper folder and copy/paste its content
Title: Re: SC4Mapper : Trouble at launch
Post by: carkid1998 on March 05, 2009, 08:06:39 AM

ok:


k¬†Ic           @   sK  d  k  Z  d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k    Z    d  k
Z
d  k Z d  k Z d  k
Z
d  k Z d e _ d  k Z d  k Z d k Td a d Z d ,,  Z d ,,  Z d e f d ,,  ƒ  YZ d    ,,  Z d
e f d ,,  ƒ  YZ d e f d
,,  ƒ  YZ d e f d ,,  ƒ  YZ d ,,  Z d e f d ,,  ƒ  YZ d  S(   Ni   (   t   *i   iû  c         C   sô   t  |  d ƒ } t  |  d ƒ } t |  ƒ d j o t  |  d ƒ } n d } t | | | | | | ƒ } yZ t |  ƒ d j o) |  d | |  d | |  d | f Sn |  d | |  d | f SWn& t |  ƒ d j o d Sqð d Sn Xd  S(   Ni    i   i   i   (   i    i    i    (   i    i    (   t   floatt   p1t   dxt   dyt   lent   dzt   sqrtt   norm(   R   R   R   R   R   (    (    t"   D:\SC4\Code\SC4Mapper\rgnReader.pyt      Normalize   s     )c         C   sΠ t  d ƒ } t i |  | i | | t i    t i
| ƒ }
t i
|
t i ƒ } t i | | i d | i d d f ƒ } | i d | i d d f } t i
d | d | d f | i ƒ  ƒ } t i | ƒ }    xr t | d d ƒ D]\ }
xS t | d d ƒ D]= } |    i | d |
d | d d |
d d g d d    ƒqù WqÞ Wx\ | i D]Q } | i } | i  }
| | i! } |
| i# } |    i | |
| | g d d
ƒqHWt i
| i ƒ  t i ƒ } t i | | ƒ } | S(    Ni   iûÿÿÿiÿÿÿÿi    i   t   RGBi@   t   outlines   #777777s   #FFFFFF(   i   iûÿÿÿiÿÿÿÿ(%   R
   t   lightDirt   tools3Dt
   onePassColorst   bLightt   heightt   shapet
   waterLevelt   GradientReadert    paletteWatert    paletteLandt   rawRGBt   Numerict
   fromstringt   Int8t   rgbt   reshapet   st   Imaget   tostringt   imt      ImageDrawt   Drawt   drawt   xranget   yt   xt      rectanglet   regiont      allCitiest   cityt   xPost   yPost   xSizet   x1t   ySizet   y1(   R   R   R   R(   R
   R    R0   R*   R   R#   R   R.   R   R%   R&   (    (    R      t
   ComputeOneRGB/   s,     *))  ?
      

#t   SC4Entryc           B   sD   t  Z d ,,  Z e e d ,, Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z    RS(   Nc         C   s  t  |  _ | |  _ t i d | d d d !ƒ d |  _ t i d | d d d !ƒ d |  _ |  i |  _ t i d | d d d !ƒ d |  _    | |  _ t i d    | d d d !ƒ d } t i d    | d d d !ƒ d } t i d    | d
d
d !ƒ d } h  d | <d | <d
| <|  _ d  S(   Nt   Hi
   i   i    t   li    i   i   t   Li   t   tt   gt   i(   t   Falset   selft
   compressedt   buffert   structt   unpackt   identt    fileLocationt   initialFileLocationt   filesizet   idxt   orderR6   R7   R8   t   TGI(   R:   R<   RC   R8   R7   R6   (    (    R      t   __init__G   s          $$ $   !!!c         C   sù   d  |  _ | oå | i |  i ƒ | i |  i ƒ |  _ | o\ t
|  i ƒ d j oB t i d |  i d d d !ƒ d } | t j o
t |  _ q" q˜ n |  i o3 | o    d GHn t i |  i d ƒ } | |  _ qõ | o    d GHn |  i |  _ n d  S(   Ni   R3   i   i   i    s   Compressed files   Uncompressed file(   t   NoneR:   t
   rawContentt      readWholet   sc4t   seekR@   t   readRB   t
   decompressR   R=   R>   t    compress_sigt   COMPRESSED_SIGt   TrueR;   t   QFSt   decodet
   uncompresst   content(   R:   RJ   RI   RM   RS   RN   (    (    R      t   ReadFileY   s"       $

    
    c         C   sE   | d |  i d j o- | d |  i d j o | d |  i d j S(   Ni    R6   i   R7   i   R8   (   t   tgiR:   RE   (   R:   RV   (    (    R      t    IsItThisTGIl   s    c         C   s"   t  i d |  i | | d !ƒ d S(   Nt   Ii   i    (   R=   R>   R:   RT   t   pos(   R:   RY   (    (    R      t   GetDWORDo   s    c         C   s"   t  i d |  i | | d !ƒ d S(   Nt   fi   i    (   R=   R>   R:   RT   RY   (   R:   RY   (    (    R      t   GetFloatr   s    c         C   s   |  i | | | !S(   N(   R:   RT   RY   t   length(   R:   RY   R]   (    (    R      t      GetStringu   s    (
   t   __name__t
   __module__RF   RP   R9   RU   RW   RZ   R\   R^   (    (    (    R      R2   F   s                c         C   sX   d } xK t | ƒ D]= } x4 t |  ƒ D]& } | t i d | | | f ƒ 7} q& Wq W| S(   Nt    R[   (      t   rR$   t   ySR%   t   xSR&   R=   t   packt   h(   Rd   Rc   Rf   R&   Rb   R%   (    (    R      t
   convheightmapx   s    

(t   SaveFilec           B   s,   t  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z RS(   Nc         C   s6   | |  _  t |  i  d ƒ |  _ |  i ƒ  |  i ƒ  d  S(   Nt   rb(   t   fileNameR:   t   openRJ   t
   ReadHeadert    ReadEntries(   R:   Rj   (    (    R      RF   €   s       
c         C   sæ  |  i i d ƒ |  _ |  i d d !d d |  i d d d !|  _ |  i } t i d | d d !ƒ d |  _ t i d | d d d    !ƒ d |  _ t i d | d
d
d    !ƒ d |  _ t i d | d d d    !ƒ d |  _    t i d | d d d    !ƒ d |  _
t i d | d d d    !ƒ d |  _ t i d
| d d d    !ƒ d |  _ t i d
| d d d    !ƒ d |  _
t i d | d    d    d    !ƒ d |  _ t i d | d d d    !ƒ d |  _ t i d | d d d    !ƒ d |  _ d  } d  |  _ d  S(   Ni`   i    i0   t    i    R4   i$   i(   i   i,   i4   i8   RX   i   i   i   i    (   R:   RJ   RL   t   headerR=   R>   t   indexRecordEntryCountt   indexRecordPositiont   indexRecordLengtht   holeRecordEntryCountt   holeRecordPositiont   holeRecordLengtht    dateCreatedt    dateUpdatedt   fileVersionMajort   fileVersionMinort   indexRecordTypeRG   t
   regionView(   R:   Ro   (    (    R      Rl   †   s     -    $$$$$$$$$$c         C   sØ   g  |  _ |  i i |  i ƒ |  i i |  i ƒ } x" t |  i    ƒ D], } t | | d | d d !| ƒ } | i
d ƒ p | i
d    ƒ o | i |  i t t ƒ n | i |  i ƒ |  i i | ƒ qA W|  i i ƒ  d  S(
   Ni   l   ôoºS l   %S i   l   Û~ l   á~ i    (   l   ôoºS l   %S i   (   l   Û~ l   á~ i    (   R:   t   entriesRJ   RK   Rq   RL   Rr   Ro   R$   Rp   RC   R2   t   entryRW   RU   RP   t   appendt   close(   R:   RC   Ro   R}   (    (    R      Rm   ›   s        " c         C   sd  t  i d ƒ | |  _ |  i i d } |  i i d } t i t    i
d d ƒ t | | |  i ƒ ƒ }
t    i
d t
|
ƒ ƒ |
}
d |  _ t t  i  ƒ  ƒ t d |  _ t d 7a |  i d d    !t    i
d
|  i ƒ |  i d    d d !t    i
d |  i ƒ |  i d d d !|  _ t |  i d
ƒ |  _ x8 |  i D]- } | i d  j o | i |  i t ƒ q,q,W|  i i ƒ  x† y t | d ƒ |  _ PWqmt j
o[ t i  d  d | d t i! t i" Bƒ } | i$ ƒ  } | i& ƒ  | t i' j o t( SqîqmXqmW|  i i) |  i ƒ |  i i* |  i ƒ |  i i+ |  i ƒ |  i |  i, } xÀ|  i D]µ} | | _. | i/ d d !t    i
d | i. ƒ | i/ d d }
| i1 d  ƒ om | i/ d d !t    i
d | i. ƒ t    i
d t
|
ƒ ƒ | i/ d d }
|
| _ d | _2 t
|
ƒ | _3 n | i1 d! ƒ o|  i } | i5 d d !t    i
d
| ƒ t    i
d
| ƒ | i5 d d !t    i
d
| ƒ | i5 d d | _5 | i }    t i | i5 ƒ }    t    i
d t
|    ƒ ƒ |    }    | i/ d d !t    i
d | i. ƒ t    i
d t
|    ƒ ƒ | i/ d d }
|    | _ d | _2 t
|    ƒ | _3 n | i1 d" ƒ oÎ t9 i: i; | ƒ d } d | d G| GHt | d d
ƒ } | i> ƒ  } | i ƒ  t9 i@ | d ƒ | i/ d d !t    i
d
| i. ƒ t    i
d
t
| ƒ ƒ | i/ d d }
| | _ d | _2 t
| ƒ | _3 n | i1 d# ƒ oÎ t9 i: i; | ƒ d } d | d G| GHt | d d
ƒ } | i> ƒ  } | i ƒ  t9 i@ | d ƒ | i/ d d !t    i
d
| i. ƒ t    i
d
t
| ƒ ƒ | i/ d d }
| | _ d | _2 t
| ƒ | _3 n |  i i) |
ƒ | | i3 7} qFWxQ |  i D]F } |  i i) | i ƒ | i1 d$ ƒ p | i1 d% ƒ o q   d  | _ q   W|  i i ƒ  t S(&   Nf0.10000000000000001i    i   R3   i   R4   i`   iÿÿ  i   RX   i   i(   Ri   t   wbsE   file %s seems to be ReadOnly
Do you want to skip?(Yes)
Or retry ?(No)t   Warningi    l   ôoºS l   %S i   l   Û~ l   á~ i'   l   ¹I i»,$Js   updating region view s   .PNG for savegame s   .PNGs   updating region view overlay s   _alpha.PNG for savegame s
   _alpha.PNG(   l   ôoºS l   %S i   (   l   Û~ l   á~ i    (   l   ¹I i»,$Ji    (   l   ¹I i»,$Ji   (   l   ôoºS l   %S i   (   l   Û~ l   á~ i    (A   t   timet   sleept      heightMapR:   R   R-   R/   RQ   t   encodeR=   Re   Rg   t   newDataR   Rq   t   intt   generic_saveValueRw   Ro   Rk   Rj   RJ   R|   R}   RH   RG   RU   RP   R   t   saveNamet   IOErrort   wxt
   MessageDialogt   YES_NOt
   ICON_QUESTIONt   dlgt      ShowModalt   resultt   Destroyt   ID_YESR9   t   writet   truncateRK   Rr   RY   R@   R<   t      newbufferRW   R;   RB   t   vRT   t   cityXPost   cityYPost    newDataCityt   ost   patht   splitextt   nt   pngRL   t   pngDatat   unlink(   R:   R˜   R™   R,,   R‰   R/   RY   R'   R   Rš   R–   R—   R    R†   RŸ   Rž   R-   R}   (    (    R      t   Save¨   s¦     
   .   
]

  & 

   2H         `
H       
H       
H      
 

(   R_   R`   RF   Rl   Rm   R¢   (    (    (    R      Rh      s            
t   SC4Filec           B   sG   t  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z RS(   Nc         C   s"   | |  _  t |  i  d ƒ |  _ d  S(   NRi   (   Rj   R:   Rk   RJ   (   R:   Rj   (    (    R      RF      s       c         C   s   | |  i j o
| |  i j S(   N(   R&   R:   R˜   R%   R™   (   R:   R&   R%   (    (    R      t   AtPos  s    c         C   s   |  i S(   N(   R:   t   mayorMod(   R:   (    (    R      t
   InMayorMod  s    c         C   s  |  i i d ƒ |  _ |  i d d !d d |  i d d d !|  _ |  i } t i d | d d !ƒ d |  _ t i d | d d d    !ƒ d |  _ t i d | d
d
d    !ƒ d |  _ t i d | d d d    !ƒ d |  _    t i d | d d d    !ƒ d |  _
t i d | d d d    !ƒ d |  _ t i d | d
d
d    !ƒ d |  _ t i d | d d d    !ƒ d |  _
t i d | d    d    d    !ƒ d |  _ t i d | d d d    !ƒ d |  _ t i d | d d d    !ƒ d |  _ d  } |  i G|  i G|  i    G|  i
G|  i GHd  S(   Ni`   i    i0   Rn   i    RX   i$   i(   i   i,   i4   i8   i   i   i   i    (   R:   RJ   RL   Ro   R=   R>   Rp   Rq   Rr   Rs   Rt   Ru   Rv   Rw   Rx   Ry   Rz   RG   Rj   (   R:   Ro   (    (    R      Rl     s     -    $$$$$$$$$$c            C   sw  g  |  _ |  i i |  i ƒ |  i i |  i ƒ } xt |  i    ƒ D]} t | | d | d d !| ƒ } | i
d" ƒ p | i
d# ƒ o | i |  i t t ƒ n | i
d$ ƒ o d GH| |  _ n | i
d% ƒ ozd    G| i GHd
Gt | i d ƒ ƒ GH| i d ƒ } | i d ƒ |  _ | i d ƒ |  _ | i d
ƒ |  _ | i d ƒ |  _ d G|  i GHd G|  i GHd G|  i GHd G|  i GHd } | d j o
d } n | d j o
d } n | d j o
d } n t i d | i | d ƒ d |  _ | i | ƒ } d G| GH| d j  o% | i | d | ƒ |  _  |  i  GHqOd G| GHd |  _  qA qA Wd GHd d GH|  i d d |  _! |  i d d |  _" |  i d |  _# |  i d |  _$ t% i& |  i! |  i" f t% i' ƒ |  _( xc t |  i! ƒ D]R } xI t |  i" ƒ D]8 } |  i i+ d  | | |  i" d ƒ |  i( | | f <qóWqÝWt, i- d! |  i" |  i! f |  i( i. ƒ  ƒ |  _/ d  } |  i i1 ƒ  d  S(&   Ni   l   ôoºS l   %S i   l   Û~ l   á~ i    s   This was the terrains   This was the city infos   version i   i   i    i   s   city tile X = s   city tile Y = s   city size X = s   city size Y = i@   i
i
i?   i     i;   t   Bs   name city lengthid   t   xxxxxxxxxxxxxxxxxxxxoldvs
   weird names   finished reading the sc4s   --i   t   F(   l   ôoºS l   %S i   (   l   Û~ l   á~ i    (   l   ôoºS l   %S i   (   l   Û~ l   á~ i    (2   R:   R|   RJ   RK   Rq   RL   Rr   Ro   R$   Rp   RC   R2   R}   RW   RU   RP   t   heightMapEntryR;   t   hexRZ   t   versionR˜   R™   t      cityXSizet      cityYSizet      offsetLenR=   R>   RT   R¥   t   sizeNameR^   t   cityNameR/   R-   R+   R,   R   t   zerost   Float32R,,   R%   R&   R\   R   R   R   R    RG   R   (      R:   RC   R¯   Ro   R¬   R&   R%   R}   R°   (    (    R      Rm   .  sj        " 
     





$   
       $  :-c            C   s   t  i d } t i | ƒ |  i d j o
d } n |  i d j o
d } n |  i d j o
d } n |  i | | ƒ t | ƒ } |  i
} d G|  i
Gd    GH| i |  i |  i |  i | ƒ } | S(
   Ni    i   s   City - Small.sc4i   s   City - Medium.sc4i   s   City - Large.sc4s    will replaces   with a new blank city(   t   sysRœ   t   mainPathR›   t   chdirR:   R­   t   namet   BuildThumbnailt   colorR   Rh   t   savedRj   R¢   R˜   R™   R,,   t   ret(      R:   t   folderR¹   R   R·   Rº   R»   Rµ   Rj   (    (    R      R¢   g  s    




    !c          C   s  t  i i |  i ƒ d } t i | |  i    i
|  i    i ƒ  | i ƒ  ƒ \ } } } } } | d 7} t | ƒ d }
t i d d | |
  ƒ }    | G| G| G| GH|    i | | | | g ƒ }    |    i | d ƒ t i d d    | |
ƒ }    |    i | | | | g ƒ }    |    i | d ƒ d  S(
   Ni    i   R    i  i¬  s   .PNGs
   _alpha.PNG(   i  i¬  (   i  i¬  (   R›   Rœ   R   R:   Rj   Rž   R   t
   generateImageR   R,,   R   R   t   colorst   minxt   minyt   maxxt   maxyRb   R   t   offsetR   R   R    t   cropt   save(    R:   R¾   R   RÁ   R   Rž   R¿   RÀ   Rb   R    Rà  (    (    R      R¸   |  s    <
(      R_   R`   RF   R¤   R¦   Rl   Rm   R¢   R¸   (    (    (    R      R£      s                  9   t      CityProxyc           B   sP   t  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z d ,,  Z    RS(      Nc         C   s  | |  _ | |  _ | |  _ | |  _ t    |  _
t    |  _ t    |  _ d |  _
|  i d d |  _ |  i d d |  _ |  i d |  _  |  i d |  _ t i |  i |  i f t i ƒ |  _ |  i t i | d ƒ i t i ƒ 7_ t i d |  i |  i f |  i i ƒ  ƒ |  _ d  |  _ d  S(   Ns   Not created yeti@   i   i   R©   (   R+   R:   R˜   R,   R™   R-   R­   R/   R®   R9   t   haveTreeR¥   t      protectedR±   R   R²   R³   R,,   t   arrayR   t   astypeR   R   R   R    RG   Rj   (   R:   R   R+   R,   R-   R/   (    (    R      RF   Œ  s                             $(-c         C   s   | |  i j o
| |  i j S(   N(   R&   R:   R˜   R%   R™   (   R:   R&   R%   (    (    R      R¤   Ÿ  s    c         C   s   d  S(   N(    (   R:   t   b(    (    R      t      Protected¢  s    c         C   s   t  S(   N(   R9   (   R:   (    (    R      t    IsProtected¥  s    c         C   s   t  S(   N(   R9   (   R:   (    (    R      t      HaveTrees¨  s    c         C   s   t  S(   N(   R9   (   R:   (    (    R      R¦   «  s    c         C   sÇ   t  i d } t i | ƒ |  i d j o
d } n |  i d j o
d } n |  i d j o
d } n t | ƒ } | d d    |  i |  i f |  _
|  i | | ƒ | i |  i |  i |  i |  i
ƒ S(
   Ni    i   s   City - Small.sc4i   s   City - Medium.sc4i   s   City - Large.sc4t   /s   City - New city(%03d-%03d).sc4(   R´   Rœ   Rµ   R›   R¶   R:   R­   R·   Rh   Rº   R¼   R˜   R™   Rj   R¸   R¹   R   R¢   R,,   (   R:   R¼   R¹   R   R·   Rº   Rµ   (    (    R      R¢   ®  s    




 !c          C   s  t  i i |  i ƒ d } t i | |  i    i
|  i    i ƒ  | i ƒ  ƒ \ } } } } } | d 7} t | ƒ d }
t i d d | |
  ƒ }    | G| G| G| GH|    i | | | | g ƒ }    |    i | d ƒ t i d d    | |
ƒ }    |    i | | | | g ƒ }    |    i | d ƒ |    i | d ƒ d  S(
   Ni    i   R    i  i¬  s   .PNGs
   _alpha.PNG(   i  i¬  (   i  i¬  (   R›   Rœ   R   R:   Rj   Rž   R   R½   R   R,,   R   R   R¾   R¿   RÀ   RÁ   R   Rb   R   Rà  R   R   R    RÄ   RÅ   (    R:   R¾   R   RÁ   R   Rž   R¿   RÀ   Rb   R    Rà  (    (    R      R¸   À  s    <
(
   R_   R`   RF   R¤   RÌ   RÍ   RΠ  R¦   R¢   R¸   (    (    (    R      RÆ   ‹  s                        c            s4  t  i ˆ  i t  i ƒ ‰ d ,,  } d ,,  ‰ d ,,  ‰ ‡ ‡ ‡  d †  } ‡ ‡ ‡  d †  } d } g  }    d } d } g  }
g  } x¥t ˆ  i d ƒ D]} x‡t ˆ  i d ƒ D]r} ˆ | | f d j oUˆ  i | | f ƒ }
ˆ |
ƒ oz y. | | | ƒ |    i | | f ƒ | d 7} Wqbt j
o | G| Gd GH,  qbt j
o | G| Gd GH,  qbXn | |
ƒ o! |
i | | f ƒ | d 7} n ˆ |
ƒ oz y. | | | ƒ | i | | f ƒ | d 7} Wqt j
o | G| Gd    GH,  qt j
o | G| Gd    GH,  qXqq© q© Wq Wd
G| GHd G| GHd G| GHt i ˆ  i ˆ  i ƒ } t i | ƒ } xU |
D]M } d( } | d | d } | i# | | d | d f g d | | d ƒqlWx] | D]U } d) } | d | d } | i# | | d d | d d f g d | | d ƒqÄWx] |    D]U } d* } | d | d } | i# | | d d& | d d& f g d | | d' ƒq$Wg  } |
D]' } | t& | | d | d d d ƒ qˆ~ g  } | D]' } | t& | | d | d d d ƒ qÀ~ g  } |    D]' } | t& | | d | d d d ƒ qù~ } | | f S(+   Nc         C   sB   |  \ } } } | | j o" | | j o | d j o t Sn t S(   Niú   (   t   valueRb   R7   RË   RP   R9   (   RР  RË   R7   Rb   (    (    R      t   RedishÓ  s    'c         C   sB   |  \ } } } | | j o" | | j o | d j o t Sn t S(   Niú   (   RР  Rb   R7   RË   RP   R9   (   RР  RË   R7   Rb   (    (    R      t   GreenishØ  s    'c         C   sB   |  \ } } } | | j o" | | j o | d j o t Sn t S(   Niú   (   RР  Rb   R7   RË   RP   R9   (   RР  RË   R7   Rb   (    (    R      t   BlueishÝ  s    'c            s   ˆ i |  d | f ƒ ˆ i |  | d f ƒ ˆ i |  d | d f ƒ f } x | D] } ˆ | ƒ p qS qS Wd ˆ  |  | f <d ˆ  |  d | f <d ˆ  |  | d f <d ˆ  |  d | d f <d  S(   Ni   (   t   configt   getpixelR&   R%   t   rgbsR   RÒ   t   verified(   R&   R%   RÖ   R   (   R×   RÒ   RÔ   (    R      t    VerifyMediumâ  s    L 
c            sá  ˆ i |  d | f ƒ ˆ i |  d | f ƒ ˆ i |  d | f ƒ ˆ i |  | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ ˆ i |  | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ ˆ i |  | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ ˆ i |  d | d f ƒ f } x  | D] } ˆ | ƒ o n q{WxC t d ƒ D]5 } x, t d ƒ D] } d ˆ  |  | | | f <q·Wq¤Wd  S(   Ni   i   i   i   (    RÔ   RÕ   R&   R%   RÖ   R   RÓ   R$   t   jR8   R×   (   R&   R%   RÖ   R8   RÙ   R   (   R×   RÓ   RÔ   (    R      t    VerifyLargeë  s    ÿ u 

i    i   s   not blues      not greens
   big cities = s   medium cities = s   small cities = s   #FF7777s   #FF0000t   filli   s   #00FF00s   #99FF00s   #00FF99s   #55FF55i   s   #0000FFs   #4000FFs   #8000FFs   #C000FFs   #F000FFs   #4040FFs   #4080FFs   #40C0FFs   #40F0FFs   #8040FFs   #8080FFs   #80C0FFs   #80F0FFs   #C040FFs   #C080FFs   #C0C0FFi   i   (   s   #FF7777s   #FF0000(   s   #00FF00s   #99FF00s   #00FF99s   #55FF55(   s   #0000FFs   #4000FFs   #8000FFs   #C000FFs   #F000FFs   #4040FFs   #4080FFs   #40C0FFs   #40F0FFs   #8040FFs   #8080FFs   #80C0FFs   #80F0FFs   #C040FFs   #C080FFs   #C0C0FF()   R   R²   RÔ   t   sizeR   R×   RÑ   RÒ   RÓ   RØ   RÚ   t   bigt   bigst   smallt   mediumt   smallst   mediumsR$   R%   R&   RÕ   R   R~   t
   IndexErrort   AssertionErrorR   t   newt   modet   outR!   R"   R#   t   ct   redsR¹   R'   R¾   t   _[1]RÆ   R   t   cities(   RÔ   R   Ré   RØ   R¹   R#   R¾   Rç   R×   RÞ   R   RÑ   RÓ   Rá   Rà   RÝ   Rß   RÒ   Rë   RÚ   Rè   Rê   R%   R&   Râ   (    (   RÔ   RÓ   R×   RÒ   R      t
   WorkTheconfigР s,                
  



 




          3 ; ;­t      SC4Regionc           B   s/   t  Z d  d ,, Z d ,,  Z d ,,  Z d ,,  Z RS(   Nc         C   s$  t  i d ƒ | |  _ t  i d ƒ | d  j    o d  |  _ g  }    | |  _ nˆ | |  _ t i    | ƒ } g  } | D]. } t
i i | ƒ d d j o | | qo qo ~ }    y t i | d ƒ |  _ Wn d  |  _ n Xg  |  _ |  i oF |  i i d ƒ |  _ t |  i | ƒ \ |  _ |  _ d G|  i i GHn xu|    D]m}
| d  j    o | i d d d |
ƒ n t t
i i | |
ƒ ƒ } | i ƒ  | i ƒ  xü t |  i ƒ D]ë \ } }
|
i! | i" | i# ƒ oÆ |
i$ t% j oo |
i" | i" j o\ |
i# | i# j oI |
i& | i& j o6 |
i' | i' j o# |  i |  |  i | d |  _ qŒt( i) d  d    d
t( i* t( i+ Bƒ } | i- ƒ  | i. ƒ  d  |  _ d  Sq¡q¡W|  i i/ | ƒ q3Wd } d } g  } g  } g  } xî |  i D]ã }
|
i& d j o | i/ |
i" |
i# f ƒ n |
i& d
j o | i/ |
i" |
i# f ƒ n |
i& d j o | i/ |
i" |
i# f ƒ n |
i" |
i& | j o |
i" |
i& } n |
i# |
i' | j o |
i# |
i' } qÌqÌWt i5 d | | f ƒ } t6 i7 | ƒ } xU | D]M } d' } | d | d } | i< | | d | d f g d | | d
ƒqáWx] | D]U } d( } | d | d } | i< | | d d | d d f g d | | d ƒq9Wx] | D]U } d) } | d | d } | i< | | d d% | d d% f g d | | d& ƒq™W| |  _ n | d  j    o | i d d ƒ n d  S(*   Ns   basicColors.inii   s   .sc4s    /config.bmpR    s    CONFIG sizes$   Please wait while loading the regions      
Reading sV   It seems that the config.bmp does not match the savegames present in the region foldert   errori    i   i   s   #FF7777s   #FF0000RÛ   s   #00FF00s   #99FF00s   #00FF99s   #55FF55s   #0000FFs   #4000FFs   #8000FFs   #C000FFs   #0040FFs   #4040FFs   #8040FFs   #C040FFs   #0080FFs   #4080FFs   #8080FFs   #C080FFs   #00C0FFs   #40C0FFs   #80C0FFs   #C0C0FFi   i   (   s   #FF7777s   #FF0000(   s   #00FF00s   #99FF00s   #00FF99s   #55FF55(   s   #0000FFs   #4000FFs   #8000FFs   #C000FFs   #0040FFs   #4040FFs   #8040FFs   #C040FFs   #0080FFs   #4080FFs   #8080FFs   #C080FFs   #00C0FFs   #40C0FFs   #80C0FFs   #C0C0FF(>   R   t   InitR   R:   RÔ   RG   R¼   t   allCityFileNamest   dircachet   listdirt   allfilesRê   R&   R›   Rœ   R   R   Rk   R)   t   convertRì   RÜ   RÅ   R   t   UpdateR£   t   joinRJ   Rl   Rm   t      enumerateR8   R*   R¤   R˜   R™   t      __class__RÆ   R­   R®   R‹   RŒ   t   OKt
   ICON_ERRORt   dlg1R   R'   R~   t   sizeXt   sizeYRÞ   Rá   Râ   Rå   R!   R"   R#   Rè   Ré   R¹   R'   R¾   (   R:   R¼   R   R   RÔ   Rû   Ré   R¹   Rá   Rð   R*   Ró   RÞ   RÅ   Rü   Rý   RJ   Rè   R8   R¾   R#   Rê   R&   Râ   (    (    R      RF   5  s–    
   

   
   B
   
 


 \#"

     
 3 ; ;

c         C   s#   t  |  i ƒ d j p
|  i d  j S(   Ni    (   R   R:   R)   RÔ   RG   (   R:   (    (    R      t   IsValid,,  s    c          C   sÿ  d GHt  i d |  i i d |  i i d f |  i i ƒ  ƒ }    t } xµt    |  i
ƒ D]¤\ } } | i | d d | i ƒ |    i | i d | i d | i d | i | i d | i f ƒ | _ | i i ƒ  } t i | i i ƒ  t i ƒ | _ t i | i | i | i f ƒ | _ d  | _ | i } | i }
| | i } |
| i } | G|
G| G| GH|  i! i GH|  i! |
| ... | | ... d  d  ... f } | i# |  i$ | |  i% ƒ pF t i | t i ƒ | _ t i | i | i | i f ƒ | _ t& } qS d  } qS W| S(   Nt   savingR©   i   i    s#   Please wait while saving the regions   
saving i@   ('   R   R   R:   R   R   R   R    RP   Rº   R÷   R)   R8   R*   R   Rõ   R±   RÄ   R˜   R™   R-   R/   R,,   t   backupR   R³   R   RG   R+   R.   R,   R0   t   x2t   y2R¾   Rè   R¢   R¼   R   R9   (    R:   R   R*   R  R   R8   Rº   Rè   R  R    R0   R.   (    (    R      R¢   ‡  s0    8 H!$         

 ($

c          C   s;  d d g } |  i o, |  i i d | d <|  i i d | d <n xo |  i D]d } | i | i }
| i    | i
}    | d |
j  o |
| d <n | d |    j  o |    | d <qL qL Wg  } | D] } | | d d q¿ ~ |  _  t i d |  i  ƒ } xA |  i D]6 } | i | i | i d | i    d f ƒ d  | _ qÿ W| i d d ƒ | i ƒ  } d  } t i | t i ƒ |  _ d  } t i |  i |  i  d |  i  d f ƒ |  _ | d  j    o | i d d ƒ n | d  j    o | i d    d
ƒ n t t |  i |  i |  ƒ |  _ | d  j    o | i d d ƒ n d  } d  } d
GHd  S(   Ni    i   i@   R©   i   s6   Please wait while loading the region
Building texturesi   s5   Please wait while loading the region
Building shadowsi   s4   Please wait while loading the region
Building colorsi   s'   Please wait while loading the region
oks    region read("   t   imgSizeR:   RÔ   RÜ   R)   R*   R˜   R­   R&   R™   R®   R%   Rê   t   aR   Rå   R    t   pasteRG   R   Rõ   R   t      rawHeightR   R   R³   R   R   R1   R9   R   R¾   t   normst   shadow(    R:   R   R  R*   R  Rê   R  R    R  R%   R&   R  (    (    R      t   show£  sF     

,
'
 ,


(   R_   R`   RG   RF   Rþ   R¢   R     (    (    (    R      Rí   4  s    O      (   R‹   R´   R=   R,   RQ   R   R   R   t    ImageFilterR!   t   PngImagePlugint   JpegImagePlugint   BmpImagePluginR   t   matht    _initializedRñ   t   os.pathR›   Rˆ   RO   R
   R1   t   objectR2   Rg   Rh   R£   RÆ   Rì   Rí   (   R
   R   R2   Rì   R   Rh   R1   R=   R
  RO   R
  R!   R£   R  Rí   RQ   R´   R‹   R   R   R   R   Rñ   Rg   R,   R›   RÆ   (    (    R      t   ?   s:                                                               2   Œ€E   d
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on March 05, 2009, 10:49:44 AM
I think you copy paste the exe and not the log :)
Title: Re: SC4Mapper : Trouble at launch
Post by: evertonforever1 on June 02, 2009, 06:25:50 PM
Im having troubles with the Mapper!

I go to save my Region (NHPBrunswickBathMaine)  and it saves. Then i Quit and there is nothing?  WHere do i find the region once it is saved?

I am getting this error message when i quit>  See The Log File C: Program Files\SC4Mapper\SC4Mapper.exe for details

Then i do that and there is this :
Traceback (most recent call last):
  File "SC4MapApp.pyo", line 862, in SaveRgn
OSError: [Errno 2] No such file or directory

im running XP
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on June 02, 2009, 11:14:10 PM
Make sure you have a My Documents\simcity 4\Regions folder and that you don't put fancy character in the region name
Title: Re: SC4Mapper : Trouble at launch
Post by: evertonforever1 on June 03, 2009, 04:48:02 AM
Would i perhaps be Under My documents/regions/download?

cause otherwise there is nothing else in that folder besides the stock maxis regions... i save my region as Weymouth in the SC4Mappper but nothing of the sort apears in the folder or when i start up the game.
Title: Re: SC4Mapper : Trouble at launch
Post by: wouanagaine on June 04, 2009, 12:08:34 AM
Can you try with another region just to check please ?
Title: Re: SC4Mapper : Trouble at launch
Post by: jayden08 on July 07, 2009, 01:02:34 AM
Well, to start off, i am using Windows 7. But so far everything that works with windows Vista works with it.

Though i am aware that this is not compatible fully with vista.

This is in the SC4Mapper.exe logfile:
Traceback (most recent call last):
  File "SC4MapApp.pyo", line 1006, in OnClose
  File "SC4MapApp.pyo", line 1009, in ShowMain
  File "SC4MapApp.pyo", line 278, in __init__
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 2-4: truncated \UXXXXXXXX escape

Have NO idea what it means.

And the whole "move your documents folder" thing is not working for me.

I open it, the splash screen comes up. and then nothing, though it is in the Process's when i open task manager.
I get the same thing with SC4Terraformer aswell.

Any help would be greatly apreciated.
Title: Re: SC4Mapper : Trouble at launch
Post by: jayden08 on July 07, 2009, 11:49:33 PM
Never mind, i got SC4 Terraformer working.
Title: Re: SC4Mapper : Trouble at launch
Post by: Russellhmfc on July 24, 2009, 06:59:53 AM
Im sorry but can someone help me, i cannot download sc4 mapper as i cannot find the download button on that page? what am i doing wrong?
Title: Re: SC4Mapper : Trouble at launch
Post by: BarbyW on July 24, 2009, 07:02:57 AM
Have you registered separately for the LEX? If not, click on the LEX button at the top of the page and register there. Once your account is activated you will see the Download button.
Title: Re: SC4Mapper : Trouble at launch
Post by: delta9 on July 28, 2009, 06:12:20 PM
FOR VISTA USERS:

Some tips on moving Documents out of \Users:

I tried simply creating a folder named "Documents" in the root directory (i.e. C:\Documents) but it does not work, there's some kind of flag that tells the system whether or not it's an "authentic" Documents folder.  However...

YOU DO NOT HAVE TO MOVE ALL OF YOUR DOCUMENTS.

It might make things easier for you to do so in the long run, because you will have two different Documents folders under your User folder, but it's not too hard to remember which is which.  All you have to move is your SimCity 4 folder from the old Documents folder to the new one.  Honestly you may not even have to do this, you can probably just copy/paste your newly rendered regions from the new "dummy" Documents folder.  If you do copy your SimCity 4 folder, be careful and thorough, because Vista's "merge folders" doesn't work right... go figure.  It took several tries and a crash of Explorer for it to finally do it 100%.  Sometimes it will merge sub-folders and sometimes it won't.

I'm just so glad I finally got this to work &apls Thank you so much wouanagaine for all the great tools you make.  We'd still be in the Dark Ages without you.
Title: Re: SC4Mapper : Trouble at launch
Post by: djrenny on December 19, 2009, 03:42:20 PM
I have vista on my pc,and the same problem with sc4mapper..
I've readed the topic and moved the folder SimCity4 to D/SimCity4..but the program still don't work..
I've tried to istall mapper on disk C or in D disk,but the problem still remane..
please help me!
Title: Re: SC4Mapper : Trouble at launch
Post by: daeley on December 30, 2009, 03:11:57 AM
had the same problem with SC4Mapper, moved my folder from C:/Users/.../Documents  to  C:/My Documents and now it works. Unfortunately I don't have a D: drive on this machine. (well I do, but it's the DVD drive).
Title: Re: SC4Mapper : Trouble at launch
Post by: catty on December 30, 2009, 10:35:43 AM
I use Windows XP and had the same problems with SC4Mapper not starting and was unable to use it with my Home Account, but have found that SC4Mapper works when I set up a Guest account on WinXP and use it there and save the map to a shared folder, its not ideal solution, but it does work on my computer   :)
Title: Re: SC4Mapper : Trouble at launch
Post by: kristinaswan on March 11, 2010, 01:20:59 AM
Short instructions for the fix to make this work with "Users\[Username\Documents" folder.  This is being done in Vista Home Premium 32-bit.  Not sure about any others.
Your user folder should look something like this.  We are going to be changing the location target for "My Documents".  Note you will not actually have to move anything, but you will have two "Documents" folders.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg709.imageshack.us%2Fimg709%2F9721%2F1documentsdefault.jpg&hash=d09ef170fd10973d86b89ee77792b990f5a668f9) (http://img709.imageshack.us/i/1documentsdefault.jpg/)
Right click and select Properties from the menu list for your current "Documents" folder.  This will have to be done from the right pane as in the left pane it isn't an option (at least on my machine).
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg33.imageshack.us%2Fimg33%2F5992%2F2properties.jpg&hash=1e748ba70a39c574c83ae52759c6184a19525d4b) (http://img33.imageshack.us/i/2properties.jpg/)
Choose the Location Tab at the top and you should see a line highlighted in blue showing the current path to the Documents folder.  Simply delete "Users\" from that path and click "OK".
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg28.imageshack.us%2Fimg28%2F511%2F3location.jpg&hash=4b4b654a90ad5a86e0ea2afed4722839329c3741) (http://img28.imageshack.us/i/3location.jpg/)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg195.imageshack.us%2Fimg195%2F2159%2F4newlocation.jpg&hash=18c97aa93c4fbad34013c29d12dce2593cc86a40) (http://img195.imageshack.us/i/4newlocation.jpg/)
It should look like this.
You'll see a dialogue asking if you wish to move all of your documents.  It is your choice, but you do NOT have to do this.  You will, however, end up with a second Documents folder.  All of your new documents will go to the new location.  Create a "SimCity 4\Regions" folder to avoid the other error with saving regions.  Do note that any regions you would like to play will need to be moved to your new folder as Sim City will not see them in the old directory.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg42.imageshack.us%2Fimg42%2F724%2F5dialogueno.jpg&hash=6dcaabd3aa9905ecf1e161b39264c934f22b3590) (http://img42.imageshack.us/i/5dialogueno.jpg/)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg148.imageshack.us%2Fimg148%2F8026%2F6doubledocuments.jpg&hash=4d2698be15c992042ebebdf1c78059d333573633) (http://img148.imageshack.us/i/6doubledocuments.jpg/)
Note the two Documents folders and their respective Folder Paths at the right.  SC4Mapper will now open and you may create files as normal.

--------------------------------------------------------------------------
**OPTIONAL**
If you would like quick access to the old location from the new location you can additionally place a symbolic link...errrmm.....shortcut pointing back to the old location.  Right click inside the new folder and choose "New > Shortcut".  Right click the shortcut created and choose properties.  Add the deleted information into the line from earlier and click OK.  This should keep ease of access to the old location without moving any existing files.
Title: Re: SC4Mapper : Trouble at launch
Post by: steveaux03 on March 14, 2010, 11:45:37 AM
lol Thanks a lot!!! People like you make my life 110% better!!  &apls &apls &apls &apls &apls &apls  :)
Title: Re: SC4Mapper : Trouble at launch
Post by: Twindle on August 14, 2010, 11:30:55 PM
That made no sense to me i am just as confused i am on vista i have it under my documents\simcity4\regions and i also have it under program files(x86) its just going to the wave screen and can someone help with how to use the terraformer?