Water as Fuel

Freeform discussion about anything related to modding Transcendence.
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

Hi - I'm new to modding transcendence... I've made a few custom ships with cool weapons, shields, reactors etc and figured out how to use my own graphics and now I'd like to experiment with creating alternate fuel supplies. Specifically I'd like to use Water or create a Water item that can fuel the base reactor of a ship I create. I haven't implemented anything yet but I imagine creating something like itSuperWater with the following important variables would be necessary:

data= "xxxx" where is xxxx is the amount of fuel
modifiers = "consumable; fuel; zzzMW" where zzz is the ship's base reactor power

is the value for sortName or numberAppearing critical or arbitrary? how are those used?

also - i saw a reference to a script command (shpConsumeFuel ship fuel), has anyone ever used that in a mod? know how to use it? is it necessary to use it? are there more important commands to worry about? basically i'd like to be able to use water from the Refuel screen (from the shipdeck or at the fueling stations where water is normally also sold alongside fuel rods and system maps) - but with not much experience playing around with scripting i'm wondering whether this is a daunting mod or something really simple....

help appreciated - sorry if this is vague because i haven't included any code (i haven't made any yet is why!)
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

using water as fuel? copy the code for fuel rods and rename it water, maybe mess around with the values. Or ask me to do it. I need some practice....
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

evilbob i appreciate the short reply but i asked a lot of specific questions which i'm curious to the answer to.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

I just finished a mod for a rechargeable heavy laser cannon that requires "laser cells" to charge it. I'll be posting it in the mod site very soon so keep an eye out for it. I'll also post in this forum when it has been uploaded. You can take a look at it and see if you'd like to make your reactor and fuel based on its code.


UPDATE: the cannon has been uploaded at the mod site so if you'd like to look it over for your reactor idea, follow the links...
http://neurohack.com/transcendence/foru ... =2612#2612
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

hey FAD - nice Mod on the laser cannon - tested it out in the game and works fine... i notice the code looks a lot like the longzhu sphere dock screen code but modified for your cannon? i'm not sure yet whether i need to create a new dock screen. that really depends on if anyone can explain to me how the following function works:

(shpIsFuelCompatible gPlayerShip gItem)

i.e. how does the shpIsFuelCompatible determine compatibility between ship and fuel?

and also has anyone used this command:

(shpConsumeFuel ship fuel)

because my hunch is that shpConsumeFuel can force a particular ship to take a particular fuel... is that what that command does?

anyone who knows the intricacies of these two commands and knows how to use them, i'd love to hear from you.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

lostdude wrote:hey FAD - nice Mod on the laser cannon - tested it out in the game and works fine... i notice the code looks a lot like the longzhu sphere dock screen code but modified for your cannon.
Thank you and yep, the longzhu code was the base for my cannon.

As for your water fuel, PlayMeNow's code example is what you'll need for your base code. Although, it could also be able to fuel other reactors in that level and I don't think that's what you're after. You're wanting a stand-alone fuel just for your reactor, correct? That's why I offered the code to my cannon, as it will only supply it and nothing else. And I'm certain it will do the same for your reactor as well, with your own modifications of course.

You could also take a look at Fichikai's reactor mod, as he made fuel that supplies only his reactors. It's also located at the mod site.
Yugi
Fleet Officer
Fleet Officer
Posts: 1027
Joined: Sun Mar 05, 2006 8:21 am

FAD wrote:You could also take a look at Fichikai's reactor mod, as he made fuel that supplies only his reactors. It's also located at the mod site.
Yeah, that's pretty easy to do. You just need to have the fuel set at a level higher than what all the other fuel, and only allow the reactor to take that level of fuel.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

If you set your fuel level too high, you may not be able to find any (in game) in any of the stations or even loot. So be careful there.
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

check out a cloaker ship i did altering the games Water Ice data...

http://www.xelerus.playmenow.org/index.php?s=mod&id=59

