Jump to content
simmaster07

Game framework compatible DLL loading (and other modding discoveries)

93 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Wow, this is great! I'm assuming, based off of what I've read about DLLs before, that this could lead to the possibility of making much more advanced mods? From my understanding the ability to load DLLs would allow modders to add/change things that they can't change right now because it would require modifying files that we aren't allowed to mess with - is that right?


N0icqd8.jpg

“The deeper I go into myself the more I realize that I am my own enemy.”  ― Floriano Martins         Member of the NAM Team

Share this post


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

    Wow, this is great! I'm assuming, based off of what I've read about DLLs before, that this could lead to the possibility of making much more advanced mods? From my understanding the ability to load DLLs would allow modders to add/change things that they can't change right now because it would require modifying files that we aren't allowed to mess with - is that right?

    Quite possibly. The thing is that this literally hasn't been done before by the modding community; only Maxis/EA would know the extent of this kind of modding, and they're bound by NDAs that prevent them from discussing code internals to this extent. It's hard to tell how far we can go with DLLs, especially since we're only starting off with this minimal API recreation which lacks functions for interfacing with a lot of stuff like the prop manager and network simulator.

    • Like 3

    Share this post


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

    Well done, this is all very interesting.

    It would be monumental if this could open the door to new modding areas.

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

    If my previous experiences with .DLL loading are anything to go by, then there is little that cannot be done. It boils down to the skill of the programmer and the knowledge available to them.

    Having this native solution is ideal, Simmaster, and I thank you for making it.

    Share this post


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

    I wish there was Karma points here. lol. Deserves about 100 of them. :)

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    3 hours ago, Mister Giggles said:

    ...is it too early to make ridiculous and impossible demands of you?

    I hope not! :yes:

    In all fairness, just engineering a DLL that can take advantage of SC4's own API has been a pretty ridiculous and impossible demand up to this point. :P

    • Like 6

    Share this post


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

    Thank you for your work. This is great. :) Sadly I don't have skill to help or take this further. I know olny how to make some BATs. That is limit of my skills. :(

     

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    9 hours ago, patfirefghtr said:

    OK so ive been using the Fix and so far less CTD's which makes me very happy and excited to be playing again!!! Now I gotta beta this lol

    You can call it a Beta, but almost 6 months in and to my mind, it's simply a fix. It works, despite much testing to force a CTD, they simply don't happen. The number of times I rage-quit after these CTDs cost me a lot of work, was starting to impact my enjoyment of the game.

    Since installing the fix, the only CTD I encountered was when I screwed up some slope mods and accidently left some conflicts behind. Other than my own errors, the game has been solid, this fix is something every player should have installed.

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

    A quick update on documentation.

    Apparently the SC4Devotion wiki is alright to use despite the forums being down. However, as it turns out I don't think I've ever gotten editor privileges. It doesn't appear that the wiki is being actively maintained either, as evidenced by the article on CTDs still saying that the puzzle-piece/TE lot crash is unfixable. :whatevs:

    I've set up a small wiki on the GitHub repository for the API to document my findings in more detail and dump stuff like lists of IDs there. If you know C++ and think this thread is pretty disorganized, feel free to check in there. I've also been making incremental changes there to introduce new interfaces and document stuff that had previously been marked as unknown. Feel free to watch the repo to keep up with the changes; otherwise, I don't intend to post about more incremental changes unless I come out with a more advanced proof-of-concept DLL.

    • Like 3

    Share this post


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

    Once the server move is done at SC4D, I'd be happy to grant you editor rights.  I'd do it now, but with the site currently existing in a weird quantum limbo state between two servers at present, I'd be concerned about any edits done now getting lost.

    -Tarkus

    • Like 1

    Share this post


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

    @simmaster07 I have updated the page with relevant information. Hopefully you will be able to add to it when SC4Devotion is back online.

    • Like 1

    My MD on SC4Devotion (updated first)
    And Here on Simtropolis
    NAM Associate

    "My mother always told me, 'Elwood, you can be two things in this world...you can either be Oh So Smart, or Oh So Pleasant.'

    Well, for years I was smart. I recommend pleasant."
    -Elwood P. Dowd, Harvey

    Share this post


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

    The "hooks" mentioned is probably the framework that allows it to accept new expansion packs. Considering that SimCity 4 seemed ready to go for all sorts of expansion packs, this could really open up the possibility of adding Rush Hour-level expansions into SimCity. The mind boggles with possibilities. :golly:

    • Like 2

    ~ COMING SOON! Exciting new projects! ~

    Share this post


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

    @LivingInThePast Hooks in SC4 aren't actually hooks in the traditional sense. They act more like events, which are triggered at certain points in the app initialization and shutdown process. I'd imagine most expansion pack functionality is done by listening to and sending messages that affect game behavior. I'd have to look at how the Rush Hour expansion pack specifically, as opposed to SimCity 4 Deluxe, works in that sense.

    • Like 2

    Share this post


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

    @LivingInThePast Hooks in SC4 aren't actually hooks in the traditional sense. They act more like events, which are triggered at certain points in the app initialization and shutdown process. I'd imagine most expansion pack functionality is done by listening to and sending messages that affect game behavior. I'd have to look at how the Rush Hour expansion pack specifically, as opposed to SimCity 4 Deluxe, works in that sense.

    Doesn't the Deluxe installer just install both in one sitting instead of having to run two separate installers?

    Share this post


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

    So far as I know, the Rush Hour addons are integrated into the SC DAT files, with an additional one added EP1.DAT. They also changed the main executable too, so likely there were some code changes at a fundamental level also.

    • Like 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:  
     
    On 7/12/2016 at 5:27 AM, bien1500 said:

    Doesn't the Deluxe installer just install both in one sitting instead of having to run two separate installers?

    It does, and it has a combined executable. I was curious as to whether SimCity 4 + Rush Hour, as opposed to Deluxe, had separate executables, but as @rsc204 pointed out this doesn't seem to be the case. I know The Sims 2 has the same engine as SimCity 4 and uses separate executables for each expansion pack as well, but these seem to be refinements of the base game code as opposed to DLL-like addons.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 7/15/2016 at 6:56 PM, simmaster07 said:

    It does, and it has a combined executable. I was curious as to whether SimCity 4 + Rush Hour, as opposed to Deluxe, had separate executables, but as @rsc204 pointed out this doesn't seem to be the case. I know The Sims 2 has the same engine as SimCity 4 and uses separate executables for each expansion pack as well, but these seem to be refinements of the base game code as opposed to DLL-like addons.

    SimCity 4 Deluxe was released at the same time as Rush Hour IIRC so any new players could jump directly into what was the superior version of the game (I think we can all agree on that, as Rush Hour basically was what SimCity 4 was supposed to be out of the door, really). At that point, I imagine future EPs would still be possible, compatible with at least Deluxe and RH-upgraded versions. I would love to hear from anyone at Maxis share some ideas for planned add-ons that never would see the light of day.

    • Like 1

    ~ COMING SOON! Exciting new projects! ~

    Share this post


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

    It's always like a holiday when this thread gets an update--this is, once again, some really amazing, groundbreaking stuff.:thumb:  I can't wait to see where you go next!

    By the way, once we completed the server move at SC4D, I went in and set up your Editor rights set up on the Wiki, as requested.  Let me know if you encounter any difficulties, or have any questions.

    -Tarkus

    • Like 4

    Share this post


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

    Woot! I'm happy to see you have a chance to work on this some more. I predict you'll have additional exciting things for us in the future. I already recommend your SC4Fix.dll to every new SimCity4ite who comes into chat as well as in my posted list of must have stuff for those who freshly install the game.

    4 hours ago, simmaster07 said:

    @CorinaMarie documented a short list of IDs for them here, but the only type of occupant we want to monitor is buildings.

    A day or two after my post there I realized that one I hadn't determined would be the Clouds and/or Fog. Since I always have them off in my game I wouldn't notice when my mod would hide them. That thread died so I didn't bother to go update it. I could try to find my notes from then if it would help, but as you only need to know buildings, I'm certain it's not necessary for your efforts here.

    Keep up the good work. Go, go, go!

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

    EDIT: It's on the STEX now.

    7BFKiVd.png

    XsvBGFK.png

    Mod upload coming soon, watch this space. While I work on polishing an outlying crash when exiting cities, the full source code can be found by following this link. The main change from the last post is the implementation of the UpgradeCityHall method. 


      Edited by simmaster07  

    Add STEX download link
    • Like 7

    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