3 ms·
> also contains the original versions of byacc and flex used for COG script parsing. Interesting. As far as I can tell, the actual cog scripts aren't in the re
by e12e 2y ago
> also contains the original versions of byacc and flex used for COG script parsing.
Interesting. As far as I can tell, the actual cog scripts aren't in the repo? I assume they need to be extracted from a copy of the game?
Would be nice to see an example of what the cog script language looks like if anyone has a link?
- cogman10 2y agoI wrote a bunch of cog scripts (hence my username) it was one of the first programming languages I learned :) It's been a while since I wrote it, but it looked pretty close to a simple C programming language. It was effectively bound events with predefined global methods you could call So you might see something like damage: setHealth(player, 100); while (getHealth(player) > 100) { setTint(getHealth(player) * 90, 0, 0); } return; Something like that (I may be forgetting some of the syntax, been a few years). The file structure was important. You'd have a `force_push.cog` which the game engine knew to link up all force push events into. A lot of these were ran locally, which as you can imagine, was a big issue when it came to cheating. There was a rudimentary checksum system in JK that would run against the cog files to verify two players hooking up together had the same version. That was easily hacked as the check ran client side. You could have events that you called and I believe labels you could jump to. That's how people created more advanced interactions. Up to and including new AI systems written purely in cog syntax.
- unaut 2y ago[dead]