Jump to content

Allowing All items to be sold.


tbkiah

Recommended Posts

In my game, i can manufature laser rifles for i think $13, and i sell them for $25... I could be wrong...

 

I believe you. I suspect the 13 is based on the 25. During my game the cost of items was always dropping, so I think it may be based on engineer count. Also the sell prices match with the cost of the items (at least in beginning).

Link to comment
Share on other sites

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.

 

 

Don't think that's correct... when I left this code in:

 

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

 

I was unable to sell medkits or scopes on the gray market. If I get around to it, I'll change the false to true in that code, and we'll know for sure. I could be wrong.

 

Also, it looks like the price to sell is simply the iCash value, while the price to make it goes down as your number of engineers goes up (I found the code to change the engineer cost-decrease formula, btw).

 

We'd want to mod this so that you can never make a profit from selling items. We want there to always be a loss, because the game doesn't multiply the number of items you're building by the build time.

 

i.e. even a $1 profit (after subtracting the opportunity cost of just selling the materials) from selling manufactured equipment on the gray market would effectively become infinite cash.

 

So, selling items on the gray market should always be a loss for game balance reasons. The problem is for interceptors, and manufactured goods that don't require elerium or alloys.

 

The simple fix:

 

Replace one of the items 192, 133, 134, 135 with the interceptor item number, and either:

 

1) add alloy and/or elerium requirement to everyone buildable (scopes, etc.); or

2) change those problem items to cost -1 iCash (like medkits).

Edited by Daemonjax
Link to comment
Share on other sites

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?

 

This isn't like the original game where the number of items you're building it multiplied by the time to build.

 

It takes the same number of days to build 1000 medkits, or 1 medkit.

 

Also, your engineers aren't tied up for the time it takes to build.

 

 

 

I hope you see the problem, now. If not, whatever. We'll just agree to disagree.

 

Honestly, I just thought I was pointing out the obvious. :D

 

I think it would be cool to allow players the choice to sell items at a loss on the grey market. But, I don't think you should be able to get infinite cash. With the game mechanics the way they are, any profit is infinite profit.

 

UPDATE:

 

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

kItem = Item(iItem);
// End:0x74 Loop:False
if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
	return false;																												
}				
// End:0xbf Loop:False
if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134))
{
	return false;
}
return m_arrItems[iItem].iCash != -1;
return ReturnValue;	
@NULL(131072)
}

 

I modified the bytecode to decompile to the above. Then, with just a few more modifications, we should be able to exclude 8 items of our choosing.

 

Assuming it just doesn't crash the game when I load the modified upk...

 

Hopefully it won't mind the extra return and null at the bottom. :D In theory, it shouldn't matter since return m_arrItems[iItem].iCash != -1; should make that junk at the bottom unreachable code.

 

Wish me luck! ;)

 

UPDATE:

 

Crashes with "Bad export index 180549991/18702". Sucks. I didn't modify the function length, per se, but I used 0x0B (Nothing) to basically null extra bytes out.

 

Something didn't work. Huh... I'll have to try something else.

Edited by Daemonjax
Link to comment
Share on other sites

This is something that I've been working on as well and I only just discovered last night that you've already had a huge discussion about it, doH!

 

Looks like you've got it to work the same way I have but are also struggling with the same buy/sell price. I'm pretty new around here but I think I'm up to speed with it all now, as we're stuck at the same part :)

 

I think I understand that area of the code and relevant functions pretty well, but haven't had success with altering the sell price yet. I'll keep on experimenting and see if I can come up with something.

 

Are there any specific items you do /don't want to be able to sell? I think I might be able to already do it, but it depends what you're trying to achieve exactly.

 

I'm quite sure rbok is right about the first three categories and the items he listed, as those are my findings too.

 

Category 1: Weapons

Category 2: Armour

Category 3: Vehicles (SHIV, inteceptor, vehicle weapons/upgrades, satellite)

 

Category 4: Doesn't exist

Category 5: Alien artefacts/collectables (Allien alloys, weapon fragments, alien food, etc.)

Category 6: Alien corpses/captives

 

EDIT:

Obviously you don't want to be able to sell items that you've got infinite amount of (basllistic pistol rifle etc), so perhaps that's what you're trying to avoid, as Caiman's screenshot showed?

 

It's the buy/sell price that I see as the issue, although I suspect selling captives might be problematic, but I haven't tested it yet.

http://i.imgur.com/4BlhN.jpg

Edited by bokauk
Link to comment
Share on other sites

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?

 

surely, if the player has excess resources, enough to make excess items (to sell) then your game balance is off "for starters"....?

 

if you then add extra resources to allow the gamer to make excess items to generate extra cash... then your game balance is even further off....

 

SO other than a desire to "want to sell everything i can make" this idea baffles me entirely... its 'usefulness' from a gaming perspective seems entirely counter-productive. :confused:

Link to comment
Share on other sites

Are there any specific items you do /don't want to be able to sell? I think I might be able to already do it, but it depends what you're trying to achieve exactly.

 

I've already discussed this to death.

 

I spent too many hours on this already. Maybe in the future we'll be able to balance this.

Link to comment
Share on other sites

I've already discussed this to death.

 

I spent too many hours on this already. Maybe in the future we'll be able to balance this.

 

Ahh ok, I must have missed that thread, I just saw mention of wanting to sell a few items like medikits and arc throwers :) . Doesn't matter anyway I guess.

 

I've had success selling alien captives, but you can still interrogate them after selling. Probably more hassle than it's worth trying to iron out that small problem though.

 

http://i.imgur.com/zjdie.jpg

 

I'll carry on looking into changing the buy/sell values then probably release a mod once the Mod Distribution tool is ready.

Link to comment
Share on other sites

It's actually pretty neat if we can sell live aliens for more than dead ones :D

 

Anyways, getting this mod to "work" isn't the problem. That's been done on page 1 of this thread.

 

The problem is to balance it in a way that isn't game breaking.

 

I dunno... maybe if we just exclude these 4 items:

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)

 

... in the second conditional, then we can tweak the other problem items in other ways (make them also cost alloys/elerium, or set their iCash to -1). Just a simple matter of finding out their item number.

 

I tried every way I could think of to get the bytecode to work with 8 or more exclusions, but never succeeded. Many hours of trying. I have to give up on that for now, at least.

Edited by Daemonjax
Link to comment
Share on other sites

ive not much knowledge of this area of modding but im wondering.

 

if you set a cost to build the pistols, granades, kevlar etc, instead of free (unlimited) would that remove the problem of generating cash for free? (selling unlimited items)

 

would also add the element of potential military bankrupcy cos u cannot get arms for free anymore. and forcing you to turn down missions due to lack of weaponry.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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