Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.

Anatomy of a Script

From AGEWiki

Revision as of 08:09, 13 June 2013 by Kensai (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A scripted event in Pride of Nations has a certain syntax that needs to be respected in order for the engine parser to read and implement it successfully. A working script should give no errors and, ideally, no warnings either. In a scripted event (or simply "script") the engine receives information that it has to select a nation, demands some conditions to be respected, implements the changes if the conditions are met, and writes a report (script log) about its operations.

The simplest possible event, the equivalent of Hello, World! in traditional programming, is the following:

SelectFaction = $CMN //select a faction, in this case CMN means all nations

SelectRegion = $Anglia //select a region, in this case Anglia (London), center of the world in the Victorian era!

StartEvent = Hello, World!|1|1|NULL|NULL|$Anglia|NULL //starts an event called "Hello, World!"

Conditions //demands some conditions to be met

Actions //if the conditions are met (if any) it will do some actions

EndEvent //ends the event

Forums