Jump to content

Is there a guide to making new abilities?


LGear

Recommended Posts

I've messed around with the SDK for a bit now, and it turns out I don't have as much of an aptitude for understanding it as I thought, aka I'm not going to be self-teaching myself into using it anytime soon.

 

Which doesn't bode well for me, because I was planning on making a mod involving the AWC, and adding new hidden abilities to its pool that it can give to soldiers. The first step though is creating new special abilities in the first place, and that's where I'm stuck as I don't know how.

 

My only real skill at the moment is in graphic and art creation, which means I can make about as many icons for the abilities as I can muster, but making the actual abilities themselves is another matter.

 

Thus my request/question: is there a guide or a tutorial to creating new special abilities I can reference to give an overview of how to start making them?

Link to comment
Share on other sites

To make new abilities, you first need to make their templates. The game uses following mechanism for this:

// new file in your mod's classes folder
// MyCustomX2Abilities.uc

class MyCustomX2Abilities extends X2Ability;

static function array<X2DataTemplate> CreateTemplates()
{
	local array<X2DataTemplate> Templates;

	Templates.AddItem(CreateSomeAbility());

	return Templates;
}


static function X2AbilityTemplate CreateSomeAbility()
{
	local X2AbilityTemplate	Template;

	`CREATE_X2ABILITY_TEMPLATE(Template, 'SomeAbilityName'); // ability name is defined here

	// !!!!!!!  code to set up the Template's properties !!!!!!!!!!!


	return Template;
}
 

This will create a template when the game launches. You obviously need to configure the Template to do.. whatever it is you want it to do. Check X2Ability_<names>.uc files to see how various abilities are set up.

Link to comment
Share on other sites

No, there is no guide available for this. Yes, we should have one. One modder had volunteered a few weeks ago (you know who you are ... :-)).

 

Sorry; I've been pretty consumed with recent projects. Once I wrap up this next stage, I promise I'll step back and write up an article.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...