Incomplete Clockwork Language Primer


AzureSkyCiel

 

Posted

Before continuing...
Mods if this break the NDA please remove ^.^
People who don't want spoilers this may or may not contain some. I hven't gone through and translated everything and thought of the implications of what they might be saying soooo... you've been warned.

For those of you that like figuring this kind of stuff out and don't have access to this discussion... Here is basically a a helping hand to those who want to understand the clockwork...

So... here are some samples that have been collected...

reS.CwK != !fiX; REs.cwK.FIx(prA) // posITIve evaNG3/_%$^^

ReS.CwK.TSk == DEf(reS.Bas)

If EnM.Atk(Res.BaS) Then ReS.CwK.TSk == DEf(reS.Bas) // DefEND ReSiStANCe.

CIT.TSK = Stop(ATK())

CWK.SEE[PPL.ATK()]; CWK.DEF(PRA)

PPL.ATK(CWK); CWK.TSK[DEF(CWK)] > CWK.TSK[CLN(PRA)]; CWK.TSK = DEF(CWK)

CIT[ESC(BAF)]; CWK.TSK = RTN.BAF(CIT)

If CWK.SEE[ATK(ADJ)] Then CWK.RSP(RCP)

CWK.SEE[PPL.ATK(CWK)]; CWK.DEF(PRA)

If RES.ATK(PRA) Then CWK.ATK(RES); If CWK.ATK(RES) Then RES = !ALV

CIT.PRA.TSK = RUN(); !SAF

PRA.BER.CWK.ENM == CBL.SYN; PRA.BER.CWK.WPN == PLS + FLM

If CWK.LOC == NTP Then CWK.ENM = RES + SYN + GHU && CWK.ALY = PPD; If

CWK.SEE.ENM Then CWK.ATK(ENM)

While PRA != CLN; CWK.TSK = CLN(PRA)

CWK.SEE[PPL.ATK(CWK)]; CWK.DEF(PRA)

CIT[ESC(BAF)]; CWK.TSK = RTN.BAF(CIT)

CIT.PRA.TSK = RUN(); !SAF

If RES != ALV Then PRA = SAF

If EMP.MCL.ALV == True Then PRA = SAF

While !CWK.SAF; CWK.TSK = DEF(CWK)

PRA == CLN; ?CWK.TSK == CLN(PRA)

If RES.ATK(PRA) Then CWK.ATK(RES); If CWK.ATK(RES) Then RES = !ALV

NTP.SAF && NTP.CLN == True

If CWK.SRV(ATM) && ATM.SRV(EMP.MCL) Then CWK.SRV(EMP.MCL)

PPL.ATK(CWK); CWK.TSK[DEF(CWK)] > CWK.TSK[CLN(PRA)]; CWK.TSK = DEF(CWK)

While !CWK.SAF; CWK.TSK = DEF(CWK)

TRF x PPL x 2 - CWK.TSK[CLN(PRA)] == PRA.CLN

