Strategic Industry

Strategic Industry V. 10.01

You... made your mod unusable for anyone who didn't pre-order the game?

And you did this on purpose?

Um. Dude. Get yourself to the hospital and have them do an MRI of your brain _stat_. I think you may have a horrible undiagnosed concussion or something.

It takes a lot of nerve to show up in the thread for someone else's creation and talk horsehocky when you've contributed nothing. You're speaking to a person who spends his/her time producing free content for you. So you might show some fudging respect and gratitude..
 
It takes a lot of nerve to show up in the thread for someone else's creation and talk **** when you've contributed nothing. You're speaking to a person who spends his/her time producing free content for you. So you might show some ****ing respect and gratitude..
Fight!
 
Thanks for your great mod, that was exactly what I was looking for since I really miss the option of being able to set several resources as a requirement for units.

However it would be nice if horses, coal, oil and uranium wouldn't be the only strategic resources that benefit from having more than 1 copy, so that there is a bonus for having 2 iron or copper as well.
Would it be possible to add another small bonus, that only applies when you have 2 copies of the specific resource? So that for example 1 iron gives the +5, while 2 iron give let's say +7 or 8?
That way it would be useful to claim/ trade more strategic resources, and it would explain why the AI usually agrees on buying several copies of a resource (right now they will buy 2 iron even if there is absolutely no point in doing so).

Keep up the good work! :)



edit: The description for the Indian Mughal Sowar still has the vanilla "does not require iron" in it.
 
Last edited:
Thanks for your great mod, that was exactly what I was looking for since I really miss the option of being able to set several resources as a requirement for units.

However it would be nice if horses, coal, oil and uranium wouldn't be the only strategic resources that benefit from having more than 1 copy, so that there is a bonus for having 2 iron or copper as well.
Would it be possible to add another small bonus, that only applies when you have 2 copies of the specific resource? So that for example 1 iron gives the +5, while 2 iron give let's say +7?
That way it would be useful to claim/ trade more strategic resources, and it would explain why the AI usually agrees on buying several copies of a resource (right now they will buy 2 iron even if there is absolutely no point in doing so).

Keep up the good work! :)



edit: The description for the Indian Mughal Sowar still has the vanilla "does not require iron" in it.
I'm not sure if doubling an effect from a resource is possible using the current modifier. I would have to find a creative work around like from a policy for example.

I have considered requiring a resource for all offensive units, mainly siege weapons.
 
I'm not sure if doubling an effect from a resource is possible using the current modifier. I would have to find a creative work around like from a policy for example.

I have considered requiring a resource for all offensive units, mainly siege weapons.

do you know where we can look up that piece of code that sets the resource-requirement to 2 when the appropriate district is not available? Maybe we can find a hint there? But maybe it's hardcoded.


Adding a resource requirement for siege weapons (like stone for catapults and iron for all the other ones) sounds good, with niter added as a booster for the artillery maybe so it doesn't become useless so early?
I also wanted to add this for my personal use at first, but then I thought that you can build huge warships in the same eras that don't require any iron at all, which is why I proposed the additional combat strength (for 2 copies of a resource) approach instead.
Hmm, that's the point where I really miss how it was handled in Civ5 where it easily allows multiple strategic resources as a requirement, and I really hope they will implement a way to achieve this in Civ6 as well. :/

Another thing that was on my mind: Right now, almost everything in the mid-lategame depends on oil (which of course makes perfect sense with your fuel/ material-logic).
But what if air units for example get aluminium back as requirement, while oil boosts their mobility?
So you need aluminium to build a chopper, coal/ carbon to boost its combat strength (better armor) and oil to boost its mobility (more/ refined fuel) with MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT ?
With a +1 movement modifier for small aircraft and a bigger one for bombers, since +1 wouldn't make a real difference there.


And now that I think of it, the same logic could be carried over to all units that require HUGE amounts of steel, strictly speaking of ships (excluding submarines):
-iron as a requirement for all of them
-coal (ironclads/ battleships) or oil (everything else) for mobility
-niter for combat strength
-uranium for mobility + combat strength (missile cruiser/ carrier)

This would still leave enough units with a primary oil requirement:
mobile SAM, rocket artillery, submarines, mechanized infantry, tank, modern armor

But those are just some thoughts.
Sorry for the wall of text.
 
Last edited:
Getting a 'crash on load' bug. I've cleared all mods running with the exception of Strategic (5.2 & extras), & 3 firaxis DLCs (Aztec, Polish, Viking). Repeatable when: -> New game is started with Strategic enabled, save is performed, exit to desktop, start game, attempt load. The crash dumps me back to the main menu with no front-end error message. Only errors that I've noted in the logs come from the database log file which is as follows:

[1050038.325] [Localization]: Validating Foreign Key Constraints...
[1050038.325] [Localization]: Passed Validation.

