Scripting question

Here's the place to talk about the features you would like to see in a sequel to KotC.

Scripting question

Postby fabgrass » Wed Mar 06, 2019 4:45 pm

Hi,

as old strong nwn scripter I m eager to see the toolset and it s scripting possibilities;
could you salamander allready publish documentation and / or examples of the script language?
is it C, or python, lua.. or a personal build? compiled or not? is there an equivalent of the heartbeat event of nwn?
is it possible to use / store global or any object attached variables? what are possible var types, and combinations (formulas, etc) ?
and to make conditions / loops / conditional loops

Then a lot of questions; all about a scripting language in fact.
If there is a doc. and if it can be published then thanks!..
fabgrass
Hobgoblin (CR 1/2)
Knights of the Chalice
 
Posts: 3
Joined: Wed Feb 20, 2019 4:49 pm

Scripting question

Advert
 

Re: Scripting question

Postby BlueSalamander » Mon Mar 11, 2019 6:12 am

Hiya fabgrass and welcome,

As an example, here's one of the most important script commands:
"Add dialog answer [text] with text colour [colour choice] and set the answer as [Selectable / Non-Selectable / Non-Selectable if the required skill is not available to the party or gold is insufficient / Non-Selectable if party lacks the skill or Skip display if answer was selected before / Skip display if the required skill is not available to the party or gold is insufficient / Skip display if answer was selected before] requiring the party skill [party skill or requirement type] or gold [gold amount] or item(s) [item list] or companion [character name] or variable [variable name] equal/above/below [variable value] or achievement [achievement name] or quest [quest name] and save the skilled character's name into the variable [variable name] and save the selected status of this answer into the variable [variable name]"

When you create your dialogue script, you select that command in the command list displayed in the script editor, then cilck add command or insert command. Then you fill up the fields in the box that appears. Most fields can be left empty.

The standard colours are Blue for Non-Skill answers, Dark Green for Skill answers and Purple for Non-Selectable answers. You can click the {RIDDLE} button to allow the player to type in an answer. You can combine a skill requirement with a gold requirement and an item requirement.

It's the game's own script language. It's uncompiled. There's no heartbeat event; that event seems more appropriate for a game with real-time combat.

Yes, you can use and store variables. There are no script objects. Variables are all saved as strings which contain either text or a number.

If you need a loop, you just use a pair of commands: "Create Label" and "Goto Label".
'Say there is a chunk of meat. Pirates will have a banquet and eat it! But heroes will share it with other people. I want all the meat!!' - Luffy in One Piece
User avatar
BlueSalamander
Master Conjuror
 
Posts: 1377
Joined: Sun May 18, 2008 6:20 pm


Return to Ideas for KotC 2

Who is online

Users browsing this forum: No registered users and 7 guests

cron