• Welcome to SC4 Devotion Forum Archives.

SC4Reader Tool

Started by Tropod, February 05, 2014, 01:32:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vester

One view at the time would be great.
Will be using it with true 3ds sub files (automata and transit networks), not bat files.

Tropod

#81
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;







Tropod

#82
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.

Tropod

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;


Tropod

#84
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;









Tropod

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.



NCGAIO


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:

Tropod

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.

Tropod

Quote from: Tropod on June 25, 2015, 04:06:34 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;




Tropod

#89
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.

Yild

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 )
DAMN Manager download: at LEX at STEX
DAMN Manager support thread: at SC4Dev

Tropod

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  :).

Yild

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
DAMN Manager download: at LEX at STEX
DAMN Manager support thread: at SC4Dev

Tropod

#93
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.

Yild

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
DAMN Manager download: at LEX at STEX
DAMN Manager support thread: at SC4Dev

Tropod

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.

Pat

gonna have to play with this tool for sure  :thumbsup:

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

Durfsurn

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

mgb204

#98
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 :).

Tropod

@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.