Welcome to the new Sinister Design forums!

Main Menu

A new engine!

Started by CraigStern, June 05, 2016, 05:39:11 PM

Previous topic - Next topic


-- the game now animates the energy bar refilling when characters regain energy at the start of a turn.

-- added a "level up" sound effect to the game accompanying the appearance of the level up screen.

-- added deployment music to the game.

-- added placeholder title screen music to the game.

-- fixed: it was possible to "skip" cut scene menus using the escape key.


-- clicking on a unit's row in the army overview interface now opens up their character screen for a more thorough inspection.

-- the AI now grays out units once it's done with them, making computer turns much easier to follow.

-- implemented a 2-second delay in the AI system between an AI character getting killed/Stunned/Frozen/Enthralled during its turn, and the AI going off to the races with new moves. (This makes it much easier to follow what's going on in these situations.)

-- the level-up screen got a bit of visual polish; it now fades out instead of just insta-vanishing when dismissed, and uses bolded arrow symbols instead of > symbols to denote stat changes.

-- fixed: clicking (or hitting escape) on the level-up screen when there was a message there showing new skills and/or proficiencies would close the whole screen instead of closing the message.

-- fixed: the descriptions in the resistance stat mouseover tooltips in the level-up screen could sometimes get cut off.

-- fixed: the name and class/level/experience lines on unit mouseover tooltips could sometimes get cut off.

-- fixed: the status effect icon would not go away on the same turn a status effect wore off.

-- fixed: mousing over units while moving would cause their health bar to display in the wrong spot.

-- fixed: the AI would wig out whenever one of its units acquired Stunned or Frozen status mid-AI-turn, as it would attempt to continue executing the old list of moves even as it recalculated its moves. (This one took a stupidly long time to fix due to the difficulty of tracking down and killing the offending coroutines at the right place in the code.)


-- the AI now accounts for the fact that backstabbed targets can't counterattack.

-- made a version of the the terrain inspector for battle; it drops the coordinate display in favor of displaying any damage from the space, the element of the damage, and any stat bonuses or penalties the space provides.

-- created a Drowning element symbol for purposes of correctly displaying drowning damage from water tiles.

-- added a button to toggle the terrain inspector on and off during battle to the Action bar.

-- added the 'G' hotkey as a shortcut to the Grab button, and the 'T' hotkey as a shortcut to the Talk button in battle.

-- added the shortcuts to the tooltips for all the major Action Bar buttons in battle.

-- added a tutorial bit about regaining energy in battle to Battle at the Oasis.

-- increased the Energy cost for Pinning Shot from 2 to 4 to make it less overpowered as a tool in smaller battles.

-- fixed: the terrain inspector would remain visible onscreen during dialogue, combat exchanges, and enemy turns.

-- fixed: if you were on the "Sell" page of the shop and you moved items around between units and the reserve supplies, the shop would not auto-update the listed items you could sell unless you clicked on the "Sell" category again.

-- fixed: the game would sometimes freeze in combat due to inappropriately paused pop-up text that it would then wait to complete animating before proceeding (which the pop-up text would never do, of course, because it was paused).

-- fixed: returning to the title screen and triggering a sound effect would produce an error as the game attempted to refer to the old audio source.

-- fixed: script actions, items, and equipment that boost character Speed were not boosting the character's maximum steps along with it.


-- the game now notices when you right-click empty spaces on the battlefield, and treats it as though you'd pressed the Escape key.

-- you can now close the character and level-up screens by clicking anywhere onscreen, not just on the specific area of the screen covered by the UI.

-- wrote a new event where one of your characters comes to you to ask for a raise.

-- updated some item descriptions.

-- caffeine pills now cure Immobilized status as well as Slowed.

-- added a camera panning tutorial to the start of the Overgrown Garden fight.

-- added mouseover tooltips to all the menu buttons on the title screen.

-- fixed: in the Oasis battle, enemies were improperly named and the chest was left empty.

-- fixed: a typo was preventing the traveling merchant event from executing properly in camp.

-- fixed: I accidentally made it so the level-up screen wouldn't appear when it was supposed to in cut scenes.

-- fixed: units were turning to face the right whenever they used a skill on themselves.


-- a fun new feature I threw into the game: skills can now have scripts attached to them via the runsScripts attribute, just like items!

When used, a skill with runsScripts on it will run each script once for each target that the skill hits. (For purposes of special characters in skill-initiated scripts, the game will treat the attacker as the triggering character, and each individual unit hit by the attack as though it is the secondary character.)

Here's an example skill using runsScripts: Cheer Up! When used, it runs CheerUpSkillScript on every unit surrounding the skill-user:

<Atk element="Shield" name="Cheer Up!" img="Stimulate" cost="2" minRange="0" maxRange="0" runsScripts="CheerUpSkillScript" shkMag="0.1" shkDur="0.2" psyDmgFactor="0" backstabFactor="1" sidestabFactor="1" accMod="0" affects="None" afterAtk="Use Once"  AOE="3/1,1,1,1,0,1,1,1,1" particles="Sparks" targeting="constrained" moveType="Normal" knockback="0" dependsUpon="" impactFrame="-9" soundAndFX="SFX[Charge Up:0],SFX[Mind Blast:8],VFX[MentalEffect:OnTargets:12]" desc="+1 morale, +2 energy."></Atk>

In turn, CheerUpSkillScript (which resides in PersistentDialogue.xml) adds a flat +1 to Morale and -2 to the target's Drain:

<Action>SpawnFloatingText/Cheered up!,-FNAME2-,Yellow,45</Action>

Amusingly, I've also used this new functionality to mock up a rudimentary but perfectly adequate version of Juxtapose...

[spoiler]Here's the skill:

<Atk element="Shield" name="Juxtapose" img="Next Character" cost="4" minRange="1" maxRange="2" runsScripts="JuxtaposeSkillScript" shkMag="0.1" shkDur="0.2" psyDmgFactor="0" backstabFactor="1" sidestabFactor="1" accMod="0" affects="None" afterAtk="Use Once" AOE="1/1" particles="Smoke" targeting="free" moveType="Normal" knockback="0" dependsUpon="" impactFrame="-9" soundAndFX="SFX[Charge Up:0],SFX[Mind Blast:8],VFX[MentalEffect:OnTargets:12]" desc="Switch spaces with target character."></Atk>

And here are the scripts:




-- new special characters: -FNAME2- and -LNAME2-. Same as -FNAME- and -LNAME-, but for the secondary character.

-- new special character: -DMG-. When used in a script run by a skill, the game will sub in the final damage done to the skill's target after accounting for resistance, backstab effects, elevation, and so on.

-- changed the scripting on battles with OnTurn/0-triggered tutorial conversations so that if tutorials are turned off, the player will hear deployment barks instead.

-- proc gen units are now generated with 2 deployment barks instead of 1, to avoid excessive repetition.

-- fixed: the Escape key wasn't closing the new turn box in battle.

-- fixed: OnLoaded dialogue wasn't being run during battle.

-- fixed: the game was making the Actions Bar show up beneath the New Turn Box following OnLoaded dialogue.

-- fixed: AddStatusAt would make the game freeze if used on a space without a character, and wouldn't work on spaces containing only destructible objects.

-- fixed: SpawnParticlesAt was spawning particles in totally the wrong locations.


-- developed a new Engineer skill using the new skill script capability: Place Lit Charges. It's essentially the same as Place Charges, but it runs a script that gives the charges Burning status right after they're created. (Left to their own devices, the charges will explode on their own 2 turns after being placed due to Heat damage from Burning.) Very simple, but very handy! :)

