How to restrict units for player/AI in dynamic campaign

How to restrict units for player/AI in dynamic campaign

Files Required For This Type Of Modding


How to restrict units for player/AI in dynamic campaign image 1

How to restrict units for player/AI in dynamic campaign image 2
How to restrict units for player/AI in dynamic campaign image 3

you need to extract these files from gamelogic.pak (using a program like 7zip) for each faction you want to modify:

1. conquest.(COUNTRY).lua

2. unit_research_(COUNTRY).set

3. units_(COUNTRY).set

The location of these files are shown in the following screenshots:

Modifying AI Spawn Tables For Dynamic Conquest


How to restrict units for player/AI in dynamic campaign image 10

step 1. open the conquest.(COUNTRY).lua in a text editor like notepad++

step 2. delete the lines corresponding to the units and vehicles you want to prevent the AI from using in dynamic conquest

step 3. save the file

Modifying Player Units In Conquest, Part 1


How to restrict units for player/AI in dynamic campaign image 15
How to restrict units for player/AI in dynamic campaign image 16

step 1. open the units.(COUNTRY).set file for the faction you want to edit in a text editor like notepad++

step 2. to remove an INFANTRY SQUAD from the player, you need to delete the corresponding line that lists the squad you want to remove

step 3. to remove a VEHICLE from the player, you need to add the text "{not_for_player_sale 1}" inside the brackets of the vehicle that you want to remove

What these steps should look like is shown in the following screenshots:

[/previewimg]

Modifying Player Units In Conquest, Part 2


How to restrict units for player/AI in dynamic campaign image 23
How to restrict units for player/AI in dynamic campaign image 24

step 1. open the unit_research_(COUNTRY).set file for the faction you want to edit in a text editor like notepad++

step 2. to remove an infantry squad or vehicle from the player tech tree, delete the corresponding line from the file. IMPORTANT NOTE: if you remove a unit from unit_research_(COUNTRY) you must also remove it from units_(COUNTRY).set (and vice versa) or else the player will still be able to purchase and use the unit in dynamic conquest

step 3 (IMPORTANT). if you remove a unit from the player research tree, you need to make sure that there are no other units that use that unit as a requirement. if you delete a unit and other units list it as a requirement, you need to change the requirement for those units to a unit that is still in the tech tree or else the game will crash when the player opens the research tree.

The following screenshots show how to correctly modify the player tech tree:

Folder Structure

When uploading your mod, your file structure needs to be in the same format as how they appear in the original gamelogic.pak file.

step 1. your conquest.(COUNTRY) file needs to be in a directory that looks like "YOURMODNAME\resource\script\multiplayer\(COUNTRY)"

step 2. your unit_research_(COUNTRY) file needs to be in a directory that looks like "YOURMODNAME\resource\set\dynamic_campaign"

step 3. your units_(COUNTRY) file needs to be in a directory that looks like "YOURMODNAME\resource\set\multiplayer\units\conquest"

If your files have an incorrect folder structure, your mod will not work

Congrats You Did It

Now you can upload your mod or whatever else you need to do.

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=3187234227					

More Call to Arms - Gates of Hell: Ostfront guilds