Creating New Fuel Rods?

A place to discuss mods in development and concepts for new mods.
Post Reply
matix
Militia Lieutenant
Militia Lieutenant
Posts: 198
Joined: Sun Apr 17, 2011 2:29 pm

I was thinking of creating a new series of reactors that are powered by something other than vanilla reactors. I looked through the .tdb and a few mods, but I havent found any examples of either making new kinds of fuel rods or having reactors use vanilla items as fuel. Any suggestions? :?
Matix's Revolutionary Repair Items! Get it here !
Stronger Centauri! Download it here
Matix's Weapon Pack!: Find it here!
Preview: Momentum Cannons! Get it here!

IRC (Love it! :D):
[10:54] * matix pokes Guest33555
[10:55] * matix thinks its dead....
[10:55] * Katami shoots Guest33555 in the foot
[10:55] <matix> O.o
[10:55] <Hatsya> don't worry, it's a water gun
User avatar
christian
Militia Lieutenant
Militia Lieutenant
Posts: 203
Joined: Sat Jul 09, 2011 11:16 pm
Location: Brazil - RS

You just have to specify the kind of fuel that it'll use, the attributes of the fuel that it must use.
User avatar
Androgeos
Commonwealth Pilot
Commonwealth Pilot
Posts: 79
Joined: Fri Jun 25, 2010 11:11 am
Location: Salvager Nomad
Contact:

Take a look at the Nova-25 reactor's fuelCriteria value in StdDevices.xml. It is set to "f L:1-3", which means it can be refueled using any object of Level I to III that has the "Fuel" attribute in it.

Now, take a look at the Helium3 Fuel Rod in StdFuel.xml, one of the fuel sources compatible with the Nova-25. Apart from having the "Fuel" attribute, it also has a data value of "2500". For items with the "Fuel" attribute, the data value is used to determine how much fuel each unit of that fuel source replenishes, so a Helium3 Fuel Rod replenishes 2500 units of fuel.

If you're thinking of using any vanilla item for fuel, I believe you'll find it quite troublesome, because you need to add the "Fuel" attribute and a data value to each item; this requires you to copy and paste the code of every single item in the game into a new XML file and make the adjustments there. Not too difficult, but very repetitive.

I will now quote the code of the Energy Unit in my Descendence mod, since it's a fuel source I made.
<ItemType UNID="&dentEnergy;"
name= "energy unit"
level= "3"
value= "1"
mass= "5"
frequency= "notrandom"

attributes= "CannotOrder; NotForSale; Consumable; Fuel"

data= "6000"

description= "Energy units are floating masses of indescribable power that give instant fuel boosts to starship reactors."
>

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

<Invoke key="K">
(block Nil
(shpRefuelFromItem gplayership (itmCreate &dentEnergy; 1))
(objRemoveItem gSource gItem 1)
(objSendMessage gSource Nil "Energy!")
(sysPlaySound &dentShSnd; gSource Nil)
)
</Invoke>
</ItemType>
This item is a fuel source due to the "Fuel" attribute and a data value of 6000, which means it recharges 6000 units of fuel. The invoke script at the bottom also makes it usable immediately from the Usable Items menu with the K key. However, it can also be used just like normal fuel (i.e. selecting it from the Ship Refuel screen). The advantage of refueling via the Usable Items menu is that it completely bypasses the current reactor's fuelCriteria; this means that even a Hyperion, which is incompatible with this fuel source on the Ship Refuel screen, can use it to replenish fuel through the Usable Items menu, albeit you would need to keep spamming U and K to refuel using multiple Energy Units.

I hope this helps somewhat.
Last edited by Androgeos on Mon Aug 20, 2012 6:23 pm, edited 2 times in total.
[10:42] <Katami> TTECH: IT SEYS "ONCE YOU ENTAR A EYSTEM HAHAHAHAAHH~~~!~~~!<3<3<3
[10:42] <Katami> ~ROLLL 1D100 L0LL0LL0LL0LHAHHAHHAH!~!!~~:-):-):-)
matix
Militia Lieutenant
Militia Lieutenant
Posts: 198
Joined: Sun Apr 17, 2011 2:29 pm

Thanks, that helped alot :mrgreen:
Matix's Revolutionary Repair Items! Get it here !
Stronger Centauri! Download it here
Matix's Weapon Pack!: Find it here!
Preview: Momentum Cannons! Get it here!

IRC (Love it! :D):
[10:54] * matix pokes Guest33555
[10:55] * matix thinks its dead....
[10:55] * Katami shoots Guest33555 in the foot
[10:55] <matix> O.o
[10:55] <Hatsya> don't worry, it's a water gun
User avatar
DangerousDude
Anarchist
Anarchist
Posts: 21
Joined: Thu Aug 30, 2012 7:09 pm

How about a Reactor that is powered by chucking in any matter? For example: Barrels, ROMs, Damaged Weapons, Working Weapons, Ammo, etc.

It could be called the "Salvager Reactor".

:lol:
I Blew Up The Charon Fortress!
I Beat The Slicer!
Cirevam
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Thu Jul 14, 2011 5:22 pm

You mean like the Mr. Fusion reactor from the Back to the Future series?
http://backtothefuture.wikia.com/wiki/Mr._Fusion

Considering how quickly the fusion reactors in T run out of clean, standardized fuel, I think running on trash would only work as an emergency feature and could even risk damaging the reactor depending on what's thrown in. At least we would finally have a use for Smartcannon rounds.
User avatar
DangerousDude
Anarchist
Anarchist
Posts: 21
Joined: Thu Aug 30, 2012 7:09 pm

Cirevam wrote:At least we would finally have a use for Smartcannon rounds.
That is my point! A use for massive amounts of Smartcannons rounds! Damaged weapons in systems with no tinkers! Or...just for when your extremely low on fuel.
I Blew Up The Charon Fortress!
I Beat The Slicer!
Post Reply