-- officially implemented Juxtapose as a Move skill with moveType of Special. Which brings me to...

-- new supported movement type for Move skills: Special. As with Teleport, this tells the game to ignore intervening obstacles; however, it also tells the game, when placing down red attack tiles, to ignore the presence of a character on the target space (which would otherwise prevent the game from placing a tile down there). Further, it tells the game not to actually move anything on its own when the skill is used--for a Special Move skill, all movement is instead expected to be handled via scripts!

-- generated Engineers will now learn either Build Stone Barricade or Place Lit Charges as an advanced skill--but not both. (Which one they'll eventually learn is chosen randomly at the moment they're generated.)

-- generated Spirits will now learn two of the following three as advanced skills: Possess, Drain, and Juxtapose. (The two they'll eventually learn are chosen randomly at the moment they're generated.)

-- premade units now support the attribute statFXImmunities, rendering them immune to certain types of status effects (e.g. Golems and Spirits can be rendered immune to Poisoned). To impart multiple immunities, delimit with a forward slash.

-- went through and made every destructible object in the game immune to "mental state" status effects: Alert, Blinded, Distracted, Enthralled, Focused, Lucid, and Stunned.

-- dropped the base Energy regen from neither moving nor acting from 5 back down to 4, thus making rest and good morale more important (a character with good morale will regain 5 energy from standing still for a turn due to the +1 boost).

