Jump to content

35 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hi all,

This tool is for editing SimCity 4 files. It includes some functionality similar to ilives Reader & also Region Census tool (ie full Region Viewing). For a full list of features, including known issues, please see the included Readme.txt.

Link:
SC4Reader
(locate relevant version, unzip & run, no install required).

The program also needs the following Microsoft's mfc.dll if you don't have it already, need to install vcredist_x64.exe &/or vcredist_x86.exe redistributable package;
http://www.microsoft.com/en-au/download/details.aspx?id=40784

This is a WIP so any bugs/issues etc, please post detailed system specs including a detailed description of what you were doing.
Any other feedback/suggestions is more than welcomed.

Program source code link:
source code
A very special thanks to ilive & his reader source code, some of which this program is based. Feel free to ask any questions or give suggestions regarding source code. Program is written in c++/MFC.

cheers :).

Some basic pictures & notes now added. In the following for each (note images may not be upto date);

Main Window
1. Make sure options are set before using program as some functions rely on folder settings.
2. Loaded *dat is for anything that's been opened, inserted, or virtual dat. Other is for Find functions but only for non-loaded file.
3. Just shows file names of files in plugins, install & other etc folders as per options settings. These can be selected & file loaded.
4. Virtual *dat; loads install, plugins, &/OR other as per options settings. Note: this loads header & index info only. Upon selecting item in main list it will load what it needs for item selected.
5/5b; Displays item info for item selected in main TGI List. 5b can edit TGI.
6/6b; cross-checks TGIs against Install &/or Plugins as per options settings. Depending on size of plugins & PC specs, full scan may take 30+minutes & generates a *.txt file with possible conflicts. 6 does a comprehensive scan, 6b only scans what's been selected in a loaded *dat.

lEKR5rF.jpg

Options Window
1. Add folder/file type; you can add multiple folders/files here. For folders, the program will automatically search subfolders so you don't need to add them separately & doing so may cause problems.
The rest of the options should be self explanatory. Changes to settings do require program be restarted.

ksitgd4.jpg


Display Type:
Default/Hex/Text; Default = default mechanism how the program handles TGI item. Files like RUL are not handled like a text file by the program, but you can choose Text here to view/edit like a text file.

l93sD8Z.jpg

Error Message;
Shows error message on exit if program had an issue loading a *dat type file. You should check the logging.txt for details if you encounter this.

IHu5cWN.jpg

TGI/Plugins scanner;
1. Is the main file being checked against.
2. Shows other info including (other) files currently cross checking against 1 above. These will get repeated (in case of Plugins scanner) as program loops through each file cross checking against each other file.

i1UBNDL.jpg


TGIs.ini file (located in settings folder)
This file contains settings relating to assignment & descriptions of TGI items for the program (including for the main list, Filter, Search functions & Tree). This file can be added to &/or changed by end-user if necessary.


Crash Reporting
If program crashes the following should appear;
You'll need to click on link in the 1st window to display 2nd;

IQxrMrN.jpg

Export function will save contents of dump, XML & screenshot to zip file. Feel free to upload that here. This should help me pinpoint any issues with crashing/hanging.

 

  • Like 6

Share this post


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

Wise guy!  OK, I picked that up and will install it in my current wine prefix.  I also grabbed the MS file although I think I am OK on that.  I hope this is easier to use than the reader.  I used to be quite OK with arcane stuff but I've lost my taste for bit bashing since I retired.

 

LATER:

 

Most intriguing.  I tried the plugins scan, and it seems to go into a loop.  How many times do you pass over the list?  Also the dialogue box for that function needs to have size handles.  I have very deep structure in my Plugins folder and would like to make that form wider by about half.

 

My current wine prefix includes the 2010 C++ run time, so I didn't need the MS download.

 

In the configuration section, for some reason I couldn't set the language string.  Everything worked except it wasn't set.

 

Now for the interesting part, old man.  I am running Ubuntu 14.04 with wine-1.7.17.  If you are interested, here is the gory detail of my hardware configuration (be prepared).

 

