Jump to content
Pixelrage

Using DAMN Manager with Steam version of SimCity 4?

52 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

I've spent the past two weeks attempting to get DAMN Manager to work with the Steam version of SimCity 4 and I just give up. It doesn't work for me, and I simply don't know why, or what to do.

I'm guessing this has something to do with permissions. I saw this in the readme file:
 

Quote

"Something" doesn't work, I see a blank window with the menu contents, what to do: check the properties of the shortcut to SimCity, in the "Start in" property path cannot have "/Apps" string, remove this part from the path.

This is exactly my issue. Open the News Ticker in-game and nothing appears. The thing is, the Steam version doesn't have a shortcut with an "Apps" path. The Steam shortcut just says "steam://rungameid/24780".

I've tried everything. Uninstall, reinstall. I've tried installing it in the Urgent Advice box, same issue (blank screen). I've tried running it + a copy of all plugins in the default plugins area (Documents/SimCity 4/plugins) and in the Steam plugins area (Program Files x86/Steam/SteamApps/common/SimCity4 Deluxe/Plugins). Same issue.

I realize that DAMN Manager was created years ago and is basically abandonware at this point. I'd be eternally grateful if someone could help. I'm frustrated and I have so many mods that the game is unplayable without something like DAMN Manager, yet I just cannot get it to work no matter what I do.

Share this post


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

The problem here is simply that Steam don't use the default or standard path that pretty much every other version of SC4 does. The DAMN tool was not coded in such a way that it takes account of this, but in short it needs to access files in the Apps directory of the install. Provided you can point it to that folder (somewhere inside the Steam directory, there should be a specific folder for SC4, this should have an Apps subfolder, where the main .exe (executable) for SC4 is located.

