Sunteți pe pagina 1din 9

The Grand How-To v2 (FAQ) - [NEW TO MODDING? READ THIS!

]
Welcome to this pretty lengthy FAQ/Tutorial about modding Company of Heroes. Ill guide you through most basic questions that arise, getting started with mod creation and explain how to load and edit a mod as well as providing links to several important tutorials. In this FAQ/Tutorial youll learn how the files work, how they are linked together along with how to create your complete custom Infantry Squad. Well start with some basic questions and answers, but before that, here are some terms that you will need to know when reading through this: ModFolder: This is the folder inside your Company of Heroes directory, where all your changes are stored. Basically when you see this term I either mean the name of the folder or just the folder itself. If your mod is called TheGrandHowTo, then your ModFolder is called TheGrandHowTo. Module: The Module is a description file for Mods, which is created along with the ModFolder in the main Company of Heroes directory. Without this file, you cannot run the mod, as with the target command of the shortcut, it will look for this file. LocaleValue: This basically is a value from the .ucs file. Each of these values start with a $ followed by a series of numbers, but in the ModStudio, you only fill in the number, not the $ symbol. vCoH: or vanilla Company of Heroes. Originally we meant Company of Heroes without any expansions with this term, but in the world of modding, we simply use it to refer to the unmodded version of Company of Heroes; the version you play online with. Q: What is a mod? A: The word mod simply means modification. Its a shorthand term which refers to people who change the basic game mechanics into something of their own creation (Although this only really applies to custom skins or other art). Mods are usually a combination of user created art (Skins, icons, and menu items) and modifications of the game statistics, like weapon accuracy, resource income, costs, unit health, and movement speed, and of course making total new squads and units, with their own specifications. Q: Why do people make mods? A: There are different reasons why people can make a mod, sometimes its because the creator wants to add realism or just change statistics that he thinks should be changed to balance the game. Often the goal is to make it more historical, but even this is a personal taste. Q: What can be changed in a mod and what cant? A: Practically everything Company of Heroes can be edited, except for some hardcoded key parts of the game. Q: How can I see whether a mod is loaded when I start the game? A: In some mods the main menu Graphical User Interface (or GUI) is changed or with

custom art, or sounds. You can also check in the multiplayer list if you can join all games. If you can, then you launched vCoH (the unmodified version of Company of Heroes). And of course when you launch a game and see the actual gameplay changes. Q: Can I play online ranked multiplayer games when a mod is loaded? A: When you load a mod, it will prevent the user from playing in ranked online multiplayer games unless another user has the exact same version of the mod loaded. Q: Are there any preparations I have to follow before I start installing/creating mods? A: Yes, before you start modifying or adding any file in your main Company of Heroes folder, it is recommended to start with making a back-up of your main Company of Heroes folder. This because if you accidentally make some mistakes during the installation of mods or creating mods in general, you will not have to reinstall and re-patch the whole game. Q: When I install a mod, can I still play vCoH? A: Yes, a mod will not affect your main Company of Heroes files, so it will not prevent you from playing normal Company of Heroes games. Q: Can I install multiple mods at the same time? A: Yes, mods will usually not be in conflict with each other, unless the ModFolder has the same name, or when custom .ucs values are in conflict with each other. Q: Can I load multiple mods at the same time? A: Two mods cant be loaded simultaneously due to the same variables being changed in most cases. If no two files are changed in both mods you can copy the files from one mod to the other (If not packed into an .sga archive) and run it as one mod. Though, if you have multiple small mods which only made minor changes, it obviously is easier to merge them. Q: What tools do I use to make a mod? A: All modding starts with Corsixs Mod Studio. You can download all the mod tools from this thread in the main Armoury, and tutorials for how to use the ModStudio it will be listed later on in this thread. Q: How can I create a new mod? A: When you installed and launched the ModStudio, click New Mod. Give your mod a name, select the Game as Company of Heroes, and select Create. The ModStudio will automatically create a ModFolder and Module inside your main Company of Heroes directory (which is usually C:\Program Files\THQ\Company of Heroes), along with the basic folders inside the ModFolder. Q: So my mod is created now, is it ready for use? A: No, unfortunately Relic had to redesign their game module file since v2.400 because of Tales of Valor, therefore the ModStudio will create an outdated module file which is incompatible with the game. Q: How do I create a Module file which is up to date with the current patch? A: Go to your main Company of Heroes directory (C:\Program Files\THQ\Company of Heroes), and find your module file, it will have the name you just gave it when creating a mod. Open it with NotePad or any text editing software.

