Giter Club home page Giter Club logo

cctimer's Introduction

CCTimer

A timer for CrossCode! It can also be used as an AutoSplitter for LiveSplit.

Installation

  1. Install CCLoader.
  2. Download and extract CCTimer.
  3. Put the timer directory in the assets/mods directory.
  4. To connect LiveSplit to CCTimer to LiveSplit add an AutoSplitter to your layout and set the script path to <CrossCode Root Directory>/assets/mods/timer/CrossCode.asl.

Configuration

The options for the autosplitter are located in the settings.json file.

Time

There are two methods of time tracking:

IGT

If the "time" entry is not set or has the value "time": "IGT" the game takes the actual ingame time and sends it to livesplit.

Example

{
    "time": "IGT"
}

State

The time can be tracked using the states of the game if "time": "state". If this method is used, the time is independent of the ingame time and continues even after restarts or different saves.

The possible values for the state filter ("filter") can are:

  • RUNNING
  • TELEPORT
  • LOADING
  • NEWGAME
  • RESET
  • LOADGAME
  • MENU
  • PAUSE
  • LEVELUP
  • QUICK
  • ONMAPMENU
  • QUESTSOLVED

These values can be either used inclusive or exclusive (or both)

Example

{
    "time": "state",
	"filter": {
		"include": [
			"RUNNING",
			"MENU",
			"LEVELUP",
			"QUICK",
			"ONMAPMENU",
			"QUESTSOLVED"
		],
		"exclude": []
    }
}

Splits

The splits that are automatically triggered are stored as an array in "splits". If the split contains "once": true it is only triggered once gamestart. Otherwise it is triggered on every frame the condition is valid. There are four types of splits:

Start

The "start" split is a special split that starts the timer when any map is loaded.

Example

{
	"splits": [{
		"type": "start"
	}]
}

Conditional start

The "start" split may include a condition that causes the run to start.

Example

{
	"splits": [{
		"type": "start",
		"on": {
			"type": "loadmap",
			"name": "rhombus-sqr.central-inner",
		}
	}]
}

Loadmap

"loadmap" checks if the map that is loaded is the same that is in "name".

Example

{
	"splits": [{
		"type": "loadmap",
		"name": "rookie-harbor.south"
	}]
}

Event triggered

"eventtriggered" checks if a var condition is valid. To see which var conditions are possible enable Print all events in the options menu.

Example

{
	"splits": [{
		"type": "eventtriggered",
		"name": "maps.cargoShip/cabins1.kitchenScene",
		"value": true
	}]
}

Damage

"damage" checks if an entity is damaged. HP ranges can be filtered using "above" and/or below.

Example

{
	"splits": [{
		"type": "damage",
		"name": "shredder-alpha",
		"below": 0
	}]
}

Level

"level" checks for the start of a level up animation for a particular level. Levels can be bounded with "above", "below", and/or "equal".

Example

{
	"splits": [{
		"type": "level",
		"equal": 15
	}]
}

Preset

"preset" checks if a specific preset was loaded (see CCPresetRevival). "name" will be checked against the "title" property of the loaded preset.

Example

image

{
	"splits": [{
		"type": "preset",
		"name": "Temple Mines"
	}]
}

Combined

The "combined" split is triggered if all "conditions" apply. Every condition is a split and can contain "once": true.

Example

{
	"splits": [{
		"type": "combined",
		"conditions": [{
			"type": "loadmap",
			"name": "rookie-harbor.south",
			"once": true
		}, {
			"type": "eventtriggered",
			"name": "maps.cargoShip/cabins1.kitchenScene",
			"value": true
		}]
	}]
}

Full example

{
	"time": "state",
	"filter": {
		"include": [
			"RUNNING",
			"TELEPORT",
			"LOADING",
			"NEWGAME",
			"RESET",
			"LOADGAME",
			"MENU",
			"PAUSE",
			"LEVELUP",
			"QUICK",
			"ONMAPMENU",
			"QUESTSOLVED"
		],
		"exclude": []
	},
	"splits": [{
		"type": "start"
	}, {
		"type": "loadmap",
		"name": "rookie-harbor.south",
		"once": true
	}, {
		"type": "eventtriggered",
		"name": "maps.cargoShip/cabins1.kitchenScene",
		"value": true,
		"once": true
	}, {
		"type": "damage",
		"name": "shredder-alpha",
		"below": 0
	}, {
		"type": "combined",
		"once": true,
		"conditions": [{
			"type": "loadmap",
			"name": "rookie-harbor.south",
			"once": true
		}, {
			"type": "eventtriggered",
			"name": "maps.cargoShip/cabins1.kitchenScene",
			"value": true,
			"once": true
		}]
	}]
}

(Optional) Multiple Autosplitters

If desired, several autosplitters can be simultaneously loaded and selected from. This feature is most useful in combination with CCPresetRevival.

Upon loading a preset or starting at New Game, the timer mod will begin waiting for the first "start" condition from one of the autosplitters to fire. Once this occurs, the autosplitter that fired will be used for splits.

Opening another preset or restarting at New Game will reset back to awaiting a "start" condition, allowing for several autosplitters to be used in the same game session.

Setup

  1. If not present, create an autosplitters directory within the timer mod folder (<CrossCode Root Directory>/assets/mods/timer/autosplitters/).
  2. Place your additional autosplitters in this directory. These should be formatted the same way settings.json is, but they can be named however you'd like as long as they end in .json.

Note: Time and State settings will be derived from the main settings.json autosplitter.

(Optional) Dependencies

A Reset Splits hotkey is also optionally included, which can be relevant in cases where you need a "start" condition to fire without relying on loading a preset or starting at New Game.

To make use of this, you'll need to install input-api.

cctimer's People

Contributors

20kdc avatar 2767mr avatar epicyoshimaster avatar krypciak avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.