Jump to content

Allowing All items to be sold.


tbkiah

Recommended Posts

I'm not that great at modding, but i did stumble my way through some code and using some resources from some of the more knowledgeable people on this site.

 

If you open an decompressed version of xcomstrategy game, under the file XGItemTree, under function CanBeSold you will find this:

 

function bool CanBeSold(int iItem)
{
local TItem kItem;

kItem = Item(iItem);
// End:0x8c Loop:False
if(kItem.iCategory == 1 || (kItem.iCategory == 2) || (kItem.iCategory == 3))
{
	return false;
}
// End:0xd4 Loop:False
if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
	return false;
}
return m_arrItems[iItem].iCash != -1;
}

 

Basically this says, if the item in question is either category 1 2 or three or items 192 135 133 or 134, then tell the game to not allow them to be sold. I have no idea what items 192 135 133 or 134 are, but they are probably your particular priority items like the skeleton key. So i wouldn't mess with those items unless i knew which ones they were.

 

Essentially what we want to do is turn that return false to a return true. So what you need to do is unpack xcomstrategygame. And use a hex editor to open the folder XGItemTree and open the file "CanBeSold.Function". This will bring you the hex code:

 

C8 35 00 00 9F 1F 00 00 00 00 00 00 C5 35 00 00 00 00 
00 00 00 00 00 00 C8 35 00 00 00 00 00 00 47 03 00 00 
7F B8 00 00 0D 01 00 00 BD 00 00 00 0F 00 C6 35 00 00 
1B 00 15 00 00 00 00 00 00 00 C8 35 00 00 4A 16 07 8C 
00 [b]84 84 9A 35 B7 02 00 00 C6 02 00 00 00 00 00 C6 35 
00 00 26 16 18 21 00 9A 35 B7 02 00 00 C6 02 00 00 00 
00 00 C6 35 00 00 2C 02 16 16 18 21 00 9A 35 B7 02 00 
00 C6 02 00 00 00 00 00 C6 35 00 00 2C 03 16 16 04 28 [/b]
07 D4 00 84 84 84 9A 00 C8 35 00 00 2C C0 16 18 0E 00 
9A 00 C8 35 00 00 2C 87 16 16 18 0E 00 9A 00 C8 35 00 
00 2C 85 16 16 18 0E 00 9A 00 C8 35 00 00 2C 86 16 16 
04 [b]28[/b] 04 9B 35 C2 02 00 00 C6 02 00 00 00 00 10 00 C8 
35 00 00 01 51 35 00 00 1D FF FF FF FF 16 04 3A C7 35 
00 00 53 00 00 00 02 00 82 00 05 05 00 00 00 00 00 00 

 

I bolded the part of the code that is relevant to our Goal. What you need to do is now Open the decompressed version of XcomStrategyGame.upk. and use Find to find this set of code.

 

At the start of the bolded numbers Are 84 84 9A... I don't know how hex works, but i do know that the 2 84's represent the 2 OR operators in the IF statement, and the 9A is the == operator. 16 I believe is the { } parethesis, but i could be wrong. Basically all i did was read it in chunks, and most of the time backwards, but that doesn't matter.

 

At the end of the bolded numbers is a 28, this is your return false. You want to change this is your XcomStrategyGame.upk to 27, which is return true. This will allow you to sell you manufactured stuff in game.

 

I also bolded the second 28 a little ways down, this is your second return false for the second IF statement. If you want to test/sell those items 192 etc you can change this to 27 and be able to sell those as well.

 

Obviously the actual money you get back may not be balanced, but i do believe those values are in the INI.

 

Now i'm trying to figure out a good way to not have items be built instantly.

 

If you have a better way or know more about the code than I do, please let me know. This is simply a quick way to allow items to be sold in the game on the grey market.

 

Although when you give items to countries that ask for it you get WAY more money than you get for selling the items, but that has been that way with alien corpses all along so no real change there.

 

If you have any questions feel free to ask. I might not have an answer, but someone else might.

Link to comment
Share on other sites

Interesting, I must have done something differently, because i changed both false to true, and my infinite items don't show up in that list in the grey market.. unless of course you did something To change that. Or maybe i did accidently and don't actually know..

 

 

Yea it was me... I changed all the == in the first if statement to != and i changed all the || to &&.... so somehow i made it so the starting inifinite weapons can not be sold..

Edited by tbkiah
Link to comment
Share on other sites

Just wonder if there's a way to have Ballistic weapons made at the workshop and have a starting inventory of say 12 of each. If you need more you make more ;)

 

They'd be dead cheap to produce (1/4 Laser) and therefore useless to sell for more than $1 XD

Link to comment
Share on other sites

The price information is easily changeable via modpatcher, which is sweet:

 

