Scripter's Guide

From Summoning Wars
Jump to: navigation, search

This will give a short overview about what scripting for Summoning Wars entails and how to do it yourself.

Contents

  • 1 Getting started
  • 2 Useful tools and skills
  • 3 Format and quality standards
  • 4 Examples and tutorials
  • 5 Test your script in-game
  • 6 Distribute your work

Getting started

A place to start when trying to get into scripting is to look at the existing quests. Take a small side quest, look into it's quest-file and try to understand how it works. Knowledge of script languages in general and Lua-Script in particular is necessary to understand what's going on. If you look into a quest-file and understand nothing at all, then you should probably learn a bit about Lua first.

Useful tools and skills

To script and edit quests you only need a text-editor of your choice and Summoning Wars. Prior knowledge in scripting or programming is useful, but not absolutely necessary, if you are willing to invest (a lot) of time into learning on the fly.

Format and quality standards

Scripts written for Summoning Wars should follow the standard guidelines for good coding: Use meaningful names for your variables, leave comments for those who will one day try to maintain or understand your script and only write one statement per line.

Since almost all scripting is done for quests there is another important thing to consider: Quests follow a timeline. You first talk to Mr. NPC, then go to The Dangerous Field to pick up some stuff, then talk to Mrs. NPC and then return to Mr. NPC for the reward. All those events take place in different regions. When scripting the quest:

There is no real way to make sure a script is absolutely bug-free, but you should still test it as thoroughly as possible. That means you should not try to test if everything you did works (you should do that while developing the script), but you should try to break it on purpose. If you succeed in breaking the script then your work is not done.

Examples and tutorials

Work in progress

Test your script in-game

Testing your script in-game should be fairly easy. You just have to see whether all those little events you poured so much time into actually trigger if (and only if) the conditions you set are met.

Distribute your work

Retrieved from "https://sumwars.org/wiki/Scripter%27s_Guide"
Personal tools
Namespaces
  • Page
  • Discussion
Variants
Views
  • Read
  • View source
  • View history
Actions
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version