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: iLives Reader 1.x Official support thread  (Read 102925 times)

0 Members and 1 Guest are viewing this topic.

Offline dlo§rhuj

Re: iLives Reader 1.x Official support thread
« Reply #240 on: August 23, 2016, 12:47:06 PM »
I tried editing the SimCity_1.dat in the latest iLive Reader (1.54) and I think it corrupted it. At least, SimCity 4 now doesn't start up anymore and just fails silently. I think it's got nothing to do with the edit itself, it must be a bug in the iLive Reader.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #240 on: August 23, 2016, 12:47:06 PM »

Re: iLives Reader 1.x Official support thread

Offline Andreas

  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 4644
  • Country: de
  • Total likes: 811
  • Reputation: 33
  • Gender: Male
    • SimCityPlaza
  • CL: ()bobby() Transit Controller
Re: iLives Reader 1.x Official support thread
« Reply #241 on: August 23, 2016, 01:47:09 PM »
The Reader was never designed to edit the SimCity_1.dat itself, but it was always advised to copy the modified data into a new *.dat file. You can "collect" the properties that you want to change with the "Add to patch" feature, and then save them into a new file in one go. This is basically the way how all mods for SC4 were created.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #241 on: August 23, 2016, 01:47:09 PM »

Re: iLives Reader 1.x Official support thread

Offline fafalone

Re: iLives Reader 1.x Official support thread
« Reply #242 on: January 02, 2017, 08:54:46 PM »
So if anyone is updating things still, would it be possible to take a look at the LUA script exprop_SetValue function? Still has the bug where only strings are properly set.

Would start in ReaderLua.cpp,

i've been trying to set UInt32 (type 0x300) properties, so it appears it's done here,

Code: [Select]
                case (0x700):
        case (0x300):
                case (0xB00):
        case (0x100):
dwVal  = (int)lua_tonumber  (state, 2);
iPos   = (int)lua_tonumber  (state, 3);
if (iPos < pProp->dwValue.GetSize())
pProp->dwValue.SetAt(iPos,dwVal);

                    break;   


Now the exprop_SetDesc is able to set its UInt32 value with
Code: [Select]
unsigned int exprop_SetDesc (lua_State *state)
   {    
_examplar_prop* pProp = (_examplar_prop*)(int) lua_tonumber (state, -2);
if (pProp)
{
pProp->dwDesc = (int) lua_tonumber (state, -1);                
}   
        return 0;
   }

So maybe that way?