[1050038.336] [Configuration]: Validating Foreign Key Constraints...
[1050038.337] [Configuration]: Passed Validation.

[1050046.879] [FullTextSearch]: Initializing FullTextSearch
[1050047.423] [Gameplay]: Validating Foreign Key Constraints...

[1050047.442] [Gameplay]: Passed Validation.
[1050047.940] [Configuration]: Validating Foreign Key Constraints...

[1050047.940] [Configuration]: Passed Validation.
[1050136.554] [Configuration]: Validating Foreign Key Constraints...

[1050136.555] [Configuration]: Passed Validation.
[1050137.071] [Gameplay] ERROR: FOREIGN KEY constraint failed

[1050137.071] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1050137.071] [Gameplay]: Validating Foreign Key Constraints...

[1050137.083] [Gameplay] ERROR: Invalid Reference on TypeTags.Type - "UNIT_POLISH_HUSSAR" does not exist in Types

[1050137.084] [Gameplay] ERROR: Invalid Reference on Unit_BuildingPrereqs.Unit - "UNIT_POLISH_HUSSAR" does not exist in Units

[1050137.084] [Gameplay] ERROR: Invalid Reference on Unit_BuildingPrereqs.Unit - "UNIT_POLISH_HUSSAR" does not exist in Units

[1050137.085] [Gameplay]: Failed Validation.
[1050137.204] [Gameplay]: Validating Foreign Key Constraints...

[1050137.225] [Gameplay]: Passed Validation.
[1050139.175] [Configuration]: Validating Foreign Key Constraints...

[1050139.175] [Configuration]: Passed Validation.


So...... I'm going to start digging around the Polish Hussar unit, but I thought I'd provide an update and see what others might have experienced or if I'm not thinking things through.
 
Getting a 'crash on load' bug. I've cleared all mods running with the exception of Strategic (5.2 & extras), & 3 firaxis DLCs (Aztec, Polish, Viking). Repeatable when: -> New game is started with Strategic enabled, save is performed, exit to desktop, start game, attempt load. The crash dumps me back to the main menu with no front-end error message. Only errors that I've noted in the logs come from the database log file which is as follows........................

Just to clarify/update I did re-download Strategic 5.01 from the link provided in the Polish compatibility fix post with no luck. I've also dropped in Strategic version 5.0 from earlier that day, and with the Polish DLC enabled the game functions/loads normally. Not quite what UG had in mind though. I'll explore a bit more, probably using how he handled the Eagle Warriors as a template.

------------------------------------------------------------------------------------------------------------------------------
-Update- I've got the 5.01 working with specific lines commented out of Strategic 'Data.xml'

Ln 363 <!--<Row Type="UNIT_POLISH_HUSSAR" Tag="CLASS_IRON"/>-->
Ln 1224 <!--<Row Unit="UNIT_POLISH_HUSSAR" PrereqBuilding="BUILDING_ARMORY"/>-->
Ln 1225 <!--<Row Unit="UNIT_POLISH_HUSSAR" PrereqBuilding="BUILDING_WORKSHOP"/>-->

Additional references (see below) do not require removal, the description reference I can understand why, but the resource assignment puzzles me. Still, it's more data to work from. This is starting to point to another load order issue however by my rough guesstimate. Why DLC would be even allowed to load later in a list is beyond my ken.

<Update>
<Where UnitType="UNIT_POLISH_HUSSAR"/>
<Set StrategicResource="RESOURCE_HORSES"/>
</Update>

&

<Update>
<Where UnitType="UNIT_POLISH_HUSSAR"/>
<Set Description="LOC_UNIT_BMOD_POLISH_HUSSAR_DESCRIPTION"/>
</Update>

-----------------------------------------------------------------------------------------------------------------------------
-Last update for the night, then I'm calling it-

It's definitely a load-order problem unique to 'load' rather than 'setup'. I have a fix, but it's ugly.

Process:
(1) Copy Poland_Jadwiga_GameplayData.xml to Strategic Industry Data folder
(make a copy from your DLC folder in base game installation directory)

(2) Modify Strategic Industry.modinfo file to include:
"<File>Data/Poland_Jadwiga_GameplayData.xml</File>"​
in both file areas (top call and database section), be sure it's at the top of both file lists

(3) Include:
<UpdateDatabase id="POLAND_JADWIGA_GAMEPLAY_DATA">
<Items>
<File>Data/Poland_Jadwiga_GameplayData.xml</File>
</Items>
</UpdateDatabase>​
above the SREComponent database entry.

