Create a new Archetype

From OuroDev
Revision as of 21:22, 24 August 2019 by Malonkey1 (talk | contribs)

Creating a new Archetype (WIP)

The following is how to create a new archetype, as well as a basic explainer of (some of) the information that makes up an Archetype.

TODO: Inherents

Things you need

  • A server set up to pack bins
  • The assets unpacked from the bins (specifically powercats.bin, powersets.bin, powers.bin and classes.bin, as those bins contain files relating to archetypes and their powers).
  • The new or modified files for the archetype and their powersets.

File Structure

Here's how the files we're needing will be arranged in your serverdata folder. They must be arranged this way to bin properly.

  • <your Ouroboros server directory>\Serverdata\Defs\
    • classes.def
    • \classes\
      • PC_YOUR_ARCHETYPE_HERE.def -> the def file for your archetype.
    • \Powers\
      • Player_YOUR_ARCHETYPE_HERE_PRIMARY.categories -> Enumerates the powersets that are included in your archetype's primary powerset category
      • Player_YOUR_ARCHETYPE_HERE_PRIMARY.categories -> As above, but for secondary powersets.
      • YOUR_ARCHETYPE_HERE_PRIMARY.powersets -> This contains the list of powers in the powersets, what level they unlock, etc.
      • YOUR_ARCHETYPE_HERE_SECONDARY.powersets -> See above
      • YOUR_ARCHETYPE_HERE_PRIMARY_POWERSETNAME.powers -> The .powers files contain the actual attributes of the powers in each powerset. You need one for each powerset. You could theoretically use existing powerset files by just referencing them in the other defs, but please be aware that that can have unintended consequences, such as including the inherent taunt effect from tanker versions of powers.

A Rundown of the Files by Type

Each definition file has its own information. Below are samples with explanations of as many fields as I can explain right now. I encourage anyone who knows more to add to it.

classes.def

This tells the game to include specific archetype definitions from the classes directory and make them available.

// Generated by XLStoClassDef.bat ver 51

include defs/classes/PC_Blaster.def
include defs/classes/PC_Controller.def
include defs/classes/PC_Defender.def
include defs/classes/PC_Scrapper.def
include defs/classes/PC_Tanker.def
include defs/classes/PC_Peacebringer.def
include defs/classes/PC_Warshade.def

//Each line starts with 'include' and tells where the archetype's .def file is. For villain archetypes, you can use v_classes.def instead, but unless the AT is specific to one side, it doesn't particularly matter which, so this rundown assumes classes.def
include defs/classes/YOUR_ARCHETYPE_HERE.def

YOUR_ARCHETYPE_HERE.def

This file defines the attributes of your archetype.

Class
{
	Name				"ARCHETYPE NAME"
	DisplayName			"DISPLAY NAME"
	PrimaryCategory			"Primary" //This has to match whatever you name your Primary .categories file (minus the file extension).
	SecondaryCategory		"Secondary" //As above, but for the secondary.
	PowerPoolCategory		"Pool" //The Pool powers for this archetype. Just leave it as Pool unless you have specific reason to change it.
	DisplayShortHelp		"Short help text."
	DisplayHelp			"Long help text. This is the text that you see when you're looking at the archetype during the archetype selection step in character creation."
	Icon				"Archetype_icon.tga" //The archetype's icon. These are textures in serverdata\texture_library\GUI\Icons\Archetype, but aren't strictly necessary as an existing one can be reused.
	AllowedOrigins			Science, Magic, Natural, Mutation, Technology//Allowed origins. Currently only used for EATs.
	SpecialRestrictions		Hero //I think these are hooked into by the code for checking that requirements are met? Hero/villain is irrelevant now, but the EATs have their own prereqs.
	ConnectHpAndStatus		kFalse //Seems to be false for every class def file. Not sure what it does.

	AttribBase //The base attributes of the class. Most of them are the same, with the most common variance being Threat.
	AttribMaxTable //A table of each attribute's value at each level for this archetype. If you're going to tangle with this, please use a spreadsheet or something.
	AttribMaxMaxTable //A table of each attribute's actual maximum value at each level. The names are confusing, I know.
	AttribMin //The absolute minimum values in each attribute that this archetype is allowed to reach.
	ResistanceMaxTable //Maximum resistance to damage, status effects and anything else that could be resisted. (Wanna give your AT 100% resistance to healing? You shouldn't, but you can.)
	ResistanceMin //The minimum resistance values this archetype can hit in each attribute.
	//I actually don't know what the rest of the fields do, and I'll need to come back when I find out more.
}

.categories files

These organize groups of powersets into categories that archetypes use. They're pretty simple:

