Yzaxtol Posted March 15, 2013 Share Posted March 15, 2013 (edited) 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 March 15, 2013 by Yzaxtol Link to comment Share on other sites More sharing options...
johnnylump Posted March 15, 2013 Share Posted March 15, 2013 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 More sharing options...
anUser Posted March 15, 2013 Share Posted March 15, 2013 Hmm that's great, imo boh grenades sould be buyable and not free, I didn't know it could be done, I'll try it this weekend Link to comment Share on other sites More sharing options...
anUser Posted March 15, 2013 Share Posted March 15, 2013 I wonder how the game will handle spent grenaes, since medikits are buildable but they seem to persist even if fully used. If they do dissapear after their use it'd be nice if the same could be done to medikits as well. Link to comment Share on other sites More sharing options...
johnnylump Posted March 15, 2013 Share Posted March 15, 2013 (edited) <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 March 15, 2013 by johnnylump Link to comment Share on other sites More sharing options...
anUser Posted March 15, 2013 Share Posted March 15, 2013 ... 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 More sharing options...
Yzaxtol Posted March 15, 2013 Author Share Posted March 15, 2013 Blargh never thought of that... :( Link to comment Share on other sites More sharing options...
Amineri Posted March 16, 2013 Share Posted March 16, 2013 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 ability2) 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_arrArtfacts3a) This is tricky because the consumable item Alien Grenade can also be collected from deal aliens4) Update XGSummaryUI to not display the XCOM artifacts as collected5) 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 More sharing options...
Yzaxtol Posted March 16, 2013 Author Share Posted March 16, 2013 ACtually.... i think Alien grenades already have code that makes them truly consumable because when you use them without the foundry upgrade, they disapear don't they? Link to comment Share on other sites More sharing options...
anUser Posted March 16, 2013 Share Posted March 16, 2013 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 More sharing options...
Recommended Posts