Quest Script readable by mere mortals?
Posted: Thu Sep 05, 2019 9:34 pm
So... making quests is hard, especially if you're new. Using N0B10Y03 as an example, I've mocked up a new scripting language that I think is a lot more readable and easier to design without mistakes, as it is closer to English syntax. Just a summary of what I did:
-Broke up the script into three separated parts: Definitions, Immediate Tasks, and Triggered Tasks
-Turned triggered tasks into if/then/& indented statements
-took out unnecessary abbreviations to be less cryptic for noobs (pc becomes Player)
-moved spawn intervals/quantities into definitions of enemy variables
-used ##d##h##m format for all duration
Task Objects
---------------------
Chance()
Enemy()
Item()
Message()
Person()
Place()
Affliction()
Player()
Reputation()
Time
Timer()
Object States (the "is" prefix is not required, but helps readability in "If" statements):
--------------------------
Chance can be isA, isB, isC, etc
Enemy can be isHit, isDead, isAlive or have #of in front of it to indicate quantity
Item can be isTaken or isDropped
Time can be is##:## for a time, is##:##to##:## for a timeframe, or is##:##or##:## for multiple periods of time
Timer can be isRunning, isStopped or isExpired
Person can be isClicked or isUnclicked
Player can be isHit, isInside, or isOutside
Actions
-----------
Calculate (Followed by Chance)
Create (Followed by Item)
Define (Followed by things that need preset before quest starts, can only appear under definitions)
Remove (Followed by Player Item or Player Affliction)
Drop (Followed by Player Item)
End (Followed by nothing, ends the quest)
Give (Followed by Player Item or Player Reputation or Player Affliction)
Hide (Followed by Person)
Log (Followed by Message)
Make (Followed by anything that has a changeable adjective status)
Reveal (followed by Place)
Say (Followed by Message)
Show (Followed by Person)
Spawn (followed by Enemy)
Start (Followed by Timer)
Stop (Followed by Timer)
Tag (followed by Item)
Unspawn (followed by Enemy)
Untag (followed by Item)
I'm sure I've made some oversights. I have no idea what the "create npc at mages guild" part does in the original, or the clearclick stuff, or the variables s.10 and s.13 that have no contents... thoughts?
edit: revising words
-Broke up the script into three separated parts: Definitions, Immediate Tasks, and Triggered Tasks
-Turned triggered tasks into if/then/& indented statements
-took out unnecessary abbreviations to be less cryptic for noobs (pc becomes Player)
-moved spawn intervals/quantities into definitions of enemy variables
-used ##d##h##m format for all duration
Task Objects
---------------------
Chance()
Enemy()
Item()
Message()
Person()
Place()
Affliction()
Player()
Reputation()
Time
Timer()
Object States (the "is" prefix is not required, but helps readability in "If" statements):
--------------------------
Chance can be isA, isB, isC, etc
Enemy can be isHit, isDead, isAlive or have #of in front of it to indicate quantity
Item can be isTaken or isDropped
Time can be is##:## for a time, is##:##to##:## for a timeframe, or is##:##or##:## for multiple periods of time
Timer can be isRunning, isStopped or isExpired
Person can be isClicked or isUnclicked
Player can be isHit, isInside, or isOutside
Actions
-----------
Calculate (Followed by Chance)
Create (Followed by Item)
Define (Followed by things that need preset before quest starts, can only appear under definitions)
Remove (Followed by Player Item or Player Affliction)
Drop (Followed by Player Item)
End (Followed by nothing, ends the quest)
Give (Followed by Player Item or Player Reputation or Player Affliction)
Hide (Followed by Person)
Log (Followed by Message)
Make (Followed by anything that has a changeable adjective status)
Reveal (followed by Place)
Say (Followed by Message)
Show (Followed by Person)
Spawn (followed by Enemy)
Start (Followed by Timer)
Stop (Followed by Timer)
Tag (followed by Item)
Unspawn (followed by Enemy)
Untag (followed by Item)
I'm sure I've made some oversights. I have no idea what the "create npc at mages guild" part does in the original, or the clearclick stuff, or the variables s.10 and s.13 that have no contents... thoughts?
edit: revising words