; Items
ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ChitinPlating,            iCash=85, iElerium=0, iAlloys=10, iTime=3,    iEng=15)    
ItemBalance=(eItem=eItem_CombatStims,              iCash=50, iElerium=0, iAlloys=5,  iTime=3,    iEng=15)    
ItemBalance=(eItem=eItem_MindShield,               iCash=150,iElerium=30,iAlloys=10, iTime=7,    iEng=35)  
ItemBalance=(eItem=eItem_Skeleton_Key,             iCash=25, iElerium=10,iAlloys=10, iTime=3,    iEng=15) 
ItemBalance=(eItem=eItem_LaserPistol,              iCash=10, iElerium=0, iAlloys=10, iTime=2,    iEng=10) 
ItemBalance=(eItem=eItem_LaserAssaultRifle,        iCash=25, iElerium=0, iAlloys=15, iTime=3,    iEng=12)    
ItemBalance=(eItem=eItem_LaserAssaultGun,          iCash=30, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_LaserSniperRifle,         iCash=35, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_HeavyLaser,               iCash=30, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_PlasmaPistol,             iCash=100,iElerium=10,iAlloys=20, iTime=4,    iEng=20)    
ItemBalance=(eItem=eItem_PlasmaLightRifle,         iCash=125,iElerium=15,iAlloys=20, iTime=6,    iEng=20)  
ItemBalance=(eItem=eItem_PlasmaAssaultRifle,       iCash=200,iElerium=20,iAlloys=30, iTime=8,    iEng=20)  
ItemBalance=(eItem=eItem_AlloyCannon,              iCash=200,iElerium=20,iAlloys=50, iTime=7,    iEng=25)  
ItemBalance=(eItem=eItem_HeavyPlasma,              iCash=250,iElerium=30,iAlloys=30, iTime=10,   iEng=25)  
ItemBalance=(eItem=eItem_PlasmaSniperRifle,        iCash=250,iElerium=25,iAlloys=30, iTime=10,   iEng=25) 
ItemBalance=(eItem=eItem_BlasterLauncher,          iCash=275,iElerium=65,iAlloys=50, iTime=12,   iEng=35)  
ItemBalance=(eItem=eItem_ArmorCarapace,            iCash=25, iElerium=0, iAlloys=15, iTime=5,    iEng=10) 
ItemBalance=(eItem=eItem_ArmorSkeleton,            iCash=30, iElerium=0, iAlloys=10, iTime=7,    iEng=15)                                     
ItemBalance=(eItem=eItem_ArmorTitan,               iCash=150,iElerium=10,iAlloys=35, iTime=10,   iEng=25) 
ItemBalance=(eItem=eItem_ArmorArchAngel,           iCash=200,iElerium=35,iAlloys=50, iTime=14,   iEng=35) 
ItemBalance=(eItem=eItem_ArmorGhost,               iCash=250,iElerium=50,iAlloys=40, iTime=14,   iEng=40) 
ItemBalance=(eItem=eItem_ArmorPsi,                 iCash=400,iElerium=40,iAlloys=20, iTime=10,   iEng=30) 
ItemBalance=(eItem=eItem_SHIV,                     iCash=50, iElerium=0, iAlloys=0,  iTime=7,    iEng=5)      
ItemBalance=(eItem=eItem_SHIV_Alloy,               iCash=75, iElerium=0, iAlloys=20, iTime=7,    iEng=10)     
ItemBalance=(eItem=eItem_SHIV_Hover,               iCash=100,iElerium=20,iAlloys=30, iTime=7,    iEng=20)     
ItemBalance=(eItem=eItem_Interceptor,              iCash=40, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)     
ItemBalance=(eItem=eItem_Firestorm,                iCash=200,iElerium=20,iAlloys=40, iTime=14,   iEng=20)     
ItemBalance=(eItem=eItem_Satellite,                iCash=100,iElerium=0, iAlloys=0,  iTime=20,   iEng=5)      
ItemBalance=(eItem=eItem_IntWeap_I,                iCash=35, iElerium=0, iAlloys=0,  iTime=7,    iEng=5)      
ItemBalance=(eItem=eItem_IntWeap_III,              iCash=35, iElerium=0, iAlloys=25, iTime=7,    iEng=10)     
ItemBalance=(eItem=eItem_IntWeap_IV,               iCash=100,iElerium=20,iAlloys=20, iTime=10,   iEng=20)     
ItemBalance=(eItem=eItem_IntWeap_V,                iCash=200,iElerium=20,iAlloys=30, iTime=10,   iEng=30)     
ItemBalance=(eItem=eItem_IntWeap_VI,               iCash=150,iElerium=20,iAlloys=30, iTime=10,   iEng=35)     
ItemBalance=(eItem=eItem_IntConsumable_Hit,        iCash=10, iElerium=0, iAlloys=0,  iTime=0,    iEng=5)    
ItemBalance=(eItem=eItem_IntConsumable_Dodge,      iCash=50, iElerium=0, iAlloys=0,  iTime=0,    iEng=10)    
ItemBalance=(eItem=eItem_IntConsumable_Boost,      iCash=20, iElerium=0, iAlloys=0,  iTime=0,    iEng=10)   
ItemBalance=(eItem=eItem_Elerium115,               iCash=3,  iElerium=1, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_AlienAlloys,              iCash=2,  iElerium=0, iAlloys=1,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_WeaponFragment,           iCash=1,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFOPowerSource,           iCash=75, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFONavigation,            iCash=40, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienFood,                iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienEntertainment,       iCash=17, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienStasisTank,          iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienSurgery,             iCash=25, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFOFusionLauncher,        iCash=125,iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_DamagedUFOPowerSource,    iCash=30, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedUFONavigation,     iCash=20, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienFood,         iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienEntertainment,iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)
ItemBalance=(eItem=eItem_DamagedAlienStasisTank,   iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienSurgery,      iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedHyperwaveBeacon,   iCash=45, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_SectoidCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_FloaterCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_ThinManCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_MutonCorpse,              iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_CryssalidCorpse,          iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_CyberdiscCorpse,          iCash=7,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_SectopodCorpse,           iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_DroneCorpse,              iCash=2,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_EtherealCorpse,           iCash=15, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_SectoidCommanderCorpse,   iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)      
ItemBalance=(eItem=eItem_BerserkerCorpse,          iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_MutonEliteCorpse,         iCash=8,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)      
ItemBalance=(eItem=eItem_FloaterHeavyCorpse,       iCash=6,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 

 

 

The problem with balancing this stuff against engineers and time to build is that:

 

the game doesn't multiply the number of items your building by the time to build.

 

So, it takes the same amount of time to make 1 eItem_ArmorPsi for 400 each, as it does to make 50 of them.

 

We'd have to figure out a way to modify the function that controls the amount of time a build project takes. Otherwise, this would be unbalanced as hell :D

 

 

Nevermind. It's fine. We just have to exclude certain things... those that don't require any elerium/alloy:

 

ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)  

 

