Jump to content

Base_Num_Rockets = 1


Caiman

Recommended Posts

Well, like I stated once or twice on the forum, I tried to give my soldiers 4 rockets to launch, editing the constant value(see here), but it didn´t work out. That constant is utmost likely not used in the game(like so much other trash data... its a mess actually).

 

I looked around in the decompressed XComGame.upk using UeExplorer, but wasn´t able to locate the important values. Any help would be much appreciated. :)

Maybe some arsenist already got it working? :P

Link to comment
Share on other sites

i've searched high and low and left and right and these files just make me pissed off.. it looks like you are on to something but then can never find what you are looking for...

 

Or you get something like setrockets() funtion.. and you go looking for that... and find out it just sets variables... f***

 

Anything you try to find in these files is annoying as hell.

 

There might be something in XGAbilityTree under the xcomgame.upk... but it's quite annoying.

 

I can find the default structs, but i can't find where they are being manipluated or set at any point in time.

Link to comment
Share on other sites

Only thing found is (should be) the decrease applied by some abilities, like ghost (Ghost Armor), and rockets/Grenade

 

Is in xcomgame.upk on the entry XGAbilityTree

 

look for:

 

kAbility.m_kUnit.SetRockets(kAbility.m_kUnit.GetRockets() - 1);

 

 

Maybe setting the -1 to 0 will give the user infinite rockets? No tested yet, will try later

Link to comment
Share on other sites

Only thing found is (should be) the decrease applied by some abilities, like ghost (Ghost Armor), and rockets/Grenade

 

Is in xcomgame.upk on the entry XGAbilityTree

 

look for:

 

kAbility.m_kUnit.SetRockets(kAbility.m_kUnit.GetRockets() - 1);

 

 

Maybe setting the -1 to 0 will give the user infinite rockets? No tested yet, will try later

 

I'd like to know how you managed to edit the ability tree in human readable format. I'm stuck with clunky hex edits.

Link to comment
Share on other sites

 

I'd like to know how you managed to edit the ability tree in human readable format. I'm stuck with clunky hex edits.

 

ditto. I'd like to figure out how to add being able to use stun to the run and gun perk, but in general being able to edit abilities via a text ini file just like the defaultgamecore

 

anyone got that far yet?

Link to comment
Share on other sites

I found something that might be relevant: XGAbility

 

simulated function int GetCharge()
{
// ObjectIndex:31706 BlockSize:0
switch(GetType())
{
	// End:0x39
	case 40:
		return m_kUnit.GetGhostCharges();
	// End:0x3e
	case 9:
	// End:0x43
	case 10:
	// End:0x68
	case 42:
		return m_kUnit.GetArcThrowerCharges();
	// End:0x6d
	case 41:
	// End:0x72
	case 37:
	// End:0x97
	case 36:
		return m_kUnit.GetMediKitCharges();
	// End:0xbc
	case 22:
		return m_kUnit.GetFragGrenades();
	// End:0xe1
	case 24:
		return m_kUnit.GetAlienGrenades();
	// End:0x106
	case 66:
		return m_kUnit.GetShredderRockets();
	// End:0x12b
	case 25:
		return m_kUnit.GetRockets();
	// End:0x150
	case 71:
		return m_kUnit.GetBattleScannerCharges();
	// End:0x175
	case 23:
		return m_kUnit.GetSmokeGrenadeCharges();
	// End:0xffff
	default:
		return 0;
}
}

 

This corresponds to XGUnit Function:

 

function UpdateItemCharges()
{
// End:0xb6 Loop:False
if(GetCharacter().HasUpgrade(48))
{
	SetMediKitCharges(GetInventory().GetNumItems(76) * XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.3);
}
// End:0xe2
else
{
	SetMediKitCharges(GetInventory().GetNumItems(76));
}
// End:0x1d4 Loop:False
if(GetCharacter().HasUpgrade(93))
{
	SetRockets(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1);
}
// End:0x23d
else
{
	SetRockets(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1);
}
// End:0x26d Loop:False
if(GetCharacter().HasUpgrade(22))
{
	SetShredderRockets(1);
}
// End:0x3ed Loop:False
if(GetCharacter().HasUpgrade(44))
{
	// End:0x384 Loop:False
	if(GetCharacter().HasUpgrade(92))
	{
		SetSmokeGrenadeCharges(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1);
	}
	// End:0x3ed
	else
	{
		SetSmokeGrenadeCharges(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1);
	}
}
// End:0x47c Loop:False
if(GetCharacter().HasUpgrade(8))
{
	SetBattleScannerCharges(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.2);
}
// End:0x5c0 Loop:False
if(GetCharacter().HasUpgrade(24))
{
	SetFragGrenades(GetInventory().GetNumItems(85) * XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.2);
	SetAlienGrenades(GetInventory().GetNumItems(88) * XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.2);
}
// End:0x618
else
{
	SetFragGrenades(GetInventory().GetNumItems(85));
	SetAlienGrenades(GetInventory().GetNumItems(88));
}
SetGhostCharges(4);
SetArcThrowerCharges(GetInventory().GetNumItems(80) * 2);
}

 

Now what to do with that... I'm not sure at the moment.

Edited by tbkiah
Link to comment
Share on other sites

SetRockets is followed by a 1(or a 1+1 which could correspond to that perk)... maybe changing this to 2 would work? Maybe changing it to 0 would either make the heavy have no rockets at all, or even unlimited?

I'm not at my machine, so I cant check that right now.

Link to comment
Share on other sites

SetRockets is followed by a 1(or a 1+1 which could correspond to that perk)... maybe changing this to 2 would work? Maybe changing it to 0 would either make the heavy have no rockets at all, or even unlimited?

I'm not at my machine, so I cant check that right now.

 

Nearly sure that the .1 are name variable and as such it will probably not work, only

 

SetShredderRockets(1);

 

may work.

 

I have tested my theory and it work, setting the value from - 1 to - 0 make ANY LISTED CONSUMABLE ITEM UNLIMITED, when using it the charge won't go down.

 

For now it's a possible solution to the scarcity of rockets, but be careful that setting the Alien Grenade to 0 will also give unlimited grenade to the muton as well!

 

The easier way to make this change is:

 

1) Seek this hex value 0000000016261616062206078503 in XComGame.upk

2) The early 10 value of 26 (26=1) in descending order, included the 26 in the above code, that should be considered the 1st, are

 

Actual Value: 3rd Medikit, 6th Ghost(Armor), 7th Arc Thrower, 9th Smoke Grenade, 10th Battle scanner

Maybe/Untested: 1st Frag Grenades, 2nd Alien Grenade, 4th Shredder Rocket, 5th Rocket, 8th ?

 

 

Just change the desidered function to 25 (25=0) If your editor posses a replacer function just use those, if i finish my work i will later try the untested value :dance:

 

Cheers :tongue:

Edited by giorestZoneside
Link to comment
Share on other sites

  • Recently Browsing   0 members

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