This appears to seed the database with enough material for the mod to call from, the rest of the Polish DLC can load at its leisure. I tried to accomplish this first with a simple dependency call, but no dice. I'm sure I've dropped a stitch somewhere, and like I said this fix is ugly. UG will not be able to include Firaxis material or files as part of the real fix. I'm only hoping that this gave some insight as to the specific cause (on the road to a more 'mod friendly' solution) and offer a temporary fix to those willing to self-service a band-aid. Also not sure if I could have gotten away with just the file call in the items section of the SREComponent database update, but done testing/poking the patient for the evening.
 
Last edited:
Just to clarify/update I did re-download Strategic 5.01 from the link provided in the Polish compatibility fix post with no luck. I've also dropped in Strategic version 5.0 from earlier that day, and with the Polish DLC enabled the game functions/loads normally. Not quite what UG had in mind though. I'll explore a bit more, probably using how he handled the Eagle Warriors as a template.

------------------------------------------------------------------------------------------------------------------------------
-Update- I've got the 5.01 working with specific lines commented out of Strategic 'Data.xml'

Ln 363 <!--<Row Type="UNIT_POLISH_HUSSAR" Tag="CLASS_IRON"/>-->
Ln 1224 <!--<Row Unit="UNIT_POLISH_HUSSAR" PrereqBuilding="BUILDING_ARMORY"/>-->
Ln 1225 <!--<Row Unit="UNIT_POLISH_HUSSAR" PrereqBuilding="BUILDING_WORKSHOP"/>-->

Additional references (see below) do not require removal, the description reference I can understand why, but the resource assignment puzzles me. Still, it's more data to work from. This is starting to point to another load order issue however by my rough guesstimate. Why DLC would be even allowed to load later in a list is beyond my ken.

<Update>
<Where UnitType="UNIT_POLISH_HUSSAR"/>
<Set StrategicResource="RESOURCE_HORSES"/>
</Update>

&

<Update>
<Where UnitType="UNIT_POLISH_HUSSAR"/>
<Set Description="LOC_UNIT_BMOD_POLISH_HUSSAR_DESCRIPTION"/>
</Update>

-----------------------------------------------------------------------------------------------------------------------------
-Last update for the night, then I'm calling it-

It's definitely a load-order problem unique to 'load' rather than 'setup'. I have a fix, but it's ugly.

Process:
(1) Copy Poland_Jadwiga_GameplayData.xml to Strategic Industry Data folder
(make a copy from your DLC folder in base game installation directory)

(2) Modify Strategic Industry.modinfo file to include:
"<File>Data/Poland_Jadwiga_GameplayData.xml</File>"​
in both file areas (top call and database section), be sure it's at the top of both file lists

(3) Include:
<UpdateDatabase id="POLAND_JADWIGA_GAMEPLAY_DATA">
<Items>
<File>Data/Poland_Jadwiga_GameplayData.xml</File>
</Items>
</UpdateDatabase>​
above the SREComponent database entry.

This appears to seed the database with enough material for the mod to call from, the rest of the Polish DLC can load at its leisure. I tried to accomplish this first with a simple dependency call, but no dice. I'm sure I've dropped a stitch somewhere, and like I said this fix is ugly. UG will not be able to include Firaxis material or files as part of the real fix. I'm only hoping that this gave some insight as to the specific cause (on the road to a more 'mod friendly' solution) and offer a temporary fix to those willing to self-service a band-aid. Also not sure if I could have gotten away with just the file call in the items section of the SREComponent database update, but done testing/poking the patient for the evening.
I discovered this problem last night but I was too tired to figure it out. I had this exact same problem referencing MOAR units after the winter patch . And my solution was to insert the XML file directly into my mod folder. This is something Firaxis really needs to fix. This will be a nightmare for many modders in the future. There is a workaround that might work though. That would require deleting the Hussar unit via an xml update and then re-creating it in my MOD. I will try this this evening.
 
Could we edit the RequirementArguments table (found in 01_GameplaySchema.sql) to add "Cost"

Code:
CREATE TABLE "RequirementArguments" (
        "RequirementId" TEXT NOT NULL,
        "Name" TEXT NOT NULL,
        "Type" TEXT NOT NULL DEFAULT "ARGTYPE_IDENTITY",
        "Value" TEXT NOT NULL,
        "Cost" INTEGER NOT NULL,
        "Extra" TEXT,
        "SecondExtra" TEXT,
        PRIMARY KEY(RequirementId, Name),
        FOREIGN KEY (RequirementId) REFERENCES Requirements(RequirementId) ON DELETE CASCADE ON UPDATE CASCADE);

and then just add a second iron-requirement (separated from the first) like this

Code:
        <Row>
            <RequirementId>REQUIRES_OWNED_IRON</RequirementId>
            <Name>ResourceType</Name>
            <Value>RESOURCE_IRON</Value>
            <Cost>2</Cost>
        </Row>

that gives Combat +3?

Or do you know where we can look up that piece of code that sets the resource-requirement to 2 when the appropriate district is not available? Maybe we can find a hint there? But maybe it's hardcoded.