I will provide you with a working module, but there are some steps that you will have to follow to get it working: [module] Copy all the content from the linked paste above (by selecting it all and then pressing Ctrl + C) and replace all content in your module file with it by pressing Ctrl + A (Select All) and then Ctrl + V (Paste). The next step is replacing the name of my example mod file, TheGrandHowTo, with the name of your mod. You can do that by pressing Ctrl + H (Replace), setting the correct search values and pressing Replace All. To tidy things up, scroll all the way to the top of your module file and then set a description for the mod. Currently I set it to [My Mod Name], but you can set it to anything you want to. You are almost ready to launch your mod. You will just have to create a shortcut telling the game we want to launch it. Q: How do I create a shortcut for launching my mod? A: Go to your desktop, copy your Company of Heroes shortcut, and rename it to the name of your mod (just for reference). Then right click and go to Properties, and there youll see the target line which should look something like this (it'll look differently if you chose a custom installation directory for your game): "C:\Program Files\THQ\Company of Heroes\RelicCOH.exe" Now change the target to this: "C:\Program Files\THQ\Company of Heroes\RelicCOH.exe" -mod TheGrandHowTo -dev Obviously, the name TheGrandHowTo has to be changed to the name of your mod (the name of ModFolder/Module). Click Apply and close the Properties window, and double click the shortcut to launch your mod. Q: How can I see whether my empty mod is loaded when I start the game? A: The first thing you will notice is that all the text values are missing and give unknown LocaleValues and if you have Tales of Valor, the first thing you will notice that the three mini-campaigns are locked. If you dont have Tales of Valor, create a skirmish game, go to the reward vehicles tab and see if there are several pink icons. Now if this happens, then its all good, we'll fix this by answering our next FAQ. Q: How do I unlock the campaigns and fix the unknown LocaleValues in my newly created mod? A: To fix the unknown values, go to your main Company of Heroes directory. Then go to CoH\Engine\Locale\[language] and copy the .ucs file to the clipboard by selecting it and pressing Ctrl + C or by right clicking on it and select Copy. Then, go to your ModFolder\Locale, and create the same [language] folder of which you just copied the .ucs file (so, create a new folder and rename it). Then go into that folder and Paste by either pressing Ctrl + V or by right clicking and

selecting Paste. Then finally go back to the main Company of Heroes folder and into the folder called Engine. Create a folder called Locale and in Locale create a folder called English and paste the .ucs file here again. To fix the campaigns, go to your main Company of Heroes folder again and find the following modules: RelicDLC1.module RelicDLC2.module RelicDLC3.module RelicOPS.module Now copy all four of these modules and rename them to: TheGrandHowToDLC1.module TheGrandHowToDLC2.module TheGrandHowToDLC3.module TheGrandHowToOPS.module Finally, open them all up , find and replace Parent = RelicCOH to Parent = TheGrandHowTo. In the same fashion as we did with our main Module file, Again, TheGrandHowTo has to be changed with the name of your ModFolder/Module. Q: So, my mod is created and has working modules, now where do I start? A: When your mod is loaded by the ModStudio, to the left you will see three main folders: Attrib, Movies and Data. All game statistics like weapons, abilities, upgrades and unit data are in the Attrib sub-folders. All GUI, models, sounds, FX and other art is located in the Data sub-folders. The Movies folder is something you wont touch unless you know what you are doing. Q: Where do I find the data of units, abilities, upgrades and weapons? A: General Unit data are split up between Entity files and Squad files inside the Attrib folder. Squad files are located in the sbps (Squad BluePrint Statistics) folder and the Entity files are in the ebps (Entity BluePrint Statistics). Abilities: Attrib\attrib\abilities Entity: Attrib\attrib\ebps Squad: Attrib\attrib\sbps Upgrade: Attrib\attrib\upgrade Weapon: Attrib\attrib\weapon Q: How are the files linked with each other? A: Attrib files (files that end with .rgd) are linked with each other in various locations inside the file, all with a different purpose. If you want to link an entity file to an ability (in other words, allow a specific entity access to a specific ability), you open up the entity file by right clicking on it, then go to GameData\ability_ext\abilities\ability_xx and fill in the line like this:

Abilities\name_of_the_ability.lua Always put .lua at the end of the line, otherwise the game will not find the file, and even cause a game crash when trying to launch. The game searches for attrib files inside Attrib\attrib automatically, so you do not need to put this in front of the line. When referring from an attrib file to a model/texture blueprint, the game will automatically search in Data\art\models, so your line starts with the first folder inside the models folder. When referring from an attrib file to a GUI icon, the game will automatically search in Data\art\ui\ingame, so your line starts in the first folder inside the ingame folder. We will now continue with discovering the world of basic Kung-Fu Modding; also known as attribute editing. From here on, I will guide you through how to create a complete new squad with a new name, different weapons, unique construction menu, some squad upgrades and a few abilities. Q: How do I make a new squad? A: For this tutorial, we will create a Command Squad for the Americans, and we will use the Riflemen as a base; primarily because the Riflemen are a basic infantry squad, which are setup in an easy way. 1. Go to Attrib\attrib\sbps\races\allies\soldiers\riflemen_squad.rgd, right click on it and select Copy. A small window should appear in where you can set a name of the new file. Name it command_squad.rgd and open it up by double clicking on the newly created file. 2. Now go to Attrib\attrib\ebps\races\allies\soldiers and in this folder copy infantry_riflemen.rgd, rename it to infantry_riflemen_command.rgd. Also copy infantry_riflemen_sergeant.rgd and rename it to officer_captain.rgd. Open both new files. 3. In command_squad.rgd, go to GameData\squad_loadout_ext\unit_list\unit_01\type. look under table_children to the right and you will see: ebps\races\allies\soldiers\infantry_rifleman.lua, change this to ebps\races\allies\soldiers\infantry_rifleman_command.lua, also change the max and num under unit_01 from 5 to 2. now go to unit_02\type and set the value to ebps\races\allies\soldiers\officer_captain.lua, also leave the max and num to 1. The new files are now linked together, having 1 Captain and 2 Riflemen forming our Command Squad.

Q: We created a squad, now how can I set it up to my own taste? A: Currently, as our squad is a copy of the Riflemen, with 3 squad members, we want to make it a real Command Squad, first by giving it a name. 1. First, we will have to create a new, so called LocaleValue (or .ucs value). To do this go to the top left corner of the ModStudio and there are three tabs:

2.

3. 4. 5. 6. 7.

8.

9.

Files, Tools and Lua. Go to the Tools tab and double click the UCS Editor, and open up the Locale Folder which shows up. Then to the bottom right there is a button called New Entry, click it. Give the ID of the entry $18000000 or higher and click OK, the new LocaleValue is now created in the .ucs file and ready to be used. Enter a text for this new value: Command Squad Then create two new values, the ModStudio will automatically generate your last entry + 1, so it should be $18000001 and $18000002. To $18000001 add: Gives Increased sight to nearby Infantry and can call in small mortar barrages. To $18000002 add: Officer, supports your troops. To the bottom right you see a button called Save, click it to save the .ucs file. Unfortunately, the location of the .ucs has also been changed over the patches, so the ModStudio saves it in Engine\Locale\English, and not in the ModFolder. Therefore, after each .ucs edit, you will have to manually copy the LocaleValues over from one to the other, by opening the .ucs files in NotePad. After you did this, go back into command_squad.rgd and to GameData\squad_ui_ext\. Then you have to find screen_name, which is the actual name of the squad, help_text, which is the description and extra_text, which is the extra description. For screen_name fill in 18000000, help_text, 18000001 and extra_text 18000002.

Secondly, we want to add some fine-tuning to its squad UI and its cost. We dont want the Command Squad to be selected when double clicking on Riflemen to select all Riflemen, and we want to give it its own hotkey along with some other things like cost and health. You dont have to do this, all of it is optional and to your own taste, but its very important for making your squad complete. 1. Back in GameData\squad_ui_ext, go to selection_group and set it to command. 2. For the hotkey, go to hotkey_name and set it to allies_upgrade_wire_cutters, this will give the Command Squad the Hotkey C. All key defaults can be found in Data\game\keydefaults.lua, by opening it up as text file in the ModStudio. Do not edit this file unless you know what you are doing. 3. The cost of a squad is a sum of the total costs of all the entities used. As the Command Squad is going to be a pretty powerful unit, we will give it a cost of 300 manpower. To give our squad a cost, go back to infantry_rifleman_command.rgd and officer_captain.rgd. In both go to GameData\cost_ext\time_cost\cost. 4. As we have two Riflemen and one Captain, the cost needs to be equalized, but obviously the Captain needs to cost more to reinforce, so therefore his base cost has to be higher as well. 5. Give the infantry_rifleman_command.rgd a manpower cost of 75 and the officer_captain.rgd a manpower cost of 150. 6. Also, as our squad contains only 3 squad members, we need to raise the time it takes to build the squad. Go to cost_ext\time_cost and increase it for the infantry_rifleman_command.rgd to 10 and for the officer_captain.rgd to 25.

7. Our captain is a special unit, and it is normal to make special units tougher as they cost more. Just like the Commonwealth Lieutenant and Captain, we dont want our Captain to be sniped with 1 shot, so well have to change the infantry armor type its using. Go to officer_captain.rgd and to GameData\type_ext. Change type_target_weapon to type_target_weapon\tp_infantry_heroic.lua and type_target_critical to type_target_critical\tp_infantry_heroic.lua. 8. We also want to increase the health of both the Captain and his bodyguards. In both officer_captain.rgd and infantry_rifleman_command.rgd, go to GameData\health_ext\hitpoints. For the Captain change it to 100 and for the Bodyguards to 80. 9. Finally, go to both ebps files, and remove the engineer_ext from both. This prevents our Command Squad from being able to build basic defenses and such.

Q: I want to change the looks of my unit, how can I do that? A: Obviously, we want our Captain to look like a real Captain and luckily, Relic already made a special infantry model and skin for it, but never used it in the release of vCoH. 1. First, we need to know where exactly the infantry model is, so go to Data\art\models\races\allies\soldiers. In this folder are all the standard available infantry models. The ebps file is linked to the .abp file (abp stands for Animator BluePrint). However, the game will automatically search in Data\art\models\, so you dont have to write those first three when linking. 2. So, in the ebps file officer_captain.rgd, go to GameData\entity_blueprint\animator and fill in Races\Allies\Soldiers\Officer_Lieutenant.

Q: I made my Command Squad, how can I make it buildable in the game? A: We will have to add it to the Barracks to be able to build it ingame, along with that we will have to give it its own cost as well as an unique ui_group_selection, which sets the location in which of the slots the Command Squad will appear when selecting the Barracks. There are twelve slots available in the command panel, look at the picture below:

1. For the Barracks, the first and the second are taken by the Jeep and Riflemen Squad, therefore we need to give our Command Squad position 3. 2. For the location of the squad, go back command_squad.rgd, to GameData\squad_ui_ext and find ui_group_selection and set it to 3. 3. Now to add our Command Squad to the Barracks go to Attrib\attrib\ebps\allies\buildings\barracks.rgd and open it up. Go to GameData\spawner_ext\squad_table. To the right you will see the Jeep and Riflemen Squad already being there, and to squad_03 add sbps\races\allies\soldiers\command_squad.lua. When linking to a squad you want a building to produce, you always refer to the sbps file, and you when linking from .rgd to .rgd you always fill in .lua at the end instead of .rgd.

Q: my Command Squad is now buildable, but I want to give them different weapons, how? A: We want our Captain to be armed with the M1911 Colt and the two bodyguards with M1 Thompsons. 1. All the standard available weapons are located in Attrib\attrib\weapon, divided into multiple folders to keep things organized. 2. We will first give the M1911 Colt to the Captain, so go to the ebps of the captain (officer_captain.rgd), then to GameData\combat_ext\hardpoints\hardpoint_01\weapon_table\weapon_01\we apon and change it to weapon\allies\small_arms\single_fire\pistol\colt_m1911_45_pistol.lua 3. Now for the bodyguards, go to the ebps file (infantry_rifleman_command.rgd) and go to the same location but change the weapon to weapon\allies\small_arms\machine_gun\sub_machine_gun\m1_thompson_sm g.lua. 4. Note, that sometimes when you want to give a weapon to a unit, the weapon might become invisible ingame while the animations are still showing up and the weapon does actually work. This is because the infantry model used by the entity isnt linked to that specific weapon. More information about this and how to fix it, can be found here.

Q: Now, my Command squad is buildable and armed, but how do I give it new abilities? A: We will give our Command Squad two abilities, a small off-map mortar barrage and heroic charge to support nearby Infantry. 1. Go to Attrib\attrib\abilities\axis_150mm_rocket_barrage.rgd, this is the Wehrmacht Officer Mortar Barrage. Copy it by right clicking on it and select Copy. Name our new ability ally_officer_mortar_barrage.rgd. First we will tune our new ability to work to our intentions, so open up our newly created ability. 2. We will have to remove the requirements it has, go to GameData\ability_bag\requirements and copy an empty requirement (an empty requirement is one that says required_none), over any existing requirements. 3. Next, we want to lower the cost of the ability a bit, go to GameData\ability_bag\cost and set the munition cost to 100. 4. The ui_group_selection for this ability already is set to 9, that is the bottom left, we want this, because usually such abilities are set from 9 to 12.

Now for the Heroic Charge Ability: 1. Go to Attrib\attrib\commonwealth_lt_heroic_charge_ability.rgd and Copy it just like the previous ability, but rename it to ally_officer_heroic_charge_ability.rgd 2. Same as the Mortar Barrage, remove any existing requirements by copy and pasting a required_none over it. 3. The ui_group_position also already is set to 10, so thats fine.

We now have to link the ability with the squad. Obviously we only want the Captain be able to call in the abilities, so if he dies, the squad loses the abilities until he is reinforced again. However, our squad can still use all the abilities the normal Riflemen Squad can use, so we will have to remove those first. 1. Go to the sbps of the Command Squad (command_squad.rgd) and to GameData\squad_ability_ext\abilities and remove abilities\ally_suppression_ability_rifle_squad_infantry.lua. 2. Go to both the ebps files (officer_captain.rgd and infantry_rifleman_command.rgd), go to GameData\ability_ext\abilities and clear out all entries filled in. 3. Now to add our abilities, go to the ebps of the Captain (officer_captain.rgd), go to GameData\ability_ext\abilities and in ability_01 fill in abilities\ally_officer_mortar_barrage.lua and in ability_02 fill in abilities\ally_officer_heroic_charge.lua

S-ar putea să vă placă și