I'd try it myself but after installing a couple different VS versions and 3 different SDKs, my VS2008 compiler is so thoroughly messed up I can't even compile hello world after countless hours trying to fix paths (no, running vcvarsall.bat didn't help), much less something as complex as reader.                 

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #242 on: January 02, 2017, 08:54:46 PM »

Re: iLives Reader 1.x Official support thread

Offline Tropod

Re: iLives Reader 1.x Official support thread
« Reply #243 on: March 18, 2017, 01:34:51 AM »
So if anyone is updating things still, would it be possible to take a look at the LUA script exprop_SetValue function? Still has the bug where only strings are properly set.
...

Not sure I properly understand this issue &mmm. So if you (or anyone?) would care to elaborate on this issue including providing a sample that highlights the issue, & possible fix, I'd be more than happy to take a look & see about fixing source code & updating it  :thumbsup:.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #243 on: March 18, 2017, 01:34:51 AM »

Re: iLives Reader 1.x Official support thread

Offline fafalone

Re: iLives Reader 1.x Official support thread
« Reply #244 on: April 23, 2017, 12:17:40 AM »
When you're adding/setting a property, there's name value, data type, rep, and value...
Code: [Select]
         exprop = reader:exprop_Add(exemplar)
         reader:exprop_SetType(exprop,0x300)
         reader:exprop_SetDesc(exprop,0x8A2602B9)
         reader:exprop_SetRep(exprop,1)
         reader:exprop_SetValue(exprop,"0x0000097A")
That SHOULD add an item order, which is type UInt32, set to 97A. Instead it sets it to a random value, or 0 (random if value quoted like above, zero if unquoted, have tried rep=0 also)

But when it's used on a string value. e.g.
Code: [Select]
         exprop = reader:exprop_Add(exemplar)
         reader:exprop_SetType(exprop,0xC00)
         reader:exprop_SetDesc(exprop,0xEA296F8F)
         reader:exprop_SetRep(exprop,0)
         reader:exprop_SetValue(exprop,"Test3")

It works fine.

this is the LUA scripting feature, the above is part of a script I wrote myself to automate editing lots. the code in my last post is from the reader source code that is behind that script's function call.

Any fix would really be a guess on my part.. can't really be more specific beyond looking at how the strings and other things like the UInt3 Desc are set without the ability to run the compiler. I did recently install VS2013, maybe I'll try compiling with that if it can load VS2010 projects..
« Last Edit: April 23, 2017, 12:33:24 AM by fafalone »

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #244 on: April 23, 2017, 12:17:40 AM »

Re: iLives Reader 1.x Official support thread

Offline Tropod

Re: iLives Reader 1.x Official support thread
« Reply #245 on: April 23, 2017, 02:49:46 PM »
...
this is the LUA scripting feature, the above is part of a script I wrote myself to automate editing lots. the code in my last post is from the reader source code that is behind that script's function call.

Any fix would really be a guess on my part.. can't really be more specific beyond looking at how the strings and other things like the UInt3 Desc are set without the ability to run the compiler. I did recently install VS2013, maybe I'll try compiling with that if it can load VS2010 projects..

I've never actually used script functionality myself to be honest. You able to upload copy of the script?
VS2013 you'll probably have to disable/surpress unicode warnings otherwise it won't compile, or alternatively change all code multi-byte->unicode.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #245 on: April 23, 2017, 02:49:46 PM »

Re: iLives Reader 1.x Official support thread

Offline jeffryfisher

  • Uncle Jeff
  • *
  • Posts: 15
  • Country: 00
  • Total likes: 12
  • Reputation: 0
  • Gender: Male
  • The most local level of gov't is one citizen
    • Liberating Digital Content
Re: iLives Reader 1.x Official support thread
« Reply #246 on: December 18, 2017, 08:36:28 PM »
Request to moderators: Tarkus's warning helps, but... If you have access to the OP on page 1, please nullify obsolete links and add (near the top) a "Find most recent download here" link that points to the latest version (or post in this thread that does so). This thread is now long enough that hunting for the latest is both tedious and prone to error.

Also, for anyone who hadn't already cottoned to the fact: There's an SC4 Reader out there that is NOT the iLives Reader! It should have been obvious except that they are (or were recently) simultaneously and unfortunately both most-current at v1.54. Adding to the confusion, there's at least one not-quite-helpful forum post out there on a site that shall remain nameless that touted iLives v1.54 but linked to the download for SC4 Reader v1.54 (the one I followed a few months ago but can no longer find).

I have now downloaded iLives v1.54 from Dropbox and can now use your superior app. Please alert me if I missed a more recent version.

Modding PC games since 1993 (back when we needed hex-editors)

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #246 on: December 18, 2017, 08:36:28 PM »

Re: iLives Reader 1.x Official support thread

Offline tomvsotis

Re: iLives Reader 1.x Official support thread
« Reply #247 on: December 18, 2017, 09:13:59 PM »
wait, really? Where's the Fries? (next time we'll wash your mouth out with soap) is SC4 Reader?

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #247 on: December 18, 2017, 09:13:59 PM »

Re: iLives Reader 1.x Official support thread

Offline Tarkus

  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 11121
  • Country: us
  • Total likes: 3536
  • Reputation: 69
  • Gender: Male
  • NAM Team Tankadillo
    • NAM HQ
  • CL: Dr. PuzzlePiece
Re: iLives Reader 1.x Official support thread
« Reply #248 on: December 18, 2017, 10:21:40 PM »
Thanks for the heads up on the need for further clarification, Jeff--I've gone ahead and made an addendum to my initial edit, with a link to ilive's Reader 1.5.4 and its source code.