If PPL.TRF(GRS) Then GRS != ALV (What's GRS?)

!ATK.CWK

CWK.FIX(PPL.ATK())

If CWK.SEE[ATK(ADJ)] Then CWK.RSP(RCP)

!RES.NTP == True; ?CWK.TSK = RCN(NTP) (Assuming RCN is Recon?)

If RES != ALV Then PRA = SAF

EMP.MCL > ALL.PRA

PRA.KEY = ATM; PRA.BER = NEU; If PRA.BER.CWK > ATM.CWK Then PRA.BER > PRA.KEY

While !COX.FIX; DEV.TSK = FIX.COX

Tina Macintyre's arc text from kyasubaru

CWK.TSK[Primary] = SEC.URE(RFT.TCH, ATM)

Probable translation: Clockwork.Task[Primary] is Secure(Rift.Tech, (for) Anti-Matter)

And upon "seeing" me:

CWK.TSK[Secondary] = (DEF(CWK), ATK(CWK.ENM))

Clockwork.Task[Secondary] is (both) Defend Clockwork, Attack Clockwork's Enemy.

[NPC] Free Radical: For CWK in ALL_CWK; CWK.FOE = INT[TGT.NEW()]; CWK.TSK = ATK(CWK.FOE)

Upon seeing me:
[NPC] Free Radical: ?DNG_LEV(TGT.NEW) > CON.RED; INT[CMB(TGT.CUR)]

While apparently engaged with a Primal Earth Carnie:
[NPC] Fallout: If CWK.SEE[CoL] == True CWK.ATK(CoL)

Upon seeing me:
[NPC] Fallout: TGT.CUR == $name; If TGT.CUR != CWK.ALY Then ATK[CUR.TGT] (using $name instead of my char's name in this post)

More Carnie confusion:
[NPC] Atomic Warfare: If TGT.CUR != CoL.ALY Then FOE = TGT.CUR; ATK(FOE)

Seeing me:
[NPC] Atomic Warfare: CWK.TSK[ATK($name)]

[NPC] Mega Snap: CWK.TSK = FIX(TMP_ACL); If STS(CUR.TSK) == FIN Then DEP.LOY(TMP_ACL)

Seeing me:
[NPC] Mega Snap: ++SYS.REQ; I_D(CUR_TGT) = FOE; For CWK in ALL_CWK(); ATK(FOE)

(In these cases, TMP_ACL is Temporal Accelerator.)

[NPC] Home Companion: ++SYS.REQ; SEC_RTY.BRE_ACH(PRA.BER) = True; For TGT in PER; FOE.LST.Append(TGT)

(I think the last two (Mega Snap and Home Companion) are Neuron's clockwork, whereas the ones before were Anti-Matter Clockwork. Hence the slight differences in structure.)

(Definitely Neuron Clockwork.)
[NPC] City Companion: ++SYS.REQ; SEC_RTY.BRE_ACH(PRA.BER) = True; For TGT in PER; FOE.LST.Append(TGT)
[NPC] 9 Volt: SEC_RTY.LVL++; SEC_RTY.STS = CDE(RED)

Upon seeing me:
[NPC] 9 Volt: CWK.TSK = DEF(PRA.BER); CWK.TSK[Secondary] = None

(Anti-Matter Clockwork)
[NPC] Dismantler: If TGT.TSK != GIV(CDE.SEC[WAR.WAL]) Then CWK.ATK(TGT)

Seeing me:
[NPC] Dismantler: If CWK.TGT != (LYL.CTZ or CWK[ATM]) Then ATK(TGT)

(City Companion is Neuron CWK, Scrub Bot is Anti-Matter CWK)
[NPC] City Companion: CWK.TSK = TSK(PRA.BER)
[NPC] Scrub Bot: For TGT in PER; For CWK in ALL_CWK(); ATK(TGT)

Seeing me:
[NPC] City Companion: ++SYS.REQ; CMB.GET_LOC(FOE) = LOC.TGT.CUR; ATK(TGT.CUR)
[NPC] Scrub Bot: ALL_CWK.TSK[Primary] = ATK($name); ALL_CWK.TSK[Secondary] = None


This looks as though it's based on Python type OO language or pseudo code....

Objects:
PPL = People
CWK = Clockwork
PRA = Praetor or Praetoria
RES = Resistence
CIT = Citizen
BAF = Behavioral Adjustment Facility
UGR = UnderGround
EMP = Emperor
MCL = Marcus Cole
SYN = Syndicate
ENM = Enemy
GHU = Ghoul
ATM = Anti-Matter
BER = Berry
NTP = Neutropolis
ALY = Ally
PPD = Praetorian Police Department
KEY = Keyes

Global Variables:
ALV = Alive
SAF = Safe
RCP = Reciprocal
ADJ = Adjacent
ALL = All
RCN = Recon

Local Variables:
CWK.SEE = What the Clockwork sees.
CWK.TSK = The task or operation the the clockwork is doing.
CWK.LOC = Location of the Clockwork.
CWK.SRV = Serve.
CWK.WPN = Weapon

Methods/Functions:
Stop() = Stop
ATK() = Attack
DEF() = Defend
CLN() = Clean
RSP() = Response
ESC() = Escape
RTN = Return

unknowns...


given up on sorting a bit so here's some more... known translations
SEC.URE = Secure
RFT.TCH = Rift Tech
ALL_CWK = All Clockwork
FOE = foe
TGT = Target
NEW = New
DNG_LEV = Danger Level
CON = Condition
RED = Red
SYS = System
REQ = Required
DEP.LOY = Deploy
SEC_RTY = Security
BRE_ACH = Breach
LST = List
LVL = Level
CDE = Code
LYL = Loyal
CTZ = Citizen
GET_LOC = Get Location
FIN = Finish
Primary = Primary (used in reference to Task)
Secondary = Secondary (used in reference to Task)
PLS = Plasma
FLM = Flame
TRF = Traffic
GRS = Grass
TMP_ACL = Temporal Accelerator
PER = Perception (Or Perception Radius.)
STS = Status
CoL = Carnival of Light
CUR = Current
CMB = CoMBat
INT[] = INserT
WLD = WeLD
MTL = MeTaL

[NPC] Cleaner: Run SYS.RST...
[NPC] Cleaner: SYS.EXE = SYS.NOM.

SYS.RST is a file and can be translated to System Restore.
SYS.EXE is the system file or OS (SYStem EXEcutable).
SYS.NOM is likely translated to System Normal.

SYS.EXE = SYS.NOM.
Likely translates to system is normal.

A little code
If <test> Then <statement>
// = denotes that the ext after it is a comment.
Append() = means add to the end of a list
++<var> = add 1 before the following process to the var.
<var>++ = add 1 after the following process to the var.
< = less than
> = greater than
== = compare var on the left to what's on the right
= = set var on the left to what's on the right
; = end statement
. = a dot operator it generally is used to access sub-variable and functions. Think of it as a way to access someone via their lineage. ie. Dad's mother, Dad's wife, etc...
! = Not


 

Posted

Hey, awesome! Nice work.


Click here to find all the All Things Art Threads!
Quote:
Originally Posted by Samuel_Tow View Post
City of Heroes is a game about freedom of expression and variety of experiences far more so than it is about representing any one theme, topic or genre.

 

Posted

And to think I used to have trouble understanding Rikti... these guys, though... =o_O=


Dungeoncleaners! (ID#125715): Slay the Adventurers! Rescue the Monsters! Return the Treasure!
Peppermint Cat-- Lv50 Mewtant Ice/Eng Bls

 

Posted

Quote:
Originally Posted by Durakken View Post
While !COX.FIX; DEV.TSK = FIX.COX
This is awesome.


Having Vengeance and Fallout slotted for recharge means never having to say you're sorry.

 

Posted

Quote:
Mods if this break the NDA please remove ^.^
Er.... can't break something that doesn't currently exist. Just sayin'.

(Also, I don't tend to have much trouble figuring out what they're saying, though it helps to see them in context.I do like that they worked out the dialog for them.)


 

Posted

I'd like to know if this code's implementation has any correlation to Westley's theory of the Und3rn3t.

That being said, I love it. Love it love it love it.


 

Posted

I saw a "NOP" in Nova Praetoria, though I don't have the quote handy.

It may be referring to "Nova Praetoria" in and of itself.

If not, then it's a bytecode instruction, short for "no operation." It's basically a way to make the processor do nothing for a given number of cycles. Back in the olden days, this was handy for timing code, but you don't see it as much anymore.


 

Posted

Quote:
Originally Posted by Durakken View Post
SYS.NOM is likely translated to System Normal.
I should think a more likely translation would be "System Nominal." I.E. nothing to report.

Quote:
Originally Posted by GuyPerfect View Post
I saw a "NOP" in Nova Praetoria, though I don't have the quote handy.

It may be referring to "Nova Praetoria" in and of itself.

If not, then it's a bytecode instruction, short for "no operation." It's basically a way to make the processor do nothing for a given number of cycles. Back in the olden days, this was handy for timing code, but you don't see it as much anymore.
I seem to recall putting code like that in a program I wrote in BASIC to ostensibly slow down the speed of a loop that was executing. No idea what it actually was, it may have simply been extraneous operations.



 

Posted

Quote:
Originally Posted by Marcian Tobay View Post
I love it. Love it love it love it.
If you love this, you might just love the slang used by the Crusader faction of the Resistance too


@Golden Girl

City of Heroes comics and artwork

 

Posted

Quote:
Originally Posted by GuyPerfect View Post
[NOP] is a bytecode instruction, short for "no operation." It's basically a way to make the processor do nothing for a given number of cycles. Back in the olden days, this was handy for timing code, but you don't see it as much anymore.
Quote:
Originally Posted by Thirty-Seven View Post
I seem to recall putting code like that in a program I wrote in BASIC to ostensibly slow down the speed of a loop that was executing. No idea what it actually was, it may have simply been extraneous operations.
/inane chatter about an arcane topic

Way back in the day, I took a class on assembly language programming for RISC processors. The thing that blew just about everyone's mind is that the CPU would load in multiple instructions to optimize execution speed. The thing is, though, that if you load in a branch operation followed by something else, that something else would have essentially been loaded for nothing.

As a result, some clever engineer came up with the concept of a branch delay slot. The principle says that the op code following a branch or jump would always execute, regardless of whether or not the branch or jump was taken. Typically you would use the instruction after a branch or jump to do something like increment a counter, being mindful of the fact that the branch would test the pre-execution value, not the value after the op code in the branch delay slot was executed.

Sometimes, you just plain couldn't do it. No matter how hard you tried (and I did try hard), how clever you thought you were (and I am clever), there was simply no op code you could put into the branch delay slot that was safe to execute. When you wound up in this situation, the NOP op code was what you ended up using. Normally, you'd avoid using it because hey, that's one CPU cycle wasted for nothing, but in a pinch, it was a lot better than just putting a dummy statement.

/more inane chatter about another arcane topic

Back in the heyday of the Commodore 64, I used to do some assembly language programming on the 6510 processor that come in it. I was a kid at the time, though, which meant that I was poor as dirt. It took me a year of scraping enough money together to buy the thing, and it was only $300 or so by the time I got one. As a result, I couldn't afford to go out and buy the machine language monitor with all of the fancy features like labels and such. No siree, I had to make do with a really, really basic MLM that I found in the back of a machine language programming book that I typed in using lots and lots of DATA statements with some READs and POKEs.

Anyway, I frequently found myself in the position of needing to add or modify some code. Unfortunately, I didn't have any memory-moving tools, and all of my machine language programs were literally programmed at literal addresses. If I wanted to branch ahead, I had to calculate the number of bytes the branch would skip and use that as the op code parameter. On many occasions, I would just guess. "I think it will be around 50 bytes, I'll add some padding and make it 0x40." Invariably, I'd find that it was off by a bit, it was only 48 bytes or so. I'd use NOPs to fill the space in between, just in case I needed to add any code. (Because otherwise, I'd have to retype the whole damn thing from that point forward or add a strategic JMP to get me in some free space in memory and a JMP to get back.)

Love 'em, hate 'em, or just don't care 'em, those are my NOP stories.


We've been saving Paragon City for eight and a half years. It's time to do it one more time.
(If you love this game as much as I do, please read that post.)

 

Posted

TonyV,

I laugh at your computer problems... The Clockwork shall make jokes about you as well.


 

Posted

Awesome I was just plundering my own log files to work on something like this. *points at avatar and sig* For Obvious reasons and now I don't have to. If I find anything you missed I'll post but it looks vary complete.


 

Posted

I saw this while running around in Nova the other day:

Quote:
CWK.SEE[GRS.CLR == GRN; SKY.CLR == BLU]; CWK.TSK = PPL.BBQ


 

Posted

Can we get a Sticky on this thread, please?

-Rachel-


 

Posted

First off it's so cool you put all that together.

Second is this saved anywhere else on the internet? When I saw this thread wasn't stickied I stating getting worried it getting purged someday.

I got alot of use out of your work. If you have the time to look at the way I incorporated the Clockwork Code into my script and let me know if you think the Clockwork Code could be used better I'd appreciate it.

Thank you

Can our new mod overlord please sticky this thread.

I'm voting it goes in the AE section.


 

Posted

That looks nothing at all like Python. It looks vaguely like pseudo-C++ or pseudo-Java. Given the context and the MMO background, I'd guess C++.