SC4D Homepage
BSC File Exchange
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length


Author Topic: SC4Reader Tool  (Read 50458 times)

0 Members and 1 Guest are viewing this topic.

Offline Tropod

Re: SC4Reader Tool
« Reply #20 on: April 07, 2014, 03: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;




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.


Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #20 on: April 07, 2014, 03:00:24 PM »

Re: SC4Reader Tool

Offline memo

  • *
  • *
  • *
  • *
  • Posts: 1765
  • Country: de
  • Total likes: 16
  • Reputation: 34
  • Gender: Male
  • CL: RULin' RULin' RULin'
Re: SC4Reader Tool
« Reply #21 on: April 09, 2014, 01: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:



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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #21 on: April 09, 2014, 01:48:54 PM »

Re: SC4Reader Tool

Offline Interoceter

Re: SC4Reader Tool
« Reply #22 on: April 13, 2014, 06: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #22 on: April 13, 2014, 06:31:36 PM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #23 on: April 15, 2014, 01: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().
« Last Edit: April 15, 2014, 01:54:51 AM by Tropod »

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #23 on: April 15, 2014, 01:37:11 AM »

Re: SC4Reader Tool

Offline vortext

Re: SC4Reader Tool
« Reply #24 on: April 15, 2014, 05: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.

time flies like a bird
fruit flies like a banana

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #24 on: April 15, 2014, 05:11:07 AM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #25 on: April 18, 2014, 05: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #25 on: April 18, 2014, 05:59:51 AM »

Re: SC4Reader Tool

Offline memo

  • *
  • *
  • *
  • *
  • Posts: 1765
  • Country: de
  • Total likes: 16
  • Reputation: 34
  • Gender: Male
  • CL: RULin' RULin' RULin'
Re: SC4Reader Tool
« Reply #26 on: April 18, 2014, 04: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #26 on: April 18, 2014, 04:22:59 PM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #27 on: April 18, 2014, 04: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.
« Last Edit: April 18, 2014, 05:01:51 PM by Tropod »

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #27 on: April 18, 2014, 04:58:55 PM »

Re: SC4Reader Tool

Offline memo

  • *
  • *
  • *
  • *
  • Posts: 1765
  • Country: de
  • Total likes: 16
  • Reputation: 34
  • Gender: Male
  • CL: RULin' RULin' RULin'
Re: SC4Reader Tool
« Reply #28 on: April 19, 2014, 03: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… ;)

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #28 on: April 19, 2014, 03:24:45 PM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #29 on: April 20, 2014, 05: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #29 on: April 20, 2014, 05:02:28 AM »

Re: SC4Reader Tool

Offline HurricaneMod10

  • *
  • Posts: 25
  • Country: us
  • Total likes: 0
  • Reputation: 0
  • Gender: Male
  • Tropical Weather Creations
Re: SC4Reader Tool
« Reply #30 on: April 20, 2014, 07: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #30 on: April 20, 2014, 07:18:50 AM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #31 on: April 20, 2014, 12: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #31 on: April 20, 2014, 12:08:45 PM »

Re: SC4Reader Tool

Offline Egi

Re: SC4Reader Tool
« Reply #32 on: April 21, 2014, 07: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #32 on: April 21, 2014, 07:54:37 AM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #33 on: April 22, 2014, 04: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #33 on: April 22, 2014, 04:36:40 PM »

Re: SC4Reader Tool

Offline HurricaneMod10

  • *
  • Posts: 25
  • Country: us
  • Total likes: 0
  • Reputation: 0
  • Gender: Male
  • Tropical Weather Creations
Re: SC4Reader Tool
« Reply #34 on: April 23, 2014, 04:39:20 AM »
I normally have got a winXP service pack 2 but Win7 as well.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #34 on: April 23, 2014, 04:39:20 AM »

Re: SC4Reader Tool

Offline NCGAIO

Re: SC4Reader Tool
« Reply #35 on: April 23, 2014, 08:59:41 PM »

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


Any chance to implement sorting ?


« Last Edit: April 25, 2014, 07:00:05 AM by NCGAIO »

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #35 on: April 23, 2014, 08:59:41 PM »

Re: SC4Reader Tool

Offline memo

  • *
  • *
  • *
  • *
  • Posts: 1765
  • Country: de
  • Total likes: 16
  • Reputation: 34
  • Gender: Male
  • CL: RULin' RULin' RULin'
Re: SC4Reader Tool
« Reply #36 on: April 27, 2014, 04: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #36 on: April 27, 2014, 04:31:38 AM »

Re: SC4Reader Tool

Offline Tropod

Re: SC4Reader Tool
« Reply #37 on: April 27, 2014, 04: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.

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #37 on: April 27, 2014, 04:12:46 PM »

Re: SC4Reader Tool

Offline memo

  • *
  • *
  • *
  • *
  • Posts: 1765
  • Country: de
  • Total likes: 16
  • Reputation: 34
  • Gender: Male
  • CL: RULin' RULin' RULin'
Re: SC4Reader Tool
« Reply #38 on: April 28, 2014, 01: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. ;)

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #38 on: April 28, 2014, 01:00:53 AM »

Re: SC4Reader Tool

Offline HurricaneMod10

  • *
  • Posts: 25
  • Country: us
  • Total likes: 0
  • Reputation: 0
  • Gender: Male
  • Tropical Weather Creations
Re: SC4Reader Tool
« Reply #39 on: May 06, 2014, 09: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!

Sim City 4 Devotion Forums

Re: SC4Reader Tool
« Reply #39 on: May 06, 2014, 09:47:33 AM »

 


If you experience visual glitches in our site, we strongly suggest you to use Firefox to browse the forums. Also a 1024*768 or higher resolution is highly recommended to view this site

SMF 2.0.13 | SMF © 2016, Simple Machines
TinyPortal © 2005-2011
SMFAds for Free Forums

Page created in 0.823 seconds with 105 queries.