Adding a resource requirement for siege weapons (like stone for catapults and iron for all the other ones) sounds good, with niter added as a booster for the artillery maybe so it doesn't become useless so early?
I also wanted to add this for my personal use at first, but then I thought that you can build huge warships in the same eras that don't require any iron at all, which is why I proposed the additional combat strength (for 2 copies of a resource) approach instead.
Hmm, that's the point where I really miss how it was handled in Civ5 where it easily allows multiple strategic resources as a requirement, and I really hope they will implement a way to achieve this in Civ6 as well. :/

Another thing that was on my mind: Right now, almost everything in the mid-lategame depends on oil (which of course makes perfect sense with your fuel/ material-logic).
But what if air units for example get aluminium back as requirement, while oil boosts their mobility?
So you need aluminium to build a chopper, coal/ carbon to boost its combat strength (better armor) and oil to boost its mobility (more/ refined fuel) with MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT ?
With a +1 movement modifier for small aircraft and a bigger one for bombers, since +1 wouldn't make a real difference there.


And now that I think of it, the same logic could be carried over to all units that require HUGE amounts of steel, strictly speaking of ships (excluding submarines):
-iron as a requirement for all of them
-coal (ironclads/ battleships) or oil (everything else) for mobility
-niter for combat strength
-uranium for mobility + combat strength (missile cruiser/ carrier)

This would still leave enough units with a primary oil requirement:
mobile SAM, rocket artillery, submarines, mechanized infantry, tank, modern armor

But those are just some thoughts.
Sorry for the wall of text.
These were the kinds of things that were going through my head when I was putting the mod together. But I wanted to make the requirements consistent for all units so that's why I ended up doing the things that I did. I like the idea of fuel is affecting movement. I'll consider some of these ideas.
 
I discovered this problem last night but I was too tired to figure it out. I had this exact same problem referencing MOAR units after the winter patch . And my solution was to insert the XML file directly into my mod folder. This is something Firaxis really needs to fix. This will be a nightmare for many modders in the future. There is a workaround that might work though. That would require deleting the Hussar unit via an xml update and then re-creating it in my MOD. I will try this this evening.

I thought re building the unit in Strategic might be a possibility as well, but was more than I wanted to bite off for a 'quick fix'. And yes, Firaxis in a world of load-order-dependent modding decided to keep their heads in the sand on that one (among some other issues). Not sure why as the precedent is well set and will only snowball as a problem as the community grows along with the complexity of the mods. It would have made more (and simple) sense to have expanded the dependency functionality (or turned it on at all, only thing I think it effects is 'check-the-box') allowing mods within themselves to establish any necessary order. Many thanks for your work UG and hope fixing/fighting issues with the core game doesn't take too much time away from modding.
 
UncivilizedGuy updated Strategic Industry with a new update entry:

Solved DLC compatibility issues

Fixed saved game crash caused by Poland DLC.

Added removable Poland DLC and Aztec DLC compatibility files for players who don't own either DLC.

After some blood, sweat and tears I finally got this to work with Poland DLC. I literally had to replace the entire data file from the DLC. I tried a variety of things but this is the only thing that works unfortunately. For those of you that do check the logs you will see an error when loading a saved game but the game loads fine and I haven't experienced any problems. The error is just stating that the data file from the Poland DLC didn't load but all of the data is there because it's included in my mod.

Read the rest of this update entry...
 
Last edited:
Still same load game error as above. Own Poland and Aztec DLC. Version 5.02.
 
UncivilizedGuy updated Strategic Industry with a new update entry:

Fixed compatibility problem with Aztec DLC

Fixed a compatibility problem with the Aztec DLC.

Explanation: After completely uninstalling and then installing a clean copy of Civ VI I began having the same compatibility issue with the Aztec DLC that I was previously having with the Poland DLC. So I updated the Aztec Compatibility xml file in a way that is similar to the Poland DLC. This seems to have fixed the problem.

Fixed a compatibility problem with the Aztec DLC.

Explanation: After completely uninstalling and then installing a clean copy of Civ VI I began having the same compatibility issue with the Aztec DLC that I was previously having with the Poland DLC. So I updated the Aztec Compatibility xml file in a way that is similar to the Poland Compatibility file. This seems to have fixed the problem. It never seems to end:wallbash:


Read the rest of this update entry...
 
Last edited:
I have the same issue like swat54 with new version of mod. Removing files didn't work :(
 
Loading with 5.03 works fine for me.

There is a small oversight in the unit_abilities.xml, the uranium ability references the aluminium modifier:

Code:
                <Row>
            <UnitAbilityType>ABILITY_URANIUM</UnitAbilityType>
            <ModifierId>ALU_RESOURCE_COMBAT</ModifierId>
        </Row>
 
Top Bottom