Skip to content

Commit

Permalink
Update to Alpha9
Browse files Browse the repository at this point in the history
# New things
- Deterministic RNG
- New Desync Monitoring with Seeds
- Command `/playuntil <ticks>`

# Changes
- New networking module by Pancake
- New ticksync
- Changed the file extension from `.tas` to `.mctas`
- Merged Monitoring files (.mon) and TASfiles (.mctas).
- Added tick 0 to the TASfile when recording

# Fixes
- Fixed playing time failing to save
- Fixed "player moved to quickly" during a savestate
- Removed "catchup ticks" when the server is lagging
  • Loading branch information
ScribbleTAS authored May 2, 2023
2 parents 7b2ad79 + 2de188e commit dc5886e
Show file tree
Hide file tree
Showing 185 changed files with 4,417 additions and 2,762 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 8 for x64
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: 4.10.3
- name: Build TASmod with Gradle
run: gradle shadowJar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: TASmod-Dev-Build
path: build/libs
36 changes: 36 additions & 0 deletions .github/workflows/buildandupload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and Upload to Discord

on: [push]

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'MinecraftTAS/TASmod'
steps:
- uses: actions/[email protected]
- name: Set up JDK 8 for x64
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: 4.10.3
- name: Build TASmod with Gradle
run: gradle shadowJar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: TASmod-Dev-Build
path: build/libs
- name: Send file to discord channel
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/TASmod-*.jar
31 changes: 0 additions & 31 deletions .github/workflows/gradle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ build

# other
eclipse
run
run/
logs/
88 changes: 72 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# TASmod
Lets you record and play back tickperfect inputs.

A Tool-Assisted Speedrun-Mod for Minecraft 1.12.2.
Is able to capture inputs and play them back, by pretending to be a keyboard.

To reduce complexity, all aspects of RNG-Manipulation have been externalized to a repository called [KillTheRNG](https://github.com/MinecraftTAS/KillTheRNG). It is now available as an optional dependency and a [standalone mod](https://maven.mgnet.work/#/main/com/minecrafttas/killtherng-full)

This mod is currently only for Forge 1.12.2 and will update/downgrade once 1.12.2 works properly

## Credits
Author of the original mod: tr7zw
Main Author: Scribble
> **New:** There are plans now to switch to Legacy-fabric, for downgrading, see [#101](https://github.com/MinecraftTAS/TASmod/issues/101).
# Credits
Author of the original mod: [tr7zw](https://github.com/tr7zw/MC-TASmod)
Main Mod Author: Scribble

Contributions by: famous1622, Pancake

Expand All @@ -14,14 +19,65 @@ Tickrate 0 idea: [Cubitect](https://github.com/Cubitect/Cubitick)
Savestate idea: [bspkrs, MightyPork](https://github.com/bspkrs-mods/WorldStateCheckpoints), although implementation is totally different now

Special thanks: Darkmoon, The Minecraft TAS Community
## Commands
`/record` Starts to record your input, hit the same command again to stop recording
`/play` Starts to play back a the stored inputs
`/save <filename>` Saves stored inputs to a file
`/load <filename>` Load inputs from file
`/clearinputs` Delete all stored inputs, use this before starting a brand new recording. `/record` will resume the recording and not clear the inputs first.

## Development
To load mixins in eclipse use `--mixin mixins.tasmod.json --tweakClass org.spongepowered.asm.launch.MixinTweaker` in program arguments

You will also find a KillTheRNG.jar (not with -deobf at the end!) in the libs folder. Copy that into `run/mods` to trick Minecraft into loading a second mod.
# Features
## Playback
This mod can record and play back
- The entire keyboard, minus TASmod keybinds (see below).
- Gui-Screens like crafting, the pause menu and the main menu! (Except the keybinding screen)
- Any screen size and window size (No warranties here...)

### Commands
`/record` - Start a recording. This will record inputs to RAM. Closing the game will empty these inputs.
`/play` - Start to play back the stored inputs.
`/save <filename>` - Save stored inputs to a file.
`/load <filename>` - Load inputs from file.
`/clearinputs` - Delete all stored inputs, use this before starting a brand new recording.
`/record` - will resume the recording and not clear the inputs first.
`/playuntil <tickCount>` - Stops the next playback at the specified tick number, then switches to a recording. Run this command then start a playback via `/play`.

`/fullrecord, /fullplay` - Same as record/play however it will quit to the main menu first.
`/restartandplay <filename>` - Quits Minecraft completely. When restarting, the specified file will be loaded and played back, when the menu appears.
### Keybinds
<kbd>F10</kbd> - Stops either a playback or a recording.

## Savestate
### Commands
`/savestate` - Prints a full guide to the savestate command in chat.
### Keybinds
<kbd>J</kbd> - Make a new savestate.
<kbd>K</kbd> - Load the most recent savestate.

## Tickratechanger (Slowdown)
### Commands
`/tickrate <ticks/second>` - Changes the game speed. Default is 20, anthing below will slow the game down, anything above will speed it up.
### Keybinds
<kbd>F8</kbd> - Enter "Tickrate 0". The game is paused but you can still look around.
<kbd>F9</kbd> - While in tickrate 0, advance the tick by 1. By holding keyboardkeys, you can make inputs while tickadvancing.

## Multiplayer support
**Important:** This is **NOT** a clientside mod, a server side installation is required a.k.a This doesn't work on Hypixel, 2b2t etc. These servers will **NEVER** be supported.

Record TASes with friends! Needs operator permissions to run tasmod related commands.
/savestate can be used to manage savestates.

> **Note:** /fullrecord, /fullplay and /restartandplay are not guaranteed to work in multiplayer at this time.
## HUD
When ingame, hitting <kbd>F6</kbd> will show you options for customising your HUD, with monitoring options and more. Even more options are available when KillTheRNG is installed.

# Development
## Setup
1. Clone this repository and put it in your workspace directory (where you open eclipse or idea)
2. Import gradle project
- Use gradle version 4.10.3
- Use [JDK 8](https://adoptium.net/en/temurin/releases/?version=8)
3. Run gradle tasks `setupDecompWorkspace` then `eclipse`.
4. *Optional but recommended:* Run gradle task `downloadKTRNG` (in the "tasmod" category) to download KillTheRNG to the run/mods folder.

## Running
The task `eclipse` should've generated to launch configs: `TASmod_Client.launch` and `TASmod_Server.launch`. Select it, then click the run or debug button in your IDE.

> **Note:** Additional setup is required for the server to actually start, like changing the eula.txt and setting `online-mode` to false in server.properties.
## Building
Build the mod using the gradle task `build` (or alternatively `shadowJar`).
52 changes: 26 additions & 26 deletions TASFile_Dark_Npp_language.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<NotepadPlus>
<UserLang name="TASLang" ext=".tas" udlVersion="2.1">
<UserLang name="TASFile" ext="mctas" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="yes" Keywords8="yes" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Comments">00# 00// 00$ 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
Expand Down Expand Up @@ -35,30 +35,30 @@
<Keywords name="Delimiters">00[ 01 02] 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="008040" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="FF8080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="004080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="008040" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="FF8080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="004080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Loading

0 comments on commit dc5886e

Please sign in to comment.