Jump to content

Buildable Alien Grenades, Possible?


Yzaxtol

Recommended Posts

I've found what I beleive is the Alien Grenade in XGItemTree.BuildItems

 

BuildItem(88, -1, -1, -1, 2, 6);

 

To

 

BuildItem(88, 10, 5, 1, 1, 25, 2, 6);

 

Alien grenades that require $10,5 Elerium, 1 Alloy, 1 Day, 25 Engineers, #2 Foundry Project (alien grenades), and #6 image (alien grenades)

 

The HEX code for (88, -1, -1, -1, 2, 6);

 

2C 58 1D FF FF FF FF 4A 4A 1D FF FF FF FF 1D FF FF FF FF 4A 4A 24 02 2C 06 16 1B 6E 04 00 00 00 00 00 00 // 2C 50

 

Do you programming boffins think it's possible?

Edited by Yzaxtol
Link to comment
Share on other sites

I like this. I'll give it a look. Can you still equip regular grenades when alien grenades are researched? If not, you'd want to make sure infinite regular grenades are still available for when alien grenades run out. The patch just broke my game, so I can't check just now.

Link to comment
Share on other sites

<p>That's true. There isn't anything that's truly consumable in the tactical game, is there? Just things that have charges that run out, but the item is still there. So without further changes, you might end up buying the ability to equip one soldier with grenades, not singular grenades.</p> Edited by johnnylump
Link to comment
Share on other sites

... worst than that, paying to have 1 soldier SLOT able to carry grenades, not even singular soldiers. Itn the geoscape there are onsumable items, it may well be some silly thing like a call to removeItem or some of the sort... but yet, one more thing to my daily larger to-do list
Link to comment
Share on other sites

I think it's -possible- to make consumable items, but it's not going to be easy.

 

Here's the outline of what I think would have to be done.

1) During tactical gameplay, when abilities are used, it has to be back referenced to the item that unlocked the use of the ability

2) Increment the XGBattleDesc.m_arrArtifacts referencing the item used (normally this hold artifacts recovered from aliens, but is an array of size 195, so can hold a tally of every item type in the game).

3) Update CollectArtifactsFromDeadAliens() to transfer the used items into the m_kDropShipCargoInfo.m_arrArtfacts

3a) This is tricky because the consumable item Alien Grenade can also be collected from deal aliens

4) Update XGSummaryUI to not display the XCOM artifacts as collected

5) Use the m_arrArtifacts in the Strategy layer to call Storage.RemoveItem() if it is non-collectible tech.

5a) Again, tricky part is Alien Grenades since are both consumable and collectible.

 

This isn't something I'm planning on coding any time soon, but I figured I'd put up the outline in case anyone else was.

Link to comment
Share on other sites

I've found this in XcomStrategyGame.upk >> XGStorage, but I can't seem to find the items list. Not sure if it will remove 'em or what, I guess they'll have to go to m_arrItems instead.

 

 

function Init()
{
    m_arrItems.Add(195);
    m_arrItemArchives.Add(195);
    m_arrClaims.Add(195);
    m_arrInfiniteItems.AddItem(57);
    m_arrInfiniteItems.AddItem(3);
    m_arrInfiniteItems.AddItem(4);
    m_arrInfiniteItems.AddItem(2);
    m_arrInfiniteItems.AddItem(85);
    m_arrInfiniteItems.AddItem(6);
    m_arrInfiniteItems.AddItem(5);
    m_arrInfiniteItems.AddItem(7);
    m_arrInfiniteItems.AddItem(57);
    m_arrInfiniteItems.AddItem(124);
    //return;    
}
Link to comment
Share on other sites

  • Recently Browsing   0 members

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