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

Issue with CP-EUI

Discussion in 'Civ5 - SDK / LUA' started by JFD, Jan 16, 2016.

  1. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,107
    Location:
    The Kingdom of New Zealand
    I'll be cross-posting this in the CP sub-forum, as I'm uncertain whether this is a general issue or a CP-EUI issue.

    Basically, some users of my Cities in Development mod have reported some issues when using it with the EUI installed from the Community Patch installer. But these issues make little sense to. I get the error:

    Code:
    Cannot find key - JFD_CrimeType
    And indeed, trying to find it in Firetuner results in the same error. Yet, when viewing the Database in SQLite Manager, this key is most certainly there. Moreover, this issue does not occur with the standard EUI installation, or without EUI. So I'm stumped. If it's of any significance, this key is added to the Yields table. So I'm guessing the Yields table is somehow locked after game load (I had a similar issue accessing GameSpeeds, and read a discussion on the matter from a while back) - but why would this be only the case with CP's EUI?

    Any thoughts would be appreciated.
     
  2. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    Simple: you don't want to use someone else's "smart" fixes for EUI_utilities.
    The original file includes nothing you should need to change for a mod.
    For more details refer to post #2220 in the official EUI thread.
     
  3. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    I gather this is directed at me. It's funny, because EUI_Utilities isn't modified by the CBP version (except to add the hard-coded trade item types for C4DF). None of the core database utilities are changed, so this really can't be pinned on me. As to what's causing it, I'm not sure, but I don't think this is as cut-and-dry as 'use the standard EUI.' (It's also irritating to constantly be thrown up against the brick wall of 'use the standard version of EUI or I'm not going to help you,' but that's another story).

    JFD, out of curiosity, have you tried making a modpack of CiD and seeing if it loads?

    G
     
  4. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,107
    Location:
    The Kingdom of New Zealand
    I don't think its an issue with CBP's EUI, really. I've never run into problems otherwise.

    Anyway, Whoward explains what the issue is here. It's odd that I and users only experienced this with the CBP's EUI, but that could be for any number of reasons not at its own fault. I have a workaround at no extra processing cost, so it's just an idle curiosity at this point.

    A modpack for MP? Not really - I can't imagine how my mods would work in MP :p
     
  5. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    The root of the problem is that the game sets
    Whoward's explanation may be true, but it may also be something else like a simple pointer setting issue. What matters is that
    fortunately turns out to be incorrect, we can simply NOT use GameInfo pregame, since DB.Query can do the same stuff (and more), although
    So
    is untrue: it uses GameInfo pregame.
    You spurred me to spend time investigating this problem, which I ended up doing, fixing and explaning, but made your own fix anyway
    Result: EUI v1.27k works while CBP is bugged :rolleyes:
     
  6. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    Ah, I haven't updated the CBP EUI because I had such problems last time. Was waiting to see if it could be fixed. If so, I'll update. Thanks!

    G
     
  7. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    Wait a bit more: there are some more bug fixes incoming with v1.28.
    Furthermore, I don't like the current situation between EUI & CP/CBP: there needs to be more modularity / independence.
    So I am also implementing:
    1/ updates to the core utils to add the hard-coded trade item types for C4DF
    2/ means for mods to set their own tooltips for use by EUI from their own scripts rather than bundling modified EUI scripts
    The aim is a win-win situation: you don't have to chase EUI bug fixes, I get a single EUI development stream under my control (please note EUI fair use rules do NOT grand derivative work rights).
     
  8. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    Regarding fair use, are you saying that I can't offer for download a modified EUI that includes CP/CBP compatibility edits? If so, that seems a little...draconian. If not, mind explaining what you mean?

    If that's the case, and I need to stop, I will do so, as I respect your ownership of the mod. I'm not terribly enthused at the idea of rewriting, from scratch, all of the tooltip edits I've made using a script system, so if the options are 'end support for EUI' and 'rewrite everything as scripts,' I'll probably just stop supporting EUI, which is a shame. I don't see what is wrong with the current system, to be honest, as I cannot fathom that scripting will cover the hundreds of tooltip and interface changes I've added to work with the CP's LUA API expansion.

    To be clear, I've never claimed that the product was my own, and I'm fairly certain no one that uses the CBP-EUI would assume it was mine. It is clear that CBP-EUI is a compatibility mod for another user's mod.

    G
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,350
    Location:
    Near Portsmouth, UK
    Then, under the terms/rules/guidelines of CfC's Modiquette (specifically - "When you upload content, you automatically grant permission for it to be used by all members of this community" and "Nobody here minds if his work is used in other mods, or used as base for something else") you need to remove it
     
  10. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,162
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    No, it doesn't say that at all. It's laying down the informal default license that has grown up in the spirit of the community in how we ought to approach use and modification in the absence of clarity. However it specifically mentions that a small number of modders have released their work under the CC license, which carries additional restrictions. In other words, you can use a different license than the informal one most of us have tacitly adopted, but you ought to be clear about it.
     
  11. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    what is meant is that you should only include files which require modifications, and not distribute unmodified files.
    The basic idea is that I do not want EUI forks, and want to continue to control EUI development.

    I do realize more modularity would make this goal easier to reach. So with EUI v1.28, I have modified the core library to add the hard-coded trade item types for C4DF, and initiated changes to allow mods to easily override EUI tooltips, in a way that does not require to include modified EUI files.

    How it's supposed to work (please note I have not yet had the time to test this aspect):
    1. EUI sets up a UI_bc1 table within MapModData at game start, before mod EntryPoints lua script (InGameUIAddin or otherwise) get to run. This MapModData.UI_bc1 table aims to include all of the tooltip functions used by EUI (1.28 includes all of the InfoToolTipInclude functions, there are more to come)
    2. mods EntryPoints lua scripts can supply a replacement xxx function by assigning the corresponding MapModData.UI_bc1.xxx field with the replacement function (so all you need to do is copy paste/code you have already written)
    3. upon closing of the dawn of man screen, EUI sets up the tooltips with whatever functions (with the expected names) are in MapModData.UI_bc1 at that time. Please be careful to set only the MapModData.UI_bc1 fields you need to set!
    :rolleyes:you really want me gone, don't you:lol: Given the fact that in the past CivFanatics has kindly acted to uphold my author rights claims, I will continue to trust that they still consider them valid
    :clap:
     
  12. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    That's fine, I don't currently distribute any unmodified files as part of the CBP. I guess I should note that the copy of EUI that the CBP uses does not in any way change the way EUI works from a 'root' level. All I've done is add in new LUA elements tied to new DLL elements (i.e. tooltip info for corporation bonuses, monopoly bonuses, etc) in order to expose CP/CBP changes to the interface. These changes are all done in lua files that overwrite EUI (using my EUI-CBP compatibility mod).

    The only key area where the EUI-CBP version differs from the latest EUI (aside from these lua UI additions) is the diplo screen, as the recent EUI changes to it hard-coded many elements that C4DF and the CBP needed to function (thus the CBP diplo. screen when using EUI retains the look, feel, and code of the BNW lua).

    If this violates your fair use model, I'll stop, but I personally feel like 'making EUI compatible with the CBP' fits the description of fair use. I don't want you to go to a ton of trouble over this when the current arrangement works just fine on my end (if the end goal is 'ease of use,' that is). As I said before, rewriting the lua for the hundreds of new lua hooks I've added to EUI for the CBP is not an appealing outcome of this situation.

    G
     
  13. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    This is absolutely true, but I'd argue that the 'spirit of the rules' is broken if you are using additional CC to wholly overwrite the forum's built-in EULA. bc1's additional CC follows the letter of the law, but the intended purpose of the CC line in the modiquette was meant, I'd argue, to deal with specific elements of a mod (most likely music, art, voicework, or other media) rather than the entirety of a mod. In that way, I tend to agree with whoward that applying a CC to an entire mod – especially if that mod includes content that was part of a retail product – is in contradiction to the forum's EULA.

    This is purely my 'legalese' speculation with regards to the spirit of the forum's rules, and is not intended as a dismissive statement.

    G
     
  14. Enginseer

    Enginseer Salientia of the Community Patch Supporter

    Joined:
    Nov 7, 2012
    Messages:
    3,215
    Gender:
    Male
    Location:
    Somewhere in California
    I don't see this in your download or I'm not looking in the right spot, are the changes currently in? I'm asking because my Leadership Reformation mod uses a component where Great Generals display an XP along with their name using the Unit:GetExperience(). So, it would be "Cao Cao (24/250)". The 24 would be related toward their current experience and the 250 a customizeable max experience number. Right now the workaround would be to have users to replace a certain portion of your UnitPanel to detect Great General and Great Admiral's experience which isn't very user-friendly...
     
  15. Iamblichos

    Iamblichos Prince

    Joined:
    Aug 17, 2015
    Messages:
    358
    Gender:
    Male
    Location:
    Dallas, TX
    How does this work with mods that are merely a formal change (which is what the EUI is)? That sort of ad hoc allowance of special restrictions for that kind of change leaves things pretty wide open for anybody else to do the same and keep others from building on other's work in time or absence.
     
  16. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    The legal framework here is author's rights / copyright. As the author of original work in EUI, I get to decide who can do what with it.
    If someone writes a book and writes no sequel, you cannot write one yourself without permission.
    If you don't like some twists in the plot, you cannot write another version without permission.
    Cheers
     
  17. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,162
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Sorry, I have the bad habit of playing devil's advocate, but I dislike when people make blanket statements. The world is a nuanced place, and that's certainly true of the law and the ethics which supposedly undergird it.

    So, to muddy the waters a bit more: bc1, your statement that you as the author of a derivative work can argue that others can't make any derivative works is certainly problematic, so I think you want to stick to the idea of a user license agreement as a condition of download rather than relying on copyright law. Modding is on shaky legal footing, and laws vary from country to country, so let's look to the EULA of Civ5. Note that Firaxis/2K can do whatever the hell they want with your mod (as whoward69 found when they incorporated some of his DLL edits) per the game's EULA. So, here's the appropriate section of the EULA:
    Spoiler End User License Agreement :
     
  18. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    EUI is not content, and I did not create EUI "through use of the Software" (simply using a text editor) so I don't see how that could apply here.
    Furthermore, 2K's claimed appropriation of someone's work via such a blanket statement is likely on shaky legal grounds too... It may be akin to a toolmaker declaring that whatever you make with that tool becomes their property :crazyeye: But of course no one is going to go to court to find out :lol:
     
  19. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    17,464
    Gender:
    Male
    Location:
    Little Rock
    I'm trying to play middle-ground, here, as I don't want this discussion to get ugly, but there are some big misconceptions here.

    EUI exists "through use of the software." Your LUA - its naming scheme, the LUA functions within it that hook into the DLL, and much of the non- or mildly-altered code, are directly from Civ 5's code base. Your mod could not exist without Civ, and is dependent on civ to function, therefore it functions 'through use of the software.'

    To use your book example, if Civ is the Encylopedia Britannica, you've written the Encyclopedia Britannnica: EUI Reader's Guide, which cannot functionally exist (and would have no reason to exist) without the Encyclopedia itself. To then claim that any derivatives of your Reader's Guide violate your own EULA is to assume that your EULA has precedence over the initial EULA of the Encyclopedia, which it does not.

    So, the order of precedence here is:
    1.) Civ's EULA
    2.) Civfanatics' Mod EULA
    3.) Author EULA

    If you make a mod for Civ, Civ's EULA trumps all, and if you upload a mod to Civfanatics, the website's EULA trumps personal EULA. You can add exceptional-use clauses and specific copyrights in your own EULA, but any EULA that nullifies the EULAs of 1.) and 2.) is invalid.

    G
     
  20. Iamblichos

    Iamblichos Prince

    Joined:
    Aug 17, 2015
    Messages:
    358
    Gender:
    Male
    Location:
    Dallas, TX
    Your statement is fairly disanalogous. Your mod offers no essential content to the game, and in that sense your claim is ad hoc. This is why I stated it's *merely* a formal mod. What is more, it's formality is wholly contingent on content that was already copy written, gaming content we all have access to and free to mod, which you've now closed off with your own "copyright" (one that doesn't have a lick of real legal bearing). If your mod brought content that was actually concrete into the game, then you would be cooking with gas, but it doesn't, so it isn't. A book written by someone has both form (it's presentation) and essence (it's content), and is more or less created out of whole cloth. I find it somewhat pretentious that you think it deserves some special status where it has no true creative content prior to and apart from the game (e.g. new game functions like in whoward's or the CP's dll, artwork, music, models, etc.). Having control of the code stream of your mod is one thing and should be held out of courtesy and good community, but what you are claiming has no real validity other than a label.
     

Share This Page