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

Quick Modding Questions Thread

Discussion in 'Mod Creation Help' started by Leyrann, Oct 28, 2018.

  1. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,639
    Location:
    London, UK
    If you mean "How many variant Unit Members can you have?", I don't think there is a limit that I'm aware of. It will just randomly select from the pool of available Variations.
     
    Gedemon likes this.
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,236
    Location:
    France
    Thanks, that could be useful combined with the Lua ability to select which one to display.
     
  3. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    Thanks. I presume it's non-essential for the functioning of the mod.

    ------------------------------

    My latest mod requires Gathering Storm DLC, since it replaces the Expansion2 CityBannerManager.lua.

    If the next Civ VI DLC uses a new CityBannerManager.lua, then the mod will be incompatible. Were the mod's CityBannerManager.lua file directed to be used with Expansion3, it would likely cause problems, since it would be outdated.

    If the mod has the compatibility line...

    <CompatibleVersions>2.0</CompatibleVersions>

    ...will Expansion3 be able to use it? Or will all mods need to be updated to...

    <CompatibleVersions>3.0</CompatibleVersions>

    ...to be used with Expansion3?
     
    Last edited: Mar 13, 2020
  4. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    The compatible versions attribute has no actual effect other than to generate a warning in the Additional Content menu that the mod has not been "marked" as being compatible but otherwise there is no actual effect. The user can choose to ignore this warning. The Compatible Versions attribute does not make the mod require the gathering storm DLL being in use nor the Gathering Storm ruleset being enabled.
     
  5. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    Okay, as long as the mod subscriber gets notification that it's not compatible. I don't want subscribers using Expansion3 and being unaware that the mod is loading an outdated CityBannerManager.lua from Expansion2.

    For future reference, when Expansion3 comes out, if it uses a new CityBannerManager.lua, is it possible to include both Expansion2 and Expansion3 CityBannerManager.lua, and have the mod use whichever is appropriate, or will I have to make two separate versions of the mod, one for Gathering Storm and one for Expansion3?
     
  6. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    You can make an action only execute if the Gathering Storm Ruleset is active, or only if the Expansion2 DLL is being used, so if there is a third expac we should be able to do that as well. Excerpts from the Gathering Storm expansion's modinfo file
    Code:
    	<ActionCriteria>
    		<Criteria id="Expansion2">
    			<GameCoreInUse>Expansion2</GameCoreInUse>
    		</Criteria>
    	</ActionCriteria>
    	<InGameActions>
    		<ImportFiles id="Expansion2_Files" criteria="Expansion2">
                            ...
    			<File>UI/CityBanners/CityBannerManager.lua</File>
    			<File>UI/CityBanners/CityBannerManager.xml</File>
                            ...
    		</ImportFiles>
    	</InGameActions>
    The filepath being specified is that from within the root folder of the Gathering Storm expansion. In other words, the folder path is relative to the folder where the modinfo file is located, just like for any other mod.
     
    Last edited: Mar 13, 2020
  7. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    Thanks for that.

    -------------------------------------

    Anyone know if it's possible to make ranged units able to capture cities? Currently, only melee units can.

    I had a look through the files but couldn't find anything.

    I'd be interested to see what would happen if ranged units were made able to capture cities that were at zero health. I don't think it would help the human player that much, but it might make the AI able to capture more cities than they do currently.
     
  8. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    As far as I can tell it's buried in the DLL. I don't see anything obvious in the database that marks ranged or siege units as being "unable to capture cities": it just exists as a game mechanic.
     
  9. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    I thought as much.

    Maybe I'll put it in Ideas & Suggestions, along with not letting ranged units continue to shoot at cities at zero health.
     
  10. IgorS

    IgorS Your ad could be here!

    Joined:
    Sep 28, 2008
    Messages:
    2,210
    Gender:
    Male
    Location:
    Rishon
  11. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    If you are using modbuddy to generate the mod, you need to look at the checkboxes in the mod's properties page in Modbuddy.

    MarkingComptibility01.jpg MarkingComptibility02.jpg

    This then creates this line in the modinfo file (under the <Properties> header)
    Code:
    <CompatibleVersions>1.2,2.0</CompatibleVersions>
    Like this I am using for a private mod:
    Code:
      <Properties>
        <Name>Basic_GS_Gameplay</Name>
        <Description>Basic Gathering Storm Gameplay Alterations</Description>
        <Created>1577547009</Created>
        <Teaser>Basic Gathering Storm Gameplay Alterations</Teaser>
        <Authors>LeeS</Authors>
        <CompatibleVersions>1.2,2.0</CompatibleVersions>
      </Properties>
    If you don't use modbuddy to generate your mods you can just add the line to the modinfo file using any text editor such as Notepad.

    ----------------------------------------------------------------------------------

    Marking the mod as compatible however has no effect whatever on how the mod operates nor on whether or not the code within the XML, SQL, LUA, DDS, BLP, TEX, Artdef, etc., files is actually correct and acceptable for the expansion(s). It merely means you the mod-author think the mod is compatible and have so marked it for your users. Any user can just tell the game to ignore compatibility warnings for an individual mod (or not) and the mod will execute the same regardless of whether compatibility is marked or not.
     
    Last edited: Mar 16, 2020
    IgorS likes this.
  12. IgorS

    IgorS Your ad could be here!

    Joined:
    Sep 28, 2008
    Messages:
    2,210
    Gender:
    Male
    Location:
    Rishon
    Thanks, helpful as always. Those minor details are something I really know nothing about.
     
  13. RavagePencil

    RavagePencil Chieftain

    Joined:
    Mar 19, 2020
    Messages:
    3
    I made a mistake by posting a whole thread in a different forum and not posting here. Please, if a moderator could delete it I would appreciate it, I don't mean to spam by asking the same question someone more suitable.
    I'm trying to understand what "ModifierType" means. Like what is it?
    I've looked at guides and I can't understand it. I guess its like some kind of unique identifier for a collection of things? Like what does it actually do?

    Another issue is that I don't understand anything to do with actually trying to add them in. I thought it would be pretty simple to add a modifier that would let a unique unit to a civilization have increased combat strength against Melee units, Anti-Cavalry units and Ranged units, but it seems like I need to understand something that I can't find a good explanation for. I don't understand what a "DynamicModifier" table is, I don't think I have that or have even seen that before in the template or guides I've been following.

    This is just way too confusing and I'm not sure how anyone is able to come from a completely fresh experience, never modding civ or another game before and supposed to follow these guides. Though its probably me being stupid and lacking the intelligence to understand at the end of the day, so if it is, don't be afraid to tell me that.
     
    Last edited: Mar 20, 2020
  14. Lenin1870

    Lenin1870 Chieftain

    Joined:
    Mar 16, 2013
    Messages:
    43
    Hello. I think it's right to write my question in this thread, so I do. I don't know how to import 2D leader images using Asset Editor. I want to use 2D image for Dawn of Man and Diplomacy screen. Also, add various face in accordance of diplomacy situations. What should I do?
     
  15. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,236
    Location:
    France
  16. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    Would it be possible to create a new Wonders tab in the Reports tabs that listed all the Wonders that had been built in the game, along with the Civilization that built them (and maybe the city, year constructed and other information)?
     
  17. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,379
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Yes. You could look at Even More Reports. The Diplomacy tab is maybe not exactly in the format that you're looking for, but it'd be a start.
     
  18. Trigan Emperor

    Trigan Emperor Prince

    Joined:
    Apr 11, 2015
    Messages:
    436
    Thanks.

    I've not seen that mod before. Looks good.
     
  19. Lenin1870

    Lenin1870 Chieftain

    Joined:
    Mar 16, 2013
    Messages:
    43
    First, Thanks for reply. Now I have a knowledge about making new leader's image.
    But I faced an issue. 20200330044645_1.jpg
    The fallback leader image is right-skewed as you see. How do I center the image?
     
  20. Zagaroth

    Zagaroth Chieftain

    Joined:
    Nov 27, 2009
    Messages:
    60

    Hey, I didn't see anyone else reply, but LeeS recently gave me some tips. Basically, You shouldn't need to use DynamicModifiers *unless* there is an effect that does not already have an associated Modifier. Example:

    MODIFIER_PLAYER_UNIT_ADJUST_GREAT_PEOPLE_POINTS_PER_KILL (<-- this is a ModifierType, not a ModifierId) already points at EFFECT_ADJUST_GREAT_PEOPLE_POINTS_PER_KILL (this association can be found in the Modifiers.xml). However, if the modifier didn't exist, but the effect was valid, you would need to create your own ModifierType, and insert into the DynamicModifier table to create it. This is also where what the ModifierType effects is set (such as COLLECTION_OWNER effects all valid targets belonging to the 'owner' of the ability/trait)

    So, your ModifierId is what you create to reference your unique usage of a modifier, and is associated to a trait or ability

    That ModifierId then need to be connected to a valid ModifierType, which is done here:

    Code:
    INSERT INTO    Modifiers
            (ModifierId,                                        ModifierType,                                                OwnerRequirementSetId,                SubjectRequirementSetId,            RunOnce,    Permanent    )
    VALUES   
            ('MODIFIER_ZAG_SUMETAL_UA_GPM_POINTS',                'MODIFIER_PLAYER_UNITS_GRANT_ABILITY',                        NULL,                                NULL,                                0,            1            ),
            ('MODIFIER_ZAG_SUMETAL_UA_GPM_POINTS_ABILITY',        'MODIFIER_PLAYER_UNIT_ADJUST_GREAT_PEOPLE_POINTS_PER_KILL',    NULL,                                NULL,                                0,            1            );
    
    and now that you've called up the modifier type, you need to feed it arguments, with the arguments being based on the effect being called upon through the ModifierType.

    Code:
    INSERT INTO    ModifierArguments
            (ModifierId,                                        Name,                        Value                            )
    VALUES   
            ('MODIFIER_ZAG_SUMETAL_UA_GPM_POINTS',                'AbilityType',                'ABILITY_ZAG_SUMETAL_UA_GPM_POINTS'    ),
            ('MODIFIER_ZAG_SUMETAL_UA_GPM_POINTS_ABILITY',        'GreatPersonClassType',        'GREAT_PERSON_CLASS_MUSICIAN'        ),
            ('MODIFIER_ZAG_SUMETAL_UA_GPM_POINTS_ABILITY',        'Amount',                    1        );
    
    This spreadsheet is great at finding effects, but then you need to try and find the right modifier to call on. Not to difficult usually.
     

Share This Page