GithubHelp home page GithubHelp logo

maximdevoir / insurgency-map-callouts Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 246 KB

A tool that simplifies the many steps that go into devloping and deploying a map callout texture mod for the Steam Workshop.

Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=1776249479

License: Other

JavaScript 95.29% CSS 4.71%
steam-workshop mod game-mod insurgency

insurgency-map-callouts's Introduction

Map Callouts

Steam File Size Steam Views Steam Downloads Steam Subscriptions

A package that simplifies the many steps that go into creating a map overviews texture mod for the Steam Workshop.

View the released mod at the Workshop

Getting Started

Map Source Submodule

Run only once

Install the maps source submodule. Once you've cloned the repository, run:

git submodule update --init --recursive

Update submodule

git submodule update --remote

Installation

Note: Ensure you have all the prerequisites and have set your GAME_LOCATION environment variable.

To begin working on the maps, run:

npm install      # Will take several minutes

npm start        # Initializes your map overviews

That's it!

You can now edit any .json file from source/maps.

To view your saved changes, open the .svg file from source/external/maps in your web browser.

Building

When you are ready to generate a Steam Workshop VPK file, run the following commands:

npm start # Exit process after all maps have a built .svg file.

npm run build

The generated vpk file will be in your build folder.

Prerequisites

Before using the software, ensure you have all the prerequisite software on your system.

Windows

  • Contains Calibri font family.
  • Using Calibri in compiled builds requires Windows 10 Pro to comply with the font license (see font redistribution FAQs).

Web Browser

  • The most recent version of popular web browser.

Python 2.7+

  • Python, recommended >=3.7.0.
  • Rossen Georgiev's VPK package from PyPI.

Insurgency

Node

  • Node, LTS version >=10.15.1, < 11.0.0 or LTS/dubnium recommended.

Yarn (optional)

  • Yarn, while not required, is recommended if you decide to contribute to the software.

Running on Linux

Requires Wine.

Requires Wine to be linked as an interpreter. See https://unix.stackexchange.com/a/304152

Environment Variables

Environment variables are variables that are set the project's .env file.

GAME_LOCATION

The GAME_LOCATION variable is the folder of your Insurgency game. This variable is not automatically generated. However, during npm start, the software will detect if the folder appears to be correct.

Example of GAME_LOCATION:

GAME_LOCATION=C:\Program Files\Steam\steamapps\common\insurgency2

MOD_NAME

The MOD_NAME variable is the name of the mod. This variable may only contain characters that are legal in a Windows filename. Example, characters like *, /, and ? are illegal and the software will fail.

GITHUB_REPO

The GITHUB_REPO variable is the path pointing to the where the project's source code is hosted at.

VTF_CMD

The VTF_CMD variable is the path to your VTFCmd.exe file. This variable will be automatically generated, during npm start, if the path does not point to a valid point and you choose to download the VTFLib binaries.

BUILD_FOR_PRODUCTION

The BUILD_FOR_PRODUCTION variable tells the software if maps should be generated in production mode. When set to false, maps will have a development notice in the corners of each map. Additionally,callouts that are hidden, or callouts that would otherwise not be rendered in production mode, will be shown - usually in red.

This should only be set to true before you build the mod.

Adapting to Other Games

This software was built in mind with adapting it to other Source engine games be as easy as possible. For games that store their map overview textures in root/materials/overviews, such as Day of Infamy, less than 5 lines of code need to be changed. And with a little more tweaking, it can be adapted to other games as well.

Directory Structure

TODO: Add directory structure and information regarding directories.

Contributing

Thank you for your interest. Yes, contributions are welcome. Please read below to understand when and how to contribute.

Callouts are stored in .json files under source/maps.

Callouts for an Existing Map

To create a callout for a new map, add an object to the callouts array.

Annotated callout object:

{
  "classNames": ["callout", <fontSizeClass>, <anchorClass>, ...], # `callout` class is required. Each element is its own class. Order of class names is not important.
  "active_gamemodes": ["ALL", "ambush"],
  "exclude_gamemodes": [],
  "translate": "0 0", # Required
  "translate": "570 280", # Absolute coordinates of callout
  "styleString": "", # Manually input styles into callout. Not recommended.
  "rotate": "", # Required but may be left as empty string.
  "rotate": "25", # Rotation of callout, Leave as empty string for default rotation of `0`.
  "day_only": boolean, # Optional. Whether or not the callout should only be rendered for day time maps.
  "night_only": boolean, # Optional. Whether or not the callout should only be rendered for night time maps.
  "callout": { # A callout with the default language is required
    "en": [], # A lang-code and an array of strings
    "en": ["Example", "Callout"], # Lang code is `en` for English. Every element is its own line.
    "es": ["Texto de", "Ejemplo"],
  },
  "night": {
    "translate": "", # Optional
    "translate": "r20 r-50", # example using relative translation to the callouts regular translate value.
    "translate": "590 230", # example using absolute translate coordinates.
    "fontSizeClass": "<fontSizeClass>", # Optional. If set, will override the day time font size.
    "fontSizeClass": "medium-regular", # Value must be one of fontSizeClass
  }
}

fontSizeClass

The default font class is regular.

A font size class is any of

  • extra-small
  • small
  • regular
  • medium-regular
  • medium
  • large

anchorClass

The default anchor class is anchor-left.

An anchor class is any of

  • anchor-left
  • anchor-middle
  • anchor-right

Submitting Your Contribution

Before you submit your contribution, run yarn start (assuming you have Yarn from the prerequisites), and commit any changes.

Guidelines

Before contributing, read below to understand if your contribution aligns with the goals of the project.

Callout Guidelines

Callout contributions are welcomed provided that:

  • the callout is clean and friendly
  • the callout makes logical sense
  • the source code for the callout follows the standards in place
  • the callout is for the ambush game mode.
    • Question: Can I submit a callout for another game mode?
    • Answer: Yes. Provided that it does not overlap with a callout for the ambush game mode.

Logic

Before making big changes to the js files, or the logic in the software, please file a GitHub Issue describing the idea.

All js files should meet the standards set by .eslintrc.json.

Contributors

A special thanks to those who contributed to the development of this mod and the naming of callouts. These are the wonderful people who contributed:

Additional thanks to the VIP Gaming Community.

Copyright and Licensing

See LICENSE.

insurgency-map-callouts's People

Contributors

dependabot[bot] avatar maximdevoir avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

insurgency-map-callouts'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.