Jump to content

Any way to edit the ammount of upgrade slots a weapon can have.


hunydo1255

Recommended Posts

 

what about this? someone posted in in steam workshop. Can it work?

 

Create a new class to extend the X2Item_DefaultWeapons

 

<snip>

 

 

This should work, but it means that this will be the only mod able to make changes in this manner to the DefaultWeapons. Since it is a class override, if there are two such mods doing this, only one of them will work.

 

So ... it should work, but more likely to be incompatible with other similar mods.

Link to comment
Share on other sites

what about this? someone posted in in steam workshop. Can it work?

 

 

 

snip

So I tried to get something like this to work, to alas no avail.

 

My solution and project files are here in case anyone wants to give it a shot:

https://www.dropbox.com/s/2i05kc7daoxtp2e/Weapon%20Slot%20Upgrades.rar?dl=0

 

My code is here, but unfortunately even though it builds successfully I don't see any change in game, even when starting a new game.

 

 

 

 

 

 
class ItemUpgradeSlots extends X2Item_DefaultWeapons config(ItemUpgradeSlots);
 
 
var config int ASSAULTRIFLE_CONVENTIONAL_IUPGRADESLOTS;
var config int ASSAULTRIFLE_MAGNETIC_IUPGRADESLOTS;
var config int ASSAULTRIFLE_BEAM_IUPGRADESLOTS;
var config int SHOTGUN_CONVENTIONAL_IUPGRADESLOTS;
var config int SHOTGUN_MAGNETIC_IUPGRADESLOTS;
var config int SHOTGUN_BEAM_IUPGRADESLOTS;
var config int CANNON_CONVENTIONAL_IUPGRADESLOTS;
var config int CANNON_MAGNETIC_IUPGRADESLOTS;
var config int CANNON_BEAM_IUPGRADESLOTS;
var config int SNIPERRIFLE_CONVENTIONAL_IUPGRADESLOTS;
var config int SNIPERRIFLE_MAGNETIC_IUPGRADESLOTS;
var config int SNIPERRIFLE_BEAM_IUPGRADESLOTS;
 
 
//Assault Rifles
static function X2DataTemplate CreateTemplate_AssaultRifle_Conventional()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_AssaultRifle_Conventional());
 
Template.NumUpgradeSlots = default.ASSAULTRIFLE_CONVENTIONAL_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_AssaultRifle_Magnetic()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_AssaultRifle_Magnetic());
 
Template.NumUpgradeSlots = default.ASSAULTRIFLE_MAGNETIC_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_AssaultRifle_Beam()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_AssaultRifle_Beam());
 
Template.NumUpgradeSlots = default.ASSAULTRIFLE_BEAM_IUPGRADESLOTS;
 
return Template;
}
 
//Shotguns
static function X2DataTemplate CreateTemplate_Shotgun_Conventional()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Shotgun_Conventional());
 
Template.NumUpgradeSlots = default.SHOTGUN_CONVENTIONAL_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_Shotgun_Magnetic()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Shotgun_Magnetic());
 
Template.NumUpgradeSlots = default.SHOTGUN_MAGNETIC_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_Shotgun_Beam()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Shotgun_Beam());
 
Template.NumUpgradeSlots = default.SHOTGUN_BEAM_IUPGRADESLOTS;
 
return Template;
}
 
 
//Cannon
static function X2DataTemplate CreateTemplate_Cannon_Conventional()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Cannon_Conventional());
 
Template.NumUpgradeSlots = default.CANNON_CONVENTIONAL_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_Cannon_Magnetic()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Cannon_Magnetic());
 
Template.NumUpgradeSlots = default.CANNON_MAGNETIC_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_Cannon_Beam()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_Cannon_Beam());
 
Template.NumUpgradeSlots = default.CANNON_BEAM_IUPGRADESLOTS;
 
return Template;
}
 
 
//SniperRifle
static function X2DataTemplate CreateTemplate_SniperRifle_Conventional()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_SniperRifle_Conventional());
 
Template.NumUpgradeSlots = default.SNIPERRIFLE_CONVENTIONAL_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_SniperRifle_Magnetic()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_SniperRifle_Magnetic());
 
Template.NumUpgradeSlots = default.SNIPERRIFLE_MAGNETIC_IUPGRADESLOTS;
 
return Template;
}
 
