[Several Ideas] Binary ODF and Lua Interface

Post ideas and suggestions on new features or improvements here.
posted on February 11th, 2012, 8:23 pm
I got the inspiration for this idea from Roblox Studio.  Some may know where I am going with this idea.

Turn the ODF into a binary file that has the ship stats (including rankup, refits/configurations, and weapons) configured similar to that of an archive file.  Enable the users to make custom values and use Lua Scripts to give custom attributes to the units.  Doing this would mean an even greater Star Trek feel to the game and more flexibility on what you can do with one ship or station.

Examples:
Borg ships could be configured easily so that build time is hindered by uplink damage.  It could also be configured so that the uplink gains maximum hitpoints and maintains it's damage ratio during construction.  It's regeneration rate would also change with construction progress to move towards the rate of the finished vessel.  When the vessel is complete, if it already has 25% hitpoints left, it'll remain at 25% hitpoints until it has a chance to regenerate.  No more 1% uplink and 100% cubes!

The Klingon Field Yard could be configured to register as a single unit (right now, it registers as 4.  One of which is not selectable).  The build menu could list all ships in separate columns based on which module would build them and be able to view all three build queues by selecting a single unit.

Refitting ships would require only 2 ODF files (currently requires 4).  The ship's stats would move towards that of the refitted ship without actually changing ODF files.  Currently, a ship changes to an ODF file, which rapidly switches to another ODF file, which starts construction on the final vessel and then deletes the other 3 ODF instances (did I get that right?).

So, in effect, each ship, station, research, etc, other than the default values, would be completely customized for gameplay.
posted on February 11th, 2012, 8:39 pm
TChapman500 wrote:Turn the ODF into a binary file that has the ship stats (including rankup, refits/configurations, and weapons) configured similar to that of an archive file.  Enable the users to make custom values and use Lua Scripts to give custom attributes to the units.



Frankly, this archive with customizable definition values is actually right here: It's called FPQ.

If you missed it, read this news-post from last year.

Star Trek Armada II: Fleet Operations - File functions, Mods and the Patch Project
posted on February 11th, 2012, 8:59 pm
You missed my point.  I am fully aware of the FPQ files.  What I'm suggesting is to modify the structure of the ODF files themselves.  So that scripts can be added into the ODF files.  The scripts would do the work of ranking up ships so that you would not have to have one ODF per rank per configuration per refit like we have now.
posted on February 11th, 2012, 9:03 pm
TChapman500 wrote:You missed my point.  I am fully aware of the FPQ files.  What I'm suggesting is to modify the structure of the ODF files themselves.  So that scripts can be added into the ODF files.  The scripts would do the work of ranking up ships so that you would not have to have one ODF per rank per configuration per refit like we have now.


I pretty much can imagine the devs willing to move away from .odf's entirely when the time has come they transplanted FO in an own engine, however with A2's engine it'll be difficult to impossible to implement.
posted on February 11th, 2012, 11:21 pm
its not the odf files that make the game mechanics, its their representation in the engine. you can't just add lua script to the odf files to querry whatever information you like or do freaky stuff if the engine itself is not built for it. The odfs are just config files to fill in values in a sheet, they don't define the sheet. And due to the nature of Fleet Operations (being a relatively complex game), its not feasable performance vise to change much in the current behavior.

Parsing time of the ODFs could be improved by using a binary format, but we already dealt with these issues with the FPQ format.
posted on February 13th, 2012, 8:00 pm
Wasn't it mentioned last month that xml was also now being used and will be used by us?
posted on February 13th, 2012, 11:04 pm
That was for the techtree, not the ODF files.  And what I proposed here is something much more advanced than what we have now.  And probably will never be implemented.  But here is a sample of what I had in mind.

Example "ODF" (fed_venture.odf)
Code: Select all
OBJECT
  Name = "U.S.S. Venture"
  // Other standard ODF stuff!
  SHIELDGENERATOR
    Hardpoints = "hp01" "hp02" "hp03" "hp04" "hp05"
    Hitpoints = 21
    RepairTime = 1.25
    HitChance = 1.95
    CrewLoss = 0.05
    Active = true
  // Other subsystems!
  CUSTOMVARIABLE
    Name = "VesselType"
    VarClass = "String"
    Value = "Scout"
  CUSTOMVARIABLE
    Name = "VesselSize"
    VarClass = "String"
    Value = "Tiny"
  weapon1  // I'm not going to put in all the commands here!
    name = "PulsePhaser"
    displayName = "Pulse Phaser"
    Enabled = true
    classLabel = "cannonimp"
    shotDelay0 = 2.5
    hardpoints = "hp01"
    weapon1ordinance
      name = "PulseUnit"
      damageBase = 3
      CUSTOMSCRIPT  // Lua Interface
        if Ordinance.Target.VesselSize.Value == "Large" then
          Ordinance.damageBase = Ordinance.damageBase * 0.6
        end     
  weapon2
    classLabel = "cannonimp"
    name = "ProgressiveScan"
    displayName = "Progressive Scan"
    CUSTOMSCRIPT
      local Disabled = false  // Make sure the script doesn't fire twice!
       if Vessel.SpecialEnergy >= 35 and Disabled == false then
          Disabled = true
          Vessel.SpecialEnergy = Vessel.SpecialEnergy - 35
          Vessel.Engines.Enable = false
          Vessel.PulsePhaser.Enable = false
          Vessel.ScanRange = 600
          Wait(3)
          Vessel.ScanRange = 2000
          Wait(3)
          Vessel.ScanRange = 2500
          Wait(3)
          Vessel.PulsePhaser.Enable = true
          Vessel.Engines.Active = true
          Vessel.ScanRange = 1500
          Disabled = false
        end
posted on February 16th, 2012, 4:53 pm
Oh thats right my bad.
Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests