Jump to content

Changing ammo capacity for a class


BanjoOz

Recommended Posts

Does anyone know were to find this?

 

I want to give the Heavy more shots with the LMG, and it seems ammo capacity is tied to a soldier's class, not their weapon itself.

 

I've been poking around in XComGame.upk and was assuming it would be somewhere in XGWeapon, XComWeapon, or even XGAction_Fire but can't find anything I can make sense of!

 

Hopefully someone better at reading the files can help out?

 

Either I missed it, or perhaps it's in a class-defining file I can't find yet?

Edited by banjo_oz
Link to comment
Share on other sites

I'd say XGCharacter, I combed XGUnit today and failed to find relevant code.

Story of the life of an XCOM EU modder.. you can comb through 100 files and it seems like you are linking variables... and then it suddenly stops and you don't know where the game gets the final variable from.

 

Edit: The worst is when it end with XGTacticalGameCoreNativeBase, because it seems like 95% of the s*** going on in that file doesn't have an effect on the game.

Edited by tbkiah
Link to comment
Share on other sites

OK, let's start with what we have :

 

XGWeapon has

defaultproperties { iAmmo=100

and

function ApplyAmmoCost(int iCost)
{
iAmmo -= iCost;
// End:0x2e Loop:False
if(iAmmo == 1)
{
	iAmmo = 0;
}
}

 

Based on that it would be reasonable to suppose that ammo consumption by class is defined with iCost.

Which I cannot find anywhere.

 

BTW, XGWeapon has a whole lot of functions related to a Overheat mechanic, possibly intended for lasers, and which are activated by eWP_Overheats. I haven't tested it yet but it sounds interesting.

Link to comment
Share on other sites

OK, let's start with what we have :

 

XGWeapon has

defaultproperties { iAmmo=100

and

function ApplyAmmoCost(int iCost)
{
iAmmo -= iCost;
// End:0x2e Loop:False
if(iAmmo == 1)
{
	iAmmo = 0;
}
}

 

Based on that it would be reasonable to suppose that ammo consumption by class is defined with iCost.

Which I cannot find anywhere.

 

BTW, XGWeapon has a whole lot of functions related to a Overheat mechanic, possibly intended for lasers, and which are activated by eWP_Overheats. I haven't tested it yet but it sounds interesting.

 

You want to find where that function is called. The parameter iCost doesn't have to appear by that name anywhere else... it could be called iApples when the function is called....

 

e.g. ApplyAmmoCost(iApples);

 

I'm not saying it is, but the function's int argument could just be a return from another function, and so you'd never find iCost...

 

e.g. ApplyAmmoCost(SomeOtherFunction());

Edited by Daemonjax
Link to comment
Share on other sites

Thanks for the help so far, folks! What should be a fairly basic, core mod is pretty tricky, eh?

 

I combed through XGWeapon and XGUnit myself and found nothing... will look at XGCharacter too but I'm still thinking it will be in some class-ability script.

 

This is pretty much way over my head, so I very much appreciate the help from you "big guns" here in finding the right code!

 

Probably the most fun experience of learning to mod XCom without official tools is just how much everyone is pooling their knowledge and working together to find and solve things. :)

Link to comment
Share on other sites

More ammo for the LMG would be a very welcome addition.

Considering that it doesn't do dramatically more damage than the assault rifle, you would thing that it would be able to suppress for a few turns at least.

Agreed. It seems odd to me that they have LESS ammo instead of more, especially since - as you said - damage isn't that much higher than an assault rifle.

 

And what kind of "support gunner" goes into battle with three bursts in his or her gun?!

 

Still can't a value in the upk, sadly, and it's driving me nuts... why is something so basic so hard to find/change? :(

Link to comment
Share on other sites

  • Recently Browsing   0 members

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