|
|
|
|
# 1
|
|
|
Ouroboros-in-training
Join Date: Jul 2006
|
Advanced Coding: New Armour Types
Rating: Competent to Experienced
Warning - I won't be going as slow as the AE basics in this. Armour Basics - you should know this stuff already! (skip to New Armour Classes if you do) This bit is because someone asked me to talk about armour classes and it's really not worth a whole tutorial. Armour classes are defined/selected on the EBPS - the entity file. Open up entity_blueprint, troop. race_troop and then pick a unit. The armour is defined in the type_ext. ![]() Fig 1. - the type_ext on an entity file or EBPS. The armour class is arbitrary - it means nothing in and of itself, it merely differentiates it from the other classes. The fact that they say low, medium and high means bugger all and they could say anything, they could just be random letters. The reason they say low, medium and high is so they make a little bit of sense when people are editing, so they seem more logical. I repeat though - the names mean nothing in terms of coding. Anyway, the purpose of these is so the troops can be grouped together into different kinds and you can then specify how much damage a weapon does to each specific kind of troop, rather than it doing the same to every kind of troop. It's this that gives us the scissors-paper-stone counter system really; some weapons are good against some types and crap against others. Each entity has a defined armour class selected from the drop down box, but for this to be useful each weapon must have a specified armour piercing rating for each armour class. See DPS dissection for the weapon side of this. How you group your troops is up to you and changing a unit from infantry_low to infantry_heavy_high is not upgrading, it is simply moving it sideways into a different group - the reason it seems like an upgrade is because of the armour piercing values that are on all the weapons, generally it has been decided that weapons will do less damage to infantry_heavy_high. This is an important piece of understanding and also the knowledge you can change these associations. type_armour_2 - this is the second type of armour for a unit. You cannot modify the armour type as such, you cannot change what it is, all you can do it simply activate the armour_type_2. Use the modifier enable_armour_2 to do this. This makes the unit use the second type for all purposes, rather than the first type. Curse of the machine Spirit used to do this back in WA, all the vehicles had infantry armour types as their second and the ability would shift it to that second type temporarily. WA also used it in the Eldar Banshee upgrade research, they got shifted to heavy infantry class. Not sure if there are any Relic uses for it currently. The reason you would want to add a new armour class is due to you thinking that there are not enough divisions in the troops, that there are certain cases where weapons should do different damage etc. and you need another class to represent this new group. New Armour Classes So 14 armour types ain't enough for ya huh? You want some special armour type for ultra light skimmers or something fancy like that eh? Too fast for lascannons, but seeker missles will do the job? But not all vehicle_low units are skimmers.....Well, you're in luck. In fact there's actually a spare armour class sitting about already: builder class. The builders actually use infantry_low so this is going spare if you need it. Anyway, if you're really greedy and have already used the builder class or you're really picky (like me) and want to do it properly then you can add some new ones. DoW: Firestorm over Kronus adds extensive amounts of armour classes (or at least its predecessor DoW:40k did) for precise control over weapon damage and DowPro adds a couple in also. Creating the New Class Okay, leave the AE alone for now, we'll be hand editing here. Go into ModTools/Datageneric/w40k/attrib (not DXP2) and you'll see a folder called TYPE_Armour. Go in there and find the tp_armour.lua file, not to be confused with TYPE_Armour.nil. Right, now in your mod's datageneric folder, Modtools/Datageneric/yourmod/attrib, create a new TYPE_Armour folder and copy the tp_armour.lua into in. Rename it to tp_vehicle_skimmer.lua. Open it up with a text editor. There's only two things you should edit - 1. the UCS reference dictates what words appear in the ingame UI when you click on the unit (more on that here). Create your own UCS file with custom armour class title and link the new armour file to it by overwriting the exisitng number, (note that the AE will use the file name, not the UCS name) 2. - change the name at the top to match the file name, tp_vehicle_skimmer.lua. Now save it of course. Right, that's your new class created. You should now be able to select it in the armour class dropboxes when you open the AE. Woo-hoo! The next job is to give yourself one extra field in the armour piercing table, otherwise you won't be able to list an armour piercing value for all your armour classes, you'll have to miss one out. So to do this we need to edit one of the tables by hand, the armour_piercing_table. Editing the Table Again, shut the AE down. Go back to your Datageneric/w40k/attrib folder and this time go in to the folder called Tables. There's tons of tables in here that piece together to make up all those files you see in the AE. These tables are the ones that the files reference, but not interit from. You can edit these to give yourself more room for things simpy by tagging extra entries on the end of them. I added a couple of weapon_table slots to the hardpoints in order to fully incorporate all 12 of the Codex Dreadnought weapons onto one unit - 5 on each hardpoint just wasn't enough. It's crucial that you do NOT change the name of the file when you copy it across though, it need to be the same so it overwrites the default one. So, create an empty 'Tables' folder in Datageneric/yourmod/attrib and copy over the armour_piercing_table in to it. Open it up with a text editor and you'll see all the 15 armour slots there. Make sense? good. Now add as many lines as you need onto the bottom like this (we only need one right now, but you may be modding more in): Code:
Code:
Quote:
![]() Fig 2. - the new armour class being selected in the new 16th armour slot Now comes one of the most tedious things you can possibly do in DoW Modding - you must now select the new class from the drop box and add an armour penetration value for EVERY SINGLE WEAPON. YAY!!!! This is best achieved utilising LUA inheritance. The new armour piercing slot will be empty on all files so if you edit slot 16 on the highest file up the tree that you can find it on then it will filter down via inheritance, you can set them all at once and set a default piercing value for all weapons. You'll need to go through and edit any changes to that, but it's a start. If all this 'referencing' and 'inheritance' stuff means nothing to you then you need to either a) read this tutorial or b) stop using Corsix Tools and try the AE. Have fun punching in those armour piercing values guys! (or if you're part of a team - hell, it looks PERFECT for that junior modder who just joined!) EDIT: Christ, I'm such a fucking dunce at times - you can just add_new_type_armour_subtype in the AE (right-click type_armour) and then add a new armour_entry table to the armour_piercing_table in the tables folder. All with in the AE. No pissing about. However, you still need to do the UCS for the new armour type outside the AE. Last edited by Octopus Rex : 13th Feb 09 at 6:06 AM. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|