We should try and find out where iCategory is defined...

 

I'd still like to have the number of items in your engineering project multiply the time it takes, but we don't know how to do that yet.

 

 

KUDOS to tbkiah! Nice mod! :D

 

UPDATE: Here is code that appears to give us a clue... Letting us see which iItems are in what iCategory (maybe):

function BuildItems()
{
m_iCurrentCategory = 1;
BuildItem(2, -1, -1, -1, 37);
BuildItem(3, -1, -1, -1, 16);
BuildItem(4, -1, -1, -1, 54);
BuildItem(5, -1, -1, -1, 31);
BuildItem(6, -1, -1, -1, 57);
BuildItem(7, -1, -1, -1, 45);
BuildItem(85, -1, -1, -1, 23);
BuildItem(86, -1, -1, -1, 56);
BuildItem(76, 25, 7, 5, 32);
BuildItem(88, -1, -1, -1, 2, 6);
BuildItem(80, 10, 7, 5, 2, 8);
BuildItem(99, -1, -1, -1, 17);
BuildItem(81, 20, 7, 5, 9, 48);
BuildItem(82, 20, 7, 5, 10, 36);
BuildItem(79, 85, 7, 10, 47, 18);
BuildItem(77, 50, 7, 10, 50, 151, 19);
BuildItem(78, 150, 10, 25, 55, 34);
BuildItem(192, 25, 20, 20, 7, 15, 3, 55);
BuildItem(8, 10, 10, 7, 10, 19, 27);
BuildItem(9, 25, 15, 7, 12, 19, 28);
BuildItem(10, 30, 25, 7, 12, 20, 29);
BuildItem(12, 35, 25, 7, 12, 20, 30);
BuildItem(11, 30, 25, 7, 12, 21, 26);
BuildItem(13, 100, 10, 20, 10, 20, 22, 40);
BuildItem(14, 125, 15, 20, 10, 20, 23, 42);
BuildItem(15, 200, 20, 30, 10, 20, 24, 41);
BuildItem(16, 200, 20, 50, 12, 25, 27, 43);
BuildItem(17, 250, 30, 30, 10, 25, 25, 39);
BuildItem(18, 250, 25, 30, 15, 25, 26, 44);
BuildItem(19, 275, 35, 40, 15, 40, 30, 38);
m_iCurrentCategory = 2;
BuildItem(57, -1, -1, -1, 12);
BuildItem(58, 25, 15, 10, 10, 14, 10);
BuildItem(59, 30, 10, 10, 15, 15, 14);
BuildItem(60, 150, 10, 35, 10, 25, 16, 15);
BuildItem(61, 200, 16, 30, 14, 35, 18, 9);
BuildItem(62, 250, 20, 25, 14, 40, 17, 11);
BuildItem(63, 400, 40, 20, 10, 30, 13, 13);
m_iCurrentCategory = 3;
BuildItem(102, 50, 14, 5, 1, 49);
BuildItem(103, 100, 25, 14, 10, 14, 1, 50);
BuildItem(104, 200, 30, 30, 14, 20, 5, 1, 51);
BuildItem(105, 40, -1, -1, 25);
BuildItem(106, 275, 40, 60, 21, 20, 5, 21);
BuildItem(107, -1, -1, -1, 66);
BuildItem(108, 100, 20, 5, 46);
BuildItem(113, -1, -1, -1, 1, 52);
BuildItem(115, -1, -1, -1, 53);
BuildItem(116, -1, -1, -1, 65);
BuildItem(117, -1, -1, -1, 1, 49);
BuildItem(118, -1, -1, -1, 50);
BuildItem(119, -1, -1, -1, 51);
BuildItem(123, 25, 7, 5, 11, 2);
BuildItem(124, -1, -1, -1, 4);
BuildItem(125, 35, 25, 7, 10, 21, 3);
BuildItem(126, 100, 20, 20, 10, 20, 28, 5);
BuildItem(127, 200, 20, 30, 10, 30, 33, 0);
BuildItem(128, 150, 20, 30, 10, 35, 29, 1);
BuildItem(135, 10, 0, 0, 0, 5, 43, 47);
BuildItem(133, 50, 0, 0, 0, 5, 44, 20);
BuildItem(134, 20, 0, 0, 0, 10, 49, 58);
m_iCurrentCategory = 5;
BuildItem(171, 3, 1, -1, -1, 14);
BuildItem(172, 2, 1, -1, -1, 36);
BuildItem(173, 1, -1, -1, 0);
BuildItem(191, -1, -1, -1, 40);
BuildItem(179, 75, -1, -1, 44);
BuildItem(177, 40, -1, -1, 43);
BuildItem(175, 10, -1, -1, 46);
BuildItem(174, 17, -1, -1, 47);
BuildItem(176, 10, -1, -1, 48);
BuildItem(178, 25, -1, -1, 49);
BuildItem(188, 125, -1, -1, 45);
BuildItem(180, -1, -1, -1, 193);
BuildItem(189, -1, -1, -1, 51);
BuildItem(186, 30, -1, -1, 163);
BuildItem(184, 20, -1, -1, 199);
BuildItem(182, 5, -1, -1, 199);
BuildItem(181, 5, -1, -1, 199);
BuildItem(183, 5, -1, -1, 199);
BuildItem(185, 10, -1, -1, 186);
BuildItem(187, 45, -1, -1, 193);
m_iCurrentCategory = 6;
BuildItem(144, 5, -1, -1, 52);
BuildItem(146, 5, -1, -1, 53);
BuildItem(148, 5, -1, -1, 55);
BuildItem(149, 5, -1, -1, 54);
BuildItem(154, 5, -1, -1, 56);
BuildItem(152, 7, -1, -1, 59);
BuildItem(156, 10, -1, -1, 61);
BuildItem(157, 2, -1, -1, 60);
BuildItem(153, 15, -1, -1, 58);
BuildItem(145, 10, -1, -1, 65);
BuildItem(151, 5, -1, -1, 62);
BuildItem(150, 8, -1, -1, 63);
BuildItem(147, 6, -1, -1, 64);
BuildItem(160, -1, -1, -1, 52);
BuildItem(162, -1, -1, -1, 53);
BuildItem(164, -1, -1, -1, 55);
BuildItem(165, -1, -1, -1, 54);
BuildItem(168, -1, -1, -1, 58);
BuildItem(161, -1, -1, -1, 65);
BuildItem(167, -1, -1, -1, 62);
BuildItem(166, -1, -1, -1, 63);
BuildItem(163, -1, -1, -1, 64);
BalanceItems();

 

For example, Item 192 appears to be in Category 1. Which is odd, because the second conditional in function CanBeSold(int iItem) checks specifically for items in categories 1 and 3, while it already excluded everything in those categories in the first conditional.

 

Perhaps this code...

 

       if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
       {
               return false;
       }

 

... has no real effect? That would be cool, because then we could use that code to exclude 4 items of our choosing.

 

Could we be so lucky and THESE items...

 

ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)  

 

