Jump to content

New to modding, trying to create some new abilities (and bring back some old ones.)


EsteemedGentleman

Recommended Posts

Hi all!

First, sorry if this is the wrong place to post, I've never been anywhere near this kind of thing before but seeing all the ace stuff coming out for my now favorite game I wanted to give it a shot.
I'm trying to recreate the "Infantry" class from Long War , (or as close as I can get it) and have hit a few snags with trying to locate the parameters to change. I was wondering if you wonderful people could point me in the direction of where I should be looking, as simple as possible please as I have 0 Coding/Programming experience.

1) Lock'n'Load -Considering reloading no longer ends the turn anyway I was contemplating giving them a free reload passively, I have found where the bonuses for that is kept, (X2WeaponUpgradeTemplate) but I'm not sure how to call that into an ability.

2)Executioner -I have found from a tutorial dealing with "Damn GoodGround" how to increase Aim by 10, but I cannot find anything about what I have to do to find the part that deals with crit chances to raise that by 10, on the target templates I did see a conditional setting, but I was wondering how to make this effect proc when aiming at a target that has 50% hp or less.

3)Just a quick question on creating the class, I cannot find the part of the scripting which contains this info for the other classes (http://imgur.com/a/5NRRW Step10) Could someone tell me which file it is?

I know this is probably a bit of a boring question for you all but thanks for your time!

Link to comment
Share on other sites

I highly recommend downloading the sdk and creating the example weapon mod it contains. Most of the changes you are interested in will require understanding how that works. With no programming experience, it is certainly possible, but that will be a good first step.

 

Have you searched on the steam workshop to find if there are already mods that do what you want? For example, there are several mods with "infantry" in the title.

Link to comment
Share on other sites

Thanks for the quick response! currently at work at the moment so haven't had a chance to try it out, will definitely look into it though!

With regards to the steam workshop question I have looked on there already, there are a few on there but while they are good they don't fit the niche i'm looking for (Lubrication's is the closest and well made but ultimately not what i'm looking for :smile:)

Edited by EsteemedGentleman
Link to comment
Share on other sites

A quick search gave me the following:

The standard reload function does not check for abilities that might grant free reloads as can be seen in X2Ability_DefaultAbilitySet.uc

//  check for free reload upgrade
bFreeReload = false;
WeaponUpgrades = WeaponState.GetMyWeaponUpgradeTemplates();
for (i = 0; i < WeaponUpgrades.Length; ++i)
{
	if (WeaponUpgrades[i].FreeReloadCostFn != none && WeaponUpgrades[i].FreeReloadCostFn(WeaponUpgrades[i], AbilityState, UnitState))
	{
		bFreeReload = true;
		break;
	}
}
if (!bFreeReload)
	AbilityState.GetMyTemplate().ApplyCost(AbilityContext, AbilityState, UnitState, NewWeaponState, NewGameState);	
//  refill the weapon's ammo	
NewWeaponState.Ammo = NewWeaponState.GetClipSize();

So as far as i know there are three ways you could do it

  1. Replace the Reload Ability Template with a complete new Template (not recommended)
  2. Override the class 'X2AbilityCost_ActionPoints' to check whether a certain ability is present (not recommended)
  3. Change the TemplateAbilityCost to a custom ability cost (okay)
  4. Change the reload abilities BuildNewGameStateFn to account for free reloads granted via custom abilities (okay)
Edited by Feelx234
Link to comment
Share on other sites

  • Recently Browsing   0 members

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