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 ... 9 10 [11] 12 13 ... 41

Author Topic: Developer's Log  (Read 40411 times)

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #150 on: July 31, 2013, 02:50:51 PM »

Woo! Pressure plates are now working. When a character walks onto a destructible object with a Pressure trigger, the character will stop moving and the associated script will run.

Triggers are added on a map-by-map basis by adding a trigger parameter in the <Unit> tag of the destructible object you want to use the trigger with. This, for instance, will add a Pressure trigger to a PressurePlate object and set it to trigger the script PressurePlateTrap:

<Unit trigger="Pressure,PressurePlateTrap">0,99,PressurePlate,0,9,None,None</Unit>

You can now specify the triggering character's coordinates using -Y- and -X-, useful for things like having particle effects on the space a script has been triggered.

New script action: DamageChar. Has three parameters: the name of the character to damage, the base damage to deal, and the element the damage belongs to (Pierce, Slash, Heat, etc.) Optionally, you can add a fourth parameter, which will serve like the affects parameter in an attack. (By default, DamageChar actions affect Health.)

This script will trigger a shower of smoke and sparks at the triggerer's location, and deal 8 base Heat damage to the triggerer:

Code: [Select]
  <Script>PressurePlateTrap
<Action>SpawnParticlesAt/Smoke,-Y-,-X-</Action>
<Action>SpawnParticlesAt/Sparks,-Y-,-X-</Action>
<Action>DamageChar/-FNAME-,8,Heat</Action>
  </Script>
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #151 on: July 31, 2013, 07:03:49 PM »

I've uploaded a video showing traps in action!

Also, new script action: DamageCharAt. It's just like DamageChar above, but instead of one parameter with character name, it starts with two parameters: the target's Y and X coordinates.

The four parameters: the Y coordinate of the character to damage, the X coordinate of the character to damage, the base damage to deal, and the element the damage belongs to (Pierce, Slash, Heat, etc.) Optionally, you can add a fifth parameter, which will serve like the affects parameter in an attack. (By default, DamageCharAt actions affect Health.)

(This action is actually probably better suited for use with traps than DamageChar, since it can affect enemies without unique names identifying them who bumble into traps.)

The installers have been updated.
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #152 on: August 02, 2013, 01:37:44 PM »

Added new destructible object trigger type: Use. Unlike Pressure triggers, Use triggers simply give the player the option to trigger the object when a character is adjacent to it and has not yet attacked. This will then run the associated script, just like a Pressure triggered object.

There is now a third type as well, Use Once. This creates an object that can be used once and only once. (Recommended for treasure chests!)
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #153 on: August 02, 2013, 02:41:32 PM »

So, how do you code script for a Use trigger, since the player can keep activating it over and over? Here's an example:

Code: [Select]
<Unit trigger="Use,UseSwitch">0,99,Switch,7,11,None,None</Unit>

<Dialog>OnTurn/0//
<Action>SetVal/LightsAreOff,=,0</Action>
<Action>EndConvImmediately/</Action>
<Reply>.../EndConv</Reply></Dialog>
 
  <Script>UseSwitch
<Action>IfValRun/LightsAreOff,=,0,TurnLightsOff</Action>
<Action>IfValRun/LightsAreOff,=,1,TurnLightsOn</Action>
<Action>IfValRun/LightsAreOff,=,2,PrepLightsForTurningOn</Action>
  </Script>
 
  <Script>TurnLightsOff
<Action>ChangeCondition/Global Lighting,Night</Action>
<Action>SetVal/LightsAreOff,=,2</Action>
  </Script>
 
  <Script>TurnLightsOn
<Action>ChangeCondition/Global Lighting,Indoors</Action>
<Action>SetVal/LightsAreOff,=,0</Action>
  </Script>
 
  <Script>PrepLightsForTurningOn
<Action>SetVal/LightsAreOff,=,1</Action>
  </Script>

You'll notice we're doing a few things here. First, we've set up our Switch with a Use trigger that runs the script UseSwitch when it's activated. We've also set up our map so it sets a custom integer variable named LightsAreOff to 0 at the very start of the battle (that's what the OnTurn/0 dialog is for). So far so good!

