Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChetdeJong authored Mar 5, 2024
2 parents 800b1fe + 0cdecdf commit 2a53c0b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
20 changes: 10 additions & 10 deletions AE-Killfeed-Script/CS2-KIllfeed-v2-script.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = '2.2.0';
const version = '2.3.0';

const weapons = [
'glock',
Expand Down Expand Up @@ -116,7 +116,7 @@ function setDeathnotice(comp: CompItem, row: row) {
}

function resetDeathnotices(comp: CompItem) {
for (let i = 1; i < 6; i++) {
for (let i = 1; i < 11; i++) {
const layer = comp.layer(i.toString());
layer.enabled = false;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ function mainEntry() {
resetDeathnotices(comp);
continue;
}
if (Number(row[0]) < 1 || Number(row[0]) > 5) continue;
if (Number(row[0]) < 1 || Number(row[0]) > 10) continue;
const isEmpty = [];
for (let j = 1; j < row.length - 1; j++) {
if (!row[j] || row[j] === '' || row[j] === undefined) isEmpty.push(j);
Expand Down Expand Up @@ -254,7 +254,7 @@ function mainEntry() {
`${error.description}\n` +
`${error.toString()}\n` +
error.toSource(),
'Uncaught error in Render function\nCheck log.txt'
'Uncaught error in Render function\nCheck log.txt which is located next to project file.'
);
} else {
alert(error);
Expand Down Expand Up @@ -572,7 +572,7 @@ function mainEntry() {
`${error.description}\n` +
`${error.toString()}\n` +
error.toSource(),
'Uncaught error in Cuts function\nCheck log.txt'
'Uncaught error in Cuts function\nCheck log.txt which is located next to project file'
);
} else {
alert(error);
Expand Down Expand Up @@ -693,16 +693,16 @@ function mainEntry() {
continue;
}

if (Number(row[0]) < 1 || Number(row[0]) > 5) {
skippedLines.push('Row is out of range 1 to 5\n' + row.join(', '));
if (Number(row[0]) < 1 || Number(row[0]) > 10) {
skippedLines.push('Row is out of range 1 to 10\n' + row.join(', '));
continue;
}

const localindex = row[0];
let isFound = false;
for (let j = 0; j < files.length; j++) {
const filename = (files as FootageItem[])[j].name.split('.')[0];
const fragindex = filename.substr(filename.length - 1, 1);
const fragindex = filename.split('_').pop();
const fragnum = filename.split('_')[0];

if (fragnum === localfragnum && fragindex === localindex) {
Expand Down Expand Up @@ -798,7 +798,7 @@ function mainEntry() {
`${error.description}\n` +
`${error.toString()}\n` +
error.toSource(),
'Uncaught error in Place function\nCheck log.txt'
'Uncaught error in Place function\nCheck log.txt which is located next to project file.'
);
} else {
alert(error);
Expand All @@ -815,7 +815,7 @@ function mainEntry() {
`${error.description}\n` +
`${error.toString()}\n` +
error.toSource(),
'Uncaught error in Main function\nCheck log.txt'
'Uncaught error in Main function\nCheck log.txt which is located next to project file.'
);
} else {
alert(error);
Expand Down
Binary file modified AE-Killfeed-Script/CS2-KIllfeed-v2.aep
Binary file not shown.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ Check video tutorial to understand how it works and why you may or may not need

Video tutorial: https://youtu.be/oeZ95yg7vN4

If you want to use only After Effects template, here's how:
https://youtu.be/rHzbCbOgMj8

1. Check `allow scripts to write files` in `edit > preferences > scripting & expressions`, otherwise script won't work.

2. Import `CS2-KIllfeed-v2.aep` into project.
Expand All @@ -101,7 +104,7 @@ Video tutorial: https://youtu.be/oeZ95yg7vN4

4. Copy spreadsheet https://docs.google.com/spreadsheets/d/1BZdVUo386uld1ZBmGNzcN43C-Auky3VDCb6OVf8olA4/copy and fill out using provided example in there.

Important part to have `GROUP` indexes not duplicated and kills indexes as `1,2,3,4,5`. Then you have to validate weapons names. Take the cell from `Helper` sheet. You can either copy cell itself or copy it's validation thing. If you copy cell and start typing it will give you hints. If something doesnt work, then make sure you have United States locale selected in settings.
Important part to have `GROUP` indexes not duplicated and kills indexes as `1,2,3,4,5,6,7,8,9,10`. Then you have to validate weapons names. Take the cell from `Helper` sheet. You can either copy cell itself or copy it's validation thing. If you copy cell and start typing it will give you hints. If something doesnt work, then make sure you have United States locale selected in settings.

5. Export as csv and name as `killfeed` and `cuts` accordingly.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cs2-killfeed-thing",
"version": "0.2.0",
"version": "0.3.0",
"description": "Parse demos for frags and get formatted output for killfeed template",
"scripts": {
"start": "tsc & node ./dist/main.js",
Expand Down

0 comments on commit 2a53c0b

Please sign in to comment.