NB: although this means you can get water fuel at any Fuel Station where water ice is normally sold - it will only work as fuel for this cloaker ship. graphics from http://artships.com/2001/rokso.php - cool feature: a 'beacon' to summon friendly xenophobe fighters.

to do: extend the sources of water fuel to other items which contain water naturally in the game, experiment more with the beacon item so that summoned ships are a random event so that there's a possibilty of summoning an enemy to your location when you really needed a friend... ability to randomly summon all manner of ships is something to work on.

cloaker ship recharges in sunlight too. no additional reactor installed... uses own base reactor.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Sounds sweet! Just DL'd and will check it out. Glad to see you solved the water prob!

UPDATE:
Water ice now fuels all playerships. You can correct this by changing the UNID name from itWaterIce to something like itStealthWater or whatever and give it your own extension. But, whatever you rename it to, that water will also refuel other playerships as well unless you set the level to suite only your reactor.

Your XenoSummon Beacon uses hot key A. This conflicts with the hot key for Autons. You could possibly change it to "X" I don't think that key is taken (?)
Also, add firstPlural= "true" to correct the grammar for your XenoSummon when there's more than one.

Personally, I think the ship is a bit too "squirrely" in turn rate. Could change maneuver= "2" to 3 or maybe higher.

Your ship image is killer but I think it would look better and more realistic if the contrast was toned down-maybe brightness as well. If you want, I can do that for you and send via email. Just need your addy.

The Stealth Cannon is waaaaaaaaaaaay overpowered...but you knew that. :P Kewl cannon BTW.

Realistically, masswise, the cargo hold is too large for that size of ship. No biggie though as some like a lot of room to store their loot. And... we can always adjust it to our own likings. :lol:

Overall, it's a nice mod and was fun to use.
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

my email address is included in the readme.txt file of the cloaker ship's extension zip hosted on the link i posted above. anyone who wants to contact me / send me anything can do so that way. (that's kind of an anti-spam tactic). FAD: glad you thought it was a fun mod... it's my first mod and would like to improve it so welcome your suggestions and any changes you want to make to it.
Yugi
Fleet Officer
Fleet Officer
Posts: 1027
Joined: Sun Mar 05, 2006 8:21 am

Well, i've been trying it out for a while, and even though it's a godship (I don't usually like godships), it's been very fun to play with :D

It could be weakened down a little, so at least something can kill you.
lostdude
Anarchist
Anarchist
Posts: 7
Joined: Sat Sep 23, 2006 7:18 pm
Location: New York

Ok, so I made a few changes as suggested. It's more of a super ship than godlike now. I tested it on the Iocrym without help from longzhu enhancement or xenophobe fighters and actually had a double KO - we both disintegrated each other. Hope that satisfies the "can it be killed" criteria! Any further tweaks people can make on their own. Thanks for the positive feedback! ... When I get some more time I intend to develop this summon beacon thing in alot more depth. For now just replace the cloaker.xml file completely with the following code:

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
	
	<!ENTITY unidExtension				"0xD80A0043">
	<!ENTITY rsXCloaker				"0xD80A0044">
	<!ENTITY rsXCloakerShields			"0xD80A0045">
	<!ENTITY rsEI100XArmor				"0x0000F00B">
	<!ENTITY scXCloaker				"0xD80A004E">
	<!ENTITY itXCloakerArmor			"0xD80A004D">
	<!ENTITY itXCloakerWeapon			"0xD80A004C">
	<!ENTITY itCloakerSphere			"0xD80AF04E">
	<!ENTITY itXCloakerVeil				"0xD80AF04D">
	<!ENTITY rsZubrinReactor			"0x0000F00C">
	<!ENTITY rsItems1				"0x0000F11D">
	<!ENTITY rsDriveExhaust				"0x0000F10C">
	<!ENTITY rsNavBeacon				"0x0000F10A">
	<!ENTITY snLaserCannon				"0x0000F201">
	<!ENTITY itLongzhuSphere			"0x00194001">
	<!ENTITY itXCloakerSolar			"0xD80AF203">
	<!ENTITY itXenoSummon				"0xD80AF204">
	<!ENTITY itStealthSpider			"0xD80AF205">
	<!ENTITY itGemOfDespair				"0x000040F7">
	<!ENTITY itStargateControlRod			"0x000040BF">
	<!ENTITY itEnhanceSRSROM			"0x000040BC">
	<!ENTITY scXenophobeFighter			"0x08010082">
	<!ENTITY svIndependent				"0x00001003">
	<!ENTITY itWaterIce				"0x00004026">

]>

