1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Petition to modders: Merge RFC:E/M with BUG/BULL

Discussion in 'Civ4 - Rhye's and Fall of Civilization' started by KMRblue1027, Oct 4, 2010.

  1. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,232
    Location:
    Hamilton, NJ
    RFC is by far the best mod I have ever played for any game but some parts of Civ4 especially RFC are micromanaging hell. BUG provides lots of helpful pop-ups and options to reduce micromanagement and add customization the the regular Civ4 interface. Personally some of my favorite parts of BUG are the scoreboard mod that allows grouping of Vassals to their respective masters and allows removing of dead nations from the board. Also the pop-ups that tell you when a city is about to become unhappy are very helpful for knowing when to stop growing with a big empire.

    Now I have no idea what kinda job this would be as BUG is completely python and XML so it would likely be a chore to create such a mod. I just hope someone here might be willing to take on such a project. (Baldyr you're the python expert here I hoping you'll step up :))

    Here's a link to the BUG subforum if you need info.

    BUG/BULL/BAT
     
  2. Llama231

    Llama231 Warlord

    Joined:
    Aug 3, 2010
    Messages:
    158
    Is there a downside?
     
  3. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Yeah, this should totally be done. I'm not even talking about the game-play benefits now, but rather the possibilities the BUG setup would open up for mod-modding.

    I'm not too familiar with BUG though, as I'm pretty much only mod-modding RFC. So I don't know exactly what such a conversion would entail.

    But, since I intend to rework some of the RFC Python code anyway (to make it more accessible for mod-modding), I'll probably end up putting the whole thing into a BUG setup in the end. Or I would if I got the time... :rolleyes:
     
  4. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,024
    Gender:
    Male
    Location:
    Leblanc
    Oh yes please! :goodjob:
     
  5. civ_king

    civ_king Deus Caritas Est

    Joined:
    Mar 9, 2006
    Messages:
    16,368
    Will that mod version run faster than the Millennium Falcon?
     
  6. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,024
    Gender:
    Male
    Location:
    Leblanc
    Let's make the Kessel run! :D
     
  7. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I'm not sure how much speed improvements can be achieved with editing the Python code, but some would probably be possible. This is not my main goal though. (Since I did already figure out how to get rid of the constant pickling, remember? :D Well, Embryodead deserves a credit on that one too. :goodjob:)

    What I would do instead is to reformat the Python into a clearer and more accessible setup. There really is no need for classes, so I would be able to take out several thousand "self" references (which reference the class instance) from the files. The most important thing would probably be to break up the several hundred lines long functions into smaller ones that can be used by mod-modders to do their own things. Sorta like turn the whole thing into what the RFCUtils.py file does, I guess.

    And once this is done, the next logical step would probably be to migrate everything to a BUG setup.
     
  8. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,024
    Gender:
    Male
    Location:
    Leblanc
    What I strongly missed when modding is an getCoreTiles(iCiv) method. It's very annoying to write two for- and one if-clause everytime I want to do something with one civ's core/normal/broader tiles.
     
  9. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Why not make your own? But you're of course right that there could be a whole ModderHelpers module for this sort of thing.
    Spoiler :
    Code:
            def addArea(self, ePlayer, bCore):
                    if not isValid(ePlayer):
                            ePlayer = self.targetPlayer
                    if isValid(ePlayer) and isMajorPlayer(ePlayer):
                            if bCore == None:
                                    lPlots = getPlotList(tBroaderAreasTL[ePlayer], tBroaderAreasBR[ePlayer])
                            elif bCore:
                                    lPlots = getPlotList(tCoreAreasTL[ePlayer], tCoreAreasBR[ePlayer])
                                    lPlots + list(tExceptions[ePlayer])
                            else:
                                    lPlots = getPlotList(tNormalAreasTL[ePlayer], tNormalAreasBR[ePlayer])
                                    for tCoords in tNormalAreasSubtract[ePlayer]:
                                            if tCoords in lPlots:
                                                    lPlots.remove(tCoords)
                    self.addTiles(tuple(lPlots))
    This method is of course part of PyScenario and not useable in any other context, but this pretty much does what you requested. Of course you also need the getPlotList() helper function (and others):
    Code:
    def getPlotList(tTL, tBR):
            lPlotList = []
            for x in range(tTL[0], tBR[0]+1):
                    if x > 123:
                            x -= 124
                    elif x < 0:
                            x += 124
                    for y in range(tTL[1], tBR[1]+1):
                            if y > 67 or y < 0:
                                    continue
                            lPlotList.append((x, y))
            return lPlotList
     
  10. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,024
    Gender:
    Male
    Location:
    Leblanc
    I'm too lazy every time I'd need it, and when I need it again I always curse myself. But thanks! :D
     
  11. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,232
    Location:
    Hamilton, NJ
    :w00t:

    Alsome that you guys are serous about this... I wish I could help :sad:

    Also if you want to see BUG and a few other really good mods in action check out RevDCM (DCM and IDW spice up combat a lot)
     
  12. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Well... I only wish I had the time to get into this. :p
     
  13. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,024
    Gender:
    Male
    Location:
    Leblanc
    Ditto :(
     

Share This Page