Jump to content
Sign In to follow this  
wouanagaine

NHP Tools suite

136 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

As I've mentioned in a PM to Wouanagaine (at least I think I mentioned this...), I think there could be a distinct market for 2 versions, a basic version that generates the current html file for Growables OR Non-growable (parks civic structures) and an "expert" version with a more diverse range of filters available for generating lists (perhaps with a selection of output formats. What do you guys think? would it be worthwhile? as long as wouanagaine is willing to programme it of course.

LK

Share this post


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

    I'm actually working on the xml/xsl version, the xml will contains every informations on every lots ( to a certain degree of course ) and by choosing the correct xsl you will be able to see all or only part of the database

    I'm still $%&^! regarding xsl programming, but there are tons of tutorials on the web that will make my life easier

    So instead of choosing filters in the program, you will be able to choose filter in your browser, this has the advantage of :

    -not having to run SC4LIG each time you want a new set of informations

    -I don't have to manage 2 versions

    I have currently the SC4LIG that generate the xml with the same informations and a xsl that display it like the html you have.

    Now I need to add more infos ( I have to dig into Building/Lot examplar for non growables ), and make a better xsl so you can choose filters before releasing the next version

    Any help on how to :

    identify a specific category buildings, ( ie Police, TrainStation / school etc.. ) with what make sense to know about it, will be appreciate

    Take care

    Share this post


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

    hey woug, i hate to do this to you again, but i got another error, this time when the program was generating the info file:

    Traceback (most recent call last):

    File "SC4LotInfosGenerator.py", line 892, in OnStart

    File "SC4LotInfosGenerator.py", line 611, in GenerateLotInfos

    TypeError: unsubscriptable object

    I have downloaded and applied the patches in the first post.

    Share this post


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

    Originally posted by: wouanagaine
    I reckon for most things I'm doing these days, I will stick to removing the PNG altogetherquote>

    Noooooooooooooooo !!!!!!!!!!!!

    what the heck of knowing the name + stats if I don't know how the lot is looking, if it will fit the city I'm buidling etc..?

    That's only my opinion, and I really like you continue to include png inside of your lots.quote>

    1,000 growable RCI lots * ~30 kB (~average size with pic) = 30,000 kB

    1,000 growable RCI lots * ~3 kB (~average size without pics) = 3,000 kB

    That's what bothers me personally more than remembering the looks, which I do by means of actual screenshots.

    Besides, whenever the copy&paste technique is used for multiple lots, the lot into which the lot design has been pasted from a source lot will not show in the PNG as it actually looks in many cases.

    I'm just mentioning this for information, no offense intended. I just happen to have a radically different approach, and in addition to this I happen to be someone in whose case this approach is used to release stuff to the public, so there we have a little conflict. Had I known about the possibility of such a fine program like the one you have written here (and other programs which ahve emerged over the time), my entire way of dealing with plugins would probably be radically different... since I couldn't know that, I've come to my own and rather radical and manually oriented way. I never did anything relying on easy two-click routines and the hope that some programs would be able to take me by the hand and lead me safely through the mess I created. No installers, no scripts, total customized system and control. That's why. I'm not trying to tell you or anybody else how to do something, I'm just trying to let you see the wonderful world of plugin management through my eyes so you can understand better what makes me do what I do.


    -=| You can choose a ready guide in some celestial voice ||| If you choose not to decide you still have made a choice |=-
    -=| You can choose from phantom fears and kindness that can kill ||| I will choose a path that's clear - I will choose free will |=-

    Share this post


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

    Hi,

    I have an idea, how about the mapper with the transportation map in your choice of colour integrated?

    Or perhaps using terrain colours of SimCity 4?

    Share this post


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

    Very usefull tools you have done wouanagaine. For sure i gonna try it. Great to have brain for us.Lol Thanks for your work.

    Share this post


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

    SC4LIG patch updated ( see first post in page 1 )

    I hopefully ( again ? ) fix freedo50 bugs.

    The new patch generate now infos.xml & infos.html, the infos.html has not changed, and it is still open in your browser at the end of the process

    The infos.xml will be the databaseformat generated so I can add more information without taking care of proper html formating.

    The SC4LIGXSLT.xsl file that come with the new patch is the 'Translation definition' so that you can browse the xml like a html file . Just drag&drop the infos.xml in your browser to see if it is ok

    Any building name that will contains a '&' will translate to 'and'. There is still a lot of chance that any others special characters have to be translated but I don't come across on my machine. This won't crash SC4LIG, but your browser won't be able to display the xml correctly


    Constantina The transportation map can be created because the needed information for building it is not decoded in the savegame. And for colors, it is the same problem/solution as SC4TF, If I do it, it will take the same time to save as SC4 render a map.

    Kimcar merci, chacun de nous utilise son cerveau comme il peut, certains sont limités d'autres non  3.gif

    DioAngel Yes try it !

    T_Wrecks I see your point with the size in term of uploading. It is quite bad that Maxis made a png instead of a jpeg, as you see the SC4LIG save them as jpeg and each pic is around 6ko. better than 30ko. But I hope SC4 don't load the png as there is no need for it in game.

    I was not aware that the png can in some case not reflect the actual lot, so  if I really want a picture of it, I should make use of the S3Ds , textures etc,  like the lot preview in iReader ? 15.gif

    Anyway when I will be enough confident in my new xslt programing skill, you will be able to hide the picture

    freedo50 I hope the new patch will be ok. , Thx for trying. it seems you have a radically different set of plugins than me

    Newsmouse-1 thx for your support

    EDIT : the patch has been reuploaded due to a bad xsl file that produce bad zoning informations

    Share this post


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

    Wouanagaine, you're a true programmer! find the most simplest and easiest way for one programme to cater for two needs! Now I just have to research how to import the data into a database!

    Great work, you're definitely an asset to this fabulous community

    LK

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    LK I think that any well known database will be able to import a well formed xml. And if not the case, the big power under xml/xsl is that the xml can be transformed to not only html.

    Share this post


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

    Originally posted by: wouanagaine I'm also positivly surprised by how you like the SC4LotInfosGenerator, I thought it won't be usefull for a lot of people.quote>
     

    Dude! you have no idea how much useful it'll be to me! Thank you so much.

    Originally posted by: vab423 wouanagaine, these are terrific but the one i think is the greatest is the lot info generator.  i, like andreas, have been wanting something like this forever. i tried creating my own access database but got too overwhelmed to finish the project.  thank you thank you thank you!quote>
     

    Yes that's exactly like me. I used to put some stats like zone sizes and stuff about downloaded stuff in a small txt file, but I got fed up to manually type all this and stop using it.

    Originally posted by: Lord Kronos wouanagaine

    I think I can speak for every one by saying the more options for the data we're able to retrieve the better. I personally would like to be able to use the information you extract to for a database of all my Lots, both RCI growable, and RCI plopable (not that I have many), but also Parks, various wall sets, Civic Building (schools, fire/police statins), stations (Rail, E-Rail, GLR, Sub, Mono) and  Bus stops, including things like capacity and what transit switch options the lots have (for example can it act as a bus stop as well as a rail station).quote>

     

    I agree completly. The more info you put the more useful it'll be. I would really really like if you could do something with the park plugins because I have a few lots in my park menu I don't even know where the hell they came from.

    Personally, I prefer it a lot more with the pictures, but if you could make it as an option, that would be perfect for everyone.

    Merci bcp et lâche pas le bon travail!

    Share this post


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

    Some information about the LIG:

    I got this error message:

    Traceback (most recent call last):
      File "SC4LotInfosGenerator.py", line 927, in OnClose
      File "SC4LotInfosGenerator.py", line 930, in ShowMain
      File "SC4LotInfosGenerator.py", line 840, in __init__
    pywintypes.error: (2, 'RegQueryValueEx', 'Das System kann die angegebene Datei nicht finden.')

    The last sentence in the message is german and means:

    "The system cannot find the specified file."

    This sentence probably would, in case of this error, pop up in your local language.

    This message means that your installation of the game ist not correctly registered, and the LIG can't find your game directory. To solve this you have to create a new string in the following registry entry:

    HKEY_LOCAL_MACHINE\Software\Maxis\SimCity 4
    Label this string "Install Dir" and edit its value to your game directory, e.g. "C:\Program Files\Simcity 4".

    Since the game actually does run fine without an installation, this probably happened because  of just copying the game files from another computer or disk.

    And, of course: A BIG Thankyou, Wouanagaine! Definitely a great toolset!

    Share this post


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

    @Jason: Nothing too serious. If the preview PNG is missing, the exported HTML will show a red "x", because no JPG file was created. And as you probably know, it's not possible to upload the file to the official Maxis exchange anymore. 2.gif

    @Lord Kronos, wouanagaine: I had some trouble with importing the XML file into Excel and Access (Office XP version). Some of the fields, such as tileset, zoning etc. were broken into multiple lines, resulting in four different tables in Access, for instance. But to my surprise, the HTML import filter worked pretty well in Excel. Again, some fields were broken into multiple lines, but I fixed that by replacing the "br" with a comma in Notepad. Then I ran some "Search & Replace" sessions to change some things, i. e. converting "Chicago" to "Chi", "New York" to "NY" etc. to save space. After that, I separated residential, commercial and industrial in three sheets, and finally, I grouped the lots into "lowrise", "midrise" and "highrise" and sorted those alphabetically. Now I have an extremely convenient list of all installed growables, subdivided and sorted to my liking. 4.gif

    Share this post


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

    Dr. Neitchskrimfrauwnmoya Thx for your support !

    scorer You seems to reply to yourself ? or did someone delete the post your replying to ? Of course I will not take any actions to correcting something that does not work on a pirated copy.

    Jacon As Andreas said, nothing serious.

    Andreas I'm not expert in xml/xsl, that is why I break fields that can contain multiple value in different xml nodes. How do you find the 'lowrise' 'midrise' 'highrise' category ? I can only do it visually. But maybe there is a field in the lot/building examplar that can be used ? About sorting to anyone liking, there is a xsl instruction to sort xml nodes, but I still have to find how to build the sort criteria when I want multiple keys ( ie sort by RCI then by Wealth then by stage etc... )

    Share this post


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

    No, I'm not talking about a pirated copy :-) I'm just too lazy to reinstall the game after reformatting my hard drive or switching the computer, so i just copy the game directory. You still need the CD to run the game. Saves a lot of hassle... until yesterday!

    Since some posts of others explain that they use the game in the same way, I wrote the above post for anyone who runs into the same problem as I did. Just wanted to help :-)

    EDIT: Of course, you could just reinstall the game to solve this issue.

    Share this post


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

    Thank you so much for making these wonderful programs Wouanagaine! They make everything so much easier...

    4.gif4.gif4.gif

    Share this post


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

    Originally posted by: wouanagaine 

    How do you find the 'lowrise' 'midrise' 'highrise' category ? I can only do it visually. But maybe there is a field in the lot/building examplar that can be used ? quote>

     

    Yes, of course I did it only visually. In many cases, low-rise buildings are stage 1 to 3, midrises are 4 to 6, and highrises 7 and 8, so I took these as a basic reference. But obviously, there can be exceptions, which I sorted out manually when the difference was too obvious (I also made a special list of the "mega lots" I have installed). Since it's a personal list of my plugins, the approach might not work for others - like T Wrecks, I have adopted a specific playing style, which suits the management of my plugins as well. The main reason why I described the process is to demonstrate what can be done with your tool - it's indeed more than a simple list generator, but a very useful analyer tool for various purposes. 4.gif I think I will import the Excel file into Access and add custom filters, so I can generate reports for specific tilesets, lot sizes etc. (i. e. to create a list of all Houston skyscrapers).

    Share this post


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

    Originally posted by: wouanagaine T_Wrecks I see your point with the size in term of uploading. It is quite bad that Maxis made a png instead of a jpeg, as you see the SC4LIG save them as jpeg and each pic is around 6ko. better than 30ko. But I hope SC4 don't load the png as there is no need for it in game.quote>
    I'm absolutely not worried about the pics in the HTML table, and I'm not worried about the size of the SC4LIG thumbnails. What I care about is the size of those PNGs inside the file.

    Now you've hit a very interesting point here: Does that PNG actually get loaded? All files contain a DIR sub-file, which lists S3D, FSH, XML, and exemplar files. Does this mean that the game opens a file, reads the DIR, and then reads the files listed by the DIR? And finally, files that are called by those files listed by the DIR? For example, LTEXT files for item descriptions which are called by an "item description key" property in the building exemplar, which in turn is listed in the DIR.

    If this was true, chances are that the LE preview PNG would in fact not be loaded at all, since I don't know of any property that would relate to it. Then the question arises whether sheer file size matters for the game: Does the entire file have to be opened before the game can search it for useful content, or is the header enough (which should be of equal size independent from the size of the entire file)? Does it matter in terms of loading speed and memory usage whether the game loads 1,000 files of 30 kB each and then skips the PNG, or whether it loads 1,000 files of 3 kB each?

    SC4LIG aside, this would be interesting to know. What about you BSC people, who have researched similar things during the Miramba experiments? Can anybody shed some light on that issue? Perhaps you have gained some general knowledge about the way SC4 loads plugins which enables you to draw some conclusions here where I can't.

    Originally posted by: wouanagaine

    I was not aware that the png can in some case not reflect the actual lot, so  if I really want a picture of it, I should make use of the S3Ds , textures etc,  like the lot preview in iReader ?quote>

    Well, if you make an automatic solution, that LE preview PNG is really all (and hence, the best) we have. The S3D and FSH files tell about the building only, but don't permit to even guess what the lot looks like. In the worst case, this would apply to the LE preview of some custom buildings, too. But if you take the S3Ds or FSHs, it would be like this in all cases.

    -=| You can choose a ready guide in some celestial voice ||| If you choose not to decide you still have made a choice |=-
    -=| You can choose from phantom fears and kindness that can kill ||| I will choose a path that's clear - I will choose free will |=-

    Share this post


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

    AFAIK, the DIR entry list only the compressed entries. But all files have a structured header that list all entries ( compressed or not ). I will be very surprised if the game load everything.

    Based on some experiences and assumption, the initial loading time is the result of SC4 scanning files for collection all TGI and load the need resource for the region view. The load time between region->city, is where I think the game actually load the real data ( S3D textures etc.. for example ).

    I made an experiment few months ago as BSC team did, about loading time, the result I had where shown https://www.simtropolis.com/forum/messageview.cfm?catid=40&threadid=81330&enterthread=y" target="_blank">here

    As noted in that thread, I now only work with huge mega packs, exactly I have 1.7go of plugins in 36 dat files. The png are still in them, but I can remove it to see.

    Share this post


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

    hey again, woug, i hate to cause so many problems, but it didnt work again! this time it stopped on the "extracting and saving lot images" with this error:

    Traceback (most recent call last):

    File "SC4LotInfosGenerator.py", line 892, in OnStart

    File "SC4LotInfosGenerator.py", line 611, in GenerateLotInfos

    TypeError: unsubscriptable object

    also, when i downloaded the new version of the patch that u posted yesterday, i didnt see a XSL file. Am i missing something very basic, is there something wrong with my plugins, or is it just because the program is still ebing developed?

    Sorry to cause more trouble lol 43.gif

    Share this post


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

    Freedo50 I use the same url for patch, so I just have to update the zip and not the post to edit the link ( I will change that in next patch release ) LordKronos get the same error when he downloaded the latest patch update. You may have to flush your internet cache or similar actions. As you still have the same error and no xsl, you certainly have downloaded a cached version ( hence the same error ).

    Share this post


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

    SC4LIG patch updated ( see first post in page 1 )

    The new patch add more informations to the infos.xml file. I still need to add pollution, capacities, building worth stats.

    To get rid of the internet cache problem, the patch is labelled SC4LIGV4Patch.ZIP and when you run the tool, it will display patch V4 on the title bar.

    I focussed the update on the xsl/xml integration so you can select what information you want to see.

    After the process, the tool will open the SC4InfosViewer.html which is a container for the xml and provide you filtering options.

    Tell me what you think of it. And if anyone with javascript xsl/xml want to help and modify/enhance the files , please do so and PM me the mods ( you will be credited of course )

    Share this post


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

    I just downloaded the prog and patch for the LIG, but all I am getting is a blank, black webpage

    There is a zipped up file called library in the prog file, but it keeps saying it is corrupt when I try to unzip it

    Share this post


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

    In addition to the above, there doesn't seem to be an .xsl file in the main download for the one in the patch to replace

    Share this post


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

    and the patch download is being called sc4ligv4patch.zip, not just sc4ligv4.zip as you say 2 posts up. the main lig dl still says v2, is this correct? Hmm...what else...I gues I should have spent more time befrore my first post, sry ;-)

    Share this post


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

    kdpflush

    I've just redownload the 2 zips to make sure I update everything correctly, and it is ok

    there was not an .xsl in the initial zip. I just wrote 'replace' because of those who got a previous patch

    so back to your bug :

    I just throw ideas because I have no specific clue :

    can you open the infos.html ? Does it show anything ?

    do the program created a 'Images' subfolder and is there any images in it ?

    can you open the infos.xml ( with IE or FF , drag&drop it on your webbrowser ) ? Does it show soemthing ?

    what is your browser ? FireFox InternetExplorer or another one ?

    in the tool dialog box:

    does the simcity_1.dat is correctly detected ? the box should have something like that c:\PROGRA~1\Maxis\SIMCIT~1\

    does your plugins folder is correctly located ?

    When you click start, does it show progression and the name of files it process ?

    Edit : Friendly reminder, there is an "edit" button to avoir triple post 4.gif. Thx for pointing the name. You have the correct one. I'll edit my previous post

    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

    Sign In to follow this  

    • 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