surg23 Posted May 11 Share Posted May 11 (edited) I'm trying to skin/function swap the Mec primary weapons so that Pulse/Particle cannons use Minigun visuals/animation. I couldn't work out how to manipulate the files manually being that the corresponding UPK files such as "Weapon_MEC_Chaingun_SF" don't have any bearing on what you see in-game. In fact you can delete those files and nothing changes. A possible workaround would be to just mirror the item parameters from higher tier counterparts onto the minigun, build costs, damage etc, which all work. Though the problem remains that the Minigun is set to 'Unlimited supply' - It does become a buildable item but it's hard-locked at 1,000 units. Removing them via console or grey market doesn't work as they are immediately replenished back to the cap of 1,000 units. I figure if I can just find the toggle that defines unlimited/limited I will be in business. One other untested theory is using the image mapping in Default Content.ini, though I suspect this won't change the tactical animation or ballistic characteristics. So probably quite useless for what I need. Edited May 11 by surg23 Link to comment Share on other sites More sharing options...
surg23 Posted May 11 Author Share Posted May 11 I may have found the toggle or list for this in Xcom StrategyGame.upk under AddInfiniteItem: function Init() { m_arrItems.Add(255; m_arrDamagedItems.Add(255; m_arrItemArchives.Add(255; m_arrClaims.Add(255; m_arrInfiniteItems.AddItem(2; m_arrInfiniteItems.AddItem(4; m_arrInfiniteItems.AddItem(28; m_arrInfiniteItems.AddItem(32; m_arrInfiniteItems.AddItem(57; m_arrInfiniteItems.AddItem(59; m_arrInfiniteItems.AddItem(66; m_arrInfiniteItems.AddItem(69; m_arrInfiniteItems.AddItem(77; m_arrInfiniteItems.AddItem(79; m_arrInfiniteItems.AddItem(80; m_arrInfiniteItems.AddItem(81; m_arrInfiniteItems.AddItem(82; m_arrInfiniteItems.AddItem(83; m_arrInfiniteItems.AddItem(87; m_arrInfiniteItems.AddItem(89; m_arrInfiniteItems.AddItem(95; m_arrInfiniteItems.AddItem(98; m_arrInfiniteItems.AddItem(97; m_arrInfiniteItems.AddItem(109; m_arrInfiniteItems.AddItem(116; m_arrInfiniteItems.AddItem(118; m_arrInfiniteItems.AddItem(123; m_arrInfiniteItems.AddItem(212; m_arrInfiniteItems.AddItem(213; m_arrInfiniteItems.AddItem(214; m_arrInfiniteItems.AddItem(218; m_arrInfiniteItems.AddItem(226; m_arrInfiniteItems.AddItem(231; m_arrInfiniteItems.AddItem(236; m_arrInfiniteItems.AddItem(241; m_arrInfiniteItems.AddItem(246; //return; } ----- At least those numbers correspond with item ID's which are unlimited supply. But now I am back to the dilemma of making a usable modification with that code. I wonder what would happen if I just loaded up the patched UPK and edited the UPK directly? Maybe that would throw off any future patches? Link to comment Share on other sites More sharing options...
surg23 Posted May 11 Author Share Posted May 11 Well it seems that going by the table name (init) this function happens only on initialization and doesn't have a function to modify it thereafter. At least I tried hex-editing bytecode value for the Minigun entry (additem:28) or 24 IC with 24 04 which changes this to a duplicate for additem:4. Checks out back in UE-explorer, however the Minigun remains infinite supply.. Very possible that this will only affect a new game. I had to duplicate the entry as I couldn't find any info on how to straight up remove entries in byte form. The Hex-editing guide implies things must be done in context so as not to disturb anything else. Though I don't see the harm in duplicating an item. Link to comment Share on other sites More sharing options...
surg23 Posted May 11 Author Share Posted May 11 Buggered if I know what is going on. I tried the same trick on GetNumItemnsAvailable which should be a live modifier. The adjusted code now reads: function int GetNumItemsAvailable(int iItemType) { // End:0x21 if(IsInfinite(byte(iItemType))) { return 4; } else { return m_arrItems[iItemType]; } //return ReturnValue; 4 items instead of the default 1000. To match what I have built in Particle cannons. But the item count is still locked at 1,000 units. Makes very little sense to me. Link to comment Share on other sites More sharing options...
surg23 Posted May 11 Author Share Posted May 11 (edited) Well that was awkward. I somehow got my directories mixed up and was testing the modfied UPK in the EU directory lol. Copied it over into XEW and there is in fact 4 Miniguns in grey market, yet on loadout they are still unlimited supply.. I thought for a moment this was purely cosmetic due to the absence of any UI manipulation, but nope.. The Minigun can be equipped infinitely. Bummer. Edited May 11 by surg23 Link to comment Share on other sites More sharing options...
Recommended Posts