I guess I should be thankful you didn't use .NET for this, but that could very well run under mono which is also loaded on my wine prefix.

 

Next question: Why do modern programmers mess with the default form layout?  The size handles should always be available.


  Edited by A Nonny Moose  
  • Like 1

Beware: Emancipated user.  No Windoze for me.
The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
If you always do what you've always done, you'll mostly get what you've always got.
JohnNewSig.gif
"We have met the enemy, and he is us" - Walt Kelly

Come join us at the Moose Factory

Share this post


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

    Thank you for your input.

    That is quite the hardware :ooh:.

     

    1. Plugins Scanner (full or just plugins folder): It iterates through each file that's loaded (as per folder settings) & compares against each other file index. ie load fileA & load fileB-fileZ whilst comparing Index TGI. Then load fileB, load fileC-fileZ whilst comparing index etc. For every file it loads, it will compare this against all other *.dat/*lot/etc type files in the relevant folders.

    2. 2010 C++ run time: as I'm currently reworking my project, next (or maybe one after) version won't need that anymore, as I'll probably incorporate that into the exe.

    3. Size handlers: you talking about the ability to resize (any) windows/frames/dialogs? I've made note of that.

    4. Language: dialog box wouldn't come up or it just wouldn't set? If need be it can be manually set in the settings.ini file (without quotes) "Language=full path name here ie C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\English\SimCityLocale.DAT". I've made a note of this though. At this stage it isn't really used except for filelistingspane & TGI/Plugins scanner.

     

     

    Quite some time ago when I was looking at what language to learn C++ came up as my preferred choice. This program is just something I'm doing in my spare time. It has a few issues/bugs/shortcomings that I'm aware of, but still useful none the less. Particularly the effects dir editor :kitty:.

    Share this post


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

    an update has been done. see my first post for link.

    summary of this update;
    Changes to option settings.
    File Listings view filter added.
    virtual dats added.
    Separate search functions for TGIs & data.
    TGI/scanner improvements.
    Sorting for effect dir columns.
    Exemplar/Cohort; edit/save validation & add/delete property.
    Exemplar/Cohort; Text based files will get auto transfered into binary on item edit/save.
    Various other improvements, fixes & adjustments.
     

     

     

    Next question: Why do modern programmers mess with the default form layout?  The size handles should always be available.

    For this release, where relevant, I've tried to make sure most dialogs are sizable ;) . Actually implementing this hasn't been that hard & it's actually come in handy.

     

    Share this post


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

    an update has been done. see my first post for link.

    summary of this update;
    FSH view improvements.
    FSH->BMP Colour/Alpha export function. Works similar to standard export function.
    RUL Tile viewing: Currently only handles/displays FSH type items. Excludes Bridge RULs & Intersection Ordering RUL. S3D viewing at this stage will probably be awhile off.
    And some bug fixes.
     

    Share this post


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

    update done. see first post for link.

    update summary;
    AVP & HLS adjustments.
    config editing added.
    LEV editing added.
    LogicObject editing added.
    TRK editing added.
    some bug fixes.
    Crash Reporting added (see bottom of first post for picture/info).

     

    Share this post


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

    update done. see first post for link.

    update summary v1.3.4 & notes;
    Auto Fill List option added - under options settings.
    Default Hex column width option added - can also be overriden in hex view itself.
    File List load bug, Path Tile overhead bug, other fixes & improvements.
    XA playing added.
    S3D viewing added.
    RUL Tile viewing: S3D viewing added - S3Ds are shown "as is" ie are not rotated like FSHs are. You can also select "Load Pref" S3D or FSH, if it can't find first preference it'll load 2nd if it exists.
    Path Tile viewing: FSH/S3D viewing added - FSH/S3D related file are shown "as is" & loaded according to path file GID.

    Share this post


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

    just a really minor update;

    1.3.4b summary;
    Filter added for Tree.
    Improvements to Exemplar/Cohort - improvements made around editing/adding of properties. Any new properties added should now save in ascending order, & for lotconfigs these should now save in sequential order. Better save validation & save/error message also added.
    Save bug fix.
    And minor update of TGIs.ini.
     

    Share this post


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

    update time ;D

    see first post for link.

    1.3.5 update summary & notes:
    Exemplar property object viewing & option added.
    Exemplar property help info added.
    Exemplar/Cohort grouping by property type on tree.
    Intersection Ordering RUL added to RUL Tile Viewing.
    Bridge RULs added to RUL Tile Viewing.
    Auto Display Edit option added.
    Data Type Searching added.
    Virutal dat remove file bug fix.
    TGI.ini updated.


    Exemplar property object viewing
    Any property of type UINT32 (& ParentCohort) that points to any other type of file should display that particular object/item. As there's quite a few some may of been missed &/or incorrectly handled. Please let me know of any issues.

    Exemplar/Cohort grouping by property type on tree
    Extra layer has been added on Tree for property type. Improvements have also been made to Tree & TGI.ini also updated. This should now provide for much better filtering of files.

    RUL Tile Viewing: Intersection Ordering RUL / Bridge RULs
    -IntersectionOrdering RUL: once "AutoTileBase = 0xIID" is selected it will (attemp to) load S3D file(s) (all 256). You can select drop down box to view relevant IID of tile grid ie across/down.
    -Bridge RULs: on ""piece <0xIID, 1>" select similar as per above (similar for dual network bridges).

    Data Type Searching
    Located on Tree as a drop box for different file types. This allows for searching/locating of set properties. Currently added is property searching for Exemplar/Cohort, ATC, TRK, HLS files.


    Other:
    Some aspects have had implementation changed, so hopefully it hasn't broken anything. As usual any feedback more than welcomed.
     

    Share this post


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

    1.3.5b update summary & notes (link on first post/page).
    Lot Data dependancy list bug fix.
    Tree node bug fix.
    Data Type Data Searching added: located on Tree.
    Data Type Property searching: LotData type files added. ParentCohort also added as an item that can be searched (under Exemplar/Cohort).

    Other fixes, adjustments & improvements.

    Share this post


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

    just a small update;

    1.3.5c update summary & notes (link on first page).
    Open dat file function added to Exemplar Object Viewer.
    Several new functions added on main list, as follows (ie mouse right click);

    Loaded *dat tab
    -Goto function (Prev/Next); for "Location" goto, this works best if list is sorted by Location.
    -TGI Mass edit.

    Other tab
    -Open dat file; opens given dat file in new application.
    -Add to loaded dat; this adds selected items to loaded *dat.
    -Export TGI(s) & Export to *dat; same as existing functions.
     

    Share this post


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

    1.3.6 update summary & notes (link on first page).
    S3D Editing.
    S3D Material custom profile settings; this allows you to create multiple custom profiles relating to Material Settings & will set relevant items for any new rows/materials added.
    S3D searching added to Property type searching.
    S3D searching added to Data type searching.
    Goto & search added within Text-based files (excluding LText).


    merry xmas  :bunny:

     

    Share this post


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

    1.3.7 update summary & notes (link on first page).

    T/G/I Filter added to context menu.
    Virtual dat clone bug fix.
    S3D improvements.
    Stats dialog added.
    Large address aware update.
    Dialogs focus update.
    other minor fixes.

    S3D improvements:
    -Alpha threshold added. Settings.ini updated as result.
    -"Apply Profile" added. This will apply selected profile to given row item.
    -TGI/Location & path info added for Mats & can be found in grid itself by hovering mouse over cell(s).
    -Open *dat function added to mats menu. This will open file location of where material is located.
    -View Texture, wireframe, both.
    -Select given group(s) to view.
    -zoom, move etc; using scroll &/or -/+ keys. Model must have focus in order for this to work.
    And others I've probably forgotten.
     

     

    some piccies showing recent additions;

    Stats dlg;
    -Provided options are set correctly, provides info for your installation & plugins folders;
    -if you load a file &/or virtual *dat it will also provide stats on TGIs;
    M2WXT6L.jpg


    S3D->Edit->Mats tab;
    TGI/Loc/Path info; If you wish to copy just this info you need to CTRL+C on the cell itself. Alternatively right click, select all & copy.
    yl7h2ao.jpg


    S3D->Edit->Mats tab->context menu;
    Like the profile drop box, any custom profiles you create should also appear in this menu for you to select & apply to the current selected row;Hb1HZCV.jpg

    Share this post


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

    1.3.8 update summary & notes (link on first page).

    HLS files; Object Viewing added (XA/TRK).
    ATC files; Object Viewing added (FSH/AVP).
    RUL Intersection Ordering: Object Viewing added (PATHS, S3Ds, LTEXT; currently excludes EFFECTS).
    S3Ds; UV Map added.
    Application ICON udpated.
    Open *dat improvements.

    RUL Intersection Ordering: Object Viewing added;
    Relevant item will load object as follows on row selection;
    -AutoTileBase; loads Exemplar data. All 256 tiles.
    -AutoPathBase; loads path data. All 256 tiles.
    -PlaceQueryID & ConvertQueryID; loads LTEXT item.
    -Piece       = 0.0, 0.0, 0, 0, 0xIID; loads model.
    Effects object viewing via RUL is currently not handled.

    Open *dat improvements.
    -Object viewer Open *dat functions; provided auto fill list in options is set, will now highlight TGI item once file has loaded.
    -short cut command can be used to load file (& location if necessary) by adding following at the end;
    "File:fileFullPath" "Loc:Number"
    for example;
    "C:\MyDocuments\SC4Reader.exe" "File:C:\MyDocuments\SimCity 4\Plugins\MyFavouritefile.dat" "Loc:1234567890"
     

    Share this post


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

    update  1.3.9 notes - see first post for link;

    S3Ds; several functions added.
    shortcut commands added; "File:Virtual dat", "File:Virtual dat\All", "File:Virtual dat\Plugins" & will load accordingly.
    Path files; path editing & functions implemented, including context menu (ie right mouse click). Items in the list itself in the columns can be changed, & for the points in the grid itself.

    Below are some pics of path files now;

    RzII1bk.jpg

    CjXzBfI.jpg

    wHkGhKm.jpg
     

    • Like 1

    Share this post


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

    update 1.3.9b;
    PNG/FSH Image display fix; somehow I mucked something up in previous release. This fixes it.
    Path Swap XY function added.
    Path Save validation added; validation is not 100% perfect however for the most part it's accurate.
    Paths; show points option added.
    Paths; mouse can also be used to select/move points/paths on overhead view while viewing single line items.
    S3D->Vert: reSize function added.
    View change bug fix.
     

    Share this post


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

    update  1.4.0 notes - see first post for link;

    HexView: HexEditing; changes can now be saved.
    Options; Region folders added. Only need to add "Region" folder, not subfolders.
    File List (see image below); Region folders & cities added (requires above option to be set). Whole Region folder (all *.sc4 in region) or single city can be selected & will load.
    File menu; Open Region function added. Loans whole region *.sc4.
    Minor changes to TGI.ini.
    A number of save game files (partially) displayed.

    sample;
    KaTI72h.jpg
     

    • Like 1

    Share this post


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

    update  1.4.1 notes - see first post for link;

    All image types (excluding FSH); Alpha channel now displayed.
    Whole Object Viewing; LotConfig(T0x10) & NetworkLots(T0x21) type files.
    Cohort Child viewing; lists all direct Cohort/Exemplar children.
    NetworkPiece ID dialog tool added.
    Other improvements & items mapped.

    This update will probably have some issues with it due to nature of features rolled out. Please let me know if you come across any.

    cheers

    Sample pics;

    Bn1lcan.jpg

    C0643Tx.jpg

    75Djh7w.jpg

    eMbYjZ9.jpg
     

    • Like 1

    Share this post


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

    update  1.4.2 notes - see first post for link;

    Region View tool added (only Satellite view currently). Tools -> Region View. Minor texturing issue exists with some regions/cities.
    AE (partial) editing.
    City names displayed on Tree items for loaded Regions.
    Filter added to Hex file compare.
    Mayormode view bug fix.
    Show In Tree crash fix.

    EtjaqhM.jpg?1

     

    • Like 1

    Share this post


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

    update  1.4.3 notes - see first post for link;

    Region View Transport map view added.
    Texture issues should be less noticeable.
    Region file more data parsed/displayed.
    shortcut command; "Region:RegionName" function add. Shortcut command in the Target box may look something like;
    "C:\Users\Home\Documents\SimCity 4\Program\SC4Reader\SC4Reader.exe" "Region:Australia"
    And it will load said region on program startup.


    d3Vq7sd.jpg?1

    • Like 1

    Share this post


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

    update  1.4.4 notes - see first post for link;

    Tree refresh display City names bug fix.
    Tutorial Subfile parsed.
    Mayormode view parse bug fix.
    Region File mostly parsed.
    City Requirements display bug fix.
    Budget files mostly parsed.

     

    Share this post


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

    update 1.4.5, 1.4.5b & 1.4.6 - see first post for link.
    T/G/I filter; multi filtering added.
    Export TGI; FSH2PNG blend export option added.
    Export TGI; Prefix, separator & suffix added, allows for customizing relevant start/separator/end of T/G/I. Only for 0xTGI exporting.
    Can export any file either by custom name or T/G/I etc plus options.

    Accessible via main list right click -> Export TGI(s) & it will open up prompt for which you can set some options. Once you click "Apply" the usual save dialog will display & save depending on options chosen. Be extra careful using the Export TGI(s) function when exporting, particularly large number of files & particularly using 0xTGI export, as once saving starts it won't prompt for file overwriting, so best to create new folder when exporting.

    Export_TGIs.jpg
    When save dialog comes up once you click apply;
    Custom name option obviously just name whatever you want to save.
    0xTGI save option; formats to use is
    "0xTGI"
    "0xTI"
    "0xGI"
    "0xI"
    without quotes & as is. ie don't use 0x12345678 for IID, just input 0xI.
    For either custom/0xTGI save options;
    In save dialog box you can input your own custom extension if you want to with/without any of the "Include" options, for example;
    0xTGI.abc
    and it will save any relevant files with that extension regardless of actual file format.

    Include options;
    -File Extension option is internal file type.
    -rdr file is as per current, and is a helper extension required for importing TGI files.
    -TGI info file is just txt file with TGI info.

    FSH->Animations added.
    FSH->Animations->Export added. Whichever of; "Color, Alpha, Blend" tab is selected/active, will be exported.
    Export TGIs->FSH->Animation->Blend added.
    Auto Play animation option added.
    Zoom added to images.

     


      Edited by Tropod  

    Share this post


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

    1.4.7 update
    Batch exporting added & accessible via main menu (ie right mouse click). "a" keyboard button can also be used for batch adding of selected files.
    S3D->REGP tab & editing added.
    S3D->PROP tab & editing added.
    Export TGI(s) ->S3D->3DS added.

     

    Share this post


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

    v1.4.8 update
    AB UDI sounds playable.
    AB->WAV export option added.

    A big thanks & shout-out to id-daemon2 & co @ http://zenhax.com for assisting with deciphering .abk sounds.


      Edited by Tropod  

    Share this post


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

    Update v150
    UI Editing. ie remove, add, editing line items etc via dialog &/or right mouse click.
    gui_tags.xml file added to assist UI editing. This xml file can be edited.
    Minor UI improvements. Some short comings still exist though.

     

    Share this post


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

    SC4Reader don't launch at all for me, then it opens a dialog box and writes: "The instruction at 0x00932c72 referenced memory at 0x00000028. The memory could not be read."

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

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

    Register a New Account


    ×

    Thank You for the Continued Support!

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

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

    Make a Donation, Get a Gift!

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

    STEX Collections

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

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections