problem with sell/buy

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

hello
this item:

Code: Select all

<ItemType UNID="&itmerc_Narcotics;"
			name=				"[case(s) of ]narcotics"
			level=				"1"
			value=				"10"
			mass=				"1000"
			frequency=			"common"
			
			attributes=			"NotForSale"

			description=		"This is a crate filled with mixed low-grade narcotics."

			sortName=			"narcotics, case of"
			>

		<Image imageID="&rsItems1;" imageX="192" imageY="480" imageWidth="96" imageHeight="96"/>
	</ItemType>
can be sold to Starton Eridani.
It seems that it cannot be bought anymore after selling it.
Shouldn't it be notforsale also for the player ?


I added 2 lines to dsRPGCommoditiesExchangeSell
(printTo 'console itemCriteria)
(printTo 'console (@ gData 'listFilter))
they both return Nil when I open the ds to try to sell items to Starton Eridani. is this a bug ?
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

I'm not sure what you mean here. Isn't that just the NotForSale attribute working as intended by preventing the item from appearing in a station's sell list?
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

Starton Eridani has this in its Trade element:
<Sell criteria="m +commonwealth; -illegal; -military; -notForSale; -notStandard; L:1-3;" priceAdj="115" inventoryAdj="200"/>
<Sell criteria="*NU -Illegal; -ID; -NotForSale;" priceAdj="110"/>
<Sell criteria="rNU L:1-4; -Illegal; -NotForSale; -notStandard;" priceAdj="110" inventoryAdj="100"/>
<Buy criteria="amswNU -Illegal; -NotForSale;" priceAdj="50"/>
<Buy criteria="*NU -Illegal; -ID; -NotForSale;" priceAdj="90"/>
<Buy criteria="*NU -Illegal; -ID;" priceAdj="10"/>
Many stations are similar or identical. This means they won't sell notForSale items ever, won't buy damaged, installed, illegal, or ID items, and pay only 10% for notForSale items. If you want to prevent an item from being purchased by these stations without tagging it illegal or ID, you have to make the price stations would pay less than 1 unit of currency (or bug George until he adds some more exclusion attributes to the trade elements of all stations). Fortunately, you can do this with a <GetTradePrice> event in the item definition.

From the wiki:
<GetTradePrice>

Use this event to dynamically compute the price of the item at runtime. The result of the event is the price of a single item of this type in credits.

gSource is the object that is valuing the item (not necessarily the object on which the item resides).

gItem is the item.
So, for example, you could make the price normal when gSource is a specific station type, and 0 otherwise, so no other stations will buy it. I think this applies when buying and selling, so you would want it to be notForSale or some other attribute that prevents it from appearing in normal stations' inventories so they won't sell it for 0.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

I had a heck of a time with stations trying to buy or sell things "it says" the station should not..
in some cases I had to explicitly name the item to not sell or buy

how I see a situation like this:
the quest to modernize the game & add ( what I call )
"personal choices into a non-democratic design"
w/ the lacking of time to re-write the game to eliminate conflicts from pre-existing items

the Item is using "Attributes" : the game uses both Attributes & Modifiers - sometime the game will not respond to the way a thing is written ( capitalization or lack of )

the use of Attributes when the ds or station is looking for modifiers....

In this case of yours : I would go after the capitalization

besides the fact that a "common" item is not for sale (yet not illegal) and such little value ......kind of defeats the purpose of the item being in a Game in the first place.
( like the smart cannon ammo -
I always up the price on it and a few other items that are simply trash for trade
simply because of the price despite being useful for some situations or play styles)
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

thank you for the explanations guys.

I think that this problem boils down to the fact that I can't understand how scrSetListFilter works.

btw, NMS

that item sells for 90% of value. (9 credits) not 10% of value at Starton.
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

That's weird. Commonwealth stations should never buy NotForSale items at any price other than 10%. Are you sure another mod or part of that mod isn't changing their <Trade> elements or applying a price adjustment? Can you check with other NotForSale items (e.g. Centauri Recoilless)?
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

NMS wrote:That's weird. Commonwealth stations should never buy NotForSale items at any price other than 10%. Are you sure another mod or part of that mod isn't changing their <Trade> elements or applying a price adjustment? Can you check with other NotForSale items (e.g. Centauri Recoilless)?

One thought today re-reading this : did the player sell it to the main station or did they have a blackmarket cargo hold and sell to the club?
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Post Reply