Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

RuneScript: Difference between revisions

From Lost City Wiki
No edit summary
No edit summary
Line 1: Line 1:
RuneScript's current iteration started with the announcement of RuneScape 2's development in 2002. RuneScape Classic had its own separate language known by the same name, but it was very different and not as capable.
RuneScript's current iteration started with the announcement of RuneScape 2's development in 2002. RuneScape Classic had its own separate language known by the same name, but it was very different and not as capable.


RuneScript was created to allow non-programmers to jump into creating quests and content with no prior experience. They lack some features - there are no for loops, no true arrays (you can forget they exist), and originally didn't even have a boolean type.
RuneScript was created to allow non-programmers to jump into creating quests and content with no prior experience. It lacks some features - there are no for loops, no true arrays (you can forget they exist), and originally didn't even have a boolean type or local variables.


=== Our Implementation ===
=== Our Implementation ===
Line 11: Line 11:
# We split strings on the pipe <code>|</code> character to continue text on newlines if we need a manual break to match screenshots.
# We split strings on the pipe <code>|</code> character to continue text on newlines if we need a manual break to match screenshots.
# Our content isn't written with any general purpose global variables, but they are supported.
# Our content isn't written with any general purpose global variables, but they are supported.
We would absolutely add and use every 2004 language behavior if we could get some questions answered.
We would absolutely add and use every 2004 language behavior if we could get more questions answered.
=== History ===
=== History ===



Revision as of 05:03, 17 March 2025

RuneScript's current iteration started with the announcement of RuneScape 2's development in 2002. RuneScape Classic had its own separate language known by the same name, but it was very different and not as capable.

RuneScript was created to allow non-programmers to jump into creating quests and content with no prior experience. It lacks some features - there are no for loops, no true arrays (you can forget they exist), and originally didn't even have a boolean type or local variables.

Our Implementation

Our RuneScript implementation deviates in a few ways. This is because we continued to learn history during the project's development.

  1. We support some language features that were introduced later: local variables, procs, booleans, structs, enums, dbtables, and debugprocs. Macros are not supported currently.
  2. Our pointer checking supports inversions: if (p_finduid(uid) = false) { return; } is valid code, and code following it will have the pointer set.
  3. We support local variable declarations at any scope. Traditionally the real game must have them at the top level.
  4. We split strings on the pipe | character to continue text on newlines if we need a manual break to match screenshots.
  5. Our content isn't written with any general purpose global variables, but they are supported.

We would absolutely add and use every 2004 language behavior if we could get more questions answered.

History

2004

(September) Weak queues get added with the introduction of Make-X.

Enums get added. Originally called mes - presumably because they were a quick way to do data-driven dialogue messages. They likely weren't fully featured until later if so

Varbits get added to optimize varp storage and reduce the manual bit math some developers were doing.

2005

Strong queues get added.

Region commands get added to create and manipulate instances.

The p_loaddelay command gets added.

2006

Procs get added by a FunOrb developer. Macros are replaced with procs, #multi dialogue was translated into @multi and ~p_choice was created as an alternate method for dialogue flow.

2009

Structs get added - Ash convinced Andrew it was better than creating objects and putting data on them.

Learn More

NPC Queues