Quick Modding Questions Thread

Code:
	<TypeProperties>
		<!--Lifespan stat-->
		<Row Type="UNIT_HERO_ANANSI"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_ARTHUR"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_BEOWULF"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_HERCULES"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_HIMIKO"		Name="LIFESPAN" Value="40"/>
		<Row Type="UNIT_HERO_HIPPOLYTA"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_HUNAHPU"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_OYA"			Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_MAUI"			Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_MULAN"			Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_SINBAD"		Name="LIFESPAN" Value="30"/>
		<Row Type="UNIT_HERO_WUKONG"		Name="LIFESPAN" Value="50"/>
		<Row Type="UNIT_QUESTING_KNIGHT"	Name="LIFESPAN" Value="12"/>
    ....
File is
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Babylon\Data/Babylon_Heroes_MODE.xml
 
  • Like
Reactions: tzu
Code:
    <Units>
        <!-- Sanguine Pact!-->
        <Row UnitType="UNIT_VAMPIRE" Cost="150" UseMaxMeleeTrainedStrength="true" BaseMoves="2" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_LAND" Combat="20" FormationClass="FORMATION_CLASS_LAND_COMBAT" PromotionClass="PROMOTION_CLASS_VAMPIRE" AdvisorType="ADVISOR_CONQUEST" Name="LOC_UNIT_VAMPIRE_NAME" Description="LOC_UNIT_VAMPIRE_DESCRIPTION" CanCapture="False" CanRetreatWhenCaptured="True" CanTrain="false" CanEarnExperience="false" ImmediatelyName="true"/>
        <!-- Voidsingers-->
        <Row UnitType="UNIT_CULTIST" Cost="100" Maintenance="4" BaseMoves="2" BaseSightRange="2" ZoneOfControl="false" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_SUPPORT" Name="LOC_UNIT_CULTIST_NAME" Description="LOC_UNIT_CULTIST_DESCRIPTION" PurchaseYield="YIELD_FAITH" PseudoYieldType="PSEUDOYIELD_UNIT_RELIGIOUS" MustPurchase="TRUE" CanTrain="false" CostProgressionModel="COST_PROGRESSION_PREVIOUS_COPIES" CostProgressionParam1="10" CanCapture="False" TraitType="TRAIT_SECRET_SOCIETY_UNIT_CULTIST"/>
    </Units>
So, yes. So long as the SQL update loads into the game after the game mode alters the game database to add the units specific to the game mode.

How can I ensure that?
 
You have to use a LoadOrder as a property of the action. In the modinfo file this will look something like this
Code:
    <UpdateDatabase id="BasicDatabaseAlterations">
      <Properties>
        <LoadOrder>150</LoadOrder>
      </Properties>
      <File>SQL/BasicInGameData.sql</File>
    </UpdateDatabase>
See the attached PDF which is the extracted pertinent portion of the Modding Guide in my signature. It shows what to do in Modbuddy to add a LoadOrder value to an action, as well as how to set up dependances, references, etc, to other mods or to Firaxis DLC and the like.
 

Attachments

Question: I see this a lot but haven't the foggiest idea of what it means: What is "SortIndex"? It gives an integer value but I'm not sure what I need to put in for that value if creating a civ, building, ui, ua, or uu?
 
Hi there, question ! :)
Anyone knows where I can found the game file icons in the SDK files ? I'm trying to build an online, interactive, tech and civics tree but I need the game icons for techs. I found a lot of them in the files "pantry/Textures/" folder as dds files, that I can convert to PNGs, but I cant found others like resources icons (pasture, quarry, mine, plantations etc) as they appear in the tech tree specificaly. Any ideas ? Or should I just manualy review 32GBs of DDS files ? :/
Thanks alot !
 
Hi there, question ! :)
Anyone knows where I can found the game file icons in the SDK files ? I'm trying to build an online, interactive, tech and civics tree but I need the game icons for techs. I found a lot of them in the files "pantry/Textures/" folder as dds files, that I can convert to PNGs, but I cant found others like resources icons (pasture, quarry, mine, plantations etc) as they appear in the tech tree specificaly. Any ideas ? Or should I just manualy review 32GBs of DDS files ? :/
Thanks alot !
I think All the Icons are in the Textures Folder. Search for ResourcesXX(X_FOW) (like Resources256) for the resources. You can just look into the Icons xml Files and search for the Filenames in "pantry/Textures/" Folder.
 
Hi there! :)

I just tried to trigger a LUA by hotkey. For initial tests I created my test.lua:

Code:
include("inputsupport");
function OnInputHandler(pInputStruct:table)
  print("OnInputHandler");
  if pInputStruct:GetKey() == Keys.VK_Y then
    print("Button Y pressed!");
    return true;
  end
  return false;
