Playing with Fire
by Kyzrati on 20120831 , under
I've started actually using all this Cool New Stuff added to the game in recent weeks in order to prepare content for the upcoming scenario, and this one was kinda fun (okay, I'll not kid myself here--it's all a ton of fun), so I thought I'd share it with you.
There's now a neat-looking flamethrower ready for the pyromaniacs among you. I originally designed this weapon to be fitted to a special guest you may encounter while playing R7, and thought I may as well create a regular portable/detachable version as well.
Hint: You can also throw the fuel canisters as makeshift incendiary grenades, or catch them in any explosion to turn the surrounding area into a fiery inferno.
Hm, come to think of it, this was all entirely possible in R6 and uses absolutely none of the new features. Heh. Well, I've already added quite a few things that were *not* possible before, but those shall remain secret for the time being so as not to spoil all the surprises (pl.).
Hopefully you'll be able to get your hands on this neat little toy. If not, you'll always find at least one of the other many toys scattered about the level. Speaking of the level, I have yet to actually make it...
Note: In recent months I've tended towards saving up content for more substantial posts, but hey, I was having fun with this and thought you'd like to see what I'm up to. Now you know: I was busy BURNING PIXELS!
There's now a neat-looking flamethrower ready for the pyromaniacs among you. I originally designed this weapon to be fitted to a special guest you may encounter while playing R7, and thought I may as well create a regular portable/detachable version as well.
![]() | ||
| "It's dark out. No one will notice me as I approach this building with arson on my mind..." |
(No dude, the lights on your standard-issue rookie armor make you stand out pretty well...)
![]() |
| "Eat flames, door!" |
(Actually, the door was already open, but for some reason this moronic
programmer didn't yet notice that you can't fire through open doorways. Seriously, none of you have tried it yet?)
![]() |
| "Witness my masterpiece!" |
(You're gonna roast alive if you don't leave soon, you know...)
Hint: You can also throw the fuel canisters as makeshift incendiary grenades, or catch them in any explosion to turn the surrounding area into a fiery inferno.
Hm, come to think of it, this was all entirely possible in R6 and uses absolutely none of the new features. Heh. Well, I've already added quite a few things that were *not* possible before, but those shall remain secret for the time being so as not to spoil all the surprises (pl.).
Hopefully you'll be able to get your hands on this neat little toy. If not, you'll always find at least one of the other many toys scattered about the level. Speaking of the level, I have yet to actually make it...
Note: In recent months I've tended towards saving up content for more substantial posts, but hey, I was having fun with this and thought you'd like to see what I'm up to. Now you know: I was busy BURNING PIXELS!
What's on Your Mind?
by Kyzrati on 20120826 , under Progress, Screenshots
The mind probe is now ready for your perusal of brains everywhere!
Actually, it would be fun (useful, even) to later use this or other similar devices to actually get some insights into what a sentient being is thinking (AI hints, flavor text, etc).
The window is nicely animated, but again I'll save the video for a UI compilation that I'll put out with R7, which is scheduled for ARRP 2012.
Of course the same screen is also used to examine your own unit stats, so the long list of extraneous stats has been removed from the HUD since they can be accessed here:
I may at some point add the ability to choose a stat and compare its value across all your squad members, if anyone would find that useful. Also, I'd like to limit the mind probe to sentient units only (which could be easily scripted through the text files using the new object traits system combined with effect conditions), but right now it's like the original X-COM: any target goes. A separate device could be designed for analyzing mechanical targets.
You'll notice that I've resurrected the melee stat which was included in the original X-COM code but not actually used in the game. If you weren't following early development or haven't tried the demo yet, you may not know that pretty much *any* item can be used for a melee attack.
The default data I'm using right now (not necessarily balanced properly) has most items with 100% base accuracy (note that by X-COM rules that doesn't mean you always hit) and take 30 TU (unique melee items and terror unit melee attacks are different, of course). It only works if you are adjacent to the enemy, duh. The damage done by the default melee attacks depends on the attacker's strength, though again this can be overridden for special items. I also added some common damage types (bludgeoning/slashing/piercing) that can be used to define melee attacks.
Melee is generally not as deadly as actually shooting a weapon, of course, but it allows for lots of fun new mechanics, like dedicated melee weapons (e.g. knives, light sabres, etc.) and bashing down weak terrain (or even sturdy terrain like walls using a sledge hammer!). Melee attacks can also cause knockback on the target if your strength is greater than theirs, and if your strength is also great enough to smash through whatever is behind the defender, then you'll smash them right through it. So you can, for example, whack an alien with a baseball bat and send him flying out a third-story window so he hopefully falls to his death from impact damage. In fact, if you had superhuman strength, you could theoretically smash aliens right through walls, and if it collapsed part of the structure the debris would even fall on them, which would be pretty funny... Of course, you have to watch out for powerful aliens doing the same things to you.
Now that the mind probe is done, that leaves only one item from the original X-COM yet to be implemented: the psi-amp. The effects are already possible through the current system, all that's missing is a menu to select from a list of usable abilities when an item has more than one. I'll save that for R8, though, since I need to get to adding new items and content for the next scenario.
Warning: Wall of semi-technical text follows.
In other news, a couple days ago I also finally added particle templating! Meta-programming (or in this case "meta-scripting") is incredibly useful for rapid development, enabling easy creation of multiple variations on a concept. In this case, the engine can now read in particle template data from the text files and, while parsing particle definitions, automatically generates all necessary variations of a given particle to meet template specifications.
While quite simple to implement, it becomes a huge time saver during the content design process, making it possible to more easily create multiple particle variations by detaching design from general behavior (i.e., great for lots of different effects with minor changes from a base design). In practice, it's mostly useful for recoloring, but can be used in other creative ways. This got me really excited--doing things like this always seems to tickle my geeky side (perhaps my biggest side).
I'd been thinking about adding this feature for a while, but it hadn't really become necessary yet. However, with the numerous colors you see in the profile window, templates make a lot of sense: What would've taken almost 200 particles to implement ended up taking only 8 (!) with templates.
This reminds me of back when I was rushing to finish Cogmind for 7DRL 2012 and had to quickly recolor a bunch of X@COM particle effects to match the many types of weapons available in Cogmind--lots and lots of copy and paste, which could've been avoided completely had particle templates been ready back then!
So I've also gone back and rewritten other X@COM particle systems to use templates as well--just the blip particles used in the motion scanner were collapsed from their original 42 long lines of particle parameters to 6 long ones and 8 short ones (the latter a tiny chart used in combination with the six template particles to generate a full set); the text typing effect originally required six lines for every new color, but now it's six lines to define the behavior, and one for each additional color! Yay!
Here's the entirety of the script lines needed to animate the typing as it's currently done in the game (the red template chart defines the colors):
Templates also make for better design by allowing you to concentrate on what's different about the particles, instead of wading through endless rows and columns of data looking for those specific little differences.
(click for non-fuzzy version)
Actually, it would be fun (useful, even) to later use this or other similar devices to actually get some insights into what a sentient being is thinking (AI hints, flavor text, etc).
The window is nicely animated, but again I'll save the video for a UI compilation that I'll put out with R7, which is scheduled for ARRP 2012.
Of course the same screen is also used to examine your own unit stats, so the long list of extraneous stats has been removed from the HUD since they can be accessed here:
(click for non-fuzzy version)
I may at some point add the ability to choose a stat and compare its value across all your squad members, if anyone would find that useful. Also, I'd like to limit the mind probe to sentient units only (which could be easily scripted through the text files using the new object traits system combined with effect conditions), but right now it's like the original X-COM: any target goes. A separate device could be designed for analyzing mechanical targets.
You'll notice that I've resurrected the melee stat which was included in the original X-COM code but not actually used in the game. If you weren't following early development or haven't tried the demo yet, you may not know that pretty much *any* item can be used for a melee attack.
The default data I'm using right now (not necessarily balanced properly) has most items with 100% base accuracy (note that by X-COM rules that doesn't mean you always hit) and take 30 TU (unique melee items and terror unit melee attacks are different, of course). It only works if you are adjacent to the enemy, duh. The damage done by the default melee attacks depends on the attacker's strength, though again this can be overridden for special items. I also added some common damage types (bludgeoning/slashing/piercing) that can be used to define melee attacks.
Melee is generally not as deadly as actually shooting a weapon, of course, but it allows for lots of fun new mechanics, like dedicated melee weapons (e.g. knives, light sabres, etc.) and bashing down weak terrain (or even sturdy terrain like walls using a sledge hammer!). Melee attacks can also cause knockback on the target if your strength is greater than theirs, and if your strength is also great enough to smash through whatever is behind the defender, then you'll smash them right through it. So you can, for example, whack an alien with a baseball bat and send him flying out a third-story window so he hopefully falls to his death from impact damage. In fact, if you had superhuman strength, you could theoretically smash aliens right through walls, and if it collapsed part of the structure the debris would even fall on them, which would be pretty funny... Of course, you have to watch out for powerful aliens doing the same things to you.
Now that the mind probe is done, that leaves only one item from the original X-COM yet to be implemented: the psi-amp. The effects are already possible through the current system, all that's missing is a menu to select from a list of usable abilities when an item has more than one. I'll save that for R8, though, since I need to get to adding new items and content for the next scenario.
Warning: Wall of semi-technical text follows.
In other news, a couple days ago I also finally added particle templating! Meta-programming (or in this case "meta-scripting") is incredibly useful for rapid development, enabling easy creation of multiple variations on a concept. In this case, the engine can now read in particle template data from the text files and, while parsing particle definitions, automatically generates all necessary variations of a given particle to meet template specifications.
While quite simple to implement, it becomes a huge time saver during the content design process, making it possible to more easily create multiple particle variations by detaching design from general behavior (i.e., great for lots of different effects with minor changes from a base design). In practice, it's mostly useful for recoloring, but can be used in other creative ways. This got me really excited--doing things like this always seems to tickle my geeky side (perhaps my biggest side).
I'd been thinking about adding this feature for a while, but it hadn't really become necessary yet. However, with the numerous colors you see in the profile window, templates make a lot of sense: What would've taken almost 200 particles to implement ended up taking only 8 (!) with templates.
This reminds me of back when I was rushing to finish Cogmind for 7DRL 2012 and had to quickly recolor a bunch of X@COM particle effects to match the many types of weapons available in Cogmind--lots and lots of copy and paste, which could've been avoided completely had particle templates been ready back then!
So I've also gone back and rewritten other X@COM particle systems to use templates as well--just the blip particles used in the motion scanner were collapsed from their original 42 long lines of particle parameters to 6 long ones and 8 short ones (the latter a tiny chart used in combination with the six template particles to generate a full set); the text typing effect originally required six lines for every new color, but now it's six lines to define the behavior, and one for each additional color! Yay!
Here's the entirety of the script lines needed to animate the typing as it's currently done in the game (the red template chart defines the colors):
Templates also make for better design by allowing you to concentrate on what's different about the particles, instead of wading through endless rows and columns of data looking for those specific little differences.
Gimme the Drugs
by Kyzrati on 20120819 , under Progress, Screenshots
Face it: If you were on the front line against a frightening alien menace, you'd probably prefer to be shot up with chemicals most of the time, too!
The oh-so-indispensable Medi-Kit is ready to patch up and treat your panicking, bleeding and otherwise not-so-happy-to-be-dying-to-WTF-WAS-THAT soldiers. It'll be much better than what you've had to face so far: Seeing critical wounds as more or less an unavoidable doom counter.
I'd like the UI to be a bit more flashy, but for now I'm sticking to a more utilitarian design and simple color scheme so these elements are at least available in game. So this is what you get:
I would have gone for a slightly more visual representation of the target's body, but the interface needs to be compatible with any kind of anatomy that could potentially be created through the dynamic body part system, so critical wounds are just shown through a list of parts. The window is animated and I added a new sound, too, but I'll save the video for a UI compilation once there's more to show.
In related news: The Special Ability Framework is COMPLETE! That pretty much explains where I've disappeared to these past weeks, and I'm sure one day it'll have been worth it--because for now it was definitely overkill for implementing just the standard X-COM content, e.g. chryssalids, silacoids, motion scanners, medi-kits, etc., which all could've been hard-coded in no time.
The framework doesn't yet include absolutely every trigger and effect that might eventually find its way in there, but 41 triggers, 47 conditions, and 30 different effects is already enough to create a mind-boggling amount of Fun Stuff. Some of said Fun Stuff you will see in R7.
As I've described before, it's a very flexible framework that allows modders to mix and match triggers and effects complete with text messages, particle effects, sounds, and of course effects on game objects. In fact, while testing the medi-kit I was able to pretty easily (took less than a minute...) add some extra functions for fun: a "poison" function that instantly kills the patient, and a "zombify" function that mutates the patient into a mindless zombie. The medi-kit interface dynamically builds itself based on what abilities the text files give the medi-kit (or, actually, any item with the "open medi-kit" trigger, since you could technically create other items that have medi-kit-like functionality), so the functions I added appeared as new buttons that I could use to kill or zombify targets... Much more useful functions could be created using the MOD_ENT ("modify entity") effect, which has 19 sub-effects for modifying unit stats on the fly.
Other things I played with to test the system:
Next I'll be working on the mind probe interface (which won't take very long) and a few random other housekeeping tasks before putting the next scenario to code. Actually, before that the HUD needs a temporary mini-log so you don't always have to open the full combat log to see what's going on, since the new ability system means you'll occasionally need more detail about what's going on than what you can see on the map.
The oh-so-indispensable Medi-Kit is ready to patch up and treat your panicking, bleeding and otherwise not-so-happy-to-be-dying-to-WTF-WAS-THAT soldiers. It'll be much better than what you've had to face so far: Seeing critical wounds as more or less an unavoidable doom counter.
I'd like the UI to be a bit more flashy, but for now I'm sticking to a more utilitarian design and simple color scheme so these elements are at least available in game. So this is what you get:
I would have gone for a slightly more visual representation of the target's body, but the interface needs to be compatible with any kind of anatomy that could potentially be created through the dynamic body part system, so critical wounds are just shown through a list of parts. The window is animated and I added a new sound, too, but I'll save the video for a UI compilation once there's more to show.
In related news: The Special Ability Framework is COMPLETE! That pretty much explains where I've disappeared to these past weeks, and I'm sure one day it'll have been worth it--because for now it was definitely overkill for implementing just the standard X-COM content, e.g. chryssalids, silacoids, motion scanners, medi-kits, etc., which all could've been hard-coded in no time.
The framework doesn't yet include absolutely every trigger and effect that might eventually find its way in there, but 41 triggers, 47 conditions, and 30 different effects is already enough to create a mind-boggling amount of Fun Stuff. Some of said Fun Stuff you will see in R7.
As I've described before, it's a very flexible framework that allows modders to mix and match triggers and effects complete with text messages, particle effects, sounds, and of course effects on game objects. In fact, while testing the medi-kit I was able to pretty easily (took less than a minute...) add some extra functions for fun: a "poison" function that instantly kills the patient, and a "zombify" function that mutates the patient into a mindless zombie. The medi-kit interface dynamically builds itself based on what abilities the text files give the medi-kit (or, actually, any item with the "open medi-kit" trigger, since you could technically create other items that have medi-kit-like functionality), so the functions I added appeared as new buttons that I could use to kill or zombify targets... Much more useful functions could be created using the MOD_ENT ("modify entity") effect, which has 19 sub-effects for modifying unit stats on the fly.
Other things I played with to test the system:
- phase-shifting aliens
- amorphous aliens that divide in two when shot
- aliens that emit a deadly toxin which kills any humans who get too close
- aliens that trigger periodic cyclones which pick up small objects and fling them around (oops, did you throw that grenade over here? hah!)
- alien gun that shoots out smaller aliens (here, have a facehugger!)
- controlled teleports
- items that can transform into other items
- potion of strength (quaff it, really)
- staff of destruction (disintegrates everything within a certain radius of target position)
- a med station that heals user when "manipulated" (<--a new command that allows units to "use" terrain objects--could be used for computer terminals or whatever)
- (approx. 30 more test abilities...)
Next I'll be working on the mind probe interface (which won't take very long) and a few random other housekeeping tasks before putting the next scenario to code. Actually, before that the HUD needs a temporary mini-log so you don't always have to open the full combat log to see what's going on, since the new ability system means you'll occasionally need more detail about what's going on than what you can see on the map.
Motion Detected!
by Kyzrati on 20120806 , under Video
"Nine meters. Seven. Six."
"That can't be! That's inside the room!"
Yes, this will probably happen to you, too.
Actually, the short range of X-COM motion scanners makes it all that much more likely. Of course, with about five seconds of modding you could expand their effect to cover the entire map. Not that you'd want to, but it's *very* easy now that they're a part of the special abilities system, too.
Since returning from vacation I've been pushing forward on that same system, adding yet more triggers and effects, most notably object spawning which means triggers can now create terrain, items, and units. But everything so far is internal stuff that doesn't make for interesting posts with something visual to show for it, so I sidetracked myself in order to bring you a simple implementation of the motion scanner interface.
Motion scanners are nice, and you are definitely going to want one on the new scenario that will come with the next release, but that's all I'll say about that for now...
Check out this video showing the scanner in action as it gets some relatively heavy use in the urban Exodus map: A spotter locates an enemy hiding in a building and his buddy blows through the wall with his gatling laser. Then we put up a smoke screen before moving into an open area, and find another building swarming with aliens and send a rocket through the door...
Now back to chipping away at the trigger/effect list.
"That can't be! That's inside the room!"
Yes, this will probably happen to you, too.
Actually, the short range of X-COM motion scanners makes it all that much more likely. Of course, with about five seconds of modding you could expand their effect to cover the entire map. Not that you'd want to, but it's *very* easy now that they're a part of the special abilities system, too.
Since returning from vacation I've been pushing forward on that same system, adding yet more triggers and effects, most notably object spawning which means triggers can now create terrain, items, and units. But everything so far is internal stuff that doesn't make for interesting posts with something visual to show for it, so I sidetracked myself in order to bring you a simple implementation of the motion scanner interface.
Motion scanners are nice, and you are definitely going to want one on the new scenario that will come with the next release, but that's all I'll say about that for now...
Check out this video showing the scanner in action as it gets some relatively heavy use in the urban Exodus map: A spotter locates an enemy hiding in a building and his buddy blows through the wall with his gatling laser. Then we put up a smoke screen before moving into an open area, and find another building swarming with aliens and send a rocket through the door...
Now back to chipping away at the trigger/effect list.
Terminal Obsession
by Kyzrati on 20120701 , under
The special abilities framework is hands down the single most complex and expansive component of the code so far. It wasn't too much trouble to get the framework up and running, but adding all the moving parts that make it useful takes a while because so much can fit in there. The framework can currently process 21 triggers (at least 20 more planned), 11 conditions (dozens more planned), and 11 categories of effects (at least 17 more planned).
I'd be further along by now if not for a hard drive failure that siphoned away many hours of free time as I tried to recover everything. (X@COM is, and always will be, safe--unless all three of my redundant backups are simultaneously abducted by aliens, in which case no promises. If it makes you feel better, though, know that I would try to get them back :)
I'm eager to finish this system and continue chipping away at the R7 feature list, but I'll be disappearing for several weeks now--on the road without any coding time... It'll at least be a good opportunity to organize the design docs, which have become rather bloated with ideas and lists.
Because I needed at least SOME image for this post, here's a shot of the new "terminal" font set which will come with the next release for those commanders who want to give their console a more traditional look. It's only available at 1280x960 or greater, as the font doesn't scale down very well:
The scene above is an automated first turn on the Exodus map as the rescue mission is beset by a pack of shredders that surges out from behind the surrounding buildings under cover of darkness.
I'd be further along by now if not for a hard drive failure that siphoned away many hours of free time as I tried to recover everything. (X@COM is, and always will be, safe--unless all three of my redundant backups are simultaneously abducted by aliens, in which case no promises. If it makes you feel better, though, know that I would try to get them back :)
I'm eager to finish this system and continue chipping away at the R7 feature list, but I'll be disappearing for several weeks now--on the road without any coding time... It'll at least be a good opportunity to organize the design docs, which have become rather bloated with ideas and lists.
Because I needed at least SOME image for this post, here's a shot of the new "terminal" font set which will come with the next release for those commanders who want to give their console a more traditional look. It's only available at 1280x960 or greater, as the font doesn't scale down very well:
The scene above is an automated first turn on the Exodus map as the rescue mission is beset by a pack of shredders that surges out from behind the surrounding buildings under cover of darkness.
Chryssalids, Zombies, and Silacoids, oh my!
by Kyzrati on 20120618 , under Progress, Screenshots
Okay, maybe not the silacoids. Who really cares about them? They're fun and all, but certainly not dangerous.
Chryssalids are of course a completely different story. These bad boys are now out there seeking panicking civilians to zombify. Then there's the zombie spawn out for some fresh soldier meat. You'll be up against the undead hordes in a new scenario planned for the next release (which is still quite a ways off, btw). Bring your Molotovs!
Here are some log excerpts from one of my tests. Louis spots a zombie shambling toward him and uses his quick soldier reflexes to try and mow it down before it can get in close. Unfortunately Igor decides to join in with his rocket launcher and while he does manage to blast the zombie, he also takes out his nearby squadmate in the process. Of course there's now a chryssalid on the lose. Good luck guys.
Then Paul shows up and, apparently having forgotten to prime his alien grenade, uses it instead to bash the chryssalid in the face. Not smart Paul.
You'll make a good zombie, Paul--they don't need brains.
Note
that because the silacoid ability is set to deal incendiary damage, as it moves it naturally sets flammable terrain on fire, instead of just
burning that area of the ground. I can't recall whether they actually set fire to the ground in the original (I don't think they did), but it would be a simple change in the ability script to turn that off. I rather like it.
Speaking of the ability scripts, here's a shot of the new specialabilities.xt file as it appears in notepad++ (click for full size):
As for modifying the silacoid's abilities as mentioned above, all you'd have to do change the "IN" (incendiary) in the "DMG_TYPE=IN" effect data string to some other kind of damage that wouldn't cause fires, like "PL" (plasma).
The Unstable Compound ability on the list was something I was using to test volatile items. Now if only Paul had smashed the chryssalid with *that* he could've at least gone out like a man! (Volatile items explode pretty easily, including when smashed against something. Oh man this game's gonna be fun once I actually get to designing the content...)
The chryssalid zombify effect was somewhat annoying because it's not supposed to take effect immediately, only on the target's death or once the chryssalid stops attacking it, so it didn't fit very well into the system and ended up requiring a "special case" MUTATE_DELAYED effect. Makes sense from a gameplay perspective, though, since that would mean a group of armored troops would be less likely to fall as quickly to a chryssalid as unarmored troops would (especially since chryssalids zombify their target even if their melee attack *misses*, and the special effect completely disregards the defender's armor!).
About the implementation, I spent a lot of time hesitating over details, trying to design the system so that it's flexible yet not prone to errors and overcomplication, but complex systems have a natural tendency to defy being forced into a simple design...
After days of bouncing back and forth between a smaller and larger scope for the special abilities, I settled on a system somewhere in the middle. In hindsight, there really should've been a lot more planning and testing before putting it to code, but the lack of concrete progress started getting to me after a few days of nothing but brainstorming and taking notes. Besides, no matter how robust it may seem, I'm sure creative modders will be able to break it. I'll just have to resolve to fix issues as they pop up, since I'd probably drive myself insane before managing to account for all the emergent possibilities. The engine does perform a lot of data checks on startup to make sure the abilities don't include any combinations that don't fit internal parameter restrictions, so we can hope the number of problems should be minimal.
Now that it works, I'll continue expanding the number of supported keywords before moving on to special items like the motion scanner. Much later on there will still be some kind of separate map-centric trigger system for terrain- and mission-related scripting; this one was focused on the game's more dynamic objects, especially entities (units).
Chryssalids are of course a completely different story. These bad boys are now out there seeking panicking civilians to zombify. Then there's the zombie spawn out for some fresh soldier meat. You'll be up against the undead hordes in a new scenario planned for the next release (which is still quite a ways off, btw). Bring your Molotovs!
Here are some log excerpts from one of my tests. Louis spots a zombie shambling toward him and uses his quick soldier reflexes to try and mow it down before it can get in close. Unfortunately Igor decides to join in with his rocket launcher and while he does manage to blast the zombie, he also takes out his nearby squadmate in the process. Of course there's now a chryssalid on the lose. Good luck guys.
Then Paul shows up and, apparently having forgotten to prime his alien grenade, uses it instead to bash the chryssalid in the face. Not smart Paul.
You'll make a good zombie, Paul--they don't need brains.
Because we don't want the silacoid to feel lonely, here's a screenshot of the alien terror unit after giving someone a crappy lawn job (terrifying indeed!):
Speaking of the ability scripts, here's a shot of the new specialabilities.xt file as it appears in notepad++ (click for full size):
As for modifying the silacoid's abilities as mentioned above, all you'd have to do change the "IN" (incendiary) in the "DMG_TYPE=IN" effect data string to some other kind of damage that wouldn't cause fires, like "PL" (plasma).
The Unstable Compound ability on the list was something I was using to test volatile items. Now if only Paul had smashed the chryssalid with *that* he could've at least gone out like a man! (Volatile items explode pretty easily, including when smashed against something. Oh man this game's gonna be fun once I actually get to designing the content...)
The chryssalid zombify effect was somewhat annoying because it's not supposed to take effect immediately, only on the target's death or once the chryssalid stops attacking it, so it didn't fit very well into the system and ended up requiring a "special case" MUTATE_DELAYED effect. Makes sense from a gameplay perspective, though, since that would mean a group of armored troops would be less likely to fall as quickly to a chryssalid as unarmored troops would (especially since chryssalids zombify their target even if their melee attack *misses*, and the special effect completely disregards the defender's armor!).
About the implementation, I spent a lot of time hesitating over details, trying to design the system so that it's flexible yet not prone to errors and overcomplication, but complex systems have a natural tendency to defy being forced into a simple design...
After days of bouncing back and forth between a smaller and larger scope for the special abilities, I settled on a system somewhere in the middle. In hindsight, there really should've been a lot more planning and testing before putting it to code, but the lack of concrete progress started getting to me after a few days of nothing but brainstorming and taking notes. Besides, no matter how robust it may seem, I'm sure creative modders will be able to break it. I'll just have to resolve to fix issues as they pop up, since I'd probably drive myself insane before managing to account for all the emergent possibilities. The engine does perform a lot of data checks on startup to make sure the abilities don't include any combinations that don't fit internal parameter restrictions, so we can hope the number of problems should be minimal.
Now that it works, I'll continue expanding the number of supported keywords before moving on to special items like the motion scanner. Much later on there will still be some kind of separate map-centric trigger system for terrain- and mission-related scripting; this one was focused on the game's more dynamic objects, especially entities (units).
Something Special for You
by Kyzrati on 20120609 , under Brainstorm
Just when I thought I'd jump into adding new content, more planning showed that a generic system to implement the chryssalid ability and a few others might as well be expanded into a powerful dynamic system.
Enter "special abilities."
The term is probably not as limited in scope as you might be thinking. Special abilities will enable objects to combine conditional triggers and effects to define unique behavior under the right circumstances, and will probably be applicable to races, entities, armor, items, and/or terrain. They'll make it possible for chryssalids to turn their victims into zombies, zombies to transform into chryssalids on death, silacoids to leaves trails of fire as they move, and many more effects that you didn't see in X-COM. They could enable:
Yesterday I started implementing the necessary data objects, and as a test merged unit death explosions into the system--so now the basic infrastructure is ready. I was considering merging grenade use and light emission (by units, items, and props), but they're already working nicely so I'll leave them alone for now, and maybe migrate those features later. Silacoid fire trails and chryssalid/zombie mechanics are next, and even the upcoming motion scanner, medi-kit, mind probe, and psi-amp functions will fit in nicely. For a single item with multiple manually-triggered abilities (as opposed to the passive kind), there will be a list to choose from when activating/using it (ex: psi-amp, which could then easily be later modified to support a broader spectrum of psionic abilities).
The way this will work:
Abilities specify an initial trigger, and all abilities with a given trigger are checked for whenever the trigger situation occurs. A sample list of possible triggers:
All of the above lists are just what I currently have enumerated in the code for eventual implementation. Many more will be added (ideas welcome).
As a part of the new system, objects will be able to list their traits (or properties, e.g., organic, sentient, metallic, etc.), where the list of possible traits also comes from an external script. So you could pretty easily add new traits and define abilities that may only (or cannot) affect objects which possess a given trait. I'm adding that feature now because it's better than hard-coding the restriction preventing chryssalids from zombifying tanks. Can't have tanks roaming around trying to bite your soldiers, now can we...
Enter "special abilities."
The term is probably not as limited in scope as you might be thinking. Special abilities will enable objects to combine conditional triggers and effects to define unique behavior under the right circumstances, and will probably be applicable to races, entities, armor, items, and/or terrain. They'll make it possible for chryssalids to turn their victims into zombies, zombies to transform into chryssalids on death, silacoids to leaves trails of fire as they move, and many more effects that you didn't see in X-COM. They could enable:
- An alien that absorbs or eats vegetation or objects it passes over/nearby, possibly regenerating itself as a result
- An alien that emits smoke
- An acid beast that corrodes adjacent metallic objects
- Snakemen that lay eggs which can in turn spawn more snakemen (UFO TTS)
- Volatile ammunition for some strange alien device that has a small chance of exploding when loaded
- An alien man-eating plant that chomps on units that pass by it
- A plant that rapidly grows and spreads over time, perhaps with additional side-effects of its own
- etc. (<--very inclusive bullet point ;)
Yesterday I started implementing the necessary data objects, and as a test merged unit death explosions into the system--so now the basic infrastructure is ready. I was considering merging grenade use and light emission (by units, items, and props), but they're already working nicely so I'll leave them alone for now, and maybe migrate those features later. Silacoid fire trails and chryssalid/zombie mechanics are next, and even the upcoming motion scanner, medi-kit, mind probe, and psi-amp functions will fit in nicely. For a single item with multiple manually-triggered abilities (as opposed to the passive kind), there will be a list to choose from when activating/using it (ex: psi-amp, which could then easily be later modified to support a broader spectrum of psionic abilities).
The way this will work:
Abilities specify an initial trigger, and all abilities with a given trigger are checked for whenever the trigger situation occurs. A sample list of possible triggers:
- "Use" an item
- Move
- Attack
- Hit by an attack
- Fall
- Death
- New turn
- Standing in or adjacent to burning/smoking terrain
- Standing next to a unit
- Holding a certain item
- Some stat has a relative value
- Random chance
- Explode
- Spawn an object (many variations)
- Assimilate a unit (switch faction--could be for psi-amp mind control)
- Panic unit (psi-amp effect)
- Mutate one unit into another
- Transmogrify an item
All of the above lists are just what I currently have enumerated in the code for eventual implementation. Many more will be added (ideas welcome).
As a part of the new system, objects will be able to list their traits (or properties, e.g., organic, sentient, metallic, etc.), where the list of possible traits also comes from an external script. So you could pretty easily add new traits and define abilities that may only (or cannot) affect objects which possess a given trait. I'm adding that feature now because it's better than hard-coding the restriction preventing chryssalids from zombifying tanks. Can't have tanks roaming around trying to bite your soldiers, now can we...
X@COM Fans
Tags
- Brainstorm (8)
- Mods (6)
- Progress (26)
- Release (10)
- Screenshots (21)
- Video (10)










