Jump to content
Sign In to follow this  
builderman

New Discoveries, Great Potential

56 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

... umm, did you sucessfully create an executable plugin for sc4?


g

Share this post


Link to post
Share on other sites
Posted:
Last Online: A long, long time ago... 
 
Well, I for 1 think it is cool.
An installable plugin as an .exe, just like the landmarks downloaded from Maxis, right?
 
How?

Share this post


Link to post
Share on other sites
Guest
Posted:
Last Online: A long, long time ago... 
 
Me too23.gif

Share this post


Link to post
Share on other sites
Guest
Posted:
Last Online: A long, long time ago... 
 
I am reading your message, but I'm almost certain I have not successfully created an executable plugin for SC4
 
2.gif

Share this post


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

Looks interesting...though I gotta agree with tropod 2.gif

The way you have that saying BM in the top left has it looking like it was made in a UI file or in Photoshop 3.gif5.gif

Share this post


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

Wouldn't making an exe that installs a plugin be REALLY simple? I mean, we could easily write our own installation framework in under 1000 lines of code. I think there is more to it than that....maybe its just a qirky little joke BM's playing on us all. 2.gif

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    The Moon is my desktop background.  Radiance in Windows XP.
     
    And, you're all wrong.  This isn't photoshopped.  It's not a plugin installer.  It's a DLL that SC4 loads on startup.  With this, we can add all sorts of things to SC4.

    Share this post


    Link to post
    Share on other sites
    Guest
    Posted:
    Last Online: A long, long time ago... 
     

    ummm wow6.gif

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    This is the DLL I used.  Place it in \SimCity 4\Plugins\.  It should work, unless I screwed something up (It's only 20 lines of code.)

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Place it in the folder, start SC4, then quit SC4.  You should see two message boxes, 1 at startup, 1 at quitting.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    When I open, I get a message saying:
    This is the DLL plugin for SimCity 4. This will cause amazing things in the future. Be Amazed.
    Then I get "Noooo! Don't kill me, please noooo!" twice. Then it starts.

    Share this post


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

    how did u stumble across this msy i ask?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Hmm so a quick little test for this would be to remove the blank lots by Ralph before the game starts and add them back when the game exits? Is this possible or am i on the wrong track.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Hmm.  You're supposed to get 1 box when SimCity starts and one when it exits.  If you guys don't get one when it exits, it means SC4 unloads the DLL.  Why it kept the debug version in memory, who knows.
     
    And I fixed the three dialog thing.   Told you I would screw something up.
     
    PS. You don't have to remove the lots either.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Here are my complete findings so far. The first two sections are programming theory, and the last is for real-world useage of this.
     
    SimCity 4: DLL Plugins, Architecture, and Practical use
     
    Plugin DLL's: 
    Plugin DLL's are normal Win32 DLL's, and can be made in any IDE that supports making Win32 DLL's.  The standard process events for a DLL apply, including DLL_PROCESS_ATTACH and DLL_PROCESS_DETACH.  The standard thread events(DLL_THREAD_ATTACH and DLL_THREAD_DETACH) don't seem to be used, suggesting that only one thread attaches to the DLL.  The DLL is unloaded immediately, probably because it doesn't contain the plugin architecture.  The sample DLL that I have provided you with launches a message box when the DLL is loaded and unloaded.  It is very simple, but is a good start.
     
    Architecture:
    Maxis appears to have used some sort of plugin architecture for their DLL's.  Basically, the architecture is a framework for SimCity to use when it wants to access the plugin.  DLL's without the correct architecture are loaded and immediately unloaded.  Unfortunately, without a working DLL plugin, or direct assistance from Maxis, we cannot know what the architecture is.
     
    Practical use:
    The DLL plugin, if we can figure out how to make it properly, provides all sorts of avenues into the heart of SC4.  A menu in game could be linked to a function in a plugin DLL.  The DLL could manipulate the memory and data of the game.  All sorts of new functionality could be added to SimCity.
     

    Share this post


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

    ----------------

    Practical use:
    The DLL plugin, if we can figure out how to make it properly, provides all sorts of avenues into the heart of
    SC4
    .  A menu in game could be linked to a function in a plugin DLL.  The DLL could manipulate the memory and data of the game.  All sorts of new functionality could be added to SimCity.
    ----------------

    Ohh lala.

     

    Examples: 

    What trees do you want in God mode?

    What building sets do you want, for how long?

    Which directory should SC4 look at for new lots...

     

    The possibilities are mind boggling...

    Share this post


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

    ----------------

    On 7/12/2003 4:27:10 PM Meatbomb wrote:

    ----------------

    Practical use:
    The DLL plugin, if we can figure out how to make it properly, provides all sorts of avenues into the heart of
    SC4
    .  A menu in game could be linked to a function in a plugin DLL.  The DLL could manipulate the memory and data of the game.  All sorts of new functionality could be added to SimCity.
    ----------------

    Ohh lala.

     

    Examples: 

    What trees do you want in God mode?

    What building sets do you want, for how long?

    Which directory should SC4 look at for new lots...

     

    The possibilities are mind boggling...


    ----------------
    He gets it!

    Share this post


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

    Dig dig dig...

    With the increasing number of Mods available there is definitely a real need for something like this in the form of a plugin manager. A program could be designed to let the user select which mods are used acording to which region or maybe even city the user selects. Then, the plugin.dll loads the correct .dats upon startup.

    Also, BM also talks about how functions can be linked to menus. Is it possible that new menus could be created to link to lots? I've seen screenshots of the Extra Cheats Plugin.dll and this seems to be the case.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Now, the way I understand it, is that it will4.gif..........Oh my god.......4.gifhope you're not serious there?
     
    Lots and Lots of possibilities in all directions. I guess, Simcity won't be the same anymore.1.gif
    Now we will be able to make new folders??

    "I love long walks, especially when they are taken by people who annoy me." I say what I think, and not what you want to hear most of the time!

    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

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    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