end

function Initialize()
  print("Initialize...");
  ContextPtr:SetInputHandler(OnInputHandler, true);
  print("Initialize!");
end

Initialize();

And added it to modinfo like:
Code:
...
<InGameActions>
        <ImportFiles id="INGAME">
            <Items>
                <File>UI/ingame.lua</File>
            </Items>
        </ImportFiles>
...

I seem to be on the wrong track, since I don't see any of the printlines in the logs (not event the initialize log).
Can you give me some hints please?

Thank you in advance!! :)
Regards
CypRyan
 
I think All the Icons are in the Textures Folder. Search for ResourcesXX(X_FOW) (like Resources256) for the resources. You can just look into the Icons xml Files and search for the Filenames in "pantry/Textures/" Folder.
Thanks for the answer, unfortunately its not the icons i'm looking for, I'm looking for tile improvements icons like the ones I attached to the message.

I'm actually looking for the exact file, I know its somewhere in Textures but I spent something like 3/4 hours looking for them in vain, so maybe someone will know where they are, search better than me or have a different idea on where to find them ?
Thanks !
 

Attachments

  • icons.png
    icons.png
    93.2 KB · Views: 32
Last edited:
Thanks for the answer, unfortunately its not the icons i'm looking for, I'm looking for tile improvements icons like the ones I attached to the message.

I'm actually looking for the exact file, I know its somewhere in Textures but I spent something like 3/4 hours looking for them in vain, so maybe someone will know where they are, search better than me or have a different idea on where to find them ?
Thanks !
I too spent a lot of time searching for them, tried everything, but didn't find them till someone gave me a Tipp (they are actually Unit Actions). Search for: UnitActions256, XP1_UnitActions256, XP2_UnitActions256.

I seem to be on the wrong track, since I don't see any of the printlines in the logs (not event the initialize log).
If you load a new UI lua file then you need the xml file for it (just an empty one if you're not making a visual UI (Panel, Pop-Up...) or altering an existing one).
Here is an example:
Code:
    <AddUserInterfaces id="TestUI">
      <Properties>
        <Context>InGame</Context>
      </Properties>
      <File>UITest.xml</File>
    </AddUserInterfaces>
  </InGameActions>
  <Files>
    <File>UITest.lua</File>
    <File>UITest.xml</File>
 
I too spent a lot of time searching for them, tried everything, but didn't find them till someone gave me a Tipp (they are actually Unit Actions). Search for: UnitActions256, XP1_UnitActions256, XP2_UnitActions256.
Ha! thanks for the tip !
Any chance that you also know where I can find these icons background ? I found files like TechKeyAbility.dds, TechKeyBuilding.dds, TechKeyDistrict.dds or TechKeyReveal.dds, but I havent found some others like for the resource improvements I asked before, and for wonders, the file TechKeyWonder.dds isnt the right one :/
 
Ha! thanks for the tip !
Any chance that you also know where I can find these icons background ? I found files like TechKeyAbility.dds, TechKeyBuilding.dds, TechKeyDistrict.dds or TechKeyReveal.dds, but I havent found some others like for the resource improvements I asked before, and for wonders, the file TechKeyWonder.dds isnt the right one :/
You're welcome.
No I don't :dunno:.
 
You don't need an xml context file if you are replacing an existing User Interface file and are not adding new button-click type content. An ImportFiles action will do since this will literally replace the original version of the file the game loads into the VFS with your own custom version of it.



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

But if you are adding a new User Interface panel or poopup then yes it needs to be done using an AddUserInterfaces action, and it needs an xml context file. Both files need to have the same name except for the extension type. Something.xml goes with Something.lua, and they need to be in the same folder within the mod.

Since what you are attempting @CypRyan is to add a new interface then you need to do as @Zegangani advised. If it were me I would also use a bit more unique name for the lua/xml files since there are already base game files called InGame.lua and InGame.xml -- Civilization 6 generally seems to be literal and case-sensitive with file names for these issues, but at times it also is not case-sensitive.
 
Sorry if this has been asked recently, but scouring the internet hasn't helped me much outside of now broken links, and I wanted to play around with the SDK
Where the hell can I get Microsoft Visual Studio 10 Isolated Shell Redistributable?
 
How do I link a preexisting 3d model to a UU/District/building etc. Like if I made a unique Theater district and just wanted to use the base campus graphics as a placeholder?
 
How do I link a preexisting 3d model to a UU/District/building etc. Like if I made a unique Theater district and just wanted to use the base campus graphics as a placeholder?

You have to make your own districts.artdef, copy campus XML part and copy to your own, then changing the name to your unique name.
 
Back
Top Bottom