<TranscendenceExtension UNID="&unidExtension;" version="0.96">

	<ItemType UNID="&itStealthSpider;"
		name=				"stealth spider"
		level=				"6"
		value=				"10000"
		mass=				"2000"
		frequency=			"rare"
		modifiers=			"MajorItem"
		description=		"This covert spider automatically repairs damage to a ship's armor."
		>

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

	<RepairerDevice
			repairCycle=	"15,20,20,25,25, 30,30,40,40,50"
			powerUse=		"10"
			/>
	<Invoke>
			(intAutoInstall gSource gItem)
	</Invoke>

	</ItemType>

	<ItemType UNID="&itWaterIce;"
			name=				"tank of water ice"
			level=				"1"
			value=				"7"
			mass=				"1000"
			frequency=			"common"
			numberAppearing=		"2d8"
			modifiers=			"Consumable; Res; Fuel"
			data=				"100000"
			description=		"Water is a valuable commodity in the depths of space."
			firstPlural=		"true"
			sortName=			"water ice, tank of"
			>
		<Image imageID="&rsItems1;" imageX="288" imageY="0" imageWidth="96" imageHeight="96"/>
	</ItemType>

	<ItemType UNID="&itXenoSummon;"
			name=				"Beacon for Summoning Xenophobe Fighters"
			level=				"5"
			value=				"5000"
			mass=				"5"
			frequency=			"rare"
			modifiers=			"MinorItem"

			description=		"Invoke this beacon to get a Xenophobe Fighter to help you"
			firstPlural=		"true"
			>

		<Image imageID="&rsNavBeacon;" imageX="0" imageY="0" imageWidth="64" imageHeight="64"/>

		<Invoke key="X">
			(block (ship)
				; Create the ship
				(setq ship
					(sysCreateShip 
						&scXenophobeFighter;
						(objGetPos gSource)
						&svIndependent;))

				; Escort ship
				(shpOrderEscort ship gSource)

				; Identify the item
				(itmSetKnown gItem)

				; Welcome message
				(objSendMessage gSource Nil "Xenophobe Fighter online")

				; Remove the item from the player's list
				(objRemoveItem gSource gItem 1)
				)
		</Invoke>

	</ItemType>

	<ItemType UNID="&itXCloakerSolar;"
			name=				"cloaker solar array"
			level=				"3"
			value=				"650"
			mass=				"1000"
			frequency=			"rare"
			modifiers=			"MajorItem"

			description=		"Sun power"
			>

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

		<SolarDevice
				refuel=			"6000"
				/>

		</ItemType>


	<ItemType UNID="&itXCloakerArmor;"
			name=				"segment of stealth armor"
			level=				"6"
			value=				"3000"
			frequency=			"rare"
			numberAppearing=	"1d4"
			mass=				"4000"
			modifiers=			"Military; MinorItem"

			description=		"The special geometry and coatings of this armor provide a ship with a greatly reduced signature in most standard scanners."

			firstPlural=		"true"
			sortName=			"stealth armor, segment of"
			>

		<Image imageID="&rsItems1;" imageX="0" imageY="0" imageWidth="96" imageHeight="96"/>

		<Armor
				hitPoints=	"60"
				damageAdj=	" 3, 3, 18, 18, 30,30,30,30, 30,30,36,36, 60,60,90,90"
				repairTech=	"7"
				repairCost=	"10"
				installCost="400"

				composition="ceramic"
				stealth=	"100"
				disintegrationImmune="true"
				/>

	</ItemType>

	<ItemType UNID="&itXCloakerWeapon;"
			name=				"stealth cannon"
			level=				"9"
			value=				"190000"
			mass=				"2500"
			frequency=			"notrandom"
			modifiers=			"MajorItem; Military"

			description=		"The pinnacle in surprise attacks."
			>

		<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>

		<Weapon
				fireRate=			"15"
				powerUse=			"100"
				>

			<Missiles>
				<Missile ammoID="&itCloakerSphere;"
				type=				"missile"

				damage=				"dark acid:03F; disintegration3; WMD7"
				missileSpeed=		"40"
				accelerationFactor="125"
				maxMissileSpeed="60"
				maneuverability="3"
				lifetime=			"60"
				
				charges=			"true"

				sound=				"&snLaserCannon;"
				>
				<Effect>
					<Starburst
						spikeCount=		"1d6+2"
						spikeLength=	"4d20"
						primaryColor=	"0xff, 0xff, 0x80"
						secondaryColor=	"0xff, 0xff, 0x00"
						/>
				</Effect>
				</Missile>
			</Missiles>
		</Weapon>

	</ItemType>

	<ItemType UNID="&itCloakerSphere;"
			name=				"Cloaker shell"
			level=				"13"
			value=				"1000"
			mass=				"5"
			frequency=			"rare"
			numberAppearing=		"20d40"
			modifiers=			"Consumable; Missile; Alien"

			description=		"This receptacle contains the fierce energies that power the cloaker weapon."

			sortName=			"~.cloaker shell"
			>

		<Image imageID="&rsItems1;" imageX="288" imageY="192" imageWidth="96" imageHeight="96"/>
	</ItemType>


	<ItemType UNID="&itXCloakerVeil;"
			name=				"Cloaker veil"
			level=				"9"
			value=				"100000"
			mass=				"5000"
			frequency=			"rare"
			unknownType=		"&itUnknownAlienDevice;"
			modifiers=			"Alien; MajorItem; Military"

			description=		"This byzantine alien device generates a particle shield that absorbs most energy weapons."
			>

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

		<Shields
				hitPoints=		"100"
				absorbAdj=		"100,100,100,100, 100,100,100,100, 100,100,100,100, 100,100,100,100"
				damageAdj=		"  0,  0, 4, 4,  20, 20,48,48, 100,100,200,200, 200,200,200,200"
				regenTime=		"30"
				regenHP=		"8"
				depletionDelay=	"24"
				powerUse=		"2000"
				/>

		</ItemType>



	<ShipClass UNID="&scXCloaker;"
			manufacturer=		"Lost Industries"
			class=				"Stealth"
			type=				"fighter"
			score=				"105"
			techOrder=			"mech"
			
			mass=				"250"
			reactorPower=			"10000"
			fuelEfficiency=	"15"
			maxFuel=		"2500000"
			minFuelTech=	"3"
			maxFuelTech=	"13"

			cargoSpace=			"500"
			thrust=				"2000"
			maneuver=			"3"
			maxSpeed=			"30"

			maxArmor=			"20000"
			maxCargoSpace=		"2000"
			maxDevices=			"10"
			maxWeapons=			"4"
			
			leavesWreck=		"75"
			>

		<Armor>
			<ArmorSection start="315" span="90" armorID="&itXCloakerArmor;" areaSet="0,2" />
			<ArmorSection start="225" span="90" armorID="&itXCloakerArmor;" areaSet="3,4" />
			<ArmorSection start="45"  span="90" armorID="&itXCloakerArmor;" areaSet="7,13" />
			<ArmorSection start="135" span="90" armorID="&itXCloakerArmor;" areaSet="1,6" />
		</Armor>

		<Devices>
			<Device deviceID="&itXCloakerWeapon;" omnidirectional="true"/>
			<Device deviceID="&itXCloakerVeil;"/>
			<Device deviceID="&itXCloakerSolar;"/>
			<Device deviceID="&itStealthSpider;"/>
		</Devices>

		<Items>
			<Item count="5000" item="&itCloakerSphere;"/>
			<Item count="50" item="&itLongzhuSphere;"/>
			<Item count="10" item="&itGemOfDespair;"/>
			<Item count="100" item="&itWaterIce;"/>
			<Item count="1" item="&itStargateControlRod;"/>
			<Item count="1" item="&itEnhanceSRSROM;"/>
			<Item count="25" item="&itXenoSummon;"/>
		</Items>

		<Image imageID="&rsXCloaker;" imageX="0" imageY="0" imageWidth="92" imageHeight="92" imageFrameCount="0" imageTicksPerFrame="0"/>

		<DriveImages>
			<NozzleImage imageID="&rsDriveExhaust;" imageX="0" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
			<NozzlePos x="-60" y="-5"/>
			<Nozzlepos x="-55" y="0"/>
			<NozzlePos x="-60" y="5"/>
		</DriveImages>

		<AISettings
			fireRateAdj=		"120"
			fireAccuracy=		"85"
			perception=			"4"
			/>

		<PlayerSettings
			desc=				"This is a stealth fighter."
			initialClass=		"true">
			
		<ArmorDisplay>
			<ArmorSection name="forward" imageID="&rsEI100XArmor;" imageX="0" imageY="0" imageWidth="90" imageHeight="9" destX="23" destY="32" hpX="55" hpY="27" nameY="8" nameBreakWidth="360" nameDestX="12" nameDestY="0"/>
			<ArmorSection name="starboard" imageID="&rsEI100XArmor;" imageX="90" imageY="0" imageWidth="9" imageHeight="56" destX="104" destY="41" hpX="98" hpY="60" nameY="30" nameBreakWidth="275" nameDestX="0" nameDestY="8"/>
			<ArmorSection name="aft" imageID="&rsEI100XArmor;" imageX="99" imageY="0" imageWidth="90" imageHeight="9" destX="23" destY="97" hpX="55" hpY="97" nameY="74" nameBreakWidth="200" nameDestX="0" nameDestY="8"/>
			<ArmorSection name="port" imageID="&rsEI100XArmor;" imageX="189" imageY="0" imageWidth="9" imageHeight="56" destX="23" destY="41" hpX="12" hpY="60" nameY="52" nameBreakWidth="200" nameDestX="0" nameDestY="8"/>
		</ArmorDisplay>
		
		<ShieldDisplay>
			<Image imageID="&rsXCloakerShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/>
		</ShieldDisplay>
			
		<ReactorDisplay>
			<Image imageID="&rsZubrinReactor;" 
					imageX="0" imageY="0" imageWidth="256" imageHeight="60"/>
			
			<PowerLevelImage imageID="&rsZubrinReactor;"
					imageX="0" imageY="60" imageWidth="202" imageHeight="14"
					destX="54" destY="9"/>
			
			<FuelLevelImage imageID="&rsZubrinReactor;"
					imageX="0" imageY="74" imageWidth="194" imageHeight="14"
					destX="54" destY="37"/>
				
			<FuelLowLevelImage imageID="&rsZubrinReactor;"
					imageX="0" imageY="88" imageWidth="194" imageHeight="14"/>
					
			<ReactorText x="62" y="22" width="154" height="14"/>
			<PowerLevelText x="62" y="0" width="154" height="9"/>
			<FuelLevelText x="62" y="51" width="154" height="9"/>
		</ReactorDisplay>
			
		</PlayerSettings>

	</ShipClass>



<Image UNID="&rsXCloaker;" bitmap="cloakership.jpg" bitmask="cloakermask.bmp" backColor="0x00000000"/>
<Image UNID="&rsXCloakerShields;" bitmap="cloakershield.bmp" backColor="0x00000000"/>

</TranscendenceExtension>
[/code]
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

lostdude, I sent you email. Let me know if you received it.
Post Reply