Aurora Toolset: Add Lever, ScriptEaseTool ScriptEase: A Pattern

5
ScriptEase: A Pattern-based Approach for Scripting Maria Cutumisu CMPUT 250 September 20, 2007 ScriptEase Patterns ! Patterns are recurrent themes in stories ! They are re-usable and independent of a particular story ! Each pattern has options (a specific lever, a specific door) ! Authors only choose patterns and pick the desired options relevant to the particular story – no programming ! ScriptEase generates the code automatically from patterns 3 ScriptEase Tool ! External tool used with the Aurora Toolset ! ScriptEase automatically generates scripts for Neverwinter Nights " It uses patterns to automatically script commonly occurring scenarios (e.g., I need to pull this lever to open this door) " Other examples? Aurora Toolset: Add Lever, Door

Transcript of Aurora Toolset: Add Lever, ScriptEaseTool ScriptEase: A Pattern

ScriptEase: A Pattern-based

Approach for Scripting

Maria CutumisuCMPUT 250

September 20, 2007

ScriptEase Patterns! Patterns are recurrent themes in stories

! They are re-usable and independent of a particularstory

! Each pattern has options (a specific lever, a specificdoor)

! Authors only choose patterns and pick the desiredoptions relevant to the particular story – noprogramming

! ScriptEase generates the code automatically frompatterns

3

ScriptEase Tool

! External tool used with the AuroraToolset

! ScriptEase automatically generatesscripts for Neverwinter Nights

" It uses patterns to automatically scriptcommonly occurring scenarios (e.g., Ineed to pull this lever to open this door)

" Other examples?

Aurora Toolset: Add Lever,

Door

Aurora

ToolsetCreate Module

Neverwinter

NightsPlay Module

NWN Technology

Toolset (IDE)Scripting Language

Game

ScriptEase

Aurora

ToolsetCreate Module

Neverwinter

NightsPlay Module

NWN and ScriptEase

UofA ScriptEase

BioWare NWScript

BioWare Aurora Engine

NWN and ScriptEase

ScriptEase generates NWScript code automatically from patterns. 8

ScriptEase Goal

! Generate scripting code withoutwriting any code

! Easy enough for non-programmers touse

! Flexible enough to script somecomplicated scenarios

9

When to use ScriptEase?

! You have very little experienceprogramming (e.g., game designer)

! You need to script a simple,commonly occurring scenario

! Prototyping

! Can use to complete 90% of a realgame’s scripts

Encounter

Dialog

Plot

Behaviour

Types of Patterns in ScriptEase

OnSpawn

OnUserDefined

OnDeath

OnPerception

OnRested

OnSpellCastAt

OnCombatRoundEndOnPhysicalAttacked

OnHeartbeat

OnBlocked

OnDamaged

OnConversation

OnDisturbed

Event Loop for CreaturesEvent Loop

Creature dies!

Every 6 seconds!

OnSpawn

OnUserDefined

OnDeath

OnHeartbeat

OnRested

OnSpellCastAt

OnCombatRoundEndOnPhysicalAttacked

OnPerception

OnBlocked

OnDamaged

OnConversation

OnDisturbed

Execution Flow

OnHeartbeatScript

(method body)

GameEngine

Play

1

2

3

OnHeartbeat

No main program…

Event loop instead.

Message/Event Method/Script

MessageProtocol

ReceiverObject

NPC

Interpreter

13

How to use ScriptEase - 1

! Preparation

" Learn the pattern catalogue

! Game Development

" Instantiate a pattern

" Adapt a pattern

! Remove actions, definitions, and conditions

! Add actions

! Add definitions and conditions

14

How to use ScriptEase - 2

! Game Development – cont.

" Plot Tokens

! Useful way to pass information between patterninstances

" (*) actions vs. regular actions

" Behaviours

15

Working in Teams

! Open module W (for writing)

! Open modules R1, …, Rn (for reading)

! Copy-paste individual/all patterns frommodules Ri into module W

! Reload Ri to get the latest version(reload/reload all)

! Close the read-only Ri modules

16

Useful Tips - 1

! Save time testing

" In the toolset:

! Build -> Test Module

" In ScriptEase

! Build -> Load and Play the Module in NWN

! Copy-paste from Encounter designerto Encounter builder

" Can be less tedious than navigatingmenus

17

Useful Tips - 2

! Picking objects in ScriptEase: usedrop-down menu in picker to quicklysearch for objects

! In the toolset, instantiate only objectsthat are in the custom palette to usethem in ScriptEase

Conclusions

! You can use ScriptEase to script most gamescenarios

! ScriptEase avoids many of the commonerrors encountered with programming andscripting languages

! Stories can be created by game designers,not only by programmers using ScriptEase

! ScriptEase provides the means to writestories in a non-linear manner

Project Information

! ScriptEase web page:

" http://www.cs.ualberta.ca/~script