Git Product home page Git Product logo

resultorienteditems's Introduction

ResultOrientedItems (ROI) is a mod for HBS's Battletech computer game. It was inspired by [ajkroeg's MoneyCanBuyLove][https://github.com/ajkroeg/MoneyCanBuyLove], and allows mod authors to associate items with effects, allowing items to have effects beyond sitting there passively in the player's inventory. The mod's homepage is https://github.com/BlueWinds/ResultOrientedItems, where you can always find the most up to date source code.

ROI does very little on its own - it is a dll designed to open up possibilities for other content creators to work with. It comes with a few sample items and events, but these are far from the only use.

ROI is distributed under the GNU General Public License v3.0 license. Special permission is granted to Battletech Advanced: 3062 and Roguetech to distribute this alongside Custom Bundle and other proprietary code. Please reach out to BlueWinds on github, or the BTA/RogueTech discords for more details.

Triggering ItemEvents

Whenever an item (UpgradeDef, JumpJetDef, WeaponDef, etc) would be added to the player's inventory, ROI checks to see if any itemEvents.Item matches. If one is found, the Requirements are checked, and if all are found to match, the the Results are applied.

If the ItemEvent's AllowInInventory is false, then the item disappears without even entering the player's possession. If true, they get it as normal.

That's it.

Additional options for Results

ROI also patches SetSimGameStat to give mod authors additional power. You can now use Reputation.Owner as a stat name, which will be converted to the current system owner before being applied. It respects a faction's DoesGainReputation, so Locals will still never gain or lose rep. For example:

"Stats": [
  {
    "typeString": "System.Int32",
    "name": "Reputation.Owner",
    "value": "15",
    "set": false
  }
],

will give the player +15 rep with the system owner (as long as they aren't the Locals).

Forcing shops and/or contracts to refresh

If an event result adds the company tag ROI_refresh_shops, the current starsystem's shops will refresh. If an event result adds the company tag ROI_refresh_contracts, the current starsytstem's contracts will refresh. Neither tag is actually added to the CompanyTags.

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.