Sim City 4 Devotion Forums

Sim City 4 Devotion Tools => Tools - General Discussion => Topic started by: Tropod on February 05, 2014, 03:32:52 PM

Title: SC4Reader Tool
Post by: Tropod on February 05, 2014, 03:32:52 PM
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 (https://www.dropbox.com/sh/9b07fqiaew7g2ct/AACkOA9VqFofwJcTuIIJeQfda?dl=0)
(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 (https://www.dropbox.com/sh/7rq48p6056icsyn/AACt0bszlmvYI9fthbJjZR16a?dl=0)
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.

(http://i.imgur.com/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.

(http://i.imgur.com/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.

(http://i.imgur.com/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.

(http://i.imgur.com/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.

(http://i.imgur.com/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;

(http://i.imgur.com/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.
Title: Re: SC4Reader Tool
Post by: memo on February 05, 2014, 03:56:36 PM
Tropod, this is great! What language is this? I started something similar a couple of months ago, at least I think it is, but stopped working on it when I couldn't come up with suitable concurrency measures. Now, seeing that you provide us with a new tool is a relief.

I can't even start it though – it exits with "ERROR Creating InitContext", followed by "Error: Could not create the shader program". My System is Win7 Professional SP1, 32bit.
Title: Re: SC4Reader Tool
Post by: memo on February 06, 2014, 02:11:16 AM
I still get the same error with the updated version though. My graphics card is Intel HD 3000; I am running Bootcamp on a MacBook Pro, if it matters. I don't know which version of OpenGL I have.
Title: Re: SC4Reader Tool
Post by: Tropod on February 06, 2014, 03:10:31 AM
I still get the same error with the updated version though. My graphics card is Intel HD 3000; I am running Bootcamp on a MacBook Pro, if it matters. I don't know which version of OpenGL I have.

I've done a quick google search & I'd say that's the most likely issue, your HD3000. I have same problem on another WinXP PC. At the moment it doesn't support OpenGL 3.2 or lower, next version I'll probably just take that out for now as the paths are the only thing using it & they're buggy atm.
Title: Re: SC4Reader Tool
Post by: droric on February 06, 2014, 04:07:48 PM
I just attempted to run this on my Windows 8.1 machine and it shows SC4Reader is trying to recover your information... for 10-20 milliseconds then the program just closes out.  It was quite difficult to get a screenshot of it.  My specs are in my sig :)

I also tried to modify \Settings\Settings.ini to match my system but I still receive the same result.



EDIT:  This only occurs when launching the application from within an RDP session, it works properly when launching from VNC or such.  I do alot of my SC4 stuff at work ;) shh don't tell

(http://i.imgur.com/1Sl3xRz.png)
Title: Re: SC4Reader Tool
Post by: mrbisonm on February 06, 2014, 04:42:15 PM
........it says: * Can't find mfc100u.dll *


?????
Title: Re: SC4Reader Tool
Post by: droric on February 06, 2014, 07:54:19 PM
........it says: * Can't find mfc100u.dll *


?????

I believe you need the Microsoft Visual C++ 2010 SP1 Redistributable
http://www.microsoft.com/en-us/download/details.aspx?id=8328
Title: Re: SC4Reader Tool
Post by: mrbisonm on February 06, 2014, 09:22:58 PM
........it says: * Can't find mfc100u.dll *


?????

I believe you need the Microsoft Visual C++ 2010 SP1 Redistributable
http://www.microsoft.com/en-us/download/details.aspx?id=8328



Thanks, appreciated. ;) Now it works.
Title: Re: SC4Reader Tool
Post by: droric on February 07, 2014, 09:18:34 AM
........it says: * Can't find mfc100u.dll *


?????

I believe you need the Microsoft Visual C++ 2010 SP1 Redistributable
http://www.microsoft.com/en-us/download/details.aspx?id=8328



Thanks, appreciated. ;) Now it works.

The amount of runtimes made available over the years has gotten a little bit out of hand  :D

http://i.imgur.com/OMVoBOo.png
Title: Re: SC4Reader Tool
Post by: cogeo on February 07, 2014, 11:49:11 AM
There is an option in the Project Settings that cause the MFC code to be included in the executable. The executable gets bigger (at least 4MB), but the application has no external dependencies. Maybe you should consider setting this option, at least for the release version.
Title: Re: SC4Reader Tool
Post by: Tropod on February 24, 2014, 04:16:23 AM

@droric
Thank you for pointing this out (ie mfc100u), I'd forgotten about it.
Regarding the RDP session: are you referring about remote desktop connection? I'm not overly familiar with this in programming environment, I also don't have Win7/Win8 (maybe in few months). I take it it's working ok now?

@cogeo:
There's pros n cons for including redistributables & at this stage I don't have any plans to include that. Perhaps down track though.



I'd be interested in any performance issues/bottlenecks anyone encounters, particularly with the viewing/editing of large RULs. I know ilives reader has some issues handling the larger ones so I'm hoping this tool helps alleviate that somewhat.

Title: Re: SC4Reader Tool
Post by: memo on February 24, 2014, 06:03:58 AM
I'd be interested in any performance issues/bottlenecks anyone encounters, particularly with the viewing/editing of large RULs. I know ilives reader has some issues handling the larger ones so I'm hoping this tool helps alleviate that somewhat.

While it would be admirable if an application scales nicely, you don't need to worry about the RULs in particular. Nobody in the NAM team actually edits the large RUL files directly anymore, let alone in the Reader. They are all split up into multiple files (https://github.com/BluelightningSC4/Network-Addon-Mod/tree/master/Controller) and get compiled using this tool (https://github.com/memo33/NAMControllerCompiler). This has several advantages, among others: smaller files that are easier to edit and to track, and everyone can use one's favourite text editor with regex searching, syntax highlighting and whatnot.
Title: Re: SC4Reader Tool
Post by: Tropod on February 25, 2014, 02:56:18 PM
....They are all split up into multiple files (https://github.com/BluelightningSC4/Network-Addon-Mod/tree/master/Controller) and get compiled using this tool (https://github.com/memo33/NAMControllerCompiler).

I figured something like that may of been the case; there's nothing like last minute changes :D. I've been out of the game for awhile & so this is just something I'm doing in my spare time for the fun of it really ()testing().
Title: Re: SC4Reader Tool
Post by: Tropod on March 07, 2014, 04:22:11 PM
an update has been done. see my first post for link.

just summary of this update;
Exemplar/Cohort editing.
File listings pane added for all SC4 type files (excluding city type files).
Plugins scanner improved. Can now also scan individual/multiple TGIs for conflicts.
Tree pane & TGI.ini updated. Can now use custom labels.
Various fixes.


EDIT: Just a note about plugins scanner & TGI checker: depending on PC specs & size of plugins:
-full scan may take 30mins + or so.
-individual/multiple TGI checker: anywhere from a minute upwards.


Any questions around these let me know.
cheers  :)
Title: Re: SC4Reader Tool
Post by: Egi on March 18, 2014, 02:00:15 PM
Nice tool :)
What I miss so far is an option to cancel the conflict scanner.
May I ask why you made you own tool instead of improving the ILives Reader?
Title: Re: SC4Reader Tool
Post by: Tropod on March 19, 2014, 04:46:11 AM
Thank you.

I've made note about conflicts scanner. Will try to have that in next version.

ilives Reader is wonderful/awesome/priceless tool, using & improving upon the source code on the other hand is easier said than done & is quite challenging to get ones head around, hence why making my own tool. This also gives me more control over what I want to do. For example, for the next release I hope to allow (full) editing of the effects dir & I am 4/5ths the way there  ;).
Title: Re: SC4Reader Tool
Post by: Tropod on April 02, 2014, 06:26:42 AM
update done, see first post for link. Summary of this update as follows;

-RUL files; Search & Goto within RULs themselves.
-dat/hex file comparison.
-scanner_compare_list.ini file now in use (used in conjunction with TGI/plugin scanner, if needed). See file for example.
-Various fixes/improvements (including cancel function for scanner  ;) ).

(basic) Editing now possible for:
-ATC files.
-AVP files.
-HLS files.
-Effects Dir - a word of caution though; Nearly all sections/sectors should be editable, however, there are still a lot of unknowns in this file & so I strongly advise referring to specs for this & ensure you back up file before doing so. Also there is no validation. Additionally, any "REP" type items should not be changed as it is currently not handled (ie don't increase Rep value items). String type items though should be safe to increase/decrease.

EDIT:
I've just updated this again, & link will be updated shortly, after discovering a critical bug with find/search function  :bomb:.
Title: Re: SC4Reader Tool
Post by: memo on April 05, 2014, 12:23:56 PM
I have just tried version 124B and I absolutely like what I saw.

A few random bugs (i.e. unreplicable) occured though:
• Sorting by filetype in sc1.dat yielded "SC4Reader has stopped working".
• Cross-Checking TGIs in sc1.dat did not complete. (Not sure what it does anyway. If it completes, it says that no files were scanned)
• Opening any files did not display any content, until restarting the program.

Also, when opening a file, the window size changes.

Loading a 60 MiB RUL file works flawlessly. I could do without the line-based editing approach, but a monospace font in the text editors would be immensely useful, as well as an option to select a fixed column number in the hex editor.

The EffDir editing functionality will be very convenient for creating puzzle pieces.
Title: Re: SC4Reader Tool
Post by: Tropod on April 06, 2014, 04:42:28 PM
@memo
Thank you for the feedback.

With the bugs; I'll take a closer look at these to see if I can't pinpoint any issues. I'm currently in the process of moving to Windows 7 (finally :'( ), so that may help pinpoint these bugs.

TGI checker & Plugins Scanner:
The plugins/conflict scanner scans & cross references all files (ie installation &/or custom plugins) whereas the TGI checker only checks TGIs selected inside a dat you've got loaded (against all install/plugin files). Both are based on file/folder settings (so 1 possible reason no files were scanned?), as is the File Listings pane. Both load *.dat header & *.dat index, read data & do a TGI compare for possible conflicts.

RULs;
If you go to Options menu there is a text option (default, hex, text), however you may encounter out of memory issue with the larger RULs when saving. Not sure if I can improve upon that or not at this stage, which is why I've take the approach I have. The default view will allow you to save multiple lines of data in the lower section, it will basically insert/append it to the current line/area you're working on.

EffectDir;
Along with Exemplar/Cohort & other files, I hope to allow extra editing capabilities along the way in due course.

monospace font & fixed columns; added to my list. Will see what I can come up with  ;D.
Title: Re: SC4Reader Tool
Post by: cogeo on April 07, 2014, 02:17:24 AM
Just out of curiosity, which library did you use to access DBPF (.dat ) files, perform compressions/decompressions, and read/write exemplars? Did you take code fragments out of the Reader, make your own or find another one?
Title: Re: SC4Reader Tool
Post by: Tropod on April 07, 2014, 04:00:24 PM

@cogeo;
-DBPF access & read/write exemplars; no library. I've just written my own code.
-compressions/decompressions. This is pretty much same as ilives reader, except slightly modified version.

@memo;
I meant to include screen shot before; this is what TGI/scanner should look like while it's scanning;
(http://imageshack.com/a/img21/2194/l0n4.jpg)



I might add some screenies to my first post later. I'm having some issues with my ISP right now, internet barely working  :angrymore:. Think maybe storm we had on weekend is causing some issues  &hlp. I feel like I'm in the 90's again using dial-up.

Title: Re: SC4Reader Tool
Post by: memo on April 09, 2014, 02:48:54 PM
TGI checker & Plugins Scanner:
The plugins/conflict scanner scans & cross references all files (ie installation &/or custom plugins) whereas the TGI checker only checks TGIs selected inside a dat you've got loaded (against all install/plugin files). Both are based on file/folder settings (so 1 possible reason no files were scanned?), as is the File Listings pane. Both load *.dat header & *.dat index, read data & do a TGI compare for possible conflicts.

RULs;
If you go to Options menu there is a text option (default, hex, text), however you may encounter out of memory issue with the larger RULs when saving. Not sure if I can improve upon that or not at this stage, which is why I've take the approach I have. The default view will allow you to save multiple lines of data in the lower section, it will basically insert/append it to the current line/area you're working on.

Thanks for the clarification. The problem with the scanner was indeed that I did not properly set the directories. They seemed right, but weren't actually correct. :-[

Now the scanner works, but gives me the following message, the first time I invoke it:

(http://www.ld-host.de/uploads/images/5e810c7950533942bd5122dec247ada3.jpg)

The second time, the message appears twice; the third time, three times, and so on.


By the way, do you plan to publish your sources some day? I'd find it interesting to see how it all works behind the scenes. I may eventually release my own collection of classes for accessing DBPF files, too.
Title: Re: SC4Reader Tool
Post by: Interoceter on April 13, 2014, 07:31:36 PM
I love the tool; it's coming in very handy. It seems have problems with the floralpreferences exemplar property. This consist of 256 float32 values. Rather than entering them in by hand, I've been working in notepad and copying/pasting them over. Sometimes it works, and sometimes it fails and corrupts the dat file.

Also when I open the property to edit, I seem to have to right click on the property on the right hand pane, then click on the property to ditch the menu, and then go to the edit tab. If I don't right click first, it sits on the exemplar type property. I'm using windows 7.
Title: Re: SC4Reader Tool
Post by: Tropod on April 15, 2014, 02:37:11 AM
@memo
Was this using the TGI checker or full scanner? And are you getting the "!m_Identifier" warning everytime you run the scanner? I'll have to look at some way of better implementing this.
source code: not sure as it's quite the spaghetti really &Thk/(. I've written a handfew programs before but not one the likes of this. It's not real professional & it's over 170MBs in size.
EDIT: I meant to point out/ask, regarding hex view & fixed column width; if you resize the frame it will resize the column width automatically. If this is not suitable let me know. I found ilives reader to be restrictive in this regard so I made sure the design of this was a bit more flexible.


@Interoceter
Thank you for the feedback.
Could you please provide a copy of the data when it's causing it to corrupt? ie the *.dat file itself if possible (just upload here as an attachment). This'll help me track down any issues with this.
Regarding Editing of exemplars; there's a safety check in place to prevent issues if user hasn't selected a property, it shouldn't effect right-mouse click (or left for that matter) though as there's no logic for mice  ()testing()  ()what().
Title: Re: SC4Reader Tool
Post by: vortext on April 15, 2014, 06:11:07 AM
Rather than entering them in by hand, I've been working in notepad and copying/pasting them over. Sometimes it works, and sometimes it fails and corrupts the dat file.

This may actually be due to Notepad. I used the same method when making tree controllers and observed that Notepad will insert a 'hard return' at the end of every line when you save. This is an invisible character which the Reader cannot deal with and consequently all entries following behind a hard return are not pasted over. Though I haven't tried it yet, I wouldn't be surprised if this tool acts similarly.

At any rate, to get rid of hard returns put the cursor at the end of a line and hit 'delete'. If nothing seems to happen, you've probably just deleted the hard return so hit delete again. If the first character on the next line disappears it's good.
Title: Re: SC4Reader Tool
Post by: Tropod on April 18, 2014, 06:59:51 AM
update done, see first post for link. Summary of this update as follows;

-a few fixes. Unfortunately haven't been able to address all recent items that've been mentioned sorry.
-FSH (color) viewing.
-BMP viewing.
-clone function; currently clones TGI file(s) with same TGI, TGIs can be edited/changed though via "Item/File Info".
-export TGI(s) to *.dat. Exports/Saves selected TGIs to a newly created *.dat file.
-export TGI(s); exports selected TGIs individually in their uncompressed state. If you've selected 2 or more TGIs it will automatically save the 2nd/3rd/etc based on the name you've given the 1st in format of "filename_#.extType.rdr" where "_#" is incremented number, "extType" is type of (internal) TGI file it is ie .bmp for BMPs, .s3d for S3Ds, .rul for RULs etc. ".rdr" is ext type for exporting/importing of TGIs. This function will also generate *.tgi text file with TGI inside it which is necessary for importing files properly, otherwise if this is missing while importing files will be allocated "unknown" with no TGI.
-logging.txt implemented. This file currently only logs info relating to a handfew errors around file loading/parsing (no more constant popups). If you encounter an issue please upload logging.txt file along with relevant *dat listed in logging.txt.


Hopefully this'll be the last release I make........on my old XP set up  ;D.
Title: Re: SC4Reader Tool
Post by: memo on April 18, 2014, 05:22:59 PM
Was this using the TGI checker or full scanner? And are you getting the "!m_Identifier" warning everytime you run the scanner? I'll have to look at some way of better implementing this.

Yes, this happened every time I used the TGI conflict checker.

Quote
source code: not sure as it's quite the spaghetti really &Thk/(. I've written a handfew programs before but not one the likes of this. It's not real professional & it's over 170MBs in size.

If you had releasing the code in mind, this might help you to write cleaner code and reduce the spaghetti, but 170 MB is quite a size. Not sure what that would comprise.

Quote
EDIT: I meant to point out/ask, regarding hex view & fixed column width; if you resize the frame it will resize the column width automatically. If this is not suitable let me know. I found ilives reader to be restrictive in this regard so I made sure the design of this was a bit more flexible.

You are right, indeed. That way, I can choose any desired column count – although I have rarely felt the need for anything other than 16 columns in a hex editor.
Title: Re: SC4Reader Tool
Post by: Tropod on April 18, 2014, 05:58:55 PM
Quote
Yes, this happened every time I used the TGI conflict checker.

Can you see how you go with the last version? A warning may come up once, but if this problem keeps happening the program *should* log the DBPF header ID (just first 4 bytes) along with *dat file location. If you can open this particular dat normally, the conflict scanner may be causing false errors (ie not loading properly) :'(. EDIT: if it does, can you post/upload the logging file along with *dat file so I can investigate?

Quote
If you had releasing the code in mind, this might help you to write cleaner code and reduce the spaghetti, but 170 MB is quite a size. Not sure what that would comprise.

By comparison, ilives reader source code is somewhat larger in size depending on which portions of it you reference. I'm hoping that moving to Win7 I'll actually get around to cleaning it all up (it is on my to-do list), possibly even re-working it all from scratch. Just need to see how I go timewise.
Title: Re: SC4Reader Tool
Post by: memo on April 19, 2014, 04:24:45 PM
Can you see how you go with the last version? A warning may come up once, but if this problem keeps happening the program *should* log the DBPF header ID (just first 4 bytes) along with *dat file location. If you can open this particular dat normally, the conflict scanner may be causing false errors (ie not loading properly) :'(. EDIT: if it does, can you post/upload the logging file along with *dat file so I can investigate?

Indeed, the message showed up only once, this time. The logging.txt file contains:

Code: [Select]
Archive.cpp(411): !m_Identifier: 4476744: C:\Program Files\Maxis\SimCity 4 Deluxe\Apps\SimCity 4 StartupManager.dat

I now see the problem. That dat file (whatever it is – I don't know) is not a DBPF file. I have never got the startup manager to work successfully, anyway. The file is attached to this post.

Quote
By comparison, ilives reader source code is somewhat larger in size depending on which portions of it you reference.

Must be due to the language… ;)
Title: Re: SC4Reader Tool
Post by: Tropod on April 20, 2014, 06:02:28 AM
Thank you for uploading that. I've just had a quick look at that file, and as you say it's not a DBPF at all (not sure if that's intended or not, I don't have that app installed), hence why sc4reader won't load it ;). SC4Reader attempts to load it due to *.dat ext but bails as it doesn't recognise header. Good to know it's doing its job ;D........

Well I've pretty much completely moved to Win7  ;D & I must say, I should've done this sooner  &idea.
Title: Re: SC4Reader Tool
Post by: HurricaneMod10 on April 20, 2014, 08:18:50 AM
Is it effect dir is released to be very modifiable with even creating puzzle pieces are look like a add new effect dir yet? I am waiting for come up new Effect Dir should be able to get a very modifiable with even creating severe thunderstorms, microbursts, tropical depressions, tropical storms, hurricanes and even major hurricanes should be on the way with my very own hurricane mod soon.

Thank you for your interesting about the programming in SC4 Reader Tool.
Title: Re: SC4Reader Tool
Post by: Tropod on April 20, 2014, 01:08:45 PM
Is it effect dir is released to be very modifiable with even creating puzzle pieces are look like a add new effect dir yet? I am waiting for come up new Effect Dir should be able to get a very modifiable with even creating severe thunderstorms, microbursts, tropical depressions, tropical storms, hurricanes and even major hurricanes should be on the way with my very own hurricane mod soon.

Thank you for your interesting about the programming in SC4 Reader Tool.

The tool can indeed edit effect dir type files (& many more), much more easily than any other tool (that I'm aware of - someone correct me if I wrong). As far as what *new* can be added, well that's to be seen still; anyone using this aspect should cross reference the format specs. The tool in itself currently does not have ability to add new lines of data, I've done this intentially at this stage to get feedback & to minimise any issues users may encounter with any bugs. Later versions I intend to implement this but again users really need to refer to the specs http://www.wiki.sc4devotion.com/index.php?title=Category:File_Formats (http://www.wiki.sc4devotion.com/index.php?title=Category:File_Formats).
Title: Re: SC4Reader Tool
Post by: Egi on April 21, 2014, 08:54:37 AM
Some of us are on win8 already ... do you want to wait it out again until win 9 comes around? ;)
I like it, but it is not a must have update like win7 compared to xp or vista was *G*

Advertisement aside, what I actually want to know, are you going to upload the sources for the reader on a platform like sourceforge someday under whatever licence?
Just in case that you stop the development of that tool, so that others can continue where you left off.
Title: Re: SC4Reader Tool
Post by: Tropod on April 22, 2014, 05:36:40 PM
Some of us are on win8 already ... do you want to wait it out again until win 9 comes around? ;)
I like it, but it is not a must have update like win7 compared to xp or vista was *G*

Advertisement aside, what I actually want to know, are you going to upload the sources for the reader on a platform like sourceforge someday under whatever licence?
Just in case that you stop the development of that tool, so that others can continue where you left off.

I don't like Win8 at all, but not going to discuss that  $%Grinno$%. ilives Reader source code can be found on sourceforge. As for source code for this; as I've stated, not sure if I'll be releasing sourcecode for this. If/when I do certainly not going to be anytime soon, as I'm currently reworking & tidying it all up (& I'm still transitioning all of my stuff to my new setup). Maybe then I will ;D. As for now, I haven't left/taken off $%Grinno$%. It might just be a little while before next version comes out, which I'm hoping will support 64bit.
Title: Re: SC4Reader Tool
Post by: HurricaneMod10 on April 23, 2014, 05:39:20 AM
I normally have got a winXP service pack 2 but Win7 as well.
Title: Re: SC4Reader Tool
Post by: NCGAIO on April 23, 2014, 09:59:41 PM

Regarding EffDir
Will be possible to view the relations between sections in future?


Any chance to implement sorting ?


(https://lh4.googleusercontent.com/-u1idy1324PI/U1pbAxyHt9I/AAAAAAAACWw/1FQWV7jHcO0/w510-h91-no/SORT+PARA+SC4READER.jpg)
Title: Re: SC4Reader Tool
Post by: memo on April 27, 2014, 05:31:38 AM
Testing v125:

I tried editing an exemplar file. What I did exactly is appending 4 characters to its exemplar name property. Afterwards, the exemplar was displayed corruptedly for all the properties following the exemplar name. To my surprise, after saving the file, the exemplar was not corrupted at all, but the change of the exemplar name was not saved either. Also, it would be nice to have a more prominent warning if an entry is corrupted.

While loading a file, if you click "fill the list" before the progress bar has filled three times, nothing is displayed at all; even after the loading is completed.

For FSH files, it would be great, if mipmaps and multiple image entries would be displayed, too, rather than just the first image.
Title: Re: SC4Reader Tool
Post by: Tropod on April 27, 2014, 05:12:46 PM
@NCGAIO
Relations; I'd have to say at this stage unlikely, main reason being time but also because there's still a lot of unknowns in the spec. It took months as it was to get effects dir editor where it is now. As for sorting; I've put that on the to do list :thumbsup:.

@memo
I've made note about FSH & fill list. Some issues/shortcomings I am aware of, some like these I am not, so it's great that you're posting these issues. Thank you  &apls.
Corrupted Entires: I could add a warning on the main Exemplar list view at the top?
Regarding Exemplar (if this doesn't cover your issue let me know); is this for text or binary exemplars, I'm guessing binary as I've been able to replicate the problem? At the moment it doesn't automatically update the "REP" item (for binary/text) so if you're adding extra items (or in this case extra text) the REP value needs to be manually updated (but not for text-based exemplar strings). Not ideal I know;  &idea I could add a warning on the edit screen next to the REP item itself to make sure users update rep value until I have this handled properly, alternatively I could add a pop up warning.
Title: Re: SC4Reader Tool
Post by: memo on April 28, 2014, 02:00:53 AM
Corrupted Entires: I could add a warning on the main Exemplar list view at the top?

That's exactly what I had in mind.

Quote
Regarding Exemplar (if this doesn't cover your issue let me know); is this for text or binary exemplars, I'm guessing binary as I've been able to replicate the problem? At the moment it doesn't automatically update the "REP" item (for binary/text) so if you're adding extra items (or in this case extra text) the REP value needs to be manually updated (but not for text-based exemplar strings). Not ideal I know;  &idea I could add a warning on the edit screen next to the REP item itself to make sure users update rep value until I have this handled properly, alternatively I could add a pop up warning.

Yes, it was a binary exemplar. I'd imagine there is not much use for being able to manually set the rep value separately, is there? Except maybe when it comes to rep 0 vs rep 1 to distinguish between the two binary formats.

Also, I would not mind if your program automatically converted text exemplars to binary exemplars when the user tries to change its properties. It would save you from those distinctions in encoding different formats. At least, that's how I have done it before. ;)
Title: Re: SC4Reader Tool
Post by: HurricaneMod10 on May 06, 2014, 10:47:33 AM
it says: * Can't find mfc100u.dll *
I can't be able to get the work with Microsoft Visual C++ 2010 SP1 Redistributable from the Windows XP Service Packs 3. ERRORS!
Title: Re: SC4Reader Tool
Post by: Tropod on June 22, 2014, 06:14:10 AM
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.


On a side note; some aspects of this version have been rewritten from ground up, so will be curious to see if everything works ok  %BUd%.
Title: Re: SC4Reader Tool
Post by: NCGAIO on June 22, 2014, 09:29:11 AM
an update has been done. see my first post for link.

.....
Sorting for effect dir columns.
.....




Thankss a lot! :thumbsup:
Title: Re: SC4Reader Tool
Post by: Tropod on June 28, 2014, 02:28:35 AM
just a minor update has been done, link updated.

Exemplar/cohort bug edit/save fix/adjustment.
Font type/size option added.
Title: Re: SC4Reader Tool
Post by: Tropod on July 05, 2014, 04:24:04 AM
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.

EDIT: rul tile viewing.
First selection of valid RUL line item plugin/install files will be loaded & scanned & image retrieved if one exists/valid (2nd+ selection image will just be retrieved). The image should be displayed as per RUL code rotation/flip.

(http://i.imgur.com/ppjIwvi.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on July 18, 2014, 05:32:49 PM
minor update. see first post for link.

summary of this update;

Search data sync bug fix.
Display Type added to tree. ie default, hex, text.
Path Tile viewing added.
Title: Re: SC4Reader Tool
Post by: memo on July 27, 2014, 04:48:43 AM
Tropod, this update looks very promising! :thumbsup:

I've just tested it. There were still a number of random crashes – I hope you can get on top of those. Sometimes, a popup message said an error occurred and I should check logging.txt – however, logging.txt is always empty. (I assume some of the crashes occured when the program failed to parse path files correctly. Parsing path files like that is quite a hard problem, since it is a text format that has a lot more freedom than a binary format, I guess.)

Also, the RUL tile display seems to display flipped tiles incorrectly. They are flipped vertically, while they should be flipped horizontally.
Title: Re: SC4Reader Tool
Post by: Tropod on July 29, 2014, 12:53:46 AM
@memo;
thanks for feedback  :thumbsup:. I've fixed the RUL tile viewing image. And there was a bug in path viewer. As for logging.txt; it can take a minute to save info for this, otherwise not sure at this stage - I'll have to take closer look or rewrite file reading  &mmm. I wasn't planning on another release for a few weeks, but your post has prompted me to try & implement crash reporting of some sort, which may help. So.....


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.
(limited) Crash Reporting added.


For Crash reporting:

You'll need to click on link in the 1st window to display 2nd;

(http://i.imgur.com/IQxrMrN.jpg)

Export function will save contents of dump, xml & screenshot to zip file. Feel free to upload that here (provided file is not to big). This should help me pinpoint any issues with crashing/hanging.
Title: Re: SC4Reader Tool
Post by: Tropod on August 23, 2014, 04:51:26 AM
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.


EDIT:
RUL Tile viewing should now look like this;

(http://i.imgur.com/W6mn771.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on September 03, 2014, 05:03:17 PM
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.
Title: Re: SC4Reader Tool
Post by: HappyDays on September 03, 2014, 08:02:39 PM
A feature request. I apologize in advance if you are no longer taking them.

Is it possible for you to add a "Unused TGI" scan to let the user know what is entirely unused in their plugins folder?

For example, I have tens of thousands of props floating around. A high percentage of them are used by nothing. DataNode allows me to find and get rid of many of them. However this method is rigorous, time consuming, and prone to error. Further, sometimes it's a bit hard finding the unused props in a file used by 1000+ lots. While, obviously, I would find this feature useful, I believe many other OCD SC4 players would find it useful as well.

That said, don't feel bad about declining. You have your own vision for the program, and it's your time spent implementing features and working out bugs. Thank you for your consideration in any case.
Title: Re: SC4Reader Tool
Post by: Tropod on September 03, 2014, 11:25:56 PM
A feature request. I apologize in advance if you are no longer taking them.

Is it possible for you to add a "Unused TGI" scan to let the user know what is entirely unused in their plugins folder?
...

I'm more than happy to hear/take any requests people may have. My programming experience/skill however to be honest is not great  $%Grinno$%. Many things I've been learing as I go along, hence why ilives reader should probably be serious modders first point of call  :thumbsup:. As for the request; one of the biggest problems with checking what TGI's aren't used is the fact that save game files, not to mention some install type files, aren't fully deciphered. And until these are I can't imagine any software reliably filtering what TGIs aren't in use. I could probably do something that cross-checks plugin TGIs with city save game files to some degree, and it has been something on my to do list, so I'll see what if anything I can come up with :thumbsup:.
Title: Re: SC4Reader Tool
Post by: HappyDays on September 04, 2014, 12:21:57 AM
Ah, no, not save games. That's not what I meant. What I mean is do an analysis of your plugins to determine if a texture is used by a building, or a building is used by a lot. Whether a UI file is used by a train station plop, and whether the train station plop is set to appear ingame.

If a texture is not used by anything, nor is it overwriting a pre-existing texture, its presence is unneeded. If a building exemplar or prop isn't attached to a lot, they too are doing nothing useful and their graphical information might just be taking up space as well. In general, most things end up on a lot and if there if no lot for them to be on then they're simply there.

Example: BSC BAT Props - T1 Vol6 is about 2.5 megs and contains a couple dozen props and their graphical information. How much of that is actually being used by something in my plugins, according to tests with DataNode? .2 megs, the S3Ds and FSHs for 1 little house.

Another example: LBT Mega Prop Pack v.01. The full package takes up 21 megs, contains over a thousand props, and has 44,000+ TGI. The amount of that my lots use? 2.4 megs, a hundred props, and 5,000 TGI.

Having a program that can identify what is not used would make the process of culling all that excess much easier. Using DataNode to identify what is not being used by identifying what IS being used works, but only on a small scale. And in any case, it is not an elegant solution to the problem - merely the only available one.

Does that explain my idea better? Sorry for the confusion! And, by the way, having better tools for examining the save data would be extremely useful! Knowing what information SC4 save files keep/puke up on and don't would really advance knowledge on what should and shouldn't be done. Perhaps is will even explain many of the save corruption issues seen over the years.

By the way, it's a very nice little house. I just don't need its friends.
Title: Re: SC4Reader Tool
Post by: Tropod on September 04, 2014, 05:13:43 PM
Ah, no, not save games. That's not what I meant. What I mean is do an analysis of your plugins to determine if a texture is used by a building, or a building is used by a lot. Whether a UI file is used by a train station plop, and whether the train station plop is set to appear ingame.....


oh ok. So if I understand right; basically if a TGI item is referenced by another TGI item in some way, but only for install/plugin files (ie as you say, whether a texture is referenced by an Exemplar). I'll put that on my to do list, as for a timeframe though not sure. It's no simple task, as it would potentially require full parsing of many files not just header/index, but I do like a challenge  %BUd%. It should go hand in hand with something else I'm wanting to do, & that is load/display objects for a given TGI item property (ie Exemplar file property).


on side note; what is DataNode ? I've not heard it before & google wasn't much help.
Title: Re: SC4Reader Tool
Post by: APSMS on September 04, 2014, 05:31:40 PM
on side note; what is DataNode ? I've not heard it before & google wasn't much help.
LOL. A STEX search would've been more helpful. It's a program by Rivit designed to expose the hierarchy of the SC4 Plugin loading. As well as identify conflicts and overrides.
Title: Re: SC4Reader Tool
Post by: Tropod on September 04, 2014, 06:06:46 PM
on side note; what is DataNode ? I've not heard it before & google wasn't much help.
LOL. A STEX search would've been more helpful. It's a program by Rivit designed to expose the hierarchy of the SC4 Plugin loading. As well as identify conflicts and overrides.


aaahhhh thank you  :thumbsup:. Found it after some fiddly searching; http://community.simtropolis.com/files/file/27675-sc4datanode/
Yes I find google becoming more & more useless when trying to search some things.
Title: Re: SC4Reader Tool
Post by: NCGAIO on September 04, 2014, 06:43:51 PM

Well ...  think this is a bit unfair since the google search brings exactly this link as the first result when placed "SC4datanode" as search element or as the fifth result when used "Simcity DataNode".


Everything is a matter of how one performs the search! In simtropolis eg you can not access some old content by the search engine page, but can access by doing a google search on the site or specific domain using the advanced search.


I'm an addict google but what can i do ... everyone has their flaws its not ! :)
Title: Re: SC4Reader Tool
Post by: HappyDays on September 05, 2014, 12:30:13 AM
Datanode is probably tied for most important utility that's come out for SC4 along with Reader and PIM-X. It gives you the ability to finely examine and test your plugins, cull the waste and duplicates. It's what told me just how very sick most buildings/prop packs are. Missing dependencies, dependencies that no longer exist, dependencies that never have existed, even one lot that pointed to two buildings! No, not props. Two different building exemplars. Thankfully the game seems to ignore one of them.

Really, had the tool existed back in 2004 things would've never been allowed to get as bad as they are now. Knowledge is power, but alas, unless the tool exists how could we be anything but blissfully ignorant?
Title: Re: SC4Reader Tool
Post by: Tropod on October 10, 2014, 07:30:22 AM
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 Property 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  ()testing().
I'll be including some pictures covering the above & also including a (permanent) link for sourcecode on first page for this soon. As usual any feedback more than welcomed.


Edit: below are some sample pictures of the above recent additions;

Exemplar object viewer;
Selecting given property; Exemplar->FSH
(http://i.imgur.com/FeoOqVk.jpg)

will load following
(http://i.imgur.com/ppFQcGV.jpg)


And so forth.....

example 2 Exemplar->Image
(http://i.imgur.com/14DHBdM.jpg)

(http://i.imgur.com/fI9k3ik.jpg)


example 3 Exemplar->Exemplar->S3D
(http://i.imgur.com/m3K2IhK.jpg)

(http://i.imgur.com/xkRuwyP.jpg)

(http://i.imgur.com/E5NQq1t.jpg)


Intersection Ordering RUL

(http://i.imgur.com/Zzf47sd.jpg)

Bridge RULs

(http://i.imgur.com/c5padnY.jpg)


Data Type searching is accessible from Tree.

(http://i.imgur.com/C0xrL8N.jpg)
Title: Re: SC4Reader Tool
Post by: memo on October 16, 2014, 01:59:37 AM
This seems to be a great update! I had hoped for a way of navigating to parent cohort files – apparently, my hopes have been more than fulfilled by this. :thumbsup: Though, I haven't had a chance to try it, yet.
Title: Re: SC4Reader Tool
Post by: Tropod on October 19, 2014, 03:23:50 AM
This seems to be a great update! I had hoped for a way of navigating to parent cohort files – apparently, my hopes have been more than fulfilled by this. :thumbsup: Though, I haven't had a chance to try it, yet.


Thanks for the feedback  :thumbsup:. The Exemplar/Cohort object viewer is similar to ilives Readers "Navigator" in some ways, which also loads/shows parentcohorts, but only if it's in present *.dat. Whereas this will (should) load parentcohort regardless (provided options are set correctly). In saying this, another update here due to few bugs.....


1.3.5b update summary & notes (link on first 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.


Enjoy  :thumbsup:

Title: Re: SC4Reader Tool
Post by: memo on October 26, 2014, 04:32:10 AM
Thanks for the feedback  :thumbsup:. The Exemplar/Cohort object viewer is similar to ilives Readers "Navigator" in some ways, which also loads/shows parentcohorts, but only if it's in present *.dat. Whereas this will (should) load parentcohort regardless (provided options are set correctly). In saying this, another update here due to few bugs.....

I have to admit I had forgotten about the Navigator, as I have never really used it. It does indeed seem to be quite useful for navigating through SC1.dat, but in most other cases, not everything is included in a single file, so your implementation will be much more useful!
Title: Re: SC4Reader Tool
Post by: Tropod on November 12, 2014, 05:18:41 AM

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.
Title: Re: SC4Reader Tool
Post by: Tropod on December 25, 2014, 05:55:46 PM
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).
EDIT: I should add; settings.ini has been updated/modified.


EDIT: S3D Material custom profiles:

following highlighted dropbox displays profiles that can be used, including current active profile. You can also access settings via here.
(http://i.imgur.com/QTBFIQK.jpg)

Settings dialog here;
(http://i.imgur.com/63KNww9.jpg)
Can create your own, change/update name, settings etc. Can also change your default profile that you wish to use. Anything you do in here will update so long as you click "Apply". Any new profiles you create will be added to the dropbox on the 1st picture above.

Currently this profile feature only applies when you add new row, however next version I'll see about adding an "Apply Profile" function for existing materials.

merry xmas  :bnn:
Title: Re: SC4Reader Tool
Post by: vester on December 26, 2014, 08:21:35 PM
Really nice X-Mas gift.

Now the matter is what can the extra function do and what can one use it for ?



Merry X-Mas.

(http://l.rgbimg.com/cache1nu5xT/users/b/ba/ba1969/600/meMMHwg.jpg)
Title: Re: SC4Reader Tool
Post by: eggman121 on December 26, 2014, 09:17:57 PM
Now the matter is what can the extra function do and what can one use it for ?

From what I can tell editing has presets that can apply the correct texture without having to set all the info as you have to in Ilives Reader.

Great work Tropod  :thumbsup: .This may become quite handy for 3D model Texture editing. Certainly in the case that you have a large amount of models to edit.

-eggman121
Title: Re: SC4Reader Tool
Post by: Tropod on December 26, 2014, 10:43:55 PM
....
From what I can tell editing has presets that can apply the correct texture without having to set all the info as you have to in Ilives Reader.
....

Pretty much  :thumbsup:. And thanks for feedback :popcorn:. I've updated my post to provide some screenies & better explanation.

This release will probably bring some issues with it around these latest features & I know some aspects are a little lacking, so any feedback is more than welcomed  :thumbsup:.

Title: Re: SC4Reader Tool
Post by: vester on December 27, 2014, 06:54:56 AM
Maybe you could add the some different default setting sets.

These are what I have used for automata modding:
For normal textures: For shadows:
(http://i40.photobucket.com/albums/e242/vester_DK/TextureTut/Normal.jpg) (http://i40.photobucket.com/albums/e242/vester_DK/TextureTut/Shadows.jpg)

For headlights and nightlights 1): For other nightlights 2):
(http://i40.photobucket.com/albums/e242/vester_DK/TextureTut/Headlights.jpg) (http://i40.photobucket.com/albums/e242/vester_DK/TextureTut/settingsNL2.jpg)

1) Is used for both headlights and other lights. The texture lights up the texture both ground and model itself.
2) These are overlayed the normal texture.
Title: Re: SC4Reader Tool
Post by: vester on January 04, 2015, 04:15:11 PM
You'll also need Microsoft's mfc.dll if you don't have it already:
http://www.microsoft.com/en-au/download/details.aspx?id=40784

Have download two of the three programs and installed the programs on that page.
(vcredist_x64.exe and vcredist_arm.exe)

Still can't get the program to work.

Could you help with another link ?
Title: Re: SC4Reader Tool
Post by: Tropod on January 05, 2015, 05:25:28 PM
Still can't get the program to work.

I need more detail :).
What error message(s) are you getting & what operating system are you running?
Title: Re: SC4Reader Tool
Post by: vester on January 08, 2015, 04:09:48 AM
The error messages says that the file mfc120u.dll is missing.


Running Windows 7, 64 bits.


Let me know if there is more you need to know.
Title: Re: SC4Reader Tool
Post by: eggman121 on January 08, 2015, 04:23:59 AM
The error messages says that the file mfc120u.dll is missing.


Running Windows 7, 64 bits.


Let me know if there is more you need to know.

You need to install the 32 bit or x86 C++ redistributable package since the SC4 Reader program itself is 32 bit. At least that's how it worked for me  ;D

-eggman121
Title: Re: SC4Reader Tool
Post by: vester on January 08, 2015, 07:53:28 AM
That helped. Thank you E.
Title: Re: SC4Reader Tool
Post by: Tropod on January 09, 2015, 02:01:07 AM
@vester
Good to hear you've got it working  :thumbsup:.

@eggman121
Thanks for your input.


Quote
You need to install the 32 bit or x86 C++ redistributable package since the SC4 Reader program itself is 32 bit.

I've updated & clarified the information around this on first page. Not sure if/when I'll ever get it ported to 64bit now, as some 3rd party dependant code it relies on needs to get ported first before I can do this &mmm.
Title: Re: SC4Reader Tool
Post by: vester on January 09, 2015, 11:52:16 AM
Installed the 64 bit version as my thought was 64 bits os = 64 bits program.



Hope you can do a zoom function on the s3d files and would love a view option for textures/wireframe/both.

Title: Re: SC4Reader Tool
Post by: HappyDays on January 09, 2015, 03:38:32 PM
I've updated & clarified the information around this on first page. Not sure if/when I'll ever get it ported to 64bit now, as some 3rd party dependant code it relies on needs to get ported first before I can do this &mmm.

But would there even be benefits for updating the code for 64-bit?
Title: Re: SC4Reader Tool
Post by: Tropod on January 09, 2015, 06:46:17 PM
Hope you can do a zoom function on the s3d files and would love a view option for textures/wireframe/both.

Definately on my list to do  ;).

But would there even be benefits for updating the code for 64-bit?

For this program & its end-users 64bit benefits would probably be very little. If you're using virtual dat features (or accessing *dat files) though & the files/plugins are quite large then it can be beneficial, especially if you're using some functions which are ram intensive. EDIT/DoubleEdit: you've just made me realise something regarding this I hadn't thought of &idea, addressawareness  &idea. just did some quick tests after changing LARGEADDRESSAWARE - managed to get this upto 4GB of ram usage before crashing. Given this I probably won't bother with 64bit %BUd%.
Title: Re: SC4Reader Tool
Post by: Tropod on January 14, 2015, 10:47:20 PM
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 mouse scroll/wheel &/or -/+, arrows keys. Model must have focus in order for this to work (ie click on area where model is).
And others I've probably forgotten.


Edit:
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;
(http://i.imgur.com/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.
(http://i.imgur.com/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;
(http://i.imgur.com/Hb1HZCV.jpg)

Title: Re: SC4Reader Tool
Post by: Tropod on February 01, 2015, 03:27:49 PM
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 (EXEMPLAR,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"
Title: Re: SC4Reader Tool
Post by: vester on February 01, 2015, 05:56:59 PM
Hi Tropod

Got a small request.

Would it be possible to add a function so you can see a s3d from all 4 angles ?
Title: Re: SC4Reader Tool
Post by: Tropod on February 02, 2015, 02:50:59 PM
You can move models around using arrow keys, or is that not suitable?
Did you want to be able to view all 4 angles at same time or (preferably) individually; I could probably just add some tabs for each angle ie A1-A4 in the frame.
Title: Re: SC4Reader Tool
Post by: vester on February 02, 2015, 03:44:26 PM
One view at the time would be great.
Will be using it with true 3ds sub files (automata and transit networks), not bat files.
Title: Re: SC4Reader Tool
Post by: Tropod on February 18, 2015, 01:58:59 PM
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;

(http://i.imgur.com/RzII1bk.jpg)

(http://i.imgur.com/CjXzBfI.jpg)

(http://i.imgur.com/wHkGhKm.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on February 20, 2015, 04:58:58 AM
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.
Title: Re: SC4Reader Tool
Post by: Tropod on March 08, 2015, 12:04:04 AM
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;
(http://i.imgur.com/KaTI72h.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on April 09, 2015, 03:50:26 PM
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. EDIT: currently at this stage there's no editing yet.
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;

(http://i.imgur.com/Bn1lcan.jpg)

(http://i.imgur.com/C0643Tx.jpg)

(http://i.imgur.com/75Djh7w.jpg)

(http://i.imgur.com/eMbYjZ9.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on June 24, 2015, 05:32:41 PM
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.

(http://i.imgur.com/EtjaqhM.jpg?1)
Title: Re: SC4Reader Tool
Post by: NCGAIO on June 24, 2015, 05:52:52 PM

This gets better and better
... Plus a great admiration for maintaining interest in the development when many no longer keeps the same interest for the game. :thumbsup:
Title: Re: SC4Reader Tool
Post by: Tropod on June 25, 2015, 06:06:34 AM
Thanks :thumbsup:. This is my :bnn: .

Must admit though I'm not 100% happy with last release (due to texturing problems), but it's a start, and I'm having trouble getting transport map to render properly at all  :'(  :angrymore:.

I forgot to list that Region file (CA027EDB,CA027EE1,00000000) is partially parsed.
Title: Re: SC4Reader Tool
Post by: Tropod on June 27, 2015, 02:41:07 AM
....
and I'm having trouble getting transport map to render properly at all
....

low & behold.....
this'll be in next version, after some other adjustments/improvements;

(http://i.imgur.com/d3Vq7sd.jpg?1)

Title: Re: SC4Reader Tool
Post by: Tropod on June 29, 2015, 05:24:51 AM
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.
Title: Re: SC4Reader Tool
Post by: Yild on July 10, 2015, 01:54:17 AM
source code file is corrupted :/

during my investigation of the damn manager problem with saving exemplar files I wanted to check if your exemplars read/write routines are different than in ilive reader and they probably are...

http://3.1m.yt/6pU5PPP6E.gif

I get this when I open my damn manager (hidden exemplars) files - in ilive reader exemplar structure 'looks' ok (but its not coz its crashing SC4)

pls upload your source code again


(its hard to return to maintain app code when you didnt see it for a year :P )
Title: Re: SC4Reader Tool
Post by: Tropod on July 10, 2015, 03:08:57 AM
Yeah I really need to completely rewrite exemplar code, it's convoluted :laugh:
Are you saying SC4Reader source code is corrupt &/or you getting this from compiling SC4Reader source code?

And are you able to upload the Exemplar file in question so I can take a look  :).
Title: Re: SC4Reader Tool
Post by: Yild on July 10, 2015, 05:48:35 AM
I'm saying... that zip file with source code is corrupted - can't unzip it  :(

uploaded dat file - its single exemlar + dir entry
http://s000.tinyupload.com/index.php?file_id=17592158642349886980

What I noticed is your tool show Rep value for every string grater than 0 (zero) - iLives Reader for each string shows 0, I didn't check if its only visual representation 'problem' or rep variable value is diffrent in both applications (probably not coz its saved each time in dbpf file).

Don't worry about convoluted code... if your not group programming its ok... for you :P
Title: Re: SC4Reader Tool
Post by: Tropod on July 10, 2015, 06:50:53 AM
I usually check for all that (corruption etc) before uploading files, seems my local version was also corrupt &mmm.

Try this one, this is v143 re-posted/uploaded;
https://www.dropbox.com/s/kbq9wiqydb3l5te/SC4Reader_source_v143_Release_150710.zip?dl=0

For Rep, it depends;
*from memory*, internal representation of Exemplar; Rep for string is char count if Exemplar is in binary format. For Exemplar text format however, Rep is zero for strings. I decided to show rep value for string as most Exemplars are binary format (& any SC4Reader edit/save get converted from Text->binary).

For *.dat you've uploaded;
This is obviously a new/generated one. I have my suspicions that ilive Reader still incorrectly parses/saves Exemplars in some cases, but it's hard to test after the fact & I haven't bothered to fully check his parse/save code (it's difficult). This is partially one of the reasons why I want to rewrite my exemplar code, eventually ()testing().

EDIT: how did you make/create this *dat?

I've had a brief look at that *dat & on the surface it looks like that Exemplar Name string property is missing its KeyType, which text version don't have but binary versions do & is necessary to properly parse the file. If KeyType equals zero (which it does in that file), then Rep is assumed to equal zero & DataValue has at least one value, which clearly that string isn't but it explains why only one char is displayed.
If you hex edit the file & change;
0C 00 00 00 17
to
0C 80 00 00 17
It should parse/display the file some more in SC4Reader. And I dare say the rest of the file may potentially have the same problem.
Title: Re: SC4Reader Tool
Post by: Yild on July 10, 2015, 04:22:40 PM
The dat file was generated by 'damn manager' - there was a bug when original exemplar was in EQZT format and manager was converting it to EQZB - the 'keytype' (or w8 variable in ilive's source code) value was not set for strings when decoding text format exemplar, and then binary representation was corrupted.

Thanks, your input is much appreciated  :bnn:

ps. your code IS convoluted... :P
Title: Re: SC4Reader Tool
Post by: Tropod on August 02, 2015, 03:20:42 AM
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.
Title: Re: SC4Reader Tool
Post by: Pat on August 03, 2015, 08:31:30 PM
gonna have to play with this tool for sure  :thumbsup:
Title: Re: SC4Reader Tool
Post by: Durfsurn on August 07, 2015, 04:40:51 AM
Tropod,

Is it possible to export a rather large amount of .fsh's to .png's but export them with the IID as the name (0x########)?

Would be awesome if you could add it if that's not possible already!

-Billy
Title: Re: SC4Reader Tool
Post by: mgb204 on August 08, 2015, 09:07:15 AM
In the reader simply use the File / Export All Files option and you will get every FSH file exported with TTTTTTTTxGGGGGGGGxIIIIIIII.FSH for the filename. If you copy all the FSH in a dat containing other non-texture files as well into a fresh DAT beforehand, it will only export the textures (otherwise it will export everything). You might then need to delete all the TGI files, but again this is a simple process.

Run the exported files through FSH2PNG or similar and use a bulk file renaming utility to chop off the Type and Group IDs (which should always be the same for sets of either Transit or Lot textures), and you've got what you want with relative ease. I've found no better way personally.

:EDIT:

Just thinking about it, if you use one of Rivit's preview versions of GoFSH, you can bypass much of this, it will export straight from the DAT into BMPs, you can then bulk-convert this in one step to PNGs and the filenames will be as you require for repackaging into a DAT. Let me know if you need further details, a link to the preview version of GoFSH can be found on my Automated Sidewalk Mod thread :).
Title: Re: SC4Reader Tool
Post by: Tropod on August 08, 2015, 04:37:18 PM
@Pat
Enjoy :thumbsup:. Feel free to provide any suggestion/feedback.

@Durfsurn
This will be in next version. Just out of curiosity, how many files we talking about, few hundred or few thousand? You can export already to FSH->BMP but just using own (incremented) filename.

@mgb204
Thanks for your input :). WIP already got working option to have TGI, TI, GI or IID for next version. And you can filter what files you want/need for exporting.
Title: Re: SC4Reader Tool
Post by: mgb204 on August 08, 2015, 04:53:41 PM
For PNG users I can think the ability to bulk export this way would be a boon, since right now using FSH2PNG mk2 it's necessary to do them in batches of 200, sounds OK until you get to the tedious files with many thousands of textures. A simple one click solution would be an excellent addition. Is it possible in the filtering to select say just the 0 wealth/zoom 5 textures, that would also be handy?
Title: Re: SC4Reader Tool
Post by: Durfsurn on August 08, 2015, 09:37:34 PM
I do know of the slightly unwieldy way of mgb204's method but I was hoping that it could be made easier (and it can!). The number is probably closer to hundreds rather than thousands and I do know of the incremented file naming export system but obviously it doesn't work when you have IID's that don't go up by one each time. Thanks a lot for putting it in the next update because textural overrides will become easier and easier with this kind of automation.

Cheers,
Billy
Title: Re: SC4Reader Tool
Post by: Tropod on August 08, 2015, 10:55:35 PM
For PNG users I can think the ability to bulk export this way would be a boon, since right now using FSH2PNG mk2 it's necessary to do them in batches of 200, sounds OK until you get to the tedious files with many thousands of textures. A simple one click solution would be an excellent addition. Is it possible in the filtering to select say just the 0 wealth/zoom 5 textures, that would also be handy?

on main list right click -> TGI Filter -> T/G/I & filters accordingly, so you could just put 7AB50E44 for TypeID & xxxxxxx# (where #=ID) for IID.
Title: Re: SC4Reader Tool
Post by: Pat on August 09, 2015, 03:56:06 AM
(http://i579.photobucket.com/albums/ss231/patfirefghtr/RegionviewWaterfalls.jpg)




OK So yes I know that is shameless plug for my MD lol, but I do have to say I like the region view and no the tiles are not bugged just a bad save copy from my OLD video card that didnt really like anything lol... BUT my new GT 610 kicks butt lol
Title: Re: SC4Reader Tool
Post by: Tropod on August 10, 2015, 05:20:32 AM
update  1.4.5;
https://www.dropbox.com/s/tldwuywep07ue5i/SC4Reader_Release_v145.zip?dl=0
Export TGI(s) function improvements.

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.


EDIT:
(http://s13.postimg.org/h2noxjufr/Export_TGIs.jpg)
double EDIT:
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.


@Pat
nice screenie  :thumbsup:. Will you be updating those cities that look a bit whacky?
Title: Re: SC4Reader Tool
Post by: Durfsurn on August 12, 2015, 04:59:44 AM
Thanks so so so so much for the export update - has proved immeasurably helpful so far. I do have one more idea at the moment that would help - being able to have multiple filters at a time, e.g. for selecting only the largest mipmaps (0X#######4/9/E).

That would be awesome,
Cheers,
Billy.

EDIT:
Actually being able to add "_a" to the end of the 0xI string would be welcome for alphas.
Title: Re: SC4Reader Tool
Post by: Tropod on August 13, 2015, 06:07:29 AM
update 1.4.5b
https://www.dropbox.com/s/sexfdjpkf0yajbd/SC4Reader_Release_v145b.zip?dl=0
T/G/I filter; multi filtering added; have a play around with this, it's not perfect but should suffice.
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.
Title: Re: SC4Reader Tool
Post by: Girafe on August 13, 2015, 06:40:25 AM
I wanted to have a look at it however mfc120u.dll is missing, any idea how I can get it and where to put?
Title: Re: SC4Reader Tool
Post by: Durfsurn on August 13, 2015, 06:45:17 AM
Tropod you absolute genius! Cheers man for another perfect patch.

Giraffe try downloading said .dll from a trustworthy source on the internet and copying it into the folder where the reader.exe is - thats what worked for me.

And on that note - mfc120u.dll is a debug version of that file - might want to check into that Tropod?

-Billy
Title: Re: SC4Reader Tool
Post by: Tropod on August 13, 2015, 06:57:31 AM
there's a link on first page;

You'll also need Microsoft's mfc.dll if you don't have it already, specifically need to install 32bit/x86 C++ redistributable package as this tool currently runs in 32bit;
http://www.microsoft.com/en-au/download/details.aspx?id=40784

As for mfc120u.dll..... ??? will have to check that out.
Title: Re: SC4Reader Tool
Post by: Pat on August 13, 2015, 11:45:22 PM
I sure am Tropod, taking a little time... getting distracted playing in them lol, with all large tiles and some odd # of them takes a bit lol
Title: Re: SC4Reader Tool
Post by: Tropod on August 23, 2015, 02:41:35 AM
update 1.4.6 - see first post for link.
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.
Title: Re: SC4Reader Tool
Post by: Tropod on September 10, 2015, 06:36:47 AM
1.4.7 update (https://www.dropbox.com/s/ywzi5f9oz762prp/SC4Reader_Release_v147.zip?dl=0)
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.
Title: Re: SC4Reader Tool
Post by: carlfatal on September 10, 2015, 08:57:42 AM
I have a problem. All time I want to install the updated reader, it says it wouldn´t work under winXP32.

Thanks in advance!
Title: Re: SC4Reader Tool
Post by: Tropod on September 10, 2015, 05:51:13 PM
The program doesn't require installation, just need to unzip & run (or double click) "SC4Reader.exe". The options will also need to be set.
If you're not getting past this you'll need to be more specific with any error messages you're getting; "it says it wouldn't work" doesn't help me :thumbsup:.
Title: Re: SC4Reader Tool
Post by: carlfatal on September 10, 2015, 07:28:20 PM
Oh sorry, I did not know, how to translate the message into proper English. So I will try again...  ;)

I simply opened the rar like you said and double clicked on the exe. Then I´ve got the message, that this would be "a not permitted win32 application"
My system is win XP, 32bit. And I have no problem to start the old Reader from the LEX.

Hope, this is more informative.  :)
Title: Re: SC4Reader Tool
Post by: Tropod on September 10, 2015, 10:32:18 PM
The reader on the LEX may be ilives reader? This program is not quite the same.
Try re-downloading it first. You need to unzip the whole contents (ie zip folder), not just open it, and then double click exe.
If that doesn't work are you able to post screenshot of the steps you are taking & error message?

Make sure you have following;
You'll also need Microsoft's mfc.dll if you don't have it already, specifically need to install 32bit/x86 C++ redistributable package as this tool currently runs in 32bit;
http://www.microsoft.com/en-au/download/details.aspx?id=40784

Antivirus/firewall also can sometimes cause problems.
Title: Re: SC4Reader Tool
Post by: carlfatal on September 11, 2015, 05:36:02 AM
Yeah, until now I am using ilive´s reader. But I would like to have all the possibilities you implemented here. So I´ve downloaded the program from this thread.

And yes, I did unzip it. Then I got this folder:

(http://www.ld-host.de/uploads/images/b94c1f59a48514ed2f0bc88f28ee3d7a.jpg) (http://www.ld-host.de/)

Now I double click the exe and:

(http://www.ld-host.de/uploads/images/4687eb95e4e0776af987ea802a69cc43.jpg) (http://www.ld-host.de/)


Do I maybe need some dll? Thanks again for your help, it´s much appreciated!
Title: Re: SC4Reader Tool
Post by: Tropod on September 11, 2015, 06:46:16 AM
try this version (unzip & run): https://www.dropbox.com/s/ow6etng9qdxb4nl/SC4Reader_Release_v147xp.zip?dl=0
(EDIT: this was put together quickly, so you may notice this is bit larger in size.)

You do need to make sure you've installed the above mentioned mfc.dll in my previous post.
What version of WinXP are you running? ie SP1/SP2/SP3 etc?

Some other thoughts, if the above file doesn't work:
-do you have another OS/PC to try on? ie Win7/Win8 etc.
-Have you tried disabling firewall/antivirus?
-running from different location? You're running this from D drive, that can some times be used for CDs/DVDs drive.

Try previous version of reader, links can be found on this page higher up, see if you encounter same problem.

I'll fire up my WinXP to see if I can't troubleshoot this on my end.
Title: Re: SC4Reader Tool
Post by: carlfatal on September 11, 2015, 07:44:58 AM
A big thank you first! Sometimes I should read more watchful. I´ve downloaded the Package from your link above and well - now it starts.

EDIT: everything is fine. Thanks a lot again!

EDIT 2: Not everything is fine. Now I get this message if I start:

(http://www.ld-host.de/uploads/images/037acb13bb6b5bdf84c9e69baa262493.jpg) (http://www.ld-host.de/)

I´ve changed game directory, plugins, regions, and language in the options, but it seems not to find the dat files. If I click "fill the list" it does, but then, after restart it is the same problem.
I can open any file with it though.
What am I doing wrong now?  $%Grinno$%
Title: Re: SC4Reader Tool
Post by: Tropod on September 11, 2015, 06:38:31 PM
In the options, remove all existing & try loading options from scratch. Just make sure you click OK, close program & start again.
If doing this doesn't work, post a pic of (or upload) the "Settings.ini" file located in settings folder. Worse case or failing this, try manually edit "Settings.ini".

Other users have had this issue only to realise they weren't properly setting the options.
Title: Re: SC4Reader Tool
Post by: carlfatal on September 12, 2015, 04:58:45 AM
I have no clue, why I coudn´t change the paths in the options, but I was able to do so in the setting.ini. And again I am surprized, why I didn´t look at the ini before, as most of the programs I know, have some kind of editable txt.files. Stupid me...  ???

But now everything is okay, the program starts without bothering anything. Nice! From now on I can learn how to use it. I really hope, that´ll be easear than to install it...  :D

So a big thank you again!  :thumbsup:
Title: Re: SC4Reader Tool
Post by: Tropod on October 19, 2015, 04:29:14 PM
v1.4.8 update (https://www.dropbox.com/s/en8c6se29ixf450/SC4Reader_Release_v148.zip?dl=0)
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.
Title: Re: SC4Reader Tool
Post by: Tropod on November 26, 2015, 02:59:41 PM
v1.4.9 update (https://www.dropbox.com/s/avwqcrj5w45ubza/SC4Reader_Release_v149.zip?dl=0)
Exemplar/Cohort search bug fix.
UI files visual display. UI editing at this stage still needs to be done via text view.

(http://i.imgur.com/EmPPp60.jpg?1)
Title: Re: SC4Reader Tool
Post by: Tropod on December 28, 2015, 10:46:13 PM
Update v150 (https://www.dropbox.com/s/e9vyu5ouwtke4gv/SC4Reader_Release_v150.zip?dl=0)
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.
Title: Re: SC4Reader Tool
Post by: speeder on January 25, 2016, 06:44:49 PM
The thing refuses to go fullscreen, it keeps setting itself to some bizarre window shapes, and when I click on the maximize button, the window becomes big, but the content remains in place (while the rest of the window renders white).

When I resize dragging, SOMETIMES it works.

Also, I managed to launch it after several attempts (I was the one that complained of it crashing on startup).
But after it launched, there was no options set, also the file selection dialog box frequently opens in the background, and in a non-modal manner, allowing me to not even notice it opened, and not being use-able unless I press Windows+D to minimize everything and then "restore" only the dialog box.

Also, after inputting some settings, the options screen close automatically... and to my pain in the ass, after setting up all options, I found out that it only save anything at all if you click the OK button on the options screen, if it closes in any other way, it does not save the settings.

Finally, after setting up the plugins folder, it started crashing again... I found where the settings are saved, and deleted the folder, then it loads (after 2 or 3 attempts, it silently fails most of the time), but as soon the settings point to my plugins folder, it crashes on startup immediately.

Also it does not print any log or report, it just crashes and show a dialog box.

The dialog box shows: "The instruction at 0x0218a62 referenced memory at 0x00000001f. The memory could not be read. Click on OK to terminate the program."

Title: Re: SC4Reader Tool
Post by: Tropod on February 24, 2016, 03:19:34 PM
I'm on a bit of hiatus with this at the moment as my attention is focused elsewhere currently. I have made note of this though & will see about looking at this when I get a chance.

If you have pictures though that would help, particularly for the Options/settings issue. PC stats would be good too.
Title: Re: SC4Reader Tool
Post by: Tropod on February 26, 2016, 06:09:41 AM
....I found where the settings are saved, and deleted the folder, then it loads (after 2 or 3 attempts, it silently fails most of the time), but as soon the settings point to my plugins folder, it crashes on startup immediately....

just re-reading your post. A few things;

Firstly thank you for your feedback, much appreciated :thumbsup:.

-both settings folder & Settings.ini file are necessary. Also the end of the Settings.ini file may be the cause of the crashing issue &/or silently failing issue (try adding/removing last blank line). File permissions may also have an impact. Not 100% sure at this stage. May I suggest manually editing/updating Settings.ini & letting me know how you go.
-crashing immediately on start up pointing to the plugins folder; which plugins folder, there's at least 2? This could be due to corrupt (*.dat or other) files, file permission or reader bug.


Quote
..The thing refuses to go fullscreen, it keeps setting itself to some bizarre window shapes, and when I click on the maximize button, the window becomes big, but the content remains in place (while the rest of the window renders white)...

I must admit that I'm aware of this, just hasn't been high on my to do list. Try moving vertical bar & it'll update whole window. Next release this'll be fixed.

Quote
....also the file selection dialog box frequently opens in the background, and in a non-modal manner, allowing me to not even notice it opened, and not being use-able unless I press Windows+D to minimize everything and then "restore" only the dialog box.

Personally I don't like windows that halt the ability to move other windows if you need to, hence the design. Unfortunately it has some issues & no reason can't be changed.

Quote
...Also, after inputting some settings, the options screen close automatically... and to my pain in the ass, after setting up all options, I found out that it only save anything at all if you click the OK button on the options screen, if it closes in any other way, it does not save the settings...

I will have to look at making a slight design change with this, shouldn't be to big an issue.


Quote
..Also it does not print any log or report, it just crashes and show a dialog box.

The dialog box shows: "The instruction at 0x0218a62 referenced memory at 0x00000001f. The memory could not be read. Click on OK to terminate the program."

Would be more than happy to address issues like this, however it would help immensely if you could elaborate/clarify on these (ie picture) & provide PC stats.


Please feel free to make any suggestions/contributions or point out any bugs with source code. This project has evolved since its start & probably has many hidden bugs &/or outdated code I'm not aware of. So more than happy to update time permitting :thumbsup:.
Title: Re: SC4Reader Tool
Post by: Tropod on March 04, 2016, 07:27:53 AM
Update v151 (https://www.dropbox.com/s/57yatrqve61wfgo/SC4Reader_Release_v151.zip?dl=0)
Options dialog exit confirmation added.
Main dialog maximise display issue fix.
Open/Save dialogs foreground fix.
Title: Re: SC4Reader Tool
Post by: Tropod on March 14, 2016, 04:55:55 PM
Update v152 (https://www.dropbox.com/s/atcbdpztc9wtaui/SC4Reader_Release_v152.zip?dl=0)
RULs->S3D: S3Ds should now be displayed as per RUL rotation & flip (excluding bridge RULs).
Text files Search/load TGI & IID by FileType added. For example INI networks -> Bridge Exemplars & Tile Verifiers. This works by highlighting text & right mouse click & search. Note IID by FileType function will return first IID found.
Effects files; Search/load IID by FileType added. Only works for certain tabs & columns.
TGI Mass Edit bug fix.
Region View Export Stats function added.
Export TGI info function added. Can be found in standard exporting functions.
Last 2 items will export data to a single text file & can be easily copied/pasted/imported into excel.
Title: Re: SC4Reader Tool
Post by: Tropod on April 15, 2016, 08:32:31 AM
1.5.3 update info;
S3D several new functions, improvements & look - big shout out & credit to "rivit" for his significant contribution around this.
Image horizonal/vertical flip. Currently does not save flip.
64bit version released.
Project source code significantly updated/adjusted due to 64bit update.

v153 32bit (https://www.dropbox.com/s/3mglkx8ntjvhgx9/SC4Reader_v153_32.zip?dl=0) - this is existing version & more stable.
v153 64bit (https://www.dropbox.com/s/ajf5tzqdsuv5gop/SC4Reader_v153_64.zip?dl=0) - 64bit version can load/save much larger files however may have unknown/undiscovered issues/bugs. Please post if you encounter any.

Users may notice a significant jump in file size. This is largely due to 3rd party & overall project update.



(http://i.imgur.com/LduBji7.jpg)
(http://i.imgur.com/6IEQMFE.jpg)
(http://i.imgur.com/V3G6RYG.jpg)

Vester: Corrected the links.
Title: Re: SC4Reader Tool
Post by: vester on April 15, 2016, 08:57:13 AM
Thanks for all the hard work on this tool to Tropod and to rivit.
Title: Re: SC4Reader Tool
Post by: NCGAIO on April 15, 2016, 10:18:00 AM

It really is necessary express huge congratulations for keeping all this work still being updated. &apls


A pity that has not come before ...
Title: Re: SC4Reader Tool
Post by: InvisiChem on April 15, 2016, 11:08:53 AM
Absolutely awesome and the tools start into the 64bit world. Thank you for the huge jump into modern tools guys.
Title: Re: SC4Reader Tool
Post by: vester on April 15, 2016, 12:27:47 PM
Had a look at the programs.

Two things I would love to be able to, when doing automata:
- change/replace textures on a model
- view the model from all four angles.

Last option should only be there when view a real 3ds file, like automata is.
Maybe added the texture function like this: link to image (http://i.imgur.com/2qu6zo7.jpg).
That last one would be real PLUS in my book.
Title: Re: SC4Reader Tool
Post by: Tropod on April 15, 2016, 06:51:40 PM
Thanks for feedback guys.
karma + for rivit for his work/collaboration on this version.

Had a look at the programs.

Two things I would love to be able to...


Request noted  :thumbsup:.


EDIT: should probably point out that you can change the IID in here & it will update, just need to save if you wish to keep changes.
Title: Re: SC4Reader Tool
Post by: rivit on April 15, 2016, 09:00:49 PM
For Everyone's Information.
 
The Default view is the BAT view angle corresponding to and taken from the BAT render scripts. Zoom = 1 here. There are model larger than this view and so you may need to zoom out to see them. Also some very small models need to be zoomed in on.

The main ways to control the view are in the context menu under the right mouse button.

The new views let you view the models from all sides both as 45deg oblique views A1 model facing Z+,A2 model facing X-,A3 model facing Z-,A4 model facing X+ and along the axes towards the model Front, Back, Left, Right, Top, Bottom.

You can zoom with the moose wheel or use the Z/2 and Zx2 buttons above the display. You can rotate the model using up and down arrow keys.

Once you have decided on a view position you like  View Save on the menu and it will stay that way until you change it. If you make changes but want to get back to your favourite use View Recall

The background may be changed by manipulating the values at the top of the display (they are decimal RGB) and reset to original with Reset Colors, and the Grid may be turned on and off with Toggle Grid . The grid adjusts graduation according to zoom. At Zoom=1 its 20m, at zoom=4 its 1 metre. Also the appropriate Axes are displayed according to view. This won't automatically change if you rotate out of the plane.

A new option Snapshot will take a picture of the current view of a model and put it into the clipboard. A small label is written below. This is useful for press shots of your new model, making icons, making albums or just admiring your work etc. The default size is 384x384 and may be as large as 768x768.

Other changes include
- correcting the BAT perspective which was slightly wrong in Reader. See Image below.
- Making backward facing triangles visible - in Reader you couldn't tell the difference and in the game they disappear. Now backward facing triangles are shown in outline, and in dark cyan as opposed to white in wireframe view. They can be fixed by swapping two corners of the triangle by Editing in Index Tab.  Take a look at Model 0x106E0000 (the lowrider Cadillac) in SimCity1.dat for an idea of how this works.
- in the work pipeline for the display are Zoom to Fit and Showing the position of Effects in a model.

What may not be apparent is that the EDIT function will allow changing pretty much everything on a model, its materials and its effects. Further work was done here for readability and is continuing here to make it easier to use. Remember to save on each panel you change and to SAVE the model when you've finished editing altogether if you want to keep changes (this is the same as reader was)
Title: Re: SC4Reader Tool
Post by: Tropod on April 16, 2016, 05:00:24 PM
For Everyone's Information.....

Thank you for your input. This is why it's great to have others contribute, if it weren't for those attached pictures I, & probably many others, would never know the difference &apls.
Title: Re: SC4Reader Tool
Post by: Tropod on May 01, 2016, 06:11:36 PM
v1.5.4
SC4Reader (https://www.dropbox.com/sh/9b07fqiaew7g2ct/AACkOA9VqFofwJcTuIIJeQfda?dl=0)

Only bug fixes for this release resulting from updating to 64bit, some of which are for;
-Data searching.
-Property searching.
-S3D.
-GUI display.
-RUL tile viewer.
-Virtual *dat to file conversion (just make sure not to use on things like NAM).
A *.temp file will now be used to faciliate for saving.
Title: Re: SC4Reader Tool
Post by: Tropod on June 09, 2016, 04:07:44 PM
Incase you missed it at ST while SC4D was down....

v1.5.5 (https://www.dropbox.com/sh/9b07fqiaew7g2ct/AACkOA9VqFofwJcTuIIJeQfda?dl=0)
Object Viewer added for: FSHs, Menu Icons, S3Ds, Cursors, Texts.
Several memory leaks fixed.

This will only load relevant items from both Install & Plugins folders based on reader options. ie It won't load anything from a loaded file.

Access via Tools -> Object Viewing

(http://i.imgur.com/qJC7CM3.jpg)

FSH viewing in various options. Be aware DirID/Size viewing may take several minutes to load depending on number of fsh's.

(http://i.imgur.com/52QrbDq.jpg)

(http://i.imgur.com/KLzAYh8.jpg)

Be aware S3Ds may be PC intensive when scrolling.

(http://i.imgur.com/HmbJdZy.jpg)

(http://i.imgur.com/RItWJzH.jpg)
Title: Re: SC4Reader Tool
Post by: mgb204 on October 05, 2016, 08:31:42 PM
Just wanted to pop in with a belated thanks for updating this to work as a 64-Bit application. A number of large files that previously crashed are now happily working as a result :D. Your application has many benefits over iLives reader, although I do switch between them a lot. But I kick myself I never found/used it sooner, it's become an invaluable tool - Take a Karma point from me for all your efforts here.  &apls
Title: Re: SC4Reader Tool
Post by: mgb204 on June 14, 2017, 08:11:49 AM
Just uploading a crash report, getting a consistent problem when trying to alter a stop point of a path.
Title: Re: SC4Reader Tool
Post by: Tropod on June 26, 2017, 05:03:03 AM
Have located the problem, looking at implementing fix. Want to confirm is it crashing before or after you end editing?
Title: Re: SC4Reader Tool
Post by: mgb204 on July 31, 2017, 04:48:27 PM
Sorry, totally missed your post. But if memory serves it was after I had edited the path and tried switching to another path as part of the .DAT file.
Title: Re: SC4Reader Tool
Post by: Tropod on September 04, 2017, 11:44:00 PM
v1.5.6 (https://www.dropbox.com/sh/9b07fqiaew7g2ct/AACkOA9VqFofwJcTuIIJeQfda?dl=0)
Bug fixes.
Tree loading improved & full load option added.
Ltext searching improved.
Max file save size option added: hardcoded limit is ~4GBs. If you save & it's over this, program will automatically save extra filename_#.dat where # = number.
Virtual->dat save added: loading virtual folder can now be converted to single *dat file within max file save limit.
Multi-*dat save added: will save multiple loaded *dats, for example load Region & save. All city files will be saved.
2ndary level saving added: for example, load exemplar->user visible name key, update/save. For any item that's in the current loaded dat, still need to save the dat itself. For anything else it'll automatically save dat.
DIRs:  Refresh button added. No longer updated/added automatically except on file saving.


This will most likely be one of the last updates :popcorn:.
Source code link on first post for anyone keen enough to continue with it :thumbsup:.
Title: Re: SC4Reader Tool
Post by: eggman121 on September 05, 2017, 12:00:44 AM
This will most likely be one of the last updates :popcorn:.
Source code link on first post for anyone keen enough to continue with it :thumbsup:

Thanks for all the hard work you have put into this program Tropod.  :thumbsup:

This tool has been invaluable in making adjustments to the various bits and pieces of the NAM. It is a shame that this will be one of the last releases but I do understand that you have been working on this tool for a very long time.

One can only Mod until they would like to enjoy the fruits of their success  ::)

-eggman121/ Stephen
Title: Re: SC4Reader Tool
Post by: eggman121 on June 26, 2018, 02:10:15 PM
Just asking for some advice here.

I have just made the change to windows 10 and everything is going well except that SC4 reader keeps crashing when I open an S3d file. Just wondering if anyone has had this issue and if there is a potential solution? I have installed all the relevant libraries so I think it could be something to do with the permissions… But I could be wrong.

-eggman121/ Stephen
Title: Re: SC4Reader Tool
Post by: Tropod on September 28, 2019, 04:04:34 AM
windows 10...SC4 reader keeps crashing when I open an S3d file.

This should fix this;
https://www.dropbox.com/s/os7bjerxm1mgir8/SC4Reader_v157_64.zip?dl=0 or https://www.dropbox.com/home/SC4Reader/Releases
Just need to select "Open with & download". Seems dropbox has changed since I used it some time ago.

v1.5.7 64bit only. No more 32bit.
Crash on S3D fix.
S3D REGP (FXs) searching added to Data Type. This should make it easier to locate any & all S3D files that contain FX items.


I've not long been on Windows10, been holding out on Win7 for long as possible. That & RL  :-\, so bit late but oh well  &mmm.

Seeing as how I've managed to get VS working now with this & ilive reader, happy to try & fix any bugs RL permitting  :bnn:.



EDIT: I'll be posting another update in the coming days/weeks, as I fix a number of issues related to Windows10/64bit.
Title: Re: SC4Reader Tool
Post by: Tropod on October 13, 2019, 05:41:37 AM
https://www.dropbox.com/s/jz2wzosydmff2yt/SC4Reader_v158_64.zip?dl=0

v1.5.8
Grid Viewer added; Path, FSH & S3Ds addable. Will only load currently loaded file.
Path files added to Object viewer. Will load all found as per options Install & Plugins folders.
S3D->Mat->Settings fix.
Various fixes related to Windows10 64bit. So should be lot more stable than previous release.

Grid Viewer is far from perfect currently & still work in progress, so some functionality absent. Meant for networks but S3Ds will load any. Any suggestions   :-\&idea.

(https://i.imgur.com/Y9TelIa.jpg)
(https://i.imgur.com/NNs0QoG.jpg)
(https://i.imgur.com/Xnxv5M9.jpg)
Title: Re: SC4Reader Tool
Post by: Tropod on November 09, 2019, 10:21:17 PM
https://www.dropbox.com/s/qhxf5fvo6lqxzs8/SC4Reader_v159_64.zip?dl=0 (https://www.dropbox.com/s/qhxf5fvo6lqxzs8/SC4Reader_v159_64.zip?dl=0)

v1.5.9
Grid Viewer improvements.
Object Viewer; Exemplars added. Note: type 0x07,0x10, 0x21 are CPU intensive/unstable or take awhile to load. Not all types added.
Exemplar Bridge types added for viewer.
Exemplar tree grouping improved.


(https://i.imgur.com/bvbqLxl.jpg)
Title: Re: SC4Reader Tool
Post by: alejogc13 on November 10, 2019, 09:19:37 AM
That will help me a lot!
Title: Re: SC4Reader Tool
Post by: fantozzi on November 10, 2019, 11:19:23 AM
Great news.  :thumbsup: :thumbsup: :thumbsup:
Hope to get into it soon.
Title: Re: SC4Reader Tool
Post by: mattb325 on November 17, 2019, 03:05:25 PM
Looks awesome! Thanks for your continued work  :)