wait, really? Where's the Fries? (next time we'll wash your mouth out with soap) is SC4 Reader?

SC4 Reader is another tool that does a lot of the same things as ilive's Reader, and was also developed by Tropod--who, coincidentally enough, also did the Version 1.5.x work on ilive's Reader.  The most recent version of SC4 Reader is actually Version 1.5.6 now, after an update in September 2017.

-Alex

-Alex

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #248 on: December 18, 2017, 10:21:40 PM »

Re: iLives Reader 1.x Official support thread

Offline tomvsotis

Re: iLives Reader 1.x Official support thread
« Reply #249 on: December 19, 2017, 01:53:58 AM »
Huh, cool. Good to know. (And point taken on the whereabouts of the fries.)

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #249 on: December 19, 2017, 01:53:58 AM »

Re: iLives Reader 1.x Official support thread

Offline Kitsune

Re: iLives Reader 1.x Official support thread
« Reply #250 on: May 30, 2018, 07:30:00 PM »
1.5.3 and 1.5.4 keep corrupting exemplars - as in 0'ing all but the one I'm working on out after I do 3-4 saves in a row on a file. Is there any solution to this ?

Edit: To add... its also zero-ing out all the exemplars if I delete a property in one exemplar.
« Last Edit: May 30, 2018, 07:38:44 PM by Kitsune »

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #250 on: May 30, 2018, 07:30:00 PM »

Re: iLives Reader 1.x Official support thread

Offline twalsh102

Re: iLives Reader 1.x Official support thread
« Reply #251 on: June 01, 2018, 10:58:27 AM »
Although we have all been taught that you always save after making changes, what I've found with the newer versions of Reader (specifically 1.5.3 and 1.5.4) is that if one saves more than once when a file is open, something is going to get corrupted.  I've experienced PNGs getting blanked or turned into apparent text files, LText files getting scrambled, and like you, exemplars getting corrupted.

To get around this, I've adopted the simple expedient of either waiting until after I've made all my modifications before saving, or having saved the first time and then discovering another change to make, closing the file and reopening it before making further changes.

I haven't experienced any corruption when following these guidelines.  But every once in a while, I won't pay attention to what I'm doing, save more than once, and end up with corruption.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #251 on: June 01, 2018, 10:58:27 AM »

Re: iLives Reader 1.x Official support thread

Offline Tyberius06

Re: iLives Reader 1.x Official support thread
« Reply #252 on: June 01, 2018, 12:15:55 PM »
Hi!
I already explained this to Kitsume via discord. You can save as many time as you want. You can have opened even more than one file, but BEFORE you would save any of the opened and modified files, you HAVE TO  hit the "reindex" and the "rebuilding DIR file" commands. Right click in the middle panel on any of the examplars etc. and there you find in the menu the above mentioned commands.

- Tyberius
You may find updates about my ongoing projects into my development thread here at SimCity 4 Devotion: Tyberius Lotting Experiments
or over there on Simtropolis into the Show Us What You're Working On thread.
I'm also working on some preservation projects the behalf of non-anymore-active-developpers.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #252 on: June 01, 2018, 12:15:55 PM »

Re: iLives Reader 1.x Official support thread

Offline twalsh102

Re: iLives Reader 1.x Official support thread
« Reply #253 on: June 01, 2018, 04:05:49 PM »
Thanks for the info!  Is this in any documentation anyplace where I might have missed it, or is this just one of those many things that is learned accidentally?
I'll have to remember to give this a try the next time I run into this phenomenon.  Not exactly the most intuitive process.  I knew about using those commands when adding or removing subfiles, but re-indexing when one isn't doing anything to affect the index is definitely counter-intuitive.  Rebuilding the DIR file might make sense if whatever you are doing changes a compressed file to an uncompressed file.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #253 on: June 01, 2018, 04:05:49 PM »

Re: iLives Reader 1.x Official support thread

Offline Kitsune

