Jump to content

4 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hey,

has anyone tried this library out for C:S mods yet? Seems kind of interesting, since it seems to allow patching of existing methods, rather than detouring the entire method.

  • Like 3

Share this post


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

Looks interesting. I wonder if it is flexible and fast enough.

Share this post


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

    Just tried it out to override the bulldozer tool on a mod I had. Seemed to work alright ( didn't notice any major performance slowdowns, original method was correctly pre-empted, etc ). Would be interesting to see if the patching priority thing with multiple conflicting mods working in real life though, since that's the biggest advantage I can see here vs detouring.

    Share this post


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

    Not necessarily, if you take a look at the documentation for the library, the new execution flow is:

    1. All prefix methods that are patched in, until one of the patches decides to end execution
    2. The original method, if one of the prefix methods didn't decide to end execution
    3. All postfix methods, regardless of whether or not execution of the prefix/original methods was altered.

    At the same time, you can also declare what ordering you'd like for the patches, so if you want to go first, you can just mark your own patch as a high priority patch/executes before a certain patch, and preempt other mod patches.

    I haven't tried that yet, but having just described that, I can see some issues with this arrangement
    ( for example, one mod overriding rendering with a prefix, and ending execution of the remaining patches from other mods by returning false. )

    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