Skip to content

janxious/BTMLColorLOSMod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTMLColorLOSMod

BattleTech Mod (using BTML and ModTek) that changes the color of indirect firing lines in battle to a different color from direct.

You've been in the situation where the lines are both red and you move and then realize you actually don't have an alpha strike. The orange-yellow line is indirect fire:

screen shot 2018-05-20 at 6 53 02 pm

The defaults for this mod setup the indirect line and the nearer target obstructed line to stand out. You can change settings as described below to make the lines very customized in appearance.

Features

  • Change the color of direct line of fire indicator drawn between the currently controlled mech and enemy targets
  • Change the color of indirect line of fire indicator drawn between the currently controlled mech and enemy targets
  • Change the color of the line of fire indicator for obstructed targets on the attacker and target sides of the obstruction
  • Add dashes to the line of fire indicator drawn between the currently controlled mech and enemy targets
  • Shift to different color settings with an easy button press

Download

Downloads can be found on Github and on Nexus.

Install

  • Install BTML and Modtek.
  • Put the BTMLColorLOSMod.dll and mod.json files into \BATTLETECH\Mods\BTMLColorLOSMod folder.
  • If you want to change the settings do so in the mod.json.
  • Start the game.

Settings

Line Settings

For each kind of line supported there is a key with its own settings in mod.json. Those keys are direct, indirect, obstructedAttackerSide, and obstructedTargetSide. They each have data structured like:

{
  "active": true,
  "colors": [
    [255,   0,   0, 255],
    [  0, 255,   0, 255],
    [  0,   0, 255, 255],
    [  0,   0,   0, 255]
  ],
  "dashed": false,
  "thickness": 1
},
Setting Type Description
active bool enable/disable changes to a particular type of line. if this is false the rest of the changes for a type of line will be ignored
dashed bool enabled/disable making a type of line dashed
thickness float change the size of a given line on-screen to be bigger or smaller. Vanilla game almost everything is 1.
colors float[][4] an array of RGBA color settings that can be used in-game to color the given line

The color variables below (float[4]) are RGBA colors. You can enter your colors as a number 0-255, or a float from 0 to 1. For example, pure red can be entered as [255, 0, 0, 255] (hex/web format) or [1, 0, 0, 1] (unity format). If you make the alpha channel 0, you will probably not have a line at all. You can use a color picker like the W3's or a color chart like websitetip's to find colors you like.

For unity-style numbers, you can use the color picker and then divide the individual values by 255 to get the decimal you need. For example hex color #66ff33 / rgb color rgb(102, 255, 51) can be entered directly as [102, 255, 51, 1] or converted from [102/255, 255/255, 51/255, 1], which works out to [0.4, 1, 0.2, 1].

You can read about why the color sets exist in the release where they were made: https://github.com/janxious/BTMLColorLOSMod/releases/tag/v0.6

Here's some sample colors so you can see what I mean by RGBA:

screen shot 2018-05-28 at 7 53 19 pm

Keybind Settings

Setting Type Description
nextColorKeyBinding json container for setting up the keybinding. description of sub-attributes in this table
nextColorKeyBinding:active `bool enable/disable the ability to key bind to switch colors and set up the default keybinding (defaults to active)
nextColorKeyBinding:keys string[] a series of keys you can press if this is active to switch to the next color set (defaults to shift+i)

General Settings

Setting Type Description
debug bool enabled/disable debug logging

More Screenshots

Side angle

screen shot 2018-05-20 at 10 57 16 pm

With the settings on cyan instead of orange

screen shot 2018-05-20 at 3 59 46 pm

Marvelous

screen shot 2018-05-20 at 10 29 41 pm

Dashes!

screen shot 2018-05-21 at 12 40 23 am

Obstructed Colors!

screen shot 2018-05-21 at 10 12 46 am

screen shot 2018-05-21 at 10 27 46 am

Special Thanks

HBS, @Mpstark, @Morphyum, @gponick

Maintainer Notes: New HBS Patch Instructions

  • pop open VS
  • grab the latest version of the assembly
  • copy the new version of the methods in original_src over the existing ones
  • see if anything important changed via git