Author Topic: Suggestion: Create Empty  (Read 929 times)

halfabandaid

  • Sentient
  • **
  • Posts: 56
  • Karma: +3/-0
    • View Profile
Suggestion: Create Empty
« on: August 11, 2012, 05:41:14 AM »
There really needs to be some sort of toggle or at least another type of fuel cell that will make it so that when it is constructed, it builds that fuel cell empty. I was trying to build some fuel barges(a.k.a. Miners that stare at the sun and then decide to shoot a beam into it) but came into the issue of not being able to make it because I couldn't fill it with fuel when contructing it.

MEANWHILE, if I build it with fuel already in it, then not only can I not store the fuel I am making, but it also will spend the next ten minutes trying to distrubute the 300K fuel that it built with. All in all, having only fuel cells that build full causes quite an issue in terms of building solar miners, as to build it it takes a ton of fuel, which you immediatly turn around and redistribute, thus compounding your issues, not resolving them. Sorry if this is gibberish, 6:40 A.M. and haven't slept.

seronis

  • Distracted
  • ***
  • Posts: 338
  • Karma: +25/-0
    • View Profile
    • Steam Profile Link
Re: Suggestion: Create Empty
« Reply #1 on: August 11, 2012, 09:59:07 AM »
If you'd like i can add this to my snippets thread. Its trivially easy to do and only edits a few files.
Any code/mods I post on this site should be considered Public Domain. Borrow it, steal it, shred it into little pieces to your hearts content. I dont require credit but I appreciate bug fixes and suggestions.

halfabandaid

  • Sentient
  • **
  • Posts: 56
  • Karma: +3/-0
    • View Profile
Re: Suggestion: Create Empty
« Reply #2 on: August 11, 2012, 07:08:24 PM »
Please do. It would make setting AI's and such so much easier to do. The other thing that you could just do is make a specialized fuel storage device just like how there is one for helium, metals, ore, etc, but on this one make it so that when it is built, it builds empty just like the others. What would also be cool is a emergency fuel cache, but that's partly unneeded with emergency generators not drawing fuel.

halfabandaid

  • Sentient
  • **
  • Posts: 56
  • Karma: +3/-0
    • View Profile
Re: Suggestion: Create Empty
« Reply #3 on: August 30, 2012, 10:50:28 AM »
You said that you were goign to add this to your snippet thread?

Where would this be?

seronis

  • Distracted
  • ***
  • Posts: 338
  • Karma: +25/-0
    • View Profile
    • Steam Profile Link
Re: Suggestion: Create Empty
« Reply #4 on: August 30, 2012, 08:58:17 PM »
Sorry i missed your response.

Inside the ga folder find storage.txt and scroll down to the section beginning with "System: FuelCell".  Immediately after that section add this (very similar) one:
Code: [Select]
System: FuelCellE
Name: Fuel Storage
Description: #SS_FUELCELL_DESC
Appearance: FuelCell
Explosion: fuel_cell_explode

Tags: Storage:Fuel, Storage
Tied To: ShipSystems 1

Available: Techs.ShipSystems.Level > 0
Level: Techs.ShipSystems.Level
Size: Scale
HPLevel: Techs.Materials.Level-1 As Level
Durability: GAME_SUBSYS_MULT * 80 * Size * pow(HEALTH_CURVE,HPLevel)
Mass: 15 * Size * max((1 - (0.01 * (floor((Techs.Metallurgy.Level / 3) + (Techs.ShipConstruction.Level / 3) + (Techs.Chemistry.Level / 3))))), 0.6)

vFuelStore: Size * 200 * (4 - decay(pow(LEVEL_GAIN_CURVE, Level), 25) - decay(pow(LEVEL_GAIN_CURVE, Level), 125) - decay(pow(LEVEL_GAIN_CURVE, Level), 625))

Costs: Metals[150 * Size * pow(SUBS_COST_CRV, Level)], Labr[5 * Size]
Complexity: 0.4

Tick Rate: 1

Provides: FuelStorageE with
Amount[vFuelStore]

Inside effects.txt find the section for  'FuelStorage' and below it add:
Code: [Select]
Name: FuelStorageE
Value: Amount

OnConstruct: AddMax(Amount, "Fuel")
OnDestruct: SubMax(Amount, "Fuel")


Keep in mind that this alternate tank is COMPLETELY empty for simplicity. If you dont have something else providing a bit of fuel you could cause your blueprint to spawn unable to create power and thus instantly die.
Any code/mods I post on this site should be considered Public Domain. Borrow it, steal it, shred it into little pieces to your hearts content. I dont require credit but I appreciate bug fixes and suggestions.

halfabandaid

  • Sentient
  • **
  • Posts: 56
  • Karma: +3/-0
    • View Profile
Re: Suggestion: Create Empty
« Reply #5 on: August 31, 2012, 04:12:58 PM »
Now a question about its usage.

Does its storage count towards the fetch fuel percentage in that it functions as a fuel cell, or does it function like a cargo bay in the sense that it will not draw fuel off of it even if that cell and that cell alone is full?

seronis

  • Distracted
  • ***
  • Posts: 338
  • Karma: +25/-0
    • View Profile
    • Steam Profile Link
Re: Suggestion: Create Empty
« Reply #6 on: September 01, 2012, 12:15:14 PM »
It just increases the ships max fuel storage wtihout filling it up for free during construction or requiring any fuel as a cost.
Any code/mods I post on this site should be considered Public Domain. Borrow it, steal it, shred it into little pieces to your hearts content. I dont require credit but I appreciate bug fixes and suggestions.

halfabandaid

  • Sentient
  • **
  • Posts: 56
  • Karma: +3/-0
    • View Profile
Re: Suggestion: Create Empty
« Reply #7 on: September 03, 2012, 05:49:31 PM »
Aight. Just needed to know which way I had to set up the AI Hierarchy. That helped.