If no such folder exists, there are potential ways to "fake it", but those aren't for the feint of heart technically speaking.

  • Like 1
  • Yes 1

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


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

    Thank you @rsc204 - there actually is an Apps directory with Steam: Program Files (x86)\Steam\SteamApps\common\SimCity4 Deluxe\Apps which contains a SimCity4.exe file. I saw a very old forum post that recommends removing that file backward one level into \SimCity4 Deluxe to make DAMN Manager work, but the game will not load and will show an error if you do this.

    It sounds like the only to ways to fix this would be:

    1. Figure out how to get the Steam version to stop using the "Steam path" and use Documents\SimCity4\Plugins instead (no idea if this is even possible, or how to do it if it is) or
    2. Create a fake set of folders to mimic the original SimCity 4 structure at Program Files (x86)\Maxis\SimCity 4 Deluxe\Plugins\ -- then copy and paste everything from \Apps into that folder to 'trick' DAMN Manager...and then, hope that works...although it probably won't.

    Or of course, the final option is to just install the original version and not use Steam anymore...

    EDIT: tested both of those options above, neither works. This just does not work at all with Steam. Really disappointed :(

    Share this post


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

    OK, looks like I've got started in the wrong line of thought, yes this is to do with the "Start In" part of a shortcut, but that's a problem with Steam in a very different way.

    So by default, the SC4 shortcut to run the game is often given the location with the \apps folder when the game is installed. But, this link needs adjusting to the previous folder, by default:

    C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Plugins

    This start in property simply tells Windows when the application is run, to use that location as the default. A more typical usage example would be when a File Open dialogue is shown by the application, it will show the files inside the path listed in the "Start In" property.

    Now, here's where things get a might fuzzier... for reasons not entirely clear to me, for DAMN to work, this setting must be linked to the Install Dir Plugins folder, in your case: 

    C:\Program Files (x86)\Steam\SteamApps\common\SimCity4 Deluxe

    However, one of the key "features" of using Steam, is that it's launcher application handles starting the game, not a Windows shortcut. So, being able to set this directory during the startup of SC4 can not be done using the usual shortcut method for other SC4 versions.

    So the real questions here are:

    • Why does the DAMN manager require this setting to function?
      Not being hugely familiar with DAMN, I simply don't understand this. After all, it's not a .DLL, any such plugins should always be loaded when you run the game? Clearly this isn't the case, hence the readme stating this partcular setting being required. Perhaps there is a workaround here?
    • Can we find a way to force this setting from within the Steam launcher?
      Within Steam, you do have the "Set Launch Options" function. But this is to add command line switches. I don't think it's possible to add a Start In location, but then I'm also not a huge user of Steam either (I have like 1 game I paid for).
    • Alternately, is there a setting we can change outside of Steam, that will still have the same effect when the game runs?
      Possibly. Within the Windows Registry, there is usually some way to achieve most things you want. Since you can assign behaviour to the application that won't care where a given .exe is ran from and will just do what you tell it. However, I'll need to dig into that one a bit, since one other thing is nagging at me...

    You see I come at this problem with absolutely 0 knowledge of DAMN personally. I used MMLs, found I didn't like them much, ignored DAMN and just manually tuned the Menu Order of all my content, which I found a satisfactory solution. However, I'm currently handling the RTMT 4.0 development and a part of that is trying to make DAMN work with this, since it was supported for the 3.6 release. I recall the previous leader of RTMT, Z, had some ideas regarding the problems for Steam users + DAMN. But I have to dig that out, I'm not sure if an absolute solution was noted, or just an idea, but either way, I don't think any of us (developers) has the Steam version, ergo it never got tested. Let me try to find this, I have a feeling it will match my Registry fix idea.

    • Thanks 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


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

    While I haven't ever used the DAMN thing, I am a wee bit familiar with some of @Daeley's coding (which is totally brilliant). When I was writing my CORI Reports mod I downloaded every file I could find on the STEX which mentioned LUA Scripting. The one which did me the most good was BSC Daeley Regional Tracking Mod because that's where I learned from his code how to open and read from or write to a file outside of the game whilst the game is running.

    The thing that bugged me was that it insisted on placing the newly created file in my installation Apps folder. I narrowed that down to this line of his code:

    BSCfieldsfile = [[Apps\BSCfields.dat]]

    Then I tweaked my own to be:

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

    And then later also created an .ini file where a custom path could be entered. This latter part is more sophisticated than I suspect the DAMN needs. You can also check out the notes I added to the aforementioned Tracking Mod whereby simply removing the Apps\ part then allows the files to be created where the Start In of the shortcut points to.

    So, I suggest peeking in the LUA part of the DAMN manager and look for a line which has some kind of data-file-like variable name and it equals Apps\Something. Changing that line to the path you need for Steam may be all that's necessary. (Ofc, look to see if there is more than one reference to the path throughout the code.)

    If nothing else, this might point you in the right direction for what to look for. *;)

    • Like 3

    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:  
     

    Thanks for the replies! Looks like DAMN only has a "settings.ini" but no reference to any path. I'm no programmer, but I opened every file in Wordpad and there seems to be no reference to "\apps" anywhere, nor to the Plugins folder path. It must be compiled in to DAMN somewhere.

    It's really too bad @Daeley disappeared...this could probably be a simple fix that takes a minute to do to make a separate version of DAMN for Steam users.

    For now, I just uninstalled the Steam version and dug out my original SimCity 4 box from 2003 and installed that! I don't think there's any hope for the Steam version without a lot of time and headaches.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    13 minutes ago, Pixelrage said:

    Thanks for the replies! Looks like DAMN only has a "settings.ini" but no reference to any path. I'm no programmer, but I opened every file in Wordpad and there seems to be no reference to "\apps" anywhere, nor to the Plugins folder path. It must be compiled in to DAMN somewhere.

    It's really too bad @Daeley disappeared...this could probably be a simple fix that takes a minute to do to make a separate version of DAMN for Steam users.

    For now, I just uninstalled the Steam version and dug out my original SimCity 4 box from 2003 and installed that! I don't think there's any hope for the Steam version without a lot of time and headaches.

    Maybe don't give up just yet, Corina's onto something very promising...

    The only code which seems to reference paths (skimming a little), is as follows:

    -- os.execute("echo off & del list.txt & for /R %i in (*.damn.lua) do echo %i >> list.txt") -- game loses focus :(
     local luainput = io.open([[Plugins/DAMN/Support/DAMN-index.txt]])
     local line = 1 
     while (line) do
      line = luainput:read("*l")
      if (line) then
       DAMenu.interpret(line)
      end
     end

     

    In the event that the "Start In" path was required to get to Plugins, then theoretically altering that code as follows with the full path should work:

    -- os.execute("echo off & del list.txt & for /R %i in (*.damn.lua) do echo %i >> list.txt") -- game loses focus :(
     local luainput = io.open([[C:/Program Files (x86)/Steam/SteamApps/common/SimCity4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])
     local line = 1 
     while (line) do
      line = luainput:read("*l")
      if (line) then
       DAMenu.interpret(line)
      end
     end

     

    No idea why the code switches the forwardslashes to backslashes, just a quirk of LUA code? Assuming C:/ works in this context, not to mention that you are using drive C, this is a simple change to test. I can't really do that and know for certain it would work with Steam. However, when I gave it the exact path for my install, then added the "\Apps" folder to the end of my Start In shortcut to screw it up, DAMN still appears. So there's a reasonable chance this might fix the issue.

    Thanks to Corina, I wouldn't have thought to look for the path in the LUA script otherwise.

    I've made the changes to the attached "customMenu.dat" file. Replace the old one with this (DAMN\Support) and test it, keep the unmodified original file, you might need to restore it.

    customMenu.dat


      Edited by Cyclone Boom  

    Added into formatted LUA code blocks for clarity. ;)
    • Like 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    17 minutes ago, rsc204 said:

    I wouldn't have thought to look for the path in the LUA script otherwise.

    Now I'll suggest that you might change that whole path to be in the user's Documents folder. That DAMN-index.txt doesn't really need to be in the installation folder IMO. As long as the program can find it it could then be placed somewhere that the user doesn't need Administrator Rights and permission from God and all that silly stuff.

    • Like 3

    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:  
     
    11 minutes ago, CorinaMarie said:

    God

    Even god would struggle to get permission in Win10!

    13 minutes ago, CorinaMarie said:

    Now I'll suggest that you might change that whole path to be in the user's Documents folder

    Well Step 1 is to be sure it actually works with Steam... I believe that's a breakthrough of sorts in itself. Then where to set the path too becomes tricky, because it really needs to be somewhere all users will be happy with. Since I don't see the vast majority editing LUA scripts, even though it's really nothing complex in practise. So, let's cross that bridge when we come to it, but there is certainly some merit to your thinking.

    • Like 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, rsc204 said:

    So, let's cross that bridge when we come to it, but there is certainly some merit to your thinking.

    You could set up an .ini file like I did for my CoriStarts.ini and add a version of my code to read that. Then peeps could set it up to be placed wherever they'd like. (I didn't quote all my code above so you'd want to grab my file and peruse the following few code blocks in it.)

    • Like 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:  
     

    @rsc204

    Just a small observation I've made with the path...

    Would this need a space adding after "City" in "SimCity4" to set it as the correct path for Steam?


    As follows:

    local luainput = io.open([[C:/Program Files (x86)/Steam/SteamApps/common/SimCity 4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])

     

    • Yes 1

    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:  
     

    I'm ready to test this out! However, there doesn't seem to be a file called "customMenu.dat"  either in DAMN\Support nor elsewhere...was that file called something else?

    Also - confirming that Cyclone is correct, there is a space before and after the "4" in the path for the game

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 minutes ago, Pixelrage said:

    Also - confirming that Cyclone is correct, there is a space before and after the "4" in the path for the game

    Well I simply used the information given to me:

    5 hours ago, Pixelrage said:

    there actually is an Apps directory with Steam: Program Files (x86)\Steam\SteamApps\common\SimCity4 Deluxe\Apps

    It's not a problem, but it does mean the file I uploaded won't work properly. It's late (2:30am), so I'll update the attachment tomorrow. But please double check the exact path and reply here, because it needs to be exact as things stand. I'll then upload a modified copy.

    14 minutes ago, Pixelrage said:

    I'm ready to test this out! However, there doesn't seem to be a file called "customMenu.dat"  either in DAMN\Support nor elsewhere...was that file called something else?

    I literally download DAMN today from the LEX, it absolutely must be part of the install, without it, you have no LUA scripts with which to read the index of files for DAMN or add anything to the SC4 news system. The Support folder should contain all these files:

    • customMenu.dat
    • DAMN readme.html
    • DAMN-Indexer.cmd
    • PLACEHOLDER

    If you are missing some, try running the installer again, make sure you specify the correct path to the INSTALLDIR for SC4, i.e.:

    Program Files (x86)\Steam\SteamApps\common\SimCity4 Deluxe\Apps

    If I had to guess, perhaps you've installed it in the Documents\Plugins folder in error?

    1 hour ago, CorinaMarie said:

    You could set up an .ini file like I did for my CoriStarts.ini and add a version of my code to read that. Then peeps could set it up to be placed wherever they'd like. (I didn't quote all my code above so you'd want to grab my file and peruse the following few code blocks in it.)

    Indeed, but it really depends on my motivation and how quickly that can be made to work. Would I be right in thinking with your .ini file, the path is manually set inside that file? It's possible to make an NSIS installer that would allow a user to select any path they wanted, then write that data into an .ini file. Of course the next hurdle, even if one could do such a thing, I need permission to re-distribute the files. Might be OK, since it's a BSC release... as before, one step at a time.

    • Yes 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


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

    Sorry about that - my fault - here's an exact copy/paste of the path-

    Quote

    C:\Program Files (x86)\Steam\SteamApps\common\SimCity 4 Deluxe\Plugins

    I'll download DAMN and install it once more...there's no custommenu.dat in mine - perhaps I have a different version

    EDIT: really, really strange. Just re-downloaded and re-installed DAMN. I still don't see "custommenu.dat". There are only 4 files in that folder (see attachment)

    newinstall.png

    Share this post


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

    Can someone please revisit this?

    I tried installing the original SimCity 4 DX and I can't get the damn patches to install without "missing or invalid registry" errors, I'm so frustrated, I feel like I'll never get back into this game again :(  I'm hoping the Steam version can work with DAMN Manager.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    37 minutes ago, Pixelrage said:

    Can someone please revisit this?

    If it's any help, I've edited the file using Reader to add the aforementioned space in the path name for the Steam installation:

    customMenu.dat


    From your previous post, it sounds like there might be other files required which are missing. Personally not being someone who's familiar with the DAMN tools nor the Steam version of the game, I'm honestly unsure what other steps are likely needed to configure it correctly.


    For the game's patches not installing on the disc based version...

    If pursuing this option instead of Steam, maybe it's worth trying one of the alternate SKU versions of the EP1 update in case your game is based from a different globally defined region. These can be downloaded from the Maxis Files page. Checking the .exe will show version 1.1.638.0 once successfully installed. Maybe otherwise it could be worth trying an uninstall of SC4, rebooting your computer, then copy the patch to your Desktop and running from there.

    • Like 1

    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:  
     
    13 hours ago, Cyclone Boom said:

    If it's any help, I've edited the file using Reader to add the aforementioned space in the path name for the Steam installation:

    Thanks for taking care of that, I simply haven't had a free moment since my last post to make the edit.

    14 hours ago, Pixelrage said:

    I can't get the damn patches to install without "missing or invalid registry" errors

    • If you mean patches for SC4, using the word DAMN in this context is rather unfortunate.
      The EP1 and NiteLighting patches will NOT install for the Steam version. Mostly because it includes them as standard, but I suspect also because Steam uniquely alters the entire installation routine, the crux of the issue here.
    • If you mean this error appears when running the DAMN installer, that's not really a patch.
      Assuming this error did not appear during the first install of DAMN, your install of SC4 may be a problem:
      • Try uninstalling all versions of SC4 (did you previously have a disk-based one you forgot to uninstall for example?) Reboot your PC, then install the Steam version anew.
      • On 01/09/2018 at 2:57 AM, Pixelrage said:

        Just re-downloaded and re-installed DAMN. I still don't see "custommenu.dat". There are only 4 files in that folder (see attachment)

        Well, I linked to the one I am using as a basis for my modifications, is that the same one you downloaded? There are other DAMN tools, but only the original mod was made by Daley. If you are using another, please give us a link, that way we can be sure everyone's on the same page.
      • Otherwise, you don't need to install DAMN for it to work, it's just convenience. You can open the installer with an application such as 7zip and manually extract the files. Check everything else first as this is a little involved, if you need full instructions, come back to us.

    If DAMN is such an important part of playing SC4, you could save yourself a ton of bother and buy a version not from Steam. Avoid the Origin edition, which is sold by some other outlets too, it's just more hassle than it's worth. My recommendation is to buy from GoG, where you get rewarded with a fully DRM-Free edition of SC4, or the last you will ever need to buy. Wait for a sale and you'll pay around $5.

    • Like 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


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

    "Damn" in that context was actually the verb, not the program - lol. As for the link where I downloaded DAMN Manager from, I used the very original link in my original post...I don't see a "custommenu.dat" file either in the ZIP of that download, nor after installing DAMN Manager:

    I think I might take that last part of advice and just try the GOG version...SC4 is actually on sale for 75% off right now! I think it is too much trouble to bother with the Steam version. I personally don't think SC4 is playable without DAMN Manager, given that I have hundreds of lots and other mods through the years.

    The original version seems to be just as much trouble. I simply can't upgrade it from 1.1.610.0 because the EP1 Update refuses to patch it for some unknown reason (barrage of pop-up error boxes). GOG seems like the way to go.

    Lastly, thank you for going through all of this with me - at the very least, this thread will help other Steam users in the future!!

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    14 minutes ago, Pixelrage said:

    I think I might take that last part of advice and just try the GOG version...SC4 is actually on sale for 75% off right now!

    Cool. That's good timing then, and this price tracker confirms it's the first GOG sale for the game since mid-June.

    Just a subtle suggestion...

    If wanting to go through with purchasing from GOG, you may wish to consider doing so after clicking this link. At the end of the URL is a string of 40 characters which forms the affiliate link for Simtropolis. The site would then receive a small sales commission from the purchase price to go towards the costs of monthly upkeep. *;)

    • Like 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:  
     

    It seems that Yild's tool uses a possibly modified variant of the LUA scripts, which are indeed in the damnControl.dat file. I've made the appropriate modifications to that file and would appreciate it if someone is able to test and confirm if this patch works.

    damnControl.dat

    • Like 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


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

    I will try out your .dat file later today!

    Hate to say it, but it looks like the GoG version also puts SC4 in something other than the "original" path -- "C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe" /command=runGame /gameId=1207664593 /path="C:\Program Files (x86)\GOG Galaxy\Games\SimCity 4 Deluxe Edition"  --  so, I'm guessing DAMN won't work with the GoG version of the game, either?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Pixelrage said:

    so, I'm guessing DAMN won't work with the GoG version of the game, either?

    The problem is nothing to do with the path, although that is the fix. The real issue is that without a proper windows shortcut, you can't set the Target Line for the Steam version. I can confirm GoG works with DAMN and allows you to set the Target Line, since that's the version I'm using.

    The creator of DAMN probably didn't foresee a version of SC4 that would be looking elsewhere for the Plugins folder, since even when not using the default install dir, the shortcut link would otherwise have been correct.

    • Like 2
    • Yes 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Pixelrage said:

    Hate to say it, but it looks like the GoG version also puts SC4 in something other than the "original" path -- "C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe"

    It sounds like you've installed the "GOG Galaxy" application which is the equivalent of how Steam has a local games client library. Basically it allows all purchased titles to be managed in one place, and as a means of receiving the latest updates and for any online based interactivity. Checking my GOG account just now and there is a rather hidden option to download the installer directly. This can be done by expanding the dropdown as I've highlighted green below, instead of clicking the inviting big blue button.

    As follows:

    GOG SC4 Expand Installer.jpg


    Then it'll reveal the URL to access the installer:

    GOG SC4 Download Installer.png


    As shown this is 1.1 GB in size, and fully patched based on the 1.1.641 version reported.

    The executable can be downloaded and installed to run standalone, from where it should provide the default installation structure without needing to depend on GOG Galaxy each time to start SC4. Also to allow a Target Line to be set from a shortcut as @rsc204 explained, just how it works with the original disc based version.

    • Like 3

    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:  
     

    Beautiful, I didn't know that - I'll reinstall under that method later.

    I'll still test out the .dat file with Steam to see what happens, too

    • Like 1

    Share this post


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

    @rsc204@Cyclone Boom I've reinstalled the Steam version with the modified .dat, and believe it or not, DAMN works perfectly!!! So, thanks for the modified file. While it's still fresh in my mind - this is exactly what I did:

    1. Uninstalled and re-installed SimCity 4 from Steam
    2. Put one random mod into the \plugins folder at C:\Users\(MyUserName)\Documents\SimCity 4\Plugins (it was the BSC/VIP Giraffe Walnut Tree)
    3. Installed DAMN from LEX to C:\Program Files (x86)\Steam\SteamApps\common\SimCity 4 Deluxe\Plugins\DAMN
    4. Installed DAMN Manager from STEX (DAMN Manager runs from wherever you unzipped it, it doesn't install like other programs...so it's just on my desktop)
    5. Opened DAMN Manager, created a new Menu Folder called "Tree test". Selected "Tree - BSC - VIP Girafe Walnut trees" from Plugins (Folder) menu, added the two individual trees to the "Tree test" Menu Folder, selected each tree individually, unchecked "hidden", clicked Save Changes.
    6. Replaced "damnControl.dat" with the newly modified damnControl.dat file from rsc204 above. This file can be found in C:\Program Files (x86)\Steam\SteamApps\common\SimCity 4 Deluxe\Plugins\DAMN\Support
    7. Started SimCity 4 - opened a new region - established city. DAMN triggers in the ticker. However, this time - when clicked, it actually dropped down the menu that showed the tree I added from step 2 above. Click the tree - then find it available in the Parks menu...and I placed it to make sure it worked, and it did!

    I'm ecstatic that this worked - will play around with it and add my huge custom region to keep testing this weekend

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    13 hours ago, Pixelrage said:

    believe it or not, DAMN works perfectly!!!

    This is good news, clearly we've managed to get to the source of the problem with Steam + DAMN. Of course this implementation still relies on the install of SC4 being in a very specific place, which is never ideal. I can of course document the edits made, both are identical, it's just that Yild's DAMN manager uses the same LUA scripts but there are differences. But ideally a solution like Corina suggested with a simple to edit .ini file, would be more user friendly long term. With that in mind, I have a small request to ask...

    If you've now purchased the GoG edition, do you still need your Steam one? They are identical, except GoG does some things Steam doesn't. It has no DRM, comes with the -CPUCount: 1 switch (prevents CTDs on modern systems), as standard. It also allows for many different languages to be used via a handy app to switch them. Lastly, the GoG Galaxy (equivalent of Steam's Launcher), is unlike Steam, completely optional.

    As a developer who'd really like to have out of the box support for DAMN with RTMT, along with the ability to provide a solution to the wider community for DAMN + Steam compatibility, would you perhaps consider gifting me your Steam copy? I don't want you to feel under any pressure or put on the spot on this, so please feel free to answer in private by PM or simply not respond if you'd prefer to keep it. But I, like many SC4 players have 2 copies already myself, the original disks and GoG version. I'm also not really in a position to spend money on a 3rd copy. However, without a copy from Steam, it's much harder to thoroughly test and release fixes that you can be sure will actually work.

    So if anyone reading this is willing to give me a copy of SC4 on Steam, it will go a long way to ensuring DAMN compatibility for Steam users in future.

    • Like 3

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 hours ago, rsc204 said:

    But ideally a solution like Corina suggested with a simple to edit .ini file, would be more user friendly long term.

    The only little problem with the .ini is the mod needs to know where to find it. If grabbing the location of the person's Documents folder like I do in my CORI Reports would work for everyone then that seems like the best overall solution.

    In the meantime I've done some tweaking such that for default install locations of GoG, Steam, and the Disc version the control file will now search all three locations and if not found then it defaults back to how Daeley wrote it originally. Then, as noted in one of the file reviews, peeps can still alter their Start In line in their shortcut to make that work.

    Here's what I wrote for it:

    imghp0785.jpg

    It will, ofc, need testing. I checked that it works on my XP comp with the disc version. (Note: The above is my first draft version. If it works as expected then it can be tightened up quite a bit by combining the two code blocks and getting rid of the DamnFileFound and DamnGameVerision variables.)

    damnControl.dat <-- deleted. See next post for the improved version.

    • Like 3

    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:  
     

    Me again. After some testing with @Cyclone Boom we found my version didn't work when the disc version of the game was installed on Win 7. So, I've updated the code as follows:

    -- Following is new code by Cori to set the path based on game version.
      -- Check the most logical places for the Damn Index file:
      DamnFileFound = nil
      DamnGameVersion = "GoG"
      DamnFileFound = io.open([[C:/GOG Games/SimCity 4 Deluxe Edition/Plugins/DAMN/Support/DAMN-index.txt]])
      if not (DamnFileFound) then
        DamnGameVersion = "Steam"
        DamnFileFound = io.open([[C:/Program Files (x86)/Steam/SteamApps/common/SimCity 4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])
        if not (DamnFileFound) then
          DamnGameVersion = "Disc 32bit OS"
          DamnFileFound = io.open([[C:/PROGRA~1/MAXIS/SIMCIT~1/Plugins/DAMN/Support/DAMN-index.txt]])
          if not (DamnFileFound) then
            DamnGameVersion = "Disc 64bit OS"
            DamnFileFound = io.open([[C:/Program Files (x86)/Maxis/SimCity 4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])
            if not (DamnFileFound) then
              DamnGameVersion = "Original Daeley Code"
              DamnFileFound = io.open([[Plugins/DAMN/Support/DAMN-index.txt]])
            end
          end
        end
      end
    
      -- Now open file under the expected variable name:
      if DamnGameVersion == "GoG" then
        luainput = io.open([[C:/GOG Games/SimCity 4 Deluxe Edition/Plugins/DAMN/Support/DAMN-index.txt]])
      elseif DamnGameVersion == "Steam" then
        luainput = io.open([[C:/Program Files (x86)/Steam/SteamApps/common/SimCity 4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])
      elseif DamnGameVersion == "Disc 32bit OS" then
        luainput = io.open([[C:/PROGRA~1/MAXIS/SIMCIT~1/Plugins/DAMN/Support/DAMN-index.txt]])
      elseif DamnGameVersion == "Disc 64bit OS" then
        luainput = io.open([[C:/Program Files (x86)/Maxis/SimCity 4 Deluxe/Plugins/DAMN/Support/DAMN-index.txt]])
      elseif DamnGameVersion == "Original Daeley Code" then
        luainput = io.open([[Plugins/DAMN/Support/DAMN-index.txt]])
      end
    -- End Cori new code.
    
    -- (Original Line) local luainput = io.open([[Plugins/DAMN/Support/DAMN-index.txt]])
     local line = 1 
     while (line) do
      line = luainput:read("*l")
      if (line) then
       DAMenu.interpret(line)
      end
     end
    
     DAMenu.currentMenu = DAMenu
     -- Release variables used (luainput is here now cause I didn't set it to local since it's nested in the IFs above)
     DamnFileFound = nil -- Cori added.
     DamnGameVersion = nil -- Cori added.
     luainput = nil -- Cori added.

    And now it can distinguish between 32bit and 64bit OS install of the disc version.

    New version: damnControl.dat <--- now deleted. Newest version: here.


    Also, if peeps will test this with both GoG and Steam and it works I'll then consolidate the code and write the routine for a custom .ini file in which one can specify the file path for other installation locations.

    • Like 3

    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:  
     

    That's a neat solution and may well prove to be the most user friendly solution where you just install a file and are done. But a better safety net IMHO is reading the install DIR from the registry, because no matter how many paths you try to think of, there is always the risk of those you didn't.

    *scratches head...*

    Can we read the registry using LUA script? That way you could add another condition, if SC4 = Not Found, check the registry for it's location and try there. LUA will do this in theory, but I don't know if the implementation used within SC4 has that function. Assuming it did, you can read the value, write it to a variable and you'll always have the correct data, provided SC4 has been properly installed.

    • Yes 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 9/8/2018 at 10:27 PM, rsc204 said:

    But a better safety net IMHO is reading the install DIR from the registry, because no matter how many paths you try to think of, there is always the risk of those you didn't.

    Well, the idea was for those oddball paths one would create an .ini file by hand and then I'll add in the code to read said file. So it'd first see if a custom path were set via said ini and if not it'd then try the paths I already have it checking now.

     

    On 9/8/2018 at 10:27 PM, rsc204 said:

    Can we read the registry using LUA script?

    Not without an API and those won't work with the embedded LUA that the game uses. However, that gave me the idea to simply write a command file to be run one time to peek in the registry and create the custom ini file which I'll then read from within the LUA code.

    So, if y'all would test this file and let me know if it does in fact create DamnLocation.ini in your SimCity 4 folder in Documents that'll let me know if this part is ok.

    @Echo OFF
    
    :: -----------------------------------------------------------------------------------
    :: Cori code to write SC4 installation directory path to an INI file for use with DAMN
    :: -----------------------------------------------------------------------------------
    
    CLS
    
      Echo Checking installation path of SimCity 4 ...
      Echo.
    
      setlocal EnableExtensions
    
    
    :64Bit
      Set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Maxis\SimCity 4"
      Set VALUE_NAME="Install Dir"
    
      For /F "usebackq skip=2 tokens=1-3*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
        Set SC4Name=%%A
        Set SC4Type=%%B
        Set SC4Value=%%C
        Set SC4Path=%%D
      )
    
      If defined SC4Name (
        Echo SC4 Install Dir = %SC4Path%
        Goto :CreateFile
      ) else (
        Goto :32Bit
      )
      Goto :Exit
    
    :32Bit
      Set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\SimCity 4"
      Set VALUE_NAME="Install Dir"
    
      For /F "usebackq skip=2 tokens=1-3*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
        Set SC4Name=%%A
        Set SC4Type=%%B
        Set SC4Value=%%C
        Set SC4Path=%%D
      )
    
      If defined SC4Name (
        Echo SC4 Install Dir = %SC4Path%
        Goto :CreateFile
      ) else (
        Goto :NotFound
      )
      Goto :Exit
    
    :CreateFile
      Echo.
      Set SC4Damn=My Documents\SimCity 4
      Echo %SC4Path% > "%USERPROFILE%\%SC4Damn%\DamnLocation.ini"
      Echo File created: %USERPROFILE%\%SC4Damn%\DamnLocation.ini
      Goto :Exit
    
    :NotFound
      Echo Path not found.
      Goto :Exit
    
    :Exit
      Echo.
      Pause
      Exit
    

    Create DAMN Location INI.cmd <--- no longer a viable option. See this post for full details.

    • Like 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

    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