Giter VIP home page Giter VIP logo

openra-fuel's Introduction

OpenRA Fuel Plugin

The OpenRA Fuel Plugin is a .dll that can be used by OpenRA mods to add support for fuel-consuming and refueling actors.

General Overview and Features

The plugin provides several new traits which interact in a number of ways. These traits are

  • Fueltank
  • FuelStorage
  • FuelBar
  • FuelGenerator
  • NeedsFuel
  • Refuelable
  • RefuelsUnits
  • RefuelsUnitsNear

The basic trait is the Fueltank and acts as the principal container that holds fuel. Fueltanks can:

  • hold a variable capacity of fuel per actor type
  • be configured to be either empty or completely full when an actor spawns
  • emit a condition when a low fuel threshold (also configurable) is reached, useful for warning players with conditional overlays.

FuelStorage is optional and can be used as a global, off-map fuel reserve, assigned to a Player actor. This requires adding the Fueltank trait to the Player actor.

FuelBar adds a graphical indicator of the fill level of an actor's Fueltank or the player's FuelStorage.

FuelGenerators generate a configurable amount of fuel in a configurable amount of time. They can be configured to deduct a configurable amount of funds for generated fuel. The generated fuel can be directed towards either the actor's Fueltank or the player's FuelStorage.

NeedsFuel is used by actors that consume fuel from their Fueltank by moving from one cell to the next. When the actor is out of fuel, a condition can be granted, allowing to disable the Mobile trait. Actors can be configured to consume fuel while stopped, and to be killed if they are out of fuel after a configurable amount of time. A possible use case for this might be to simulate starving infantry, or for airplanes falling out of the sky when their tanks run dry. Optionally, and enabled by default, the trait can extend the actor's tooltip to show the remaining and total range in cells.

The Refuelable trait has to be added to actors meant to receive fuel from other actors. Fuel can only be taken from actors of specific, configurable types.

The RefuelsUnits trait is used by buildings that serve as gas stations. The speed of fuel transfer can be configured, as well as the offset on the giving actor where the receiving actor needs to be position to receive fuel. Fuel can be taken from either the giving actor's own Fueltank or the player's FuelStorage.

The RefuelsUnitsNear trait is refuel units within a circular area around the giving actor. As with RefuelsUnits, the speed of transfer is configurable, as well as the range, which can be shown as a range circle. Additionally, it is configurable whether either the giving or receiving actors need to be stopped to give or receive fuel, respectively.

How to get started

You basically just need to copy the .dll into your mod directory and add it to the Assemblies: stanza of your mod.yaml file.

Assemblies:
  yourmod|OpenRA.Mods.Fuel.dll

Trait documentation

The trait documentation can be found in the wiki.

openra-fuel's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

axxxf

openra-fuel's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.