The Sinister Design Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new Sinister Design forums!

Pages: 1 ... 8 9 [10]
 91 
 on: February 07, 2019, 01:58:35 PM 
Started by CraigStern - Last post by CraigStern
-- 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:

Code: [Select]
<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:

Code: [Select]
<Script>
CheerUpSkillScript
<Action>SetStat/-FNAME2-,Morale,+:1</Action>
<Action>SetStat/-FNAME2-,Drain,-:2</Action>
<Action>SpawnFloatingText/Cheered up!,-FNAME2-,Yellow,45</Action>
</Script>

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

Spoiler
Here's the skill:

Code: [Select]
<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:

Code: [Select]
<Script>
JuxtaposeSkillScript
<Action>SetStringByStat/TargetCategory,-FNAME2-,Category</Action>
<Action>IfStringRun/TargetCategory,character,Juxtapose</Action>
</Script>

<Script>
Juxtapose
<Action>SpawnParticlesAt/Smoke,-Y-,-X-</Action>
<Action>SpawnParticlesAt/Smoke,-CHAR2Y-,-CHAR2X-</Action>
<Action>SetVal/Y1,=:-Y-</Action>
<Action>SetVal/X1,=:-X-</Action>
<Action>SetStat/-FNAME-,Coords,-CHAR2Y-:-CHAR2X-</Action>
<Action>SetStat/-FNAME2-,Coords,-VAL:Y1-:-VAL:X1-</Action>
</Script>

-- 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.

 92 
 on: February 06, 2019, 03:07:00 PM 
Started by CraigStern - Last post by CraigStern
-- 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.

 93 
 on: February 05, 2019, 02:09:41 PM 
Started by CraigStern - Last post by CraigStern
-- 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.

 94 
 on: February 04, 2019, 04:20:38 PM 
Started by CraigStern - Last post by CraigStern
-- 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.)

 95 
 on: February 03, 2019, 09:34:52 PM 
Started by CraigStern - Last post by CraigStern
-- 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.

 96 
 on: February 01, 2019, 03:28:50 PM 
Started by CraigStern - Last post by CraigStern
-- for all combat barks except for deployment barks and defeat barks, the dialogue window now now auto-closes a couple of seconds after it finishes typing out the dialogue so as to render barks less obtrusive to the flow of battle.

-- created a little inspector window in both battle and in the map editor that tells you the coordinates, terrain type, and elevation of every tile as you mouse over it. (In battle, it's turned off by default, but can be toggled on with Shift + T.)

 97 
 on: January 31, 2019, 08:15:40 PM 
Started by CraigStern - Last post by CraigStern
-- music can now play continuously between scenes rather than automatically cutting out at every scene change! When changing from one scene to a second scene that uses the same background track (or has a blank musictrack attribute), the game continues playing the existing music from the initial scene.

 98 
 on: January 30, 2019, 01:04:30 PM 
Started by CraigStern - Last post by CraigStern
-- created a new Army Overview interface that lays out all the units in a given roster in table format, displaying their name, species, class, level, experience, morale, current/max health, current/max energy, daily food consumption, and monthly salary. Mousing over a unit's row in the table highlights it; units that have 0 health remaining have their rows redded-out. Mousing over the icons at the top of the table offers an explanation of what the numbers mean.

-- new script action: ShowArmyOverview. Cut scene only; it displays the army overview interface for a given roster of units. One parameter, optional: roster number. (If not used, the game displays the current roster by default--which, at the moment, is always 0.)

-- implemented two new special characters offering support for and ♥ in text. These, are, respectively:
Code: [Select]
[*]
Code: [Select]
-HEART-

 99 
 on: January 30, 2019, 08:07:36 AM 
Started by CraigStern - Last post by CraigStern
Oooh, this is a complex question to answer! Text processing for most* special characters happens long after the XML parsing process is through; it happens right before the text is displayed or used, so that script actions in the same scene, conversation, or even the same dialogue branch can alter the values that certain special characters stand in for.

The order of special character swapping, as it now stands, is basically: (1) -NL-, (2) values reflecting the general game state that cannot affect, but which can be used to set or check custom variables (-SCENE-, -DAYSPASSED-, -AURA-, etc.), (3) number-getters (LASTINLIST[] and RANGE[]), (4) ID[], (5) custom variables (-VAL:-, then -STR:-, then LIST{}), (6) PICK{}, (7) BRANCH[], (8) all the triggering unit properties (-ARMY-, -Y-, -X-, -NAME-, -CLASS-, heshe/himer/hiser, etc.), (9) all the "CHAR2" secondary unit properties (for dialogue that triggers relative to a second character), and finally (10) basic character substitutions (**, --, and ;;).

Based on my testing, that order tends to work quite well. (Having the double-hyphen last is particularly important in order to avoid problems processing multiple special characters in a row, like -NL--NL-.) There's no cycling at the moment; it just does a single pass-through. I have yet to encounter a situation that requires more than one pass-through to work, though I'm sure one must exist. I'll make the necessary changes if I ever run into it.

...oh, and about Unicode: getting Unicode characters to work in Unity at all is kind of a process, unfortunately, so probably not. However, your question has inspired me to add support for a couple more ASCII characters I can foresee people wanting to use, so hopefully that'll do. :)


* procedurally generated dialogue in the engine has its own, largely distinct set of special characters, swapped at the time the dialogue is generated. This occurs much earlier on than swapping for special characters elsewhere in the engine, as proc gen special characters refer to values internal to the character being generated rather than current game state or custom variable values. I mostly haven't discussed proc gen special characters, so if you see me talking about special characters, 99% chance is that it's the normal kind.

 100 
 on: January 29, 2019, 10:07:17 PM 
Started by CraigStern - Last post by bugfartboy
-- new special character, the double-semicolon (;;)! When this character is detected in text, the game swaps in a comma. This allows you to use commas in your script action parameters without totally screwing things up! (The game uses actual commas to delimit script action parameters--using the double-semicolon in script action parameters allows you to sidestep this effect.)
I have my guesses, but I'm curious how you're handling parameters internally, and what the processing order is. At what point in the process of reading/handling the XML node do you do your string substitution? Is it just once, or do you cycle through until nothing else can be replaced?



Is the new engine unicode-friendly? That is, if I type a '' (U+2022) or a '≸' (U+2279) into one of the files, will it render correctly in-game? If yes, what's the likelihood of getting support for inserting the actual code for a character, such as "&#8226;" "&#x2022;" "&bull;" for a bullet point, and handing it off to be converted+replaced with the appropriate character?

Pages: 1 ... 8 9 [10]