Spellcaster Studios

Make it happen…

Speech System

Revamped the speech system a bit, to make it easier to script and to prepare for the future in terms of multi-language (not sure if it will ever have more than one language, but this way it’s just a matter of translating a directory)…

Previously, the script for a text exchange would be something like:

speech.say("We’re lucky we got that tip!\nWe really could use some cash intake…",3000,"player",0,0.6,0.9,1.0)
wait_speech()
speech.say("My gambling systems point to a 96% chance this will backfire…\n",5000,nil,0.8,0,0,1)
wait_speech()
speech.say("Stop being negative, Sky! Maybe for once we got lucky!",3000,"player",0,0.6,0.9,1.0)
wait_speech()

I had to put in the text, the duration, who was speaking and the color of the text, carriage returns… Now, I can do just:

speech_sequence({  
     "cutscene001_001",
     "cutscene001_002",
     "cutscene001_003"})

On a separate XML file I have information about the speaker and colors:

<?xml version="1.0" encoding="UTF-8"?>
<texts>
    <colors>
        <color speaker="skydancer">0.8,0,0,1</color>
        <color speaker="player">0,0.6,0.9,1</color>
    </colors>
    <text language="eng">
        <string name="cutscene001_001" speaker="skydancer">Good morning, captain…</string>
        <string name="cutscene001_002" speaker="player">Good morn…</string>
        <string name="cutscene001_003" speaker="skydancer">Stardate is ${current_stardate}…</string>
        <string name="cutscene001_004" speaker="skydancer">We’ve run into an asteroid…</string>
        <string name="cutscene001_005" speaker="skydancer">I’m shutting down affected …</string>
        <string name="cutscene001_006" speaker="player">Well, I’m still woozy from the…</string>
    </text>
</texts>

I can override everything anyway (speaker, duration, color) and even add meta-tags to insert variables into the text, and the system takes care of the text so it won’t be too long, breaking it in the right places…

From a player’s perspective, nothing has changed, it’s just much easier for me to write the scripts and to improve the texts, etc…

screen103

Now listening to: “Rethroned” by “Northern Kings”

Link of the day: Some good friends of mine (including the person that did the current music for Chrome Hunter) just released for free their new EP “Quarto Vazio” on their website, check it out: http://www.painted-black.org/

Comment