Need help on modding

Freeform discussion about anything related to modding Transcendence.
Post Reply
Aron0621
Anarchist
Anarchist
Posts: 7
Joined: Tue Jun 11, 2013 5:44 am

Realized that creating a tutorial 'adventure' with my native language would be much easier than making 'translation pack'. And I decided to put it off for a while.

Now I`m trying to create 'solar station'. It sells solar panel/armors, etc.
I need some help, though.

*StationType - locationCriteria
It should be located only near the sun of a system. --OuterSpace?
*Trade
It sells specified items like solar panels, armors, modified barrel item, etc. <Trade>-<buy>/<sell> seems to do something... I would experiment with it, but I would appreciate some advices.
*Refueling
Offers refuel in half price. Any way to modify them?
*Device
I want to add a device which increases all solar panel`s efficiency, but installing more than 2 of them won`t give additional benefits. I need to check whether the device is installed of not.

...things like that. I will post more question while developing. Any helps appreciated.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Code: Select all

<!-- Solar power station -->

	<StationType UNID="&stSolarStation;"
			name=				"Solar power station"
			sovereign=			"&svCorporate;"
			dockScreen=			"Main"
			abandonedScreen=	"&dsAbandonedStation;"
			dockingPorts=		"8"
			canAttack=			"true"

			multiHull=			"true"
			armorID=			"&itSolarArmor;"
			hitPoints=			"100"
			repairRate=			"1"
			explosionType=		"&vtBlastExplosion2;"
			ejectaType=			"&vtWreckEjecta;"

			attributes=			"corporate, corporateCustoms, envAir, envEarth, envFire, envWater, friendly, independent, human, populated"
			levelFrequency=		"cccuu rv--- ----- ----- -----"
			locationCriteria=	"+planetary; +innerSystem; -frost; -nebulae; -void"
			>

		<Names noArticle="true">Solar Station %s</Names>

		<Image			imageID="&rsStations4;" imageX="0" imageY="0" imageWidth="192" imageHeight="192"/>

		<Ships>
			<Lookup count="1d2" table="&tbCorpDefenders;"/>
			<Lookup count="1d4" table="&tbCommPrivateCrafts;"/>
		</Ships>

		<Reinforcements minShips="3">
			<Table>
				<Lookup chance="75" table="&tbCorpDefenders;"/>
				<Lookup chance="25" table="&tbCommPrivateCrafts;"/>
			</Table>
		</Reinforcements>

		<Items>
			<Item				count="8d20"	item="&itSolarPanelArray;" />
			<Item				count="4d20"	item="&itSolarArmor;" />
			<Item				count="4d20"	item="&itPhotorepairArmor;" />
		</Items>

		<Trade currency="credit" max="5000" replenish="250">
			<Sell	criteria="*NU -Illegal; -ID; -NotForSale;"	priceAdj="100"/>
		</Trade>

		<Events>
			<OnDestroy>
				(intCorporateOnDestroy)
			</OnDestroy>
		</Events>

		<DockScreens>
			<Main>
				<Panes>
					<Default>

						<OnPaneInit>
							(scrSetDesc gScreen (cat "Welcome to " (objGetName gSource) ", your most reliable source of starship fuel and a member of the Earth Industries Conglomerate. All our fuel has been produced to the exacting standards required by today's reactors. Please use the terminal to proceed with your transaction."))
						</OnPaneInit>

						<Actions>
							<Action name="Buy items" default="1" key="B">
								(scrShowBuyScreen 
									"*"						; items sold to player
									)
							</Action>

							<Action name="Refuel" key="R">
								(block Nil
									(intSetCompatibleFuelEx '((&itHeliumAssembly; 50) (&itHelium3FuelRod; 50)))
									(scrShowScreen gScreen "&dsRefuel;")
									)
							</Action>

							<Action name="Undock" cancel="1" key="U">
								<Exit/>
							</Action>

						</Actions>

					</Default>
				</Panes>
			</Main>

		</DockScreens>
	</StationType>
This Transcendence design type meets each of your criteria.

Explained below is what each part does.

Code: Select all

locationCriteria=	"+planetary; +innerSystem; -frost; -nebulae; -void"
These criteria are copied from both the Corporate fuel depot and the heliotrope station, I hope they explain themselves.

Code: Select all

<Items>
			<Item				count="8d20"	item="&itSolarPanelArray;" />
			<Item				count="4d20"	item="&itSolarArmor;" />
			<Item				count="4d20"	item="&itPhotorepairArmor;" />
		</Items>
These tags determine what items the station has, which obviously means these items are the only ones ready to be sold or looted.

As you can see, each individual item has its own tag, with the count= parameter determining how many of that item is available per station. In this case, it's the sum of dice rolls, 8 rolls of a 20-sided dice for Solar Panel Arrays.

You can add or remove items by deleting or copying the corresponding <item> (NOT <items>) tag, just be sure to change the item= parameter to a new itemtype UNID.

Code: Select all

<Trade currency="credit" max="5000" replenish="250">
			<Sell	criteria="*NU -Illegal; -ID; -NotForSale;"	priceAdj="100"/>
		</Trade>
This determines what items the station will sell from its inventory. "*NU -illegal; -ID; -NotForSale;" means any item that is not illegal, not an ID chip, and not having the attribute "NotFotSale"

priceAdj refers to price adjustment in relative percentage to the base cost.

max= and replenish= are not important in this case, because the station does to need to pay for anything.

Code: Select all

(intSetCompatibleFuelEx '((&itHeliumAssembly; [u]50[/u]) (&itHelium3FuelRod; [u]50[/u])))
As we can see here, the number 50 refers to 50%, that is, the price of the He-3 assembly and fuel rod is 50% the normal price. You can set this to any positive integer (negative too, maybe), and that will be the relative price of each fuel rod used in the refueling process.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Post Reply