- Nuke global preference variables (they're now fetched with get_xxx_pref whenever needed)
- Nuke magic SDFs that store preferences and other info
- The only preferences now stored in the saved game are those related to difficulty
- play_sound no longer takes an option repeat parameter, but instead takes a delay which will be used if sounds are disabled
- SDF array increased to 350x50
- When saving a legacy scenario, a dialog is shown to remind you to update and to allow you to clear the legacy flag
- All buttons from the array that were strictly related to UI have been removed.
- Some new buttons have been added. The duplicate Leave button has been removed.
- Tests for converting legacy terrain types
- Tests for initialization to sane values
Fixes:
- cCreature no longer initializes spec1 and spec2 to 0. This probably didn't cause bugs, but who knows...
- In fact, cCreature no longer explicitly initializes anything in its cTownperson superclass. That's what the superclass constructor is for after all.
- Relatedly, cTownperson now defaults to a facial graphic of -1. Also a docile attitude.
- iLiving defaults to ap 0, direction here.
- Fix Change When Step terrains to properly support not having a sound while still allowing an arbitrary number of custom sounds.
- Add support for a lack of sound to Change When Used terrains, including at conversion time (original game supported it but OBoE was forcing the sound to a door sound).
- Fix conversion of crumbling terrain types (old conversion was allowing quickfire to destroy them)
Other:
- New addAttack method in cMonster.
- Change snd_num_t to signed, because it's been getting annoying that I can't easily use -1 to mean "no sound".
- Vahnatai no longer have a bonus to mage spells (that's now the Magery item ability)
- Vahnatai XP gain bonus changed
- Fix sliths being noted as resistant to poison (they aren't and never have been)
- Click one to jump directly to the description of that node.
- Back/forward buttons work thanks to history API.
- List is sorted alphabetically.
- This was also done for the page describing item abilities.
- Choose Picture dialog now scales these pictures down to fit in the available space, thus avoiding the ugly overlap issue.
- Choose Picture dialog now supports full sheets, scaling them down in a similar manner
- Due to the above, the Display Picture node now offers a Choose button
- The possibility of large (72x72) dialog pictures is now properly documented
- On load, the game now detects graphic sheets and sounds whose IDs are "discontinuous", as well as graphics intended to directly replace preset graphic sheets.
- Edit sheets dialog can now handle "discontinuous" graphics. (The edit sounds dialog already could.)
- Edit sheets dialog prompts user to create a new sheet if there are none already, and also if there are some but not ID 0 (in the latter case they can cancel and still edit the sheets).
- Edit sheets dialog prompts user to convert sheets if the scenario is legacy, rather than doing it silently
- Edit sheets dialog now has "new" and "delete" buttons
- Edit sounds dialog now has functioning "delete" button
- Nuke some uses of strcpy, sprintf, etc; current info strings in the scenario editor are now stored as std::string instead of C-strings.
- A smarter method of calculating the "erase" terrain for a given terrain type. In case of impassable spaces, trims, and walkways, instead of using the ground terrain, the trim terrain (if any) is used as the erase terrain; if there's no trim, ground 0 (cave, by default) is used. The method of determining if two terrains are essentially the same (ie, whether to paint or erase) has also been improved a little.
- Also, to reduce confusion, the erase terrain is now shown beneath the paint terrain.
Terrain changes:
- Add "archetype" flag as a better way of determining which amongst a set of terrains sharing the same ground type should be considered as the most basic terrain of that ground type. It's automatically applied to any terrains using original graphics when importing an old scenario; generally, any with no terrain special will be marked as an archetype, but if the lava graphic was used, it's instead any with a terrain special. It's a crude method that may easily break, but probably not possible to do better.
- When importing old scenarios, set the two walkways to be separate ground types while the crops should have grass as their ground, and the conveyors have cave.
- Fix fly, boat, block horse LEDs not being cleared if a terrain lacks that flag when using the arrow buttons. This could lead to terrains accidentally picking up the flags of nearby terrains in the list.
- Fix the block horse flag was not correctly saved when closing the dialog.
- Fix the block horse flag not being correctly loaded from the scenario file
Can't Enter node renamed to Prevent Action, as it's a more accurate description of what it does. It has been expanded to cover the following cases, all of which are documented:
- When the special node was called during an attack action (which involves a weapon whose ability is to call a special node when attacking, or an item or monster ability that calls a special node when hit), then Prevent Action reverses the action point cost.
- When called as the result of a purchase (a shop item that calls a special), then Prevent Action prevents gold from being deducted (which is also new in this commit, as before it never deducted gold)
- When called as the result of using a normal item (not a special item), then Prevent Action prevents a charge from being deducted
- When called as the result of a monster using its ability, then Prevent Action prevents the action points from being deducted
- Cases it already covered (cancelling initiation of talk mode, searching of containers, outdoor wandering encounters) have been documented
- The fact that it will break things during talk mode is also documented now
Start Spell Targeting node has been tweaked and gained some new options:
- You can allow the player to target opaque or antimagic spaces. In town mode, you can prohibit them from targeting antimagic spaces.
- You can specify a special node to be called if targeting fails because they selected an invalid space, or because an special node keyed to spellcasting context cancelled it
- You no longer get a "Hit 'p' to cancel" message. Even better, hitting 'p' does not cancel it. (Well, more precisely, it triggers the failure node, with the party's or pc's location as the target space.)
Misc:
- Fix crash outdoors due to trying to check for force barriers
- Add instant help message
- Prevent from ending town combat if one member is in a forcecage or if everyone's in a different forcecage (you can still end it if everyone's in the same cage)
- If entering town combat while caged, everyone remains in the cage
- Penalties to melee combat if the target or attacker is in a forcecage (higher penalties if the attacker is caged, unless they're using a pole weapon)
- Instead of placing a forcecage at every location where someone gains forcecage status, the game now syncs forcecages (placing them on locations where someone has forcecage status) at the end of the move.
- The Flash Step and Word of Recall spells and any specials that move the party also clear their forcecage status, so that a new forcecage won't appear on their new location. If they're moved into a forcecage, the syncing process will give them the status at the end of the move.
- Forcecage status now supported for the Occasional Status item ability
- Forcecages now eventually expire on their own even if you can't break out. Unoccupied ones also have a slight (0.1%) chance each turn to expire.
- Affect Status node now allows forcecage status. (It also works as documented, using Extra 1c rather than 2a as the status type.)
- Preset monsters placed in preset force cages gain the status at town initialization; it's a lot more than they'd gain through the syncing process, so unless they break free, it'll last a very long time.
- Monsters/PCs with spells (and PCs with Mage Lore) now have an increased chance of resisting entrapment in a forcecage
- If the full party is subject to a forcecage, the PC with the best chance of breaking free (assuming they don't resist) is chosen to determine whether they resist. Note that this may not be the PC with the best chance of resisting in the first place.
- Protection from Forcecage now implemented as an item ability
Other stuff (though related):
- Reset party's combat pos to the null location (-1,-1) after a cutscene ends; to not do so would mess up get_loc() calls
- String buffer referencing is no longer done via a pointer but instead by a magic value separate from the pointer system (it's still -8 though)
- String buffer now stored in universe instead of scenario
- Monster radiate abilities can now specify a spell pattern to use
- Fix some abilities being incorrectly shown in the editor's ability details dialog (for example, radiate abilities were shown as "Summon aid")
- Add the recently-added monster missile types to the options offered in the editor
- Fix chance of activating not being editable for the martyr's shield ability
- Show the monster summoned for summoning abilities (finally!)
- Show the subcategory for unusual abilities (one of active, passive death)
- Fix the displayed percentage chance for summon abilities (the permille was shown instead)
- Fix incorrect action point display in the editor for the two recently-added monster missiles
- Fix crash when editing a missile ability
- Fix abilities page not showing the newly-added or recently-edited ability after exiting the detail/option dialog
- Fix pick monster button for summoning abilities being off by one
- Fix documentation of how to format map graphics, to match the logic in the code
- Fix display of map graphics both on the automap and in dialogs
- Add Choose button to select the map graphic
- Fix the vanishing text bug again (this time it only triggered for fields with a single character in them)
- Fix light mask not rendering correctly
- Fix terrain-sourced lighting not being calculated on scenario load
- Fix light-removing items incorrectly applying their ability strength
- Fix smash patterns not affecting opaque tiles (such as mouldy walls)
- Fix monsters outside the light range not being rendered when fog is lifted
- Fix town timers not being cancelled when you leave town
- Fix non-existent outdoor wandering encounters sometimes triggering due to uninitialized data
- Hard-wrap some doc lines
- Node to change a monster's location (also works on party members)
- Node to temporarily place text on the map
- Fix the "lift fog" node
- Remove the optimization of only redrawing a terrain space if it has changed
- Missing special node opcodes
- Pass the party's (or in combat, the active character's) current location to special nodes triggered by timers
- Fix the set pointer node
- Fix terrain palette not correctly registering clicks while scrolled down
- Fix sheets not correctly being copied from the temporary files folder
- Fix monster abilities not being loaded from new scenarios
- Fix custom sheets not being reloaded if they have changed
- Documentation tweaks
- Alter monster statistics on the fly, including basic attacks
- Alter experience level and morale (the latter currently only works on monsters while the former might have strange results on PCs)
- Alter the contents of the player's soul crystal
- Forced Give node now has an option to force-equip the item
- place_monster no longer places a monster if one is already there, except when special node forces it
- targeting node no longer moves to jumpto if an error occurs
- fix targeting and pattern nodes not appearing in the editor
- The job board is loosely based on Exile III's job board; the dialog is converted from the one contained as a relic of E3 in BoE
- Quest system is loosely based on a mix of Exile III jobs and Blades of Avernum quests
- Talking to a monster (even a hostile one) can now trigger an arbitrary special node
Dialog engine:
- LED's now support wrapped labels
- Augmentation - gives one PC bonus hit points
- Nirvana - gives one PC negative dumbfounding and bonus spell points
- Icy Rain - like Firestorm, but cold damage
- Flame Aura - Damages spaces adjacent to caster
- Summon Aid - Like Summoning, but only summons one
- Major Summon Aid - Like Major Summoning, but only summons one
- Flash Step - Short-range teleport
- Fix Blade Aura spell not having refer and timing information; it also had the wrong ID (82 instead of 72