Re: iLives Reader 1.x Official support thread
« Reply #254 on: June 03, 2018, 12:25:24 PM »
Yep it is bizzare that changing a value in exempler A > then saving > will zero out exemplers b to d. Frustrating too as I've had instances that reindexing will crash the program. Also, I thought DIR's are only for compressed files? As the exemplars getting 0'ed out are not compressed, and hence not listed in the DIR.

Edit: Upon further thought.... the only files that are getting corrupted are the ones not in the DIR. That is including uncompressed PNG, LTEXT, and Exemplars. So it seems reader is doing some kind of check involving the DIR when saving and corrupting uncompressed files; its not doing the check if you reindex first.
« Last Edit: June 03, 2018, 12:37:22 PM by Kitsune »

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #254 on: June 03, 2018, 12:25:24 PM »

Re: iLives Reader 1.x Official support thread

Offline mgb204

Re: iLives Reader 1.x Official support thread
« Reply #255 on: June 03, 2018, 04:59:20 PM »
Have you tried simply moving all files into a new DAT. As you state, DIR files are necessary to index the entries of compressed content/properties. But if the file has no such compressed content, no DIR file should be present in the first place. I suspect you may have a file where compressed content did exist but was removed somehow. But if you use the Patch function of Reader, you shouldn't ever have DIR files unless you need them.

I'd try removing the DIR file from any such DATs where no compressed files reside. However, that's potentially going to go wrong (even with 0.93), if you simply remove the DIR file itself. So the best method would be to copy/paste all contents into a new reader session, then saving a new DAT and work from there.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #255 on: June 03, 2018, 04:59:20 PM »

Re: iLives Reader 1.x Official support thread

Offline Kitsune

Re: iLives Reader 1.x Official support thread
« Reply #256 on: June 03, 2018, 07:07:33 PM »
Have you tried simply moving all files into a new DAT. As you state, DIR files are necessary to index the entries of compressed content/properties. But if the file has no such compressed content, no DIR file should be present in the first place. I suspect you may have a file where compressed content did exist but was removed somehow. But if you use the Patch function of Reader, you shouldn't ever have DIR files unless you need them.

I'd try removing the DIR file from any such DATs where no compressed files reside. However, that's potentially going to go wrong (even with 0.93), if you simply remove the DIR file itself. So the best method would be to copy/paste all contents into a new reader session, then saving a new DAT and work from there.

So this particular file has 212 compressed files, and 18 uncompressed. I'm thinking the better way to go might just be to compress everything. As much I know ... I know there is still a lot unknown.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #256 on: June 03, 2018, 07:07:33 PM »

Re: iLives Reader 1.x Official support thread

Offline eagle74

Re: iLives Reader 1.x Official support thread
« Reply #257 on: June 13, 2018, 10:37:54 AM »
Well I managed to corrupt a few files with V1.54 yesterday, & spent the afternoon getting the game working again.  I knew better from past reading of these threads & usually only use 1.54 when absolutely necessary.  0.93 works fine for most of my tweaking.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #257 on: June 13, 2018, 10:37:54 AM »

Re: iLives Reader 1.x Official support thread

Offline briansgenius

Re: iLives Reader 1.x Official support thread
« Reply #258 on: November 27, 2018, 07:17:55 PM »
So I must be an uber newb cuz my issue isn't addressed here. Upon opening .exe I receive error message "Failed to open C:\Program Files(x86)\Steam\steamapps\common\Sim City 4 Deluxe\English US\SimCityLocale.DAT" Which I rectified by creating the subfolder "English US" and copying the dat file to it. In either case I was still presented with a Microsoft Visual C++ error "Program C: etc etc Reader.exe This application has requested the Runtime to terminate in an unusual way. Please contact useguys 4 halp" and that's where I'm stuck now. I already had Visual 2015 but installed 2008 and the SP1 Redistributable Package (x86) on Windows 10.

Sim City 4 Devotion Forums

Re: iLives Reader 1.x Official support thread
« Reply #258 on: November 27, 2018, 07:17:55 PM »

 


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 1.18 seconds with 107 queries.