Upcoming OSM/demo: dynamic weather/fog, nonlinear campaigns, custom HUD elements - by kdau
kdau on 25/6/2013 at 18:48
UPDATE: This script module has been released. See the (
http://www.ttlg.com/forums/showthread.php?t=141906) KDScript thread for details.
Greetings again, editors. As some of you may know, NewDark introduced several features that are only available to custom scripts in C++. I used some of these in (
www.ttlg.com/forums/showthread.php?t=141355) A Nice Game of Chess, and in response to queries I decided to make a script module and demo mission that make these features accessible to everyone. Specifically, I'm including
these NewDark features, as well as some random custom scripts that I've written for NGoC and my current WIP.
*
Dynamic fog and weather (precipitation): both can be changed throughout the mission. For example, rain or snow can start or stop, and fog can "roll" in or out.
* I've also written a script that synchronizes global fog to the current zone fog, working around the limitation of the sky only taking global fog.
*
Nonlinear campaigns: a mission can change which mission will start next, dynamically reordering the campaign.
*
Custom HUD elements can be drawn with full alpha blending. (This goes well beyond the old Shock feature.)
* Environment map textures, themselves a NewDark feature, can be swapped out during a mission just like terrain textures can be.
* Additional information about the environment (engine version, whether running from DromEd, which rendering features are enabled, etc.) is available to missions.
My question for all of you is:
what sort of custom HUD elements would you put in your missions, if any? Please comment below with a description of what you'd want, and I'll try to make your ideas possible with the script. (No flames about interface minimalism, please. I mostly agree with you, and I'm sure that authors will use the feature sensibly.) Theoretically, these can include images (static or animated), text (can change color but not font/size), and line drawings, and be positioned anywhere on screen, including tracking the position of a specific object. The data that they display can come from virtually any aspect of the mission. Ideas so far:
* Percentage bar: display the value of any numeric property/field with whatever graphics are desired.
* Tool sight: we already have a bow sight, but some thrown or magic-particle-casting tools in FMs have been a bit hard to use for lack of target precision. A subtle crosshair could appear when such an item is active in inventory.
* Quest arrow: not necessarily the traditional kind (I hope), but any sort of graphic/text that tracks the position of an object.
* Mini-map: selected based on current location, perhaps with pinpoint for current player location.
Also, just in case,
is anyone currently interested in developing a nonlinear campaign? I've specced out a set of scripts that would make this more feasible, which I'm calling the "nonlinear toolkit". If someone wants to create such a campaign, I hope to develop and test those scripts along with that author's building and testing process, since fully testing this kind of system in isolation would be nearly impossible. I would specifically cover the following:
* All player properties, weapons, inventory, and loot would carry over (an expanded version of LastMissionLoot/InvCarryOver).
* Key properties on non-fixed objects would be kept for each mission. The only limit here (as far as I have checked) is storage size, so this should be flexible.
* Entry and exit points would be coordinated, automatically dropping the player at the correct place in the correct next mission.
* Campaign-level objectives would be persistent, while mission-level objectives, if any, would be properly isolated.
* Movies, goals/stats screens, and the like would all be adjusted to make sense for what was actually happening.
Once I complete the HUD script and do some more local testing, I plan to release a demo/alpha version in the next week or so.
sNeaksieGarrett on 25/6/2013 at 20:46
This sounds awesome. I'm particularly interested in how you'd set up dynamic weather. That way you could make it rain or snow for a bit and then shut off. No longer would we have a binary weather system!
As far as the HUD goes, the only thing I can think of is a better way of dealing with health. The default method is to have singular shields in the bottom left, but having a bar that goes down (I know, it's been done in FMs already) and is less visible (smaller and maybe right underneath the light gem perhaps?) would be nice. I'm just wondering if you're method is easier to set up than the bar method that FM authors have used. I'll admit that I haven't looked into how they've done that, so I don't know if you'd even want to bother messing with that since there's already a method being utilized.
kdau on 26/6/2013 at 03:47
Quote Posted by sNeaksieGarrett
This sounds awesome. I'm particularly interested in how you'd set up dynamic weather. That way you could make it rain or snow for a bit and then shut off. No longer would we have a binary weather system!
Indeed. Right now my script just has parameters for frequency and drop speed, so that any desired trigger could turn weather on/off or change the intensity. The feature allows changing everything about weather, though, so theoretically you could do something like falling leaves giving way to snow. (I believe that one type of precip would have to stop completely before the next one started, but other than that the sky's the limit.) (Sorry about the bad pun. :joke:)
Quote Posted by sNeaksieGarrett
As far as the HUD goes, the only thing I can think of is a better way of dealing with health. The default method is to have singular shields in the bottom left, but having a bar that goes down (I know, it's been done in FMs already) and is less visible (smaller and maybe right underneath the light gem perhaps?) would be nice. I'm just wondering if you're method is easier to set up than the bar method that FM authors have used. I'll admit that I haven't looked into how they've done that, so I don't know if you'd even want to bother messing with that since there's already a method being utilized.
I would imagine that the bar style is done by having "shield" images (bits of the bar) that are flush with each other, but I've never looked. What I can do is a generic "percentage bar" element that, with whatever graphics you provide, could display the status of any numeric property/field - player health, AI health, amount of something that has been picked up or consumed, progress towards a cumulative goal, etc. I'll add that to my list.
sNeaksieGarrett on 26/6/2013 at 04:53
Cool. So if I understand you correctly you'd be able to set up a boundstrigger for example that would then have your scrip on it and would tell Thief that you want to say, increase precip speed or something.
kdau on 26/6/2013 at 06:54
Quote Posted by sNeaksieGarrett
Cool. So if I understand you correctly you'd be able to set up a boundstrigger for example that would then have your scrip on it and would tell Thief that you want to say, increase precip speed or something.
Exactly. In my WIP, a light drizzle turns into a torrential downpour at a dramatic plot moment, complete with distant thunder.
PinkDot on 26/6/2013 at 20:31
kdau - I really like what you're working on especially the dynamic wheather effects. I kind of hoped that we would be able to do it one day, as I was able to change the fog with the console commands while being in the game mode. Great to see it actually happening!
Just a question - is it only fog distance that we will be able to change or the colour as well?
BTW. now what we need is sun light map calculations in the background and we would be able to have a day-night cycle in the new dark engine!
Quote:
Environment map textures, themselves a NewDark feature, can be swapped out during a mission just like terrain textures can be.
Does fog affect environment map textures?
Also - is there a chance (in the future) to have it updating from time to time, so it would reflect any changes in the environment. (f.e. the day-night cycle mentioned above.. :) )
R Soul on 26/6/2013 at 21:02
Quote Posted by kdau
I would imagine that the bar style is done by having "shield" images (bits of the bar) that are flush with each other, but I've never looked.
That's correct, but the shields (and light gem) are objects. shield2.bin and UICRY##.bin
kdau on 26/6/2013 at 21:27
Quote Posted by PinkDot
kdau - I really like what you're working on especially the dynamic wheather effects. I kind of hoped that we would be able to do it one day, as I was able to change the fog with the console commands while being in the game mode. Great to see it actually happening!
Just a question - is it only fog distance that we will be able to change or the colour as well?
Both distance and color. :thumb:
Quote:
BTW. now what we need is sun light map calculations in the background and we would be able to have a day-night cycle in the new dark engine!
Ah, the impossible dream. I bet someone really talented with lighting could even simulate it with a bunch of animated lights. A (hopefully) much simpler bit that I'd like to see would be the ability to change the NewSky settings. Even if the sunlight were constant, a nice slowly-falling sunset would be lovely.
Quote:
Does fog affect environment map textures?
Not that I can tell. That's actually what I'll show in the demo, one envmap texture being replaced with another to match a change in fog and lighting color.
Quote:
Also - is there a chance (in the future) to have it updating from time to time, so it would reflect any changes in the environment. (f.e. the day-night cycle mentioned above.. :) )
Sure, I expect I'll be around here for a good while. Whatever our feathered friend(s) see(s) fit to add to NewDark, I'm glad to write a script for. :)
Quote Posted by R Soul
That's correct, but the shields (and light gem) are objects. shield2.bin and UICRY##.bin
Interesting. That suggests some unexplored possibilities!
Sliptip on 27/6/2013 at 10:45
Kdau this is fantastic news! :eek:
I think I'm most excited about the ability to dynamically change which mission loads next! That's a feature I've always wanted but never thought I'd ever see! With the HUD, do you think a mini-rotatable map would ever be possible?
PsymH on 27/6/2013 at 16:41
Quote Posted by kdau
Ah, the impossible dream. I bet someone really talented with lighting could even simulate it with a bunch of animated lights. A (hopefully) much simpler bit that I'd like to see would be the ability to change the NewSky settings. Even if the sunlight were constant, a nice slowly-falling sunset would be lovely.
Man, that would be superb, because I'm working on a mission with two parallel worlds and each world has it's own sky. :thumb: