Jump to content

46 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    1 minute ago, ebones5 said:

    I'll be sure to post back if I get it up and running.

    Yay! *:)

     

    I suspect theses two lines are what would confuzzle the Mac:

    local cmUserDir = os.getenv("USERPROFILE")
    cmOutputPath = cmUserDir .. [[\My Documents\SimCity 4\]]

    That os.getenv command is very likely Windoze specific.

     

    One thing before you go tweaking: Have you tried creating the CoriReport.ini file and changing the output path there? Scroll back up to post # 1 and find this part:

    7010-4599.jpg

    ^ I've underlined the part to change in green.

    This would need to be a valid Mac Path where the output report text file has permission to be written and it's assuming CoriReport.ini can be read by your game if placed in the same folder as the SimCity 4.exe.

    • Thanks 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    Oh, and another thing which might need tweaking if CoriReport.ini can be read would be in the Lua code itself in the first module on the 66th line:

    cmOutputPath = string.sub(line,16) .. [[\]]

    You'll prolly need to change that backslash to a forward slash. (In hindsight I could've let that be passed as part of the custom path instead of tacking it on the end via the Lua code.)

    • Thanks 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    Me again. :O

    Here's a different plan. Starting with the original download of my mod, look for lines 39 and 40 in the first Lua module:

        local cmUserDir = os.getenv("USERPROFILE")
        cmOutputPath = cmUserDir .. [[\My Documents\SimCity 4\]]


    Then change those to:

    --    local cmUserDir = os.getenv("USERPROFILE")
        cmOutputPath = [[/Users/ebones5/Desktop/SomeFolder/]]

    The two dashes added at the very start in the first line comment it out so the Lua interpreter doesn't execute it. Then in the next line the "ebones5" needs to be whatever your user name is on your comp and the "SomeFolder" needs to be a folder you have created.

    I suspect the line with the os.getenv might cause the whole code to fail on a Mac before it even gets to the point of checking for a passed path from CoriReport.ini.

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    So I have tried everything, commenting out the getenv, trying a ton of different output paths and I've got nothing. I think the issue is that the Aspyr version was sold on the Mac App Store, which requires "Containers" for all applications, I have tried to remove the container in the past (for some reason I can't remember) but the application would crash on launch. Even running the program as sudo and with full disk access has yielded no results. I'm gonna keep trying it for a little bit, but I doubt I'll really get anywhere. Thank you for your help!

    • Like 2

    Share this post


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

    I got it to work! For anyone who has a Mac and wants to edit the code (this only applies to the Aspyr version, I think the Steam version can be set to any folder as its not sandboxed AFAIK).

    --local cmUserDir = os.getenv("USERPROFILE")
       cmOutputPath = [[/Users/yourUserName/Library/Containers/com.aspyr.simcity4.appstore/Data/Documents]]

    Do NOT use "~/" as the shortcut to your home directory it will NOT work. This directory is the only one I was able to get to work, I think it has to do with the fact that the application can only write to its "container" folder, but I'm not an expert on Mac development.

    And as stated above change the "\" to a "/"

    14 hours ago, CorinaMarie said:

    Oh, and another thing which might need tweaking if CoriReport.ini can be read would be in the Lua code itself in the first module on the 66th line:

    cmOutputPath = string.sub(line,16) .. [[\]]

    You'll prolly need to change that backslash to a forward slash. (In hindsight I could've let that be passed as part of the custom path instead of tacking it on the end via the Lua code.)

    I'm still having issues with the ini, so I'll try and figure that out and post back if I get it working, but what's important is you can get data!

    EDIT: I was able to get the INI working! I could not get it to autogenerate, so I made one myself and pathed it to the same Documents folder. I don't know if it's the same for Windows, but the ini is case sensitive! So "CreateCSV" doesn't work while "createcsv" does. 


      Edited by ebones5  

    INI Success
    • Like 3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    6 hours ago, ebones5 said:

    I got it to work!

    Woot! *:)

     

    6 hours ago, ebones5 said:

    EDIT: I was able to get the INI working!

    Double woot! *:thumb:

     

    6 hours ago, ebones5 said:

    I could not get it to autogenerate, so I made one myself and pathed it to the same Documents folder.

    It doesn't auto generate. Even for Windoze the file does need to be created manually. *;)

     

    6 hours ago, ebones5 said:

     I don't know if it's the same for Windows, but the ini is case sensitive! So "CreateCSV" doesn't work while "createcsv" does. 

    This is quite peculiar. :O

    In the Lua module CA63E2A3-4A5E8EF6-434F5249, the code block for dealing with the CorReport.ini is lines 56 thru 119. More specifically, line 62 is:

    local SmooshedLine = string.lower(line)

    which should convert what it read to all lower case. :lost: And from there is does do all the comparisons to a lower case text match.

    Ofc, if writing the .ini file with only lower case is what makes it work, we can consider that a viable workaround.

     

    Thanks so much for reporting back that you've gotten it to work and how it can be done. *:party:

    As you use the reports, you will likely find things which don't seem to match up. For instance (as only one of many examples) if counting the number of stations, the game data is really showing the number of cells occupied by stations and not a true station count as we humans would expect.


    Edit: One thing I suspect might not work is the UniqueFilename option in the .ini. It calls the OS to get the time and that might be a Windoze only function. The workaround would be to make sure at least one day has passed in the game before creating a new report.

    • Like 1
    • Thanks 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    Hello,

    it doesn't work for me. I put the .dat file in the plugins folder and the.ini file in app folder, but nothing happens. I can see though the popup message on game news.

    Maybe it's a .ini file problem?

    Share this post


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

    Hi @joe1987

    That sounds a bit unusual.

    It seems like there could be some transparency affecting the window somehow, and possibly a conflict with some mod which alters the game's UI panels. Maybe try adding The_CORI_Reports_beta_v02e.dat inside a folder which loads last, or try with an empty Plugins folder to check it works standalone.

    For the .ini file, this is what controls the parameters for the report creation with the formats, but the actual news popup should still appear. Does it also show this same way if accessing the news item from the City Planner advisor feed? I suspect it will do since this shares the same method of being listing.

    There's also this which might be worth enabling:

    Play Options - Urgent Advice Dialogs.png


    Toggling this on should make the report dialog popup when first loading a city.

    Should any of the above not work, if you could post a pic of the problem, that would help us diagnose what else specifically might be the problem here.

    • Thanks 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 7/10/2020 at 12:17 AM, Cyclone Boom said:

    Hi @joe1987

    That sounds a bit unusual.

    It seems like there could be some transparency affecting the window somehow, and possibly a conflict with some mod which alters the game's UI panels. Maybe try adding The_CORI_Reports_beta_v02e.dat inside a folder which loads last, or try with an empty Plugins folder to check it works standalone.

    For the .ini file, this is what controls the parameters for the report creation with the formats, but the actual news popup should still appear. Does it also show this same way if accessing the news item from the City Planner advisor feed? I suspect it will do since this shares the same method of being listing.

    There's also this which might be worth enabling:

    Play Options - Urgent Advice Dialogs.png


    Toggling this on should make the report dialog popup when first loading a city.

    Should any of the above not work, if you could post a pic of the problem, that would help us diagnose what else specifically might be the problem here.

    Hello @Cyclone Boom,
    sorry for very late reply. I don't have a pop-up problem: I can see the C.O.R.I. Report pop-up as I load a city, I just can't get the text report as I click on "CurrentCityDataReport" or "RuntimeTablesReport" or "AllTablesRawReport". Should I set up my folder wher text are stored? Thank you.

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    24 minutes ago, joe1987 said:

    Should I set up my folder wher text are stored?

    By default the text reports should go into the SimCity 4 folder in Documents. This should happen even without the .ini file.

    The original mod was written and tested for Win XP and Win 7 so with any other OS it's possible something is interfering.

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 12/1/2021 at 4:18 PM, CorinaMarie said:

    By default the text reports should go into the SimCity 4 folder in Documents. This should happen even without the .ini file.

    The original mod was written and tested for Win XP and Win 7 so with any other OS it's possible something is interfering.

    Thank you @CorinaMarie, I think I solved it. I had to change folder option (I don't know why it was read only) and to adjust the .ini file in the proper way.  The folder couldn't be written then it didn't work.  I couldn't get the .txt report, now I finally can. Thanks again for help.

    • Like 3

    Share this post


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

    @Raymond7cn

    In reference to your post, and more specifically this part:

    2 hours ago, Raymond7cn said:

    a = create_reward_cityplanning('031F0000')
    function a.condition()
        if (game.g_population < tuning_constants.MAYOR_HOUSE_POP) then
            return  [[text@aa81d58c]]
    else
            return reward_state.AVAILABLE
        end
    end
    a.once = 1
    a.timeout = tuning_constants.ADVICE_TIMEOUT_LONG
    a.title   = [[text@0a5d302d]]
    a.message   = [[text@aa5d3031]]


    I've added the advices table output to the All Tables Report.

    As I mentioned in your thread, those are how each entry gets created. Here's what it looks like as the game sees it:

      [542] =     {
          class_id = 2855738418
          timeout = 1000000
          guid = 52363264
          condition = "function: 0E235DF0"
          message = "text@aa5d3031"
          persist = 1
          title = "text@0a5d302d"
          mood = 5
          priority = 100
          once = 1
          type = 23
          _base =         {
              class_id = 2315908596
              guid = 0
              mood = 3
              command = 0
              priority = 100
              type = 0
              timeout = 36000
              trigger = "0"
              event = 0
              news_only = 0
              message = ""
              title = ""
              effects =             {
                }
              persist = 0
              once = 0
              no_timeout = 0
              frequency = 720
            }
        }

    The _base is a copy of the template which was used so ignore anything in that part. Now in the code you quoted, from this part: a = create_reward_cityplanning('031F0000'), the 031F0000 gets converted to decimal and that's what matches up to the guid = 52363264 in the above table entry. Now, this may not be of any use to you, but if you are testing new advice creation you can check how the game sees it. *;)


    Here's the updated file: The_CORI_Reports_beta_v02f.dat

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    How would I install CORI Reports on Windows 10? The Reports do not create any text files on Windows 10 inside the SimCity 4 folder.


    Michael J Bull

    Share this post


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

    Hi @MichaelJBull769

    I've moved your question into the dedicated C.O.R.I. Reports thread for consolidation. *;)


    A first thing to try is create the CoriReport.ini file inside your SimCity 4 folder at: Documents\SimCity 4\CoriReport.ini

    See Cori's opening post for details on how to set the output path inside this .ini file.

    • Thanks 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    40 minutes ago, MichaelJBull769 said:

    How do I delete an file if windows fails to write the text file???

    Windows 10 Tip: Manage Files and Folders with File Explorer

    • Thanks 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

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

    Register a New Account


    ×

    Thank You for the Continued Support!

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

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

    Make a Donation, Get a Gift!

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

    STEX Collections

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

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections