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

Change to modding with R&F

Discussion in 'Civ6 - Creation & Customization' started by Gedemon, Feb 7, 2018.

  1. Hanny

    Hanny Chieftain

    Joined:
    Sep 3, 2007
    Messages:
    343
    Location:
    IOW UK
    Sorry I was not clear, it runs as is for RF, and is a pre patch pre RF file I have on the system and is the only custom civ that will run without any modding after the update and RF install.
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,918
    Location:
    France
    that's not possible.
     
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,918
    Location:
    France
    Posted this code
    Code:
    INSERT OR REPLACE INTO Players (Domain,CivilizationType,LeaderType,LeaderName,LeaderIcon,CivilizationName,CivilizationIcon,LeaderAbilityName,LeaderAbilityDescription,LeaderAbilityIcon,CivilizationAbilityName,CivilizationAbilityDescription,CivilizationAbilityIcon,Portrait,PortraitBackground)
        SELECT    'Players:Expansion1_Players', CivilizationType,LeaderType,LeaderName,LeaderIcon,CivilizationName,CivilizationIcon,LeaderAbilityName,LeaderAbilityDescription,LeaderAbilityIcon,CivilizationAbilityName,CivilizationAbilityDescription,CivilizationAbilityIcon,Portrait,PortraitBackground
        FROM Players WHERE Domain <> 'Players:Expansion1_Players' AND NOT EXISTS (SELECT * FROM Players WHERE CivilizationType = Players.CivilizationType AND Domain = 'Players:Expansion1_Players' );
    here for testing:
    http://steamcommunity.com/sharedfiles/filedetails/?id=1297840287
     
  4. Ewok-Bacon-Bits

    Ewok-Bacon-Bits Chieftain

    Joined:
    Oct 23, 2016
    Messages:
    167
    I'm not sure if this is just for scenarios but has anyone experienced an issue where if you move a unit onto territory (including your own) a pop-up always comes up asking if you want to declare war? I suspect its something to do with the scenario map or config but I can't seem to figure it out, its the first time I've even seen this and it came with the patch. I know it doesn't have to do with the lua code in my tests, it still does it when placing things with the console.
     
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,049
    Location:
    London, UK
    What's the latest on the DLC/R&F/Mods load order issues? Is there no way around editing the DLC .modinfo?
     
  6. Hanny

    Hanny Chieftain

    Joined:
    Sep 3, 2007
    Messages:
    343
    Location:
    IOW UK
    What i think happened was it was uploaded as compatable with RF, as i was downloading the patch and RF, hence it worked right of the bat.
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,918
    Location:
    France
    None AFAIK. I'll post here if I found out that someone has a way to do it.
     
  8. TheMarshmallowBear

    TheMarshmallowBear Benelovent Chieftain of the BearKingdom

    Joined:
    Dec 27, 2006
    Messages:
    7,035
    Location:
    Inside an Ikanda.
    I think I found a way to replace UI files without overwrriting them all (using how the UI is handled by the expansion in the replacement files).

    I just managed to import a custom LaunchBar file by including the _Expansion1 file in my lua file and the launch bar works with mere two lines of code, has this been kn own?
     
  9. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    229
    Gender:
    Male
    And what about replacing code in UI lua? Say default is "do A and B" and I want "do just B".
    You still need replace files in this case I guess?
     
  10. TheMarshmallowBear

    TheMarshmallowBear Benelovent Chieftain of the BearKingdom

    Joined:
    Dec 27, 2006
    Messages:
    7,035
    Location:
    Inside an Ikanda.
    I'm not nearlly experienced to give you a good answer tbh,

    I think it's possible to replace functions within lua tbh, I haven't tried it tbh. But I'm just putting out there that experimentation may be in order.
     
  11. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    229
    Gender:
    Male
    Exactly "replace functions" is the right expression.
    Will try this myself some day soon.
     
  12. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
    Rise&Fall uses „function replacement” quite often. There seems to be even a special tag in .modinfo for UI replacements.
    The method is simple and exploits a bit Lua peculiarities, i.e. a function name is just a key in the table.
    So, they store original function in e.g. BASE_original, then overwrite it with a new function. Inside that new function you do your stuff and may also call original function using BASE_original. Sometimes they just simply overwrite old function entirely.
    Load order is important is someone wants to stack more hoops like this.
     
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,918
    Location:
    France
    using the <ReplaceUIScript> tag then include the old file in the new ?

    if that's the case, yes, it was reported by thecrazyscot in the Fall patch changes thread.
     
  14. TheMarshmallowBear

    TheMarshmallowBear Benelovent Chieftain of the BearKingdom

    Joined:
    Dec 27, 2006
    Messages:
    7,035
    Location:
    Inside an Ikanda.
    Ah, yes, I'm referring to that.
     
  15. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,918
    Location:
    France
    So, after a week, who has found anything interesting for modding in that patch ?

    The only useful addition I can think of is that, available in script context for R&F:
    Code:
    City:ChangeLoyalty
     
    Larsenex likes this.

Share This Page