... are actually items 192, 133, 134, and 135???? That'd be sweet!

Edited by Daemonjax
Link to comment
Share on other sites

Interesting, I must have done something differently, because i changed both false to true, and my infinite items don't show up in that list in the grey market.. unless of course you did something To change that. Or maybe i did accidently and don't actually know..

 

 

Yea it was me... I changed all the == in the first if statement to != and i changed all the || to &&.... so somehow i made it so the starting inifinite weapons can not be sold..

 

heheh... interesting :D

 

 

if(kItem.iCategory != 1 && (kItem.iCategory != 2) && (kItem.iCategory != 3))
{
   return true;
}

 

 

Is equivalent to:

 

if(kItem.iCategory == 4 || (kItem.iCategory == 5) || (kItem.iCategory == 6))
{
   return true;
}

 

^ assuming there is a category 4, but whatever. Not that it really matters, but I believe there's actually only 5 categories (1, 2, 3, 5, 6).

 

What's interesting about doing it this way (or just jumping past the first conditional), is now the second conditional actually serves a purpose:

 

if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
      return false;
}

 

Since item 192 is in category 1... and 133, 134, and 135 are in category 3.... those are now excluded.

 

I believe the second conditional was created before the first conditional was... when they were still testing out ways to make most items sellable. Then they changed their minds, added the first conditional... and then never bothered to remove the second (why bother, when it has no effect).

 

I REALLY would like to know what those four items are... anyone have any ideas? I'm hoping they're the 4 problem items I'd want to exclude because they use no materials.

 

Anyways, the reason you prevented the selling of the infinite starter items is because for those items you allowed the code to continue down to:

 

return m_arrItems[iItem].iCash != -1;

 

Which returns true iff the item has value that isn't -1. Starter items have a value of -1.

 

You're telling me you did that by happy accident? Because that's rather perfect ;)

 

Depending on how it turns out, that may or may not be the right way to do it (we just may want to skip the first conditional altogether), but whatever. Pretty cool regardless. ;)

 

 

Here's what I'm going to try...

 

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000040  C8 35 00 00 4A 16 07 8C 00 84 84 9A 35 B7 02 00  È5..J..Œ.„„š5·..

 

Changing the 0x07 at offset 0x46 to 0x06 should just skip the first conditional, while leaving everything else alone.

 

Yeah...

 

function bool CanBeSold(int iItem)
{
local TItem kItem;

kItem = Item(iItem);
// This is an implied JumpToken;
goto J0x8c;
kItem.iCategory == 1 || (kItem.iCategory == 2) || (kItem.iCategory == 3);
return false;
J0x8c:

// End:0xd4 Loop:False
if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
	return false;
}
return m_arrItems[iItem].iCash != -1;
}

 

I can confirm that medkits and scopes are in the list of 4 items that are excluded in the second conditional. I'm willing to bet that arcthrowers, and that first health bonus item are the remaining two. That's a good thing for us.

 

One major problem, however, is that you can sell interceptors for $40. If you have the air/space bonus, however, they only cost $20. So, we'll need to find a way to prevent interceptors from being sold on the grey market.

 

In fact, there are several items which can be used to create nearly infinite cash. I've made a list:

 

