Giter Site home page Giter Site logo

shenoyranjith / aoe2cm2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siegeengineers/aoe2cm2

0.0 1.0 0.0 8.89 MB

Captains Mode for Age of Empires II

Home Page: https://aoe2cm.net

HTML 0.97% CSS 8.49% TypeScript 90.45% Shell 0.04% Dockerfile 0.06%

aoe2cm2's Introduction

aoe2cm

Captains Mode for Age of Empires II

This is a recreation of the original aoe2cm by pip with additional features such as snipe turns and user generated presets.

Age of Empires II © Microsoft Corporation. Captains Mode for Age of Empires II was created under Microsoft's "Game Content Usage Rules" using assets from Age of Empires II, and it is not endorsed by or affiliated with Microsoft.

Setup

cp presets.json.template presets.json
cp alerts.json.template alerts.json
npm install
npm run build
npm run build-server
node build/server.js

Visit localhost:3000 then.

Presets

A preset defines the order and modes in which host and guest pick and ban civilisations.

A preset is simply a list of turns that is being processed turn by turn. The preset also has a name and defines the set of civilisations that can be picked, like AoC only or everything up to RotR.

A turn consists of an acting player (host, guest, or none for technical turns such as revealing hidden picks/bans) and an action.

The following actions are available:

User Actions

These actions are usually executed by the users (Host & Guest).

pick

select one of the civilisations for play

ban

prevent the opponent or both players (depending on modifiers) from picking the selected civilisation in a future turn

snipe

Ban one of the opponent's picks

Modifiers

Exclusivity

There are three values for Exclusivity: NONEXCLUSIVE, EXCLUSIVE, and GOBAL.

A GLOBAL ban means that neither player may pick the civilisation in the future,
an EXCLUSIVE ban means that the player cannot ban the civilisation again in the future,
a NONEXCLUSIVE ban means that the player can ban the civilisation again in the future, but that makes no sense honestly, so don't use that.

A GLOBAL pick means that neither player may pick the civilisation again in the future,
an EXCLUSIVE pick means that the player cannot pick the civilisation again in the future,
a NONEXCLUSIVE pick means that the player can pick the civilisation again in the future.

Hidden

A hidden pick or ban is not shown to the opponent or spectators until it is revealed by an admin REVEAL action.

Parallel

During a parallel turn, both players execute their respective action at the same time. The turn is over once both players have completed their respective action or have run out of time. To configure a parallel turn, create two turns and mark the first one as parallel.

Admin actions

These actions can only be executed by the server.

reveal picks

show all hidden picks to all players and spectators

reveal bans

show all hidden bans to all players and spectators; should be done after hidden bans before the next picks

reveal snipes

show all hidden snipes to all players and spectators

reveal all

reveal picks, bans, and snipes

Validations

Each action gets validated by the server before it is broadcasted. If one or more validations fail, an error is returned to the player and the action is not broadcasted.

Validations for all actions:

  • VLD_000: Draft is currently expecting actions
  • VLD_001: Acting user is supposed to act according to preset
  • VLD_002: Action is expected according to preset

Validations for PICKs:

  • VLD_100: Civilisation has not been banned globally before
  • VLD_101: Civilisation has not been banned before for same player
  • VLD_102: Civilisation has not been exclusively picked before by the same player
  • VLD_103: Civilisation has not been globally picked before by either player

Validations for BANs:

  • VLD_200: Civilisation has not been exclusively banned before by same player

Validations for SNIPEs:

  • VLD_300: Civilisation has been picked before by opponent
  • VLD_301: The opponent has a non-sniped pick of the civilisation

Messages

Sequence diagram of a session

aoe2cm2's People

Contributors

hszemi avatar shenoyranjith avatar goto-bus-stop avatar heavenlychorus avatar paulirish avatar t90watcher avatar

Watchers

James Cloos 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.