static function X2DataTemplate CreateTemplate_SniperRifle_Beam()
{
local X2WeaponTemplate Template;
Template = X2WeaponTemplate(Super.CreateTemplate_SniperRifle_Beam());
 
Template.NumUpgradeSlots = default.SNIPERRIFLE_BEAM_IUPGRADESLOTS;
 
return Template;
}
 

 

Edited by Vazeron1
Link to comment
Share on other sites

I am the one who posted in steam workshop. And as stated, since this is a class override, only one of them can be active.

 

The reason why its not compiled is probably due to some naming mistake in config files or you forgot to add the override lines to the config.

 

This method works since im using it in my game. There might be another way to do it without class override for compatability. Maybe on load game finding the item template and edit its stat.

Link to comment
Share on other sites

There are only two places that NumUpgradeSlots is actually used (a method in UIArmory_WeaponUpgrade and a method in UIUtilities_Strategy), so you'd think overriding those two methods would work. However, for some reason it doesn't. It appears to have something to do with the UI, but I'm not skilled enough in Unrealscript to figure it out.

 

I also attempted to override X2Item_DefaultWeapons.CreateTemplates(), with the idea of looping over all the templates returned by Super.CreateTemplates and incrementing NumUpgradeSlots. Unfortunately that doesn't seem to work either - it appears both X2Item_DefaultWeapons.CreateTemplates() and my custom replacement get called, for some reason.

Link to comment
Share on other sites

I am the one who posted in steam workshop. And as stated, since this is a class override, only one of them can be active.

 

The reason why its not compiled is probably due to some naming mistake in config files or you forgot to add the override lines to the config.

 

This method works since im using it in my game. There might be another way to do it without class override for compatability. Maybe on load game finding the item template and edit its stat.

will you upload it somewhere? It's propably the only thing I care about right now. Got most of those bugging things from modding ini files so far and rest is not that big of a deal. That can wait for another replay and maybe someone will solve those by that time... ^^

Link to comment
Share on other sites

 

I am the one who posted in steam workshop. And as stated, since this is a class override, only one of them can be active.

 

The reason why its not compiled is probably due to some naming mistake in config files or you forgot to add the override lines to the config.

 

This method works since im using it in my game. There might be another way to do it without class override for compatability. Maybe on load game finding the item template and edit its stat.

will you upload it somewhere? It's propably the only thing I care about right now. Got most of those bugging things from modding ini files so far and rest is not that big of a deal. That can wait for another replay and maybe someone will solve those by that time... ^^

 

 

Try the following links. It also change every armour to include the utility slot. (PS. Its the solution not the actual mod.) I assume you have the SDK and can build it.

 

https://www.dropbox.com/s/cfjjdnvgovskmw3/ExtendedDefaultWeapon.7z?dl=0

Edited by cwingnam
Link to comment
Share on other sites

 

 

I am the one who posted in steam workshop. And as stated, since this is a class override, only one of them can be active.

 

The reason why its not compiled is probably due to some naming mistake in config files or you forgot to add the override lines to the config.

 

This method works since im using it in my game. There might be another way to do it without class override for compatability. Maybe on load game finding the item template and edit its stat.

will you upload it somewhere? It's propably the only thing I care about right now. Got most of those bugging things from modding ini files so far and rest is not that big of a deal. That can wait for another replay and maybe someone will solve those by that time... ^^

 

 

Try the following links. It also change every armour to include the utility slot. (PS. Its the solution not the actual mod.) I assume you have the SDK and can build it.

 

https://www.dropbox.com/s/cfjjdnvgovskmw3/ExtendedDefaultWeapon.7z?dl=0

 

 

 

oh man you are golden ...but nope, dont have it. Is there some quick way to build it from those .uc files without it or with basic UDK? Dont really want to poke around more than ini files for this game. It would totally kill me :D Tried that for KF2 and with luck it crashed on me and still is crashing even today :D I always had bad luck with UDKs, so never got into them.

 

EDIT: ok, seems like that i cant compile this with standard UDK on my own without package with a superclass ...is that XComGameData_WeaponData.ini alterable in mod version? Only thing I want different is to have all weapons with 4 slots, because I have completely different damage model set with higher tiers more reliable and different pros/cons instead to allow more variety late game.

 

You should upload it to nexus. Lots of ppl will love u for this SLOT package combined.

Edited by flankers
Link to comment
Share on other sites

This is killing me. I need this mod.

I am physically incapable of playing the game any more without it.

 

Tried hacking together something with the dev tools but without any know-how what-so-ever I failed.

 

If someone gets this working I will build a shrine in their honor. If they get it working with a configurable ini I might even offer them my firstborn child.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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