ItemBalance=(eItem=eItem_SHIV,                   iCash=50, iElerium=0, iAlloys=0,  iTime=7,  iEng=5)
ItemBalance=(eItem=eItem_Interceptor,            iCash=40, iElerium=0, iAlloys=0,  iTime=-1, iEng=-1)
ItemBalance=(eItem=eItem_Satellite,              iCash=100,iElerium=0, iAlloys=0,  iTime=20, iEng=5)
ItemBalance=(eItem=eItem_IntWeap_I,              iCash=35, iElerium=0, iAlloys=0,  iTime=7,  iEng=5)
ItemBalance=(eItem=eItem_IntConsumable_Hit,      iCash=10, iElerium=0, iAlloys=0,  iTime=0,  iEng=5)
ItemBalance=(eItem=eItem_IntConsumable_Dodge,    iCash=50, iElerium=0, iAlloys=0,  iTime=0,  iEng=10)
ItemBalance=(eItem=eItem_IntConsumable_Boost,    iCash=20, iElerium=0, iAlloys=0,  iTime=0,  iEng=10)

 

EDIT: Actually, don't the last 3 also cost corpses to make?

 

 

So, we basically have to get this code into that function somehow:

 

if (m_arrItems[iItem].iEng != -1 && m_arrItems[iItem].iAlloys == 0)
{
     return false;
}

 

This would care of everything on that list, except interceptors. We'll have to figure out it's item number, which may come down to trial and error. I would check 161 and hope to get lucky.

 

If we can't get the above code into the function, then we'd have to find their item numbers too. Actually, this all seems a little hopeless without being able to increase the size of functions, and perhaps should be left on the backburner until we can do more.

Edited by Daemonjax
Link to comment
Share on other sites

Interesting, I must have done something differently, because i changed both false to true, and my infinite items don't show up in that list in the grey market.. unless of course you did something To change that. Or maybe i did accidently and don't actually know..

 

 

Yea it was me... I changed all the == in the first if statement to != and i changed all the || to &&.... so somehow i made it so the starting inifinite weapons can not be sold..

 

heheh... interesting :D

 

 

if(kItem.iCategory != 1 && (kItem.iCategory != 2) && (kItem.iCategory != 3))
{
   return true;
}

 

 

Is equivalent to:

 

if(kItem.iCategory == 4 || (kItem.iCategory == 5) || (kItem.iCategory == 6))
{
   return true;
}

 

^ assuming there is a category 4, but whatever. Not that it really matters, but I believe there's actually only 5 categories (1, 2, 3, 5, 6).

 

What's interesting about doing it this way (or just jumping past the first conditional), is now the second conditional actually serves a purpose:

 

if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
      return false;
}

 

Since item 192 is in category 1... and 133, 134, and 135 are in category 3.... those are now excluded.

 

I believe the second conditional was created before the first conditional was... when they were still testing out ways to make most items sellable. Then they changed their minds, added the first conditional... and then never bothered to remove the second (why bother, when it has no effect).

 

I REALLY would like to know what those four items are... anyone have any ideas? I'm hoping they're the 4 problem items I'd want to exclude because they use no materials.

 

Anyways, the reason you prevented the selling of the infinite starter items is because for those items you allowed the code to continue down to:

 

return m_arrItems[iItem].iCash != -1;

 

Which returns true iff the item has value that isn't -1. Starter items have a value of -1.

 

You're telling me you did that by happy accident? Because that's rather perfect ;)

 

Depending on how it turns out, that may or may not be the right way to do it (we just may want to skip the first conditional altogether), but whatever. Pretty cool regardless. ;)

 

 

Here's what I'm going to try...

 

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000040  C8 35 00 00 4A 16 07 8C 00 84 84 9A 35 B7 02 00  È5..J..Œ.„„š5·..

 

Changing the 0x07 at offset 0x46 to 0x06 should just skip the first conditional, while leaving everything else alone.

 

Yeah...

 

function bool CanBeSold(int iItem)
{
local TItem kItem;

kItem = Item(iItem);
// This is an implied JumpToken;
goto J0x8c;
kItem.iCategory == 1 || (kItem.iCategory == 2) || (kItem.iCategory == 3);
return false;
J0x8c:

// End:0xd4 Loop:False
if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
	return false;
}
return m_arrItems[iItem].iCash != -1;
}

 

I can confirm that medkits and scopes are in the list of 4 items that are excluded in the second conditional. I'm willing to bet that arcthrowers, and that first health bonus item are the remaining two. That's a good thing for us.

 

One major problem, however, is that you can sell interceptors for $40. If you have the air/space bonus, however, they only cost $20. So, we'll need to find a way to prevent interceptors from being sold on the grey market.

 

In fact, there are several items which can be used to create nearly infinite cash. I've made a list:

 

ItemBalance=(eItem=eItem_SHIV,                   iCash=50, iElerium=0, iAlloys=0,  iTime=7,  iEng=5)
ItemBalance=(eItem=eItem_Interceptor,            iCash=40, iElerium=0, iAlloys=0,  iTime=-1, iEng=-1)
ItemBalance=(eItem=eItem_Satellite,              iCash=100,iElerium=0, iAlloys=0,  iTime=20, iEng=5)
ItemBalance=(eItem=eItem_IntWeap_I,              iCash=35, iElerium=0, iAlloys=0,  iTime=7,  iEng=5)
ItemBalance=(eItem=eItem_IntConsumable_Hit,      iCash=10, iElerium=0, iAlloys=0,  iTime=0,  iEng=5)
ItemBalance=(eItem=eItem_IntConsumable_Dodge,    iCash=50, iElerium=0, iAlloys=0,  iTime=0,  iEng=10)
ItemBalance=(eItem=eItem_IntConsumable_Boost,    iCash=20, iElerium=0, iAlloys=0,  iTime=0,  iEng=10)

 