-- when right-clicking an object, the game now shows the object sprite in the character screen wherever the character portrait would be.

-- the reserve supplies screen now instructs the player to give items to characters first when they try to use or equip them within the actual reserve supplies.

-- two new special characters for use with skill scripts: -ATKX- and -ATKY-. These return not the coordinates of the attacker, not the coordinates of the current target, but the coordinates of the red attack tile that was clicked in order to launch the attack. (Useful for scripting custom effects for AOE skills relative to the skill's "center"!)

-- the campaign editor now supports deleting scenes! (The game will prompt you first to make sure you intended the click before deleting anything.)

-- fixed: the game would not let you choose an empty save slot when doing a mid-battle save.

-- fixed: the game would freeze if a dead unit killed another unit with its onDeath attack (e.g. explosive charges killing other explosive charges with Explode).


-- the AI now notices when a skill has scripts attached to it, and will treat that skill as having some effect even if the skill deals 0 damage and imparts no status effects directly!

-- new tag: SkillPreference. This lets you place a proverbial finger on the scales with a unit's AI, making the unit more (or less) likely to use a particular skill. Two parameters: (1) skill name, and (2) an operation (i.e. operator:operand). Unlike operations elsewhere in the game, this one uses a float for the operand instead of an integer (because it touches on the AI), and doesn't support floor/ceiling operators (because it's not working with integers).

For example: suppose you wanted to double the AI's internal "score" for moves involving Mind Shield on a certain unit; you'd give that unit the following tag: SkillPreference,Mind Shield,*:2.0

-- there is now a separate window of all browsable in-game skills that you can use to populate the Skill Progression field in the character creator. The window checks to ensure that the character is learning skills at a specified level above 1, and that the character does not already start with the skills selected to learn later.

-- the character editor now throws an error if you try to proceed from the skills screen with the same skill in both Skills and Skill Progressions.

-- improved the camp activity narration for the "Alone" activity.

-- made Dialogue and Script boxes different colors in the dialogue editor to make them easily visually distinguishable.

-- fixed some hair alignment issues with a few of the female human hair types.

-- fixed a variety of not-terribly-interesting bugs.


-- conditions now support the use of custom variables! Which is to say, you can slot in -VAL:-, -STR:- and LIST{} special characters to set Condition parameters on a map based on player decisions from prior scenes--or even just at random.

-- moved the triggering of OnLoaded dialogue forward so that it triggers before most starting battlefield conditions (all of them except for NewArmy, SetArmyAlliance, SetArmyColor, Deployment, and RosterNumber) go into effect. This provides an opportunity to shift variable values impacting battle conditions at the very start of the battle!

Here, for instance, is OnLoaded dialogue that successfully randomizes Global Lighting for a map with a Global Lighting,-STR:Lighting- condition:

<Dialogue trigger="OnLoaded" convID="Random Lighting" r="false">
<Branch num="0" name="">/

-- implemented the Roster Number condition in both battle and cut scenes, allowing switching of the current roster for purposes of recruitment, camp activities, and battle deployment.

-- implemented the Fatigue condition in battle, allowing different armies to start with varying amounts of Energy missing.

-- implemented the Space Bonus and Space Damage conditions in battle, allowing the editing of individual space properties.

-- implemented the new Death Rules condition, replacing the old Permadeath condition. Death Rules takes one of the following four strings as its sole parameter: Permadeath/Wound Level/Back at 1/Back at Full.

If Death Rules are set to Permadeath, fallen characters are immediately removed from all rosters, per the Telepath Tactics default; if set to Wound Level, fallen characters  are gone until recovered (whether via camp activities or a SetStat action); if set to Back at 1, fallen characters return in the next scene with 1 health; and if set to Back at Full, fallen characters return in the next scene at full health.

Death Rules can also be set to some other, arbitrary string, in which case death will have no inherent effect whatsoever beyond the character being removed from the current battle. (Note that regardless of what Death Rules are in play, you can still institute custom effects for fallen characters via OnCharDeath dialogue.)

-- implemented a third difficulty setting, "Brutal." The three difficulty settings, in addition to changing prices for recruitment and items, change the Death Rules for the campaign (Relaxed = Back at 1, Challenging = Wound Level, and Brutal = Permadeath).

-- created documentation for all existing operators in the game.

-- began documenting all existing conditions in the game.

-- began work in an in-game scripting reference allowing the player to browse all supported Actions, Replies, Conditions, Triggers, Tags, Operators, etc. in-game while editing a campaign.

-- fixed: the game would crash when loading a non-deployment battle with unused FromPlayerRoster spawn locations.

-- fixed: the AI wouldn't bother attacking with Blinded characters due to their zeroed-out accuracy. This was unsatisfying, so the AI now ignores Blinded status for purposes of weighing whether to attack with someone. :)

-- fixed: a few annoying timing errors during AI-controlled turns.

-- fixed: temporary status effects were not getting removed from characters after battle.


-- new background received and added to the game: prison!

-- fixed: the game was only applying space damage to spaces possessing a phase attribute of liquid.

-- fixed: the terrain inspector window wouldn't update with space properties when mousing over a space containing a unit or a UI tile.


-- created a new custom variable type: the Area! Areas are rectangular spaces with bounds corresponding to coordinates on the battlefield.

-- new script action: SetArea. Takes 5 parameters: (1) Area Name, (2) topmost Y coordinate, (3) bottom-most Y coordinate, (4) leftmost X coordinate, and (5) rightmost X coordinate.

-- new script actions: IfInAreaGoTo and IfInAreaRun! These check to see if a character is present on the battlefield, and if so, whether the character is within a defined area--if so, the associated thing (going to the branch or running the script) happens. Takes 5 parameters: (1) Area Name, (2) Character Name, (3) Branch Number/Script Name, and (4) Check For Absence (true or false -- optional). If (4) is set to true, the thing will happen only if the character is present on the battlefield and not within the specified area.

These replace the (far more cumbersome) old IfOnCoordsRun action.

-- new dialogue trigger: OnReachingArea! This works exactly like OnReachingSpace (which it is replacing) did, except that it takes the name of a custom area instead of coordinates. Parameters: (1) Area Name, (2) Character Name (or -ANY-; optional), and (3) Army Number (optional).

-- new script action: SkillsToList. Three parameters: (1) Character Name, (2) List Name, and (3) Natural Only (true or false -- optional). Creates a list with the names of all skills the character currently possesses. If the third parameter is left blank (or set to false), the list will include both natural skills and skills granted by the character's equipment; but if set to true, the list will only include natural skills (i.e. nothing deriving from an equipped item).

-- new script action: RemoveSkill. Two parameters: (1) Character Name and (2) Skill Name. Removes the specified skill from the specified character's natural skills.

-- new script action: InvToList. Two parameters: (1) Character Name (or Reserve Supplies, or a roster number), and (2) List Name. Creates a list with the names of all items in the specified inventory; each named item's position in the list corresponds to its position in the inventory. (Using Reserve Supplies as parameter 1 will select the current roster's reserve supplies, while using a number will select the reserve supplies of the specified roster.)

-- new script action: RemoveItem. Two parameters: (1) Character Name (or Reserve Supplies, or a roster number), and (2) Item Position or Item Name. Removes the item specified from the specified inventory.

Using Reserve Supplies as parameter 1 will select the current roster's reserve supplies, while using a number will select the reserve supplies of the specified roster; using a number for parameter 2 will remove from the selected position n the inventory, while using a string will search for the first item whose name contains the string.

-- fixed: you could use Give Item to get more than 12 items into a character's inventory.

-- fixed: a Kill-All Victory could trigger while enemy reinforcements remained waiting to spawn.


Gave artist feedback on internal wood floor tiles with "house wall" sides and new, 1-width cliff terrain tiles.

-- the recruitment screen now has a button providing fast access to the Army Overview interface so you can make more informed decisions while recruiting!

-- when accessed with no units in the player's current roster, instead of remaining confusingly blank, the Army Overview screen now displays the message "No characters to display."

-- the terrain inspector in the map editor now displays coordinates in y , x order to be consistent with the order used in script actions. Further, it now labels the x and y coordinates for greater clarity.

-- the character creator now checks to ensure that all counterattacks given to a character are real skills that exist, and throws an error if they don't.

-- new script action: MasteriesToList. Two parameters: (1) Character Name and (2) List Name. Creates a list with the names of all equipment masteries the named character possesses.

-- new script action: LearnMastery. Two parameters: (1) Character Name and (2) Mastery Name. (For multiple masteries, delimit Mastery names with vertical bars.) The named character learns the named mastery/ies.

-- new script action: RemoveMastery. Two parameters: (1) Character Name and (2) Mastery Name. Removes the specified mastery from among the specified character's equipment masteries.

-- made lissit somewhat less common during recruitment in the main campaign.

-- fixed: the game would not show the effects of newly recruited characters' equipment on their stats and skills in the character screen until they first appeared in a battle.

-- fixed: some issues with the display of weather effects.

-- fixed: the UV-free tiling shader on water and lava tile materials somehow got switched out for a mobile diffuse shader.


-- designed and implemented a "space selector" UI element that shows the space you're currently moused over at all times during your turn. This should eliminate any ambiguity about what you're about to click during your turn (and also constitutes a necessary precondition to adding in controller support).

-- removed those ugly placeholder asterisks denoting spaces you'll be moving through and replaced them with slightly less placeholder-y, less ugly directional arrows.

-- reduced the opacity of enemy move range tiles to make it easier to see your own movement tiles when they overlap.

-- fixed: cliff fill tiles weren't set as children of the battlefield in either the main game or the map editor, cluttering up the base level of unity's hierarchy whenever they were instantiated.


-- on the title screen Load Game menu, the game now detects the most recently saved saved game and automatically opens to the page where that save file appears.

-- in the mid-battle Save Game menu, the game now detects the most recently used save game slot (for either saving or loading), and automatically opens to the page where that save slot appears.

-- the space selector element is now hidden during dialogue, during attacks, in between turns, and throughout AI turns.

-- during deployment, the space selector now appears only over valid deployment tiles.

-- new script action: AddReply. This adds a new reply to a specified branch of a specified dialogue tree. Three parameters: (1) Conv ID, (2) Branch Name or Number, and (3) Reply Text|Reply Type|Reply Parameters. If parameter 1 is left blank, the game will apply this action to the current dialogue tree. The vertical bars in parameter 3 will be converted into forward slashes, and whatever is typed there will be treated as a normal reply.

-- new script action: RemoveReply. This removes a specified reply from a specified branch of a specified dialogue tree. Three parameters: (1) Conv ID, (2) Branch Name or Number, and (3) Reply Number or Reply Containing Text. If parameter 1 is left blank, the game will apply this action to the current dialogue tree. If a number s not entered for Parameter 3, the game will find the first reply containing whatever text is entered as a substring.

-- the main campaign now remembers when you ask peoples' names in the Recruitment and Arena scenes, and removes the reply options allowing you to trigger the introductory name dialogue again from future interactions.

-- removed the Order Introductions button from camp; the character intros are a really important part of learning about the characters and who they are, and I wasn't satisfied with the player experience of getting to know one's characters when they were taken out of the equation.

-- the character creator now throws an error when you try to proceed with a character inventory containing more than 12 items in it, and explicitly tells you to reduce the number of items to 12 or less.

-- fixed: due to some outdated code, the game would refuse to show dummy tiles when mousing over skill buttons in the Actions Bar after a character screen had been opened and closed.

-- fixed: the title screen wasn't letting the player select a save slot for a new game beyond the first page of slots.

-- fixed: the game would display the victory screen at the same time as a level-up coinciding with the battle-winning attack, provided that that was the only level-up queued to occur at that moment.


-- the engine now parses the soundAndFX attribute on skills, stores information about the sound and visual effects associated with queued attacks, then queues up said effects with their associated timing info as soon as each queued attack launches. Then, the game checks a counter for each queued-up effect on each frame.

-- the game now plays skill sound effects on their associated frames in combat.

-- the game now tries to play skill visual effects of the OnTargets type on their associated frames in combat. (Only a fraction of these are actually currently implemented, as I have to create each animation by hand.)

-- added all the old sound effects into the gameso that they can be called at runtime.


-- the game now tries to play skill visual effects of the OnSelf and OnCenter types on their associated frames in combat.

-- created skill effect animations for Mind Blast, Mind Shield, Mind Shock, and for the final ("impact") portions of Pyro Blast, Cryo Blast, Light Blast and Shadow Blast.

-- restructured the visual effects class in order to allow visual effects to move over time and emit light onto the scene.

-- the game now marks visual effects complete after they're done animating, and removes completed visual effects from the scene.

-- worked on fixing some issues with visual effect positioning, with limited success.