Newbie question: Converting items (playing with quantity)

Freeform discussion about anything related to modding Transcendence.
Post Reply
ytszazu
Anarchist
Anarchist
Posts: 9
Joined: Fri Dec 30, 2011 1:01 am

For this mod:

28_OreRefiningMod.zip

The goal here was to convert one item to another (like the thinker)

So, for these formulas; the item on the left will convert (which need number of items as middle number) to the item on the right.

Code: Select all


<StaticData>
		<CustomWork>
			(
				(&itPteracniumOre;		1	&itPteracniumFuelRod;)
				(&itUraniumOre;			1	&itCrystallineUranium;)
				(&itHeliumRegolith;		1	&itHeliumAssembly;)
				(&itHelium3FuelRod;		5	&itHeliumAssembly;)
				(&itQuantumVacuum;		2	&itHadronVacuumFuelCell;)
				(&itXenotiteOre;		1	&itXenotiteFuelRod;)
				(&itHyperonicOre;		5	&itLongzhuSphere;)
				(&itHadronArcheolith;		1	&itHadronVacuumFuelCell;)
				(&itChronimiumGas;		5	&itHadronVacuumFuelCell;)
							

			)


							; Enable/disable actions
							(scrEnableAction gScreen 0 (and gMatch (geq (plyGetCredits gPlayer) gCost)))
							)
					</Initialize>

					<Actions>
						<Action name="Proceed" default="1" key="P">
							(if (and gMatch (geq (plyGetCredits gPlayer) gCost))
								(block Nil
									(scrRemoveItem gScreen gMaxCount)
									(plyCharge gPlayer gCost)
									(objAddItem gPlayerShip (itmCreate (item gMatch 2) gCount))

									(scrShowPane gScreen 'Done)
									)
								)
						</Action>

						<Action name="Cancel" cancel="1" key="C">
							<ShowPane pane="Default"/>
						</Action>

					</Actions>

				</UseItem>

				<Done

My question is: How to do it the reverse way?

Example, convert one item on the left to 5 items on the right (as opposed to 5 items on the left to one item on the right).

Thanks to digdug for the mod. :)

New here, hope I didn't break any rules. :)

Regards,

ZAZU
ShaunWilkinson
Anarchist
Anarchist
Posts: 24
Joined: Sat Dec 24, 2011 7:11 pm
Location: Heretic System
Contact:

could you simply reverse the code?

put the items on the right to the left and vice versa then adjust values as required?
I am the One and Only
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1495
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska

ShaunWilkinson wrote:could you simply reverse the code?

put the items on the right to the left and vice versa then adjust values as required?
Correct, I have made several Tinker stations in the start while exploring how things work :
you take the items you want to be converted ( left ) with a number to qualify ( middle ) ans the item you want ( right )

If you have ore and want MAGs : ore ( # ) MAG ( you would only get 1 for the qualifying numbers so if you want to convert to something that goes fast you might lower the qualify number to justify the expense, like "ore 1 MAG")

it looks mystical but it is actually the simplest code in the entire game ( which is probably why most of us starting out get fascinated by it being so straight forward )
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
ShaunWilkinson
Anarchist
Anarchist
Posts: 24
Joined: Sat Dec 24, 2011 7:11 pm
Location: Heretic System
Contact:

just out of curiousity, how would you go about say converting 2 items into 1 of another item?

would it be 0.5 as the value or would you go into negatives to solve the problem?
I am the One and Only
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1495
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska

ShaunWilkinson wrote:just out of curiousity, how would you go about say converting 2 items into 1 of another item?

would it be 0.5 as the value or would you go into negatives to solve the problem?
As far as I know you require whole numbers.
I have once upon a tinker set it up to take ore to fuel then take that fuel in another option to convert it to something else:
ore 5 fuel
fuel 5 candy
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

the best way to do this is to modify the functions that it uses to work with a new setup
eg

Code: Select all

( &itore;  1  &fuel; 5) ===  1 ore will make 5 fuel 
then make some code that reads that and does the converting for you.

i would make it, but i am busy/lazy atm
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2616
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

ohhh, somebody interested in a 4 years old mod :D
It's far from being balanced but I made it when i was newbie :P

so, yeah, sdw195 is right and his solution is probably the easiest to implement on George's code.
Post Reply