PowerCategory Blaster_Ranged //Name the category.
{
	DisplayName "P2430742932" //The string that the category displays for its name. You can use a pstring, or just a regular text string. I've found that both work.
	PowerSets Blaster_Ranged.Archery//Start listing the files. The actual .powers files these reference should be named like they are here, except that the '.' gets replaced with an underscore '_'
	PowerSets Blaster_Ranged.Assault_Rifle
	PowerSets Blaster_Ranged.Beam_Rifle
	PowerSets Blaster_Ranged.Dark_Blast
	PowerSets Blaster_Ranged.Dual_Pistols
	PowerSets Blaster_Ranged.Electrical_Blast
	PowerSets Blaster_Ranged.Energy_Blast
	PowerSets Blaster_Ranged.Fire_Blast
	PowerSets Blaster_Ranged.Ice_Blast
	PowerSets Blaster_Ranged.Psychic_Blast
	PowerSets Blaster_Ranged.Radiation_Blast
	PowerSets Blaster_Ranged.Sonic_Attack
	PowerSets Blaster_Ranged.Water_Blast
	PowerSets Blaster_Ranged.Wind_Blast
}

.powersets files

These contain the information on specific powersets.

PowerSet Dominator_Control.Electric_Control//this references a specific .powers file, replacing the '.' here with an underscore '_'. In this case, it refers to Dominator_Control_Electric_Control.powers
{
	Name             "Electric_Control"//internal set name
	DisplayName      "P2339549431"//displayed set name
	DisplayShortHelp "P2339549431"//short help text
	DisplayHelp      "P2149248823"//help text you see during character creation
	SetAccountRequires	"RogueAccess auth> IsRetailAccount auth> ! || IsReactivationActive? || LimitedRogueAccess auth> || ctpselco ProductOwned? ||" //requirements to access the set per account.
	SetAccountTooltip	"P487305591"//This is the string that explains how to get access to this set.
	SetAccountProduct	ctpselco
	IconName         "Electric_Control_set.ico"//The set icon

	//Below is each power. It has to reference a power in the corresponding .powers file for the set.

	Powers Dominator_Control.Electric_Control.Electric_Fence
	Available 0 //This field tells the level the ability is unlocked for choosing. It starts from an index of zero, so you need to enter the intended level minus 1. a -1 here means it is never available for selection.
	AIMaxLevel 0 //The rest of the fields here don't really matter for creating an archetype, and seem to always be these values for player ATs.
	AIMinRankCon -9999
	AIMaxRankCon 9999
	MinDifficulty 2
	MaxDifficulty 9999

	Powers Dominator_Control.Electric_Control.Tesla_Cage
	Available 0
	AIMaxLevel 0
	AIMinRankCon -9999
	AIMaxRankCon 9999
	MinDifficulty 2
	MaxDifficulty 9999

	etc...
}

.powers files

These files define the actual effects and attributes of the powers. I'm not going to go into detail here, as that will be more appropriate for Create a new Power, when that page is made.\

The .powers files should be named to match how they are referenced in the .powersets and .categories files (if you have Clown_Assault.Banana_Peels mentioned in those, you should name it Clown_Assault_Banana_Peels.powers)

Inherents and You

Archetype Inherents are...weird. They are intended to be unique to each archetype, and so as a result, they are often not wholly contained in inherent_inherent.def Additionally, some Inherents are actually several powers, such as Domination, which is made up of six (!) interlocking pieces that work together to make the power work.

Additionally, the inherents often cheat a little bit, but being wholly or partly dummy powers, with the actual effects being hidden inside their actual powersets. For example, the inherent taunt of Gauntlet is actually a component of the Tanker's attack powers, not something applied by their inherent power, as are the bonus increases of the Blaster's Defiance. (That's why you can see the icons of your attacks on your status reticle after attacking as a Blaster: it's the power that's applying the buff.)

Ultimately, it's up to you to actually decide how to execute your inherent, and there's honestly enough stuff there that it deserves its own article. I recommend looking at the existing AT inherents and using those as a guide. If you want an effect that fires off whenever a power gets used, you might want to put that into the powers, but if it's a passive effect, a click, or a toggle, it's recommended to put that into the actual power itself.

More importantly, feel free to get creative! You're already making a brand new archetype, why not experiment? How about a toggle that gives bonus damage when turned on, and bonus healing when turned off? Why not a clicky that makes you explode and heal all your allies once your rage bar is full? What about a power that applies a global recharge enhancement for each nearby enemy? You are limited only by the power system, your creativity, and your skill, and the last two can improve only with practice and daring.

Putting it together

Once you have the files in place, run the mapserver and test client to bin everything:

mapserver.exe -createbins -verbose 2

, then

ouroboros_test.exe -console -createbins -verbose 2 -project cov

. Next, you need to run the mapserver again to generate templates:

mapserver.exe -productionmode -templates

You should be good to go, but you may get some crashes. If that happens, it means that the database didn't get updated with the new attributevars. In that case, what you'll have to do is delete your cohdb from the SQL server manager and run DBserver to initialize a new one. WARNING: This will delete every character on the server if you do not back them up first. BACK UP YOUR CHARACTERS. Unless you don't care about keeping your characters or don't mind remaking them. In which case, don't worry about it.