Next, we have UseSwitch itself. UseSwitch simply checks the value of LightsAreOff to see what it should do next, then runs the appropriate script. If LightsAreOff = 0, then that means the lights are on and flicking the switch should turn them off; thus, it runs TurnLightsOff. If LightsAreOff = 1, then that means the lights are off and flicking the switch should turn them on; thus, it runs TurnLightsOn.

All simple so far, yes? The only thing that gets a little tricky is that IfXRun actions don't behave in an if/else manner; we can't just set LightsAreOff to 1 in TurnLightsOff, or else UseSwitch will detect that the value is 1 and turn them right back on in the very next line! We have to be a little tricky and set them to 2 in TurnLightsOff; then, once we've passed the second line in UseSwitch, we then change the value from 2 back to 1 using PrepLightsForTurningOn.

And now, just to prove that this actually works: here's a movie showing it in action!

http://youtu.be/Ru99YVUW5n8
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #154 on: August 05, 2013, 02:19:55 PM »

There's now an optional sixth parameter that can be used with the SpawnChar action: triggers. This works just like triggers added to the <Unit> tag in a map, except that the trigger type and script to run are delimited with a colon instead of a comma.

Fixed a bunch of bugs (version number wasn't showing up, game froze whenever SpawnChar was used, etc.) and updated the installers.

Did some work figuring out what size portraits we'll need for larger characters (golems and such), and did a test to determine the appropriate size for mouth variations in anticipation of possible support for talking animations.
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #155 on: August 05, 2013, 03:05:29 PM »

Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #156 on: August 05, 2013, 03:16:13 PM »

I've begin some preliminary work on random battlefield generation!

For a variety of reasons, I have decided to limit this feature to dungeons for now, since (a) dungeons are the environment with the greatest potential for interesting procedural configurations, and (b) making a generator that intelligently combined all of the various outdoor tilesets would be a nightmare. (And really, I'd like to get started working on the campaign itself again, so I'm limiting the feature to a scope that I know I can finish somewhat expeditiously.)

Right now, the plan is to create an algorithm that intelligently cobbles together dungeons out of 5 x 5 prefabricated chunks. (Below is a picture of one such chunk.) I haven't 100% decided on all of the details yet, but I imagine that hallways will mostly be 3 x 5 in size, some with destructible objects to form choke points. I'll post more about it tomorrow when I make more progress. :)
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #157 on: August 06, 2013, 03:34:58 PM »

Today was a dull day governed by business, administrative and marketing work. Blegh. I will return to coding tomorrow.
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #158 on: August 06, 2013, 09:03:57 PM »

Since we didn't have any super-exciting updates out of me today, how about some sweet new character portraits? :D

Here are the crossbowman and skiakineticist portraits:
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #159 on: August 06, 2013, 09:16:21 PM »

Oh, also: Tyvon finished up the spriggat breath attack animations! :D
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #160 on: August 07, 2013, 02:44:31 PM »

Fixed a bug that prevented OnReachingSpace from working when you specified a team but not a particular named character as required to trigger the dialog.

Laid more groundwork for random level generation. (This one's gonna take a while, folks.)
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #161 on: August 08, 2013, 02:16:29 PM »

Created an updated version of the "What is Telepath Tactics?" trailer showing off some of the game's new character animations and portrait art!

In the process of collecting the footage, I discovered a number of bugs that I'm in the process of fixing.
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #162 on: August 09, 2013, 12:19:05 PM »

Created new 4-player, multiplayer map: Tavern.

The Control key now allows you to examine space properties; Shift no longer has this function. (It was annoying me that the space info would pop up every time I used the Shift + E hotkey combo.)

I've finished updating the "What is Telepath Tactics?" trailer with new footage.
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #163 on: August 09, 2013, 12:37:18 PM »

Here's a screenie from the Tavern map, making use of some new destructible object sprites (including new double doors that each occupy a single space!)
Logged

CraigStern

  • The Creator
  • Administrator
  • White Cape
  • *****
  • Offline Offline
  • Posts: 1800
    • View Profile
    • Sinister Design
Re: Developer's Log
« Reply #164 on: August 09, 2013, 01:11:52 PM »

Fixed a bug where the game would freeze if a Lock or Unlock action failed to find a door at the listed coordinates.

Also: the spriggat animations are now done. We're moving on to the Stone Golem now. :D

Logged
Pages: 1 ... 9 10 [11] 12 13 ... 41