From 5d31f1e93d17495dac308a24e3904b0ea6c56b1c Mon Sep 17 00:00:00 2001 From: johannes Date: Thu, 15 Feb 2024 01:40:24 +0100 Subject: added README --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..83a5215 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# demo-edit + +![Screenshot](preview/banner.png) + +## about + +Change names, skins, maps and more of a teeworlds demo file. + +demo-edit is tested with demos of version 5 and 6 (ddnet), but theoreticly supports version 3 and 4 aswell. Only supports teeworlds 0.6 network protocol. + +## compile + +```sh +git clone https://github.com/johannesHHM/demo-edit +cd demo-edit +make +``` + +## run + +```sh +./build/dedit --help +``` + +## examples + +Under are a couple of examples that should run without issue after compiling. + +Prints info of 'clip.demo'. Info consists of demo header and chunk counts. +```sh +./build/dedit testdata/clip.demo --info +``` + +Rename player with clientid 3 to 'holymadtee', change map to 'ice.map' and save the output to 'out.demo'. +```sh +./build/dedit testdata/clip.demo --rename 3 holymadtee --map testdata/ice.map --output out.demo +``` + +Set the skin of player with name 'New Hero' to 'bomb', rename 'New Hero' to 'Bob-omb', change map to 'jungle.map' and save the output to 'out.demo'. +```sh +./build/dedit testdata/clip.demo -s "New Hero" bomb -r "New Hero" Bob-omb -m testdata/jungle.map -o out.demo +``` + +Tip: 'out.demo' can be quickly viewed by running +```sh +DDNet out.demo +``` + +## help + +``` +Usage: dedit [OPTIONS] + +Argument: + Sets input demo + +Options: + -r, --rename Renames player with id to name + -s, --skin Set skin of player with id to skin + -m, --map Changes the map of demo to map + -e, --extract-map Saves the map of demo to file + -o, --output Saves the output demo to file + -i, --info Prints info of demo + -I, --extended-info Prints extended info of demo + -h, --help Prints this help info +``` + +## credits + +Some functions/implementations are heavily inspired by other sources. They are commented in the code with links to their referances. Under are some credits: + +- [libtw2](https://github.com/heinrich5991/libtw2): variable length int implementation, demo/snapshot documentation +- [teeworlds](https://github.com/teeworlds/teeworlds): huffman implementation +- [ddnet](https://github.com/ddnet/ddnet): some demo writing specifics + + -- cgit v1.2.3