1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

Announcement: DLL enables far easier modularization

Discussion in 'Civ4 - Plug and Play Project' started by rheinig, Aug 4, 2008.

  1. rheinig

    rheinig Chieftain

    Jul 24, 2008
    Hi there.

    Yes, you don't know me, and yes, this is practically my first post, but trust me - this is the result of some expertise.

    I have played around with modular XML for a while without publishing anything to the world. Recently, after letting the game rest for two years, I revisited it and soon had the inspiration that eluded my for years regarding Python Event managers. While working on my fully modular Python Event Manager, I found one kind of events could not be elegantly modularized using Python metaprogramming (Random Events callbacks), so I went into the DLL and changed that. Soon, I arrived at an extensively changed DLL, and I kindly ask all of you to evaluate my work.

    What advantages can you expect? For the audience of this forum:
    • Module load order is now easily predictable though not controllable (no good idea on that, I think predictability is already a vast improvement, coupled with a lessened need, see below).
    • Delayed pass 2 (e.g. tech prerequisites - can now crossreference across all tech modules)
    • Incremental Modular XML system. A module can now modify existing entries instead of replacing them. Example - a Module defines a new UnitCombatType. It can now add itself to the existing promotions instead of overwriting the whole promotion tree, without modifying the promotion effects, thus allowing other modules to touch these without needing to know about your new UnitCombatType...

    There's a host of other fixes and improvements in there, but it's designed to be 100% backwards compatible with BTS 3.1.7. Most changes need some form of activation in XML, so without definitions catering to it, the DLL should behave identically (minus a few obvious bugs). Do refer to the readme included in the download for detailed information.

    Please consider this an early beta - my horsing-around mod works well with this, but I haven't really had the time for proper every-code-path-touched testing. Feedback welcome.

    Also please excuse the lack of source code - I will provide source, I'm just too lazy to separate changed files from unaltered ones right now. Let's say, if the resonance is good and we manage to fix a few bugs together, then the next version will be complete, OK?

    So now for the download - should the forum attachment system not work you can load it here...

    Missing installation instructions? It will have them once I declare it out of beta ;) - I'm out for feedback from people who know where a CvGameCoreDLL goes.

    You may also want to look for more offerings by me - I plan to release the Fully Modular Python Manager and the example files soon - just have to work out a few kinks and spots where the modularization is not yet cleanly independent...

    Have phun!

    Attached Files:

  2. tucoow

    tucoow Chieftain

    May 1, 2008
    A pasture, somewhere GMT+8
    hello rheinig,

    thanks for helping me on art_def question; by looking at the reply I found you're also one of victims of this mostly-dead sub-forum, just like me did. :lol:

    please turn to the new PnP project -- call "WoC":


    One month ago I also wandered around here, just like you, to look for answer for questions. Many people suggest them to close this mostly-dead sub-forum or add sugnificent redirection, but some how this is not done so far.

    I think the people there need you eagerly, as you can do py/sdk. Please look at the TR-WoC conversion there:
  3. TAfirehawk

    TAfirehawk WoC Team Manager

    Aug 25, 2006
    Yeah this does sound familiar tucoow....
  4. rheinig

    rheinig Chieftain

    Jul 24, 2008
    All right. I admit to having neglected reading all forums and posts here before acting :rolleyes:.

    I guess *moving* a thread is reserved to moderators, so I'll re-post in that WoC forum. Note the repost will contain a fresh version (I've finally found out why modularizing random events breaks), source, and neutral GlobalDefines files to ease get started with this DLL.

Share This Page