So, we basically have to get this code into that function somehow:

 

if (m_arrItems[iItem].iEng != -1 && m_arrItems[iItem].iAlloys == 0)
{
     return false;
}

 

This would care of everything on that list, except interceptors. We'll have to figure out it's item number, which may come down to trial and error. I would check 161 and hope to get lucky.

 

If we can't get the above code into the function, then we'd have to find their item numbers too. Actually, this all seems a little hopeless without being able to increase the size of functions, and perhaps should be left on the backburner until we can do more.

 

Erm, why? I understand the interceptor thing, that one is, while slow, still effective. I might be overlooking something or just can not understand the problem here. Player first pay's a "hit load of valuables for some tech that he/she is likely to never use (chitin plating, combat stims, psi shield that makes no difference what so ever) and you want the player to not make a benefit for that. Why?

Link to comment
Share on other sites

The price information is easily changeable via modpatcher, which is sweet:

 

; Items
ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ChitinPlating,            iCash=85, iElerium=0, iAlloys=10, iTime=3,    iEng=15)    
ItemBalance=(eItem=eItem_CombatStims,              iCash=50, iElerium=0, iAlloys=5,  iTime=3,    iEng=15)    
ItemBalance=(eItem=eItem_MindShield,               iCash=150,iElerium=30,iAlloys=10, iTime=7,    iEng=35)  
ItemBalance=(eItem=eItem_Skeleton_Key,             iCash=25, iElerium=10,iAlloys=10, iTime=3,    iEng=15) 
ItemBalance=(eItem=eItem_LaserPistol,              iCash=10, iElerium=0, iAlloys=10, iTime=2,    iEng=10) 
ItemBalance=(eItem=eItem_LaserAssaultRifle,        iCash=25, iElerium=0, iAlloys=15, iTime=3,    iEng=12)    
ItemBalance=(eItem=eItem_LaserAssaultGun,          iCash=30, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_LaserSniperRifle,         iCash=35, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_HeavyLaser,               iCash=30, iElerium=0, iAlloys=25, iTime=4,    iEng=12)    
ItemBalance=(eItem=eItem_PlasmaPistol,             iCash=100,iElerium=10,iAlloys=20, iTime=4,    iEng=20)    
ItemBalance=(eItem=eItem_PlasmaLightRifle,         iCash=125,iElerium=15,iAlloys=20, iTime=6,    iEng=20)  
ItemBalance=(eItem=eItem_PlasmaAssaultRifle,       iCash=200,iElerium=20,iAlloys=30, iTime=8,    iEng=20)  
ItemBalance=(eItem=eItem_AlloyCannon,              iCash=200,iElerium=20,iAlloys=50, iTime=7,    iEng=25)  
ItemBalance=(eItem=eItem_HeavyPlasma,              iCash=250,iElerium=30,iAlloys=30, iTime=10,   iEng=25)  
ItemBalance=(eItem=eItem_PlasmaSniperRifle,        iCash=250,iElerium=25,iAlloys=30, iTime=10,   iEng=25) 
ItemBalance=(eItem=eItem_BlasterLauncher,          iCash=275,iElerium=65,iAlloys=50, iTime=12,   iEng=35)  
ItemBalance=(eItem=eItem_ArmorCarapace,            iCash=25, iElerium=0, iAlloys=15, iTime=5,    iEng=10) 
ItemBalance=(eItem=eItem_ArmorSkeleton,            iCash=30, iElerium=0, iAlloys=10, iTime=7,    iEng=15)                                     
ItemBalance=(eItem=eItem_ArmorTitan,               iCash=150,iElerium=10,iAlloys=35, iTime=10,   iEng=25) 
ItemBalance=(eItem=eItem_ArmorArchAngel,           iCash=200,iElerium=35,iAlloys=50, iTime=14,   iEng=35) 
ItemBalance=(eItem=eItem_ArmorGhost,               iCash=250,iElerium=50,iAlloys=40, iTime=14,   iEng=40) 
ItemBalance=(eItem=eItem_ArmorPsi,                 iCash=400,iElerium=40,iAlloys=20, iTime=10,   iEng=30) 
ItemBalance=(eItem=eItem_SHIV,                     iCash=50, iElerium=0, iAlloys=0,  iTime=7,    iEng=5)      
ItemBalance=(eItem=eItem_SHIV_Alloy,               iCash=75, iElerium=0, iAlloys=20, iTime=7,    iEng=10)     
ItemBalance=(eItem=eItem_SHIV_Hover,               iCash=100,iElerium=20,iAlloys=30, iTime=7,    iEng=20)     
ItemBalance=(eItem=eItem_Interceptor,              iCash=40, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)     
ItemBalance=(eItem=eItem_Firestorm,                iCash=200,iElerium=20,iAlloys=40, iTime=14,   iEng=20)     
ItemBalance=(eItem=eItem_Satellite,                iCash=100,iElerium=0, iAlloys=0,  iTime=20,   iEng=5)      
ItemBalance=(eItem=eItem_IntWeap_I,                iCash=35, iElerium=0, iAlloys=0,  iTime=7,    iEng=5)      
ItemBalance=(eItem=eItem_IntWeap_III,              iCash=35, iElerium=0, iAlloys=25, iTime=7,    iEng=10)     
ItemBalance=(eItem=eItem_IntWeap_IV,               iCash=100,iElerium=20,iAlloys=20, iTime=10,   iEng=20)     
ItemBalance=(eItem=eItem_IntWeap_V,                iCash=200,iElerium=20,iAlloys=30, iTime=10,   iEng=30)     
ItemBalance=(eItem=eItem_IntWeap_VI,               iCash=150,iElerium=20,iAlloys=30, iTime=10,   iEng=35)     
ItemBalance=(eItem=eItem_IntConsumable_Hit,        iCash=10, iElerium=0, iAlloys=0,  iTime=0,    iEng=5)    
ItemBalance=(eItem=eItem_IntConsumable_Dodge,      iCash=50, iElerium=0, iAlloys=0,  iTime=0,    iEng=10)    
ItemBalance=(eItem=eItem_IntConsumable_Boost,      iCash=20, iElerium=0, iAlloys=0,  iTime=0,    iEng=10)   
ItemBalance=(eItem=eItem_Elerium115,               iCash=3,  iElerium=1, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_AlienAlloys,              iCash=2,  iElerium=0, iAlloys=1,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_WeaponFragment,           iCash=1,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFOPowerSource,           iCash=75, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFONavigation,            iCash=40, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienFood,                iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienEntertainment,       iCash=17, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienStasisTank,          iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_AlienSurgery,             iCash=25, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_UFOFusionLauncher,        iCash=125,iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)    
ItemBalance=(eItem=eItem_DamagedUFOPowerSource,    iCash=30, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedUFONavigation,     iCash=20, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienFood,         iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienEntertainment,iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)
ItemBalance=(eItem=eItem_DamagedAlienStasisTank,   iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedAlienSurgery,      iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_DamagedHyperwaveBeacon,   iCash=45, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 
ItemBalance=(eItem=eItem_SectoidCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_FloaterCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_ThinManCorpse,            iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_MutonCorpse,              iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_CryssalidCorpse,          iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_CyberdiscCorpse,          iCash=7,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_SectopodCorpse,           iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_DroneCorpse,              iCash=2,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_EtherealCorpse,           iCash=15, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_SectoidCommanderCorpse,   iCash=10, iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)      
ItemBalance=(eItem=eItem_BerserkerCorpse,          iCash=5,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)        
ItemBalance=(eItem=eItem_MutonEliteCorpse,         iCash=8,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1)      
ItemBalance=(eItem=eItem_FloaterHeavyCorpse,       iCash=6,  iElerium=0, iAlloys=0,  iTime=-1,   iEng=-1) 

 

 

The problem with balancing this stuff against engineers and time to build is that:

 

the game doesn't multiply the number of items your building by the time to build.

 

So, it takes the same amount of time to make 1 eItem_ArmorPsi for 400 each, as it does to make 50 of them.

 

We'd have to figure out a way to modify the function that controls the amount of time a build project takes. Otherwise, this would be unbalanced as hell :D

 

 

Nevermind. It's fine. We just have to exclude certain things... those that don't require any elerium/alloy:

 

ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)  

 

We should try and find out where iCategory is defined...

 

I'd still like to have the number of items in your engineering project multiply the time it takes, but we don't know how to do that yet.

 

 

KUDOS to tbkiah! Nice mod! :D

 

UPDATE: Here is code that appears to give us a clue... Letting us see which iItems are in what iCategory (maybe):

function BuildItems()
{
m_iCurrentCategory = 1;
BuildItem(2, -1, -1, -1, 37);
BuildItem(3, -1, -1, -1, 16);
BuildItem(4, -1, -1, -1, 54);
BuildItem(5, -1, -1, -1, 31);
BuildItem(6, -1, -1, -1, 57);
BuildItem(7, -1, -1, -1, 45);
BuildItem(85, -1, -1, -1, 23);
BuildItem(86, -1, -1, -1, 56);
BuildItem(76, 25, 7, 5, 32);
BuildItem(88, -1, -1, -1, 2, 6);
BuildItem(80, 10, 7, 5, 2, 8);
BuildItem(99, -1, -1, -1, 17);
BuildItem(81, 20, 7, 5, 9, 48);
BuildItem(82, 20, 7, 5, 10, 36);
BuildItem(79, 85, 7, 10, 47, 18);
BuildItem(77, 50, 7, 10, 50, 151, 19);
BuildItem(78, 150, 10, 25, 55, 34);
BuildItem(192, 25, 20, 20, 7, 15, 3, 55);
BuildItem(8, 10, 10, 7, 10, 19, 27);
BuildItem(9, 25, 15, 7, 12, 19, 28);
BuildItem(10, 30, 25, 7, 12, 20, 29);
BuildItem(12, 35, 25, 7, 12, 20, 30);
BuildItem(11, 30, 25, 7, 12, 21, 26);
BuildItem(13, 100, 10, 20, 10, 20, 22, 40);
BuildItem(14, 125, 15, 20, 10, 20, 23, 42);
BuildItem(15, 200, 20, 30, 10, 20, 24, 41);
BuildItem(16, 200, 20, 50, 12, 25, 27, 43);
BuildItem(17, 250, 30, 30, 10, 25, 25, 39);
BuildItem(18, 250, 25, 30, 15, 25, 26, 44);
BuildItem(19, 275, 35, 40, 15, 40, 30, 38);
m_iCurrentCategory = 2;
BuildItem(57, -1, -1, -1, 12);
BuildItem(58, 25, 15, 10, 10, 14, 10);
BuildItem(59, 30, 10, 10, 15, 15, 14);
BuildItem(60, 150, 10, 35, 10, 25, 16, 15);
BuildItem(61, 200, 16, 30, 14, 35, 18, 9);
BuildItem(62, 250, 20, 25, 14, 40, 17, 11);
BuildItem(63, 400, 40, 20, 10, 30, 13, 13);
m_iCurrentCategory = 3;
BuildItem(102, 50, 14, 5, 1, 49);
BuildItem(103, 100, 25, 14, 10, 14, 1, 50);
BuildItem(104, 200, 30, 30, 14, 20, 5, 1, 51);
BuildItem(105, 40, -1, -1, 25);
BuildItem(106, 275, 40, 60, 21, 20, 5, 21);
BuildItem(107, -1, -1, -1, 66);
BuildItem(108, 100, 20, 5, 46);
BuildItem(113, -1, -1, -1, 1, 52);
BuildItem(115, -1, -1, -1, 53);
BuildItem(116, -1, -1, -1, 65);
BuildItem(117, -1, -1, -1, 1, 49);
BuildItem(118, -1, -1, -1, 50);
BuildItem(119, -1, -1, -1, 51);
BuildItem(123, 25, 7, 5, 11, 2);
BuildItem(124, -1, -1, -1, 4);
BuildItem(125, 35, 25, 7, 10, 21, 3);
BuildItem(126, 100, 20, 20, 10, 20, 28, 5);
BuildItem(127, 200, 20, 30, 10, 30, 33, 0);
BuildItem(128, 150, 20, 30, 10, 35, 29, 1);
BuildItem(135, 10, 0, 0, 0, 5, 43, 47);
BuildItem(133, 50, 0, 0, 0, 5, 44, 20);
BuildItem(134, 20, 0, 0, 0, 10, 49, 58);
m_iCurrentCategory = 5;
BuildItem(171, 3, 1, -1, -1, 14);
BuildItem(172, 2, 1, -1, -1, 36);
BuildItem(173, 1, -1, -1, 0);
BuildItem(191, -1, -1, -1, 40);
BuildItem(179, 75, -1, -1, 44);
BuildItem(177, 40, -1, -1, 43);
BuildItem(175, 10, -1, -1, 46);
BuildItem(174, 17, -1, -1, 47);
BuildItem(176, 10, -1, -1, 48);
BuildItem(178, 25, -1, -1, 49);
BuildItem(188, 125, -1, -1, 45);
BuildItem(180, -1, -1, -1, 193);
BuildItem(189, -1, -1, -1, 51);
BuildItem(186, 30, -1, -1, 163);
BuildItem(184, 20, -1, -1, 199);
BuildItem(182, 5, -1, -1, 199);
BuildItem(181, 5, -1, -1, 199);
BuildItem(183, 5, -1, -1, 199);
BuildItem(185, 10, -1, -1, 186);
BuildItem(187, 45, -1, -1, 193);
m_iCurrentCategory = 6;
BuildItem(144, 5, -1, -1, 52);
BuildItem(146, 5, -1, -1, 53);
BuildItem(148, 5, -1, -1, 55);
BuildItem(149, 5, -1, -1, 54);
BuildItem(154, 5, -1, -1, 56);
BuildItem(152, 7, -1, -1, 59);
BuildItem(156, 10, -1, -1, 61);
BuildItem(157, 2, -1, -1, 60);
BuildItem(153, 15, -1, -1, 58);
BuildItem(145, 10, -1, -1, 65);
BuildItem(151, 5, -1, -1, 62);
BuildItem(150, 8, -1, -1, 63);
BuildItem(147, 6, -1, -1, 64);
BuildItem(160, -1, -1, -1, 52);
BuildItem(162, -1, -1, -1, 53);
BuildItem(164, -1, -1, -1, 55);
BuildItem(165, -1, -1, -1, 54);
BuildItem(168, -1, -1, -1, 58);
BuildItem(161, -1, -1, -1, 65);
BuildItem(167, -1, -1, -1, 62);
BuildItem(166, -1, -1, -1, 63);
BuildItem(163, -1, -1, -1, 64);
BalanceItems();

 

For example, Item 192 appears to be in Category 1. Which is odd, because the second conditional in function CanBeSold(int iItem) checks specifically for items in categories 1 and 3, while it already excluded everything in those categories in the first conditional.

 

Perhaps this code...

 

       if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
       {
               return false;
       }

 

... has no real effect? That would be cool, because then we could use that code to exclude 4 items of our choosing.

 

Could we be so lucky and THESE items...

 

ItemBalance=(eItem=eItem_Medikit,                  iCash=25, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ArcThrower,               iCash=35, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_TargetingModule,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)      
ItemBalance=(eItem=eItem_ReinforcedArmor,          iCash=20, iElerium=0, iAlloys=0,  iTime=1,    iEng=5)  

 

... are actually items 192, 133, 134, and 135???? That'd be sweet!

 

Cat 1 - Weapons

Cat 2 - Armor

Cat 3 - Vehicles

Item 192- Skeleton Key

Item 133 - Interceptor Dodge

Item 134 - Interceptor Boost

Item 135 - Interceptor AIM

 

Big problem I see with selling everything is it looks like there is only one cash value. This one cash value is either manufacture cost OR sell value, not both. This means no loss or profit.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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