Need help with code

Freeform discussion about anything related to modding Transcendence.
Post Reply
BillD
Anarchist
Anarchist
Posts: 14
Joined: Mon Jun 27, 2011 4:17 am

I'd like to remove the buy limit from Ringer Stations. I believe this is the offending bit of code, from <DockScreen UNID="&dsExchangeSell;":

Code: Select all

(setq desc (cat gTitle " is not interested in buying " (itmGetName thisItem 0x02) ".")
Removing this is a little above my pay grade, so any help would be appreciated.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

nope, ringer stations buy-sell behaviour is in ringers.xml at line 88

Code: Select all

<Trade currency="rin" max="100000" replenish="5000">
			<Sell	criteria="*NU +RingerValuable;"		priceAdj="550"/>
			<Sell	criteria="*NU -ID;"					priceAdj="100"/>
			<Buy	criteria="*NU +RingerValuable;"		priceAdj="500"/>
			<Buy	criteria="*NU +Res; >=4;"		priceAdj="65"/>
		</Trade>
you can just change the max="100000" to any number you adjust the money at the station.

for a criteria list you can check here:
http://wiki.neurohack.com/transcendence ... m_criteria
BillD
Anarchist
Anarchist
Posts: 14
Joined: Mon Jun 27, 2011 4:17 am

I started a new game, and have reached the first Ringer station. I sold them 200 tons of Orthosteel Ore, and got "We're not interested in buying Orthosteel Ore" when trying to sell them more. That's what I want to eliminate. The buying limit is lame, and unrealistic.
BillD
Anarchist
Anarchist
Posts: 14
Joined: Mon Jun 27, 2011 4:17 am

I've got this working the way I want now. If you don't want to micromangage your loot, here's what I changed.

Search for "&dsExchangeSell" in Transcendence.xml. Here the original code:

Code: Select all

; If the station already has lots of these, lower the price
								(setq existingCount (objHasItem gSource thisItem))
								(setq averageCount (itmGetAverageAppearing thisItem))
								(switch
									(not existingCount)
										Nil

									(geq existingCount (multiply averageCount 5))
										(setq gCost 0)

									(geq existingCount (multiply averageCount 4))
										(setq gCost (divide (multiply gCost 25) 100))

									(geq existingCount (multiply averageCount 3))
										(setq gCost (divide (multiply gCost 50) 100))

									(geq existingCount (multiply averageCount 2))
										(setq gCost (divide (multiply gCost 75) 100))
									)
Remove this line:

Code: Select all

(geq existingCount (multiply averageCount 5))
										(setq gCost 0)
You can now sell whatever quantity you like to a station, and won't get the "is not interested in buying" message.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

creative little pilot :)

personally I increase the credit limits .
I never like to edit the great Developers work: just add things I thought at the time were interesting.

for your creative art: you could take your idea and put it in a Global: extension globals can often over-ride the standard ones. and then maybe you can share the wealth with other players? I got a cargo box with 500 tons of titanium to sell :)
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
BillD
Anarchist
Anarchist
Posts: 14
Joined: Mon Jun 27, 2011 4:17 am

Post Reply