Commit Graph

59 Commits

Author SHA1 Message Date
a51ab021f4 Add two new special nodes for cutscenes
- 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
2015-06-03 20:56:07 -04:00
1b754619dc Several more tweaks/fixes
- 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
2015-06-02 22:01:22 -04:00
2dee8e81f7 Add editor support for the new Affect special nodes 2015-06-01 14:59:14 -04:00
965dcc1201 Add ability for an item to call a special node when dropped 2015-02-07 13:10:28 -05:00
5bfae50315 Traits and races
- Vahnatai race implemented
- Pacifist trait implemented
- New trait: Anama - classified as a disadvantage but also has some perks
- PCs with bug race now immune to web fields
- PCs with undead/demon races now do that type of damage on unarmed attacks

The new races and traits probably still need some work/balancing.
2015-02-05 17:33:12 -05:00
36491c818c Implement a dialog to edit shops in the scenario editor 2015-02-04 13:55:22 -05:00
fcd29fb2ac Fix scenario editor build and update data/docs regarding shop nodes 2015-02-03 13:53:03 -05:00
559663dd35 New special nodes to store/unstore PCs outside the party structure
- Stored PCs are lost when you leave the scenario
2015-02-02 14:18:30 -05:00
4f93e8ea5a Update special node and talking node strings/data for the new quest stuff
- Also, Update Quest node now uses the mess1/2 fields.
2015-02-02 11:38:36 -05:00
4efcb08932 Implement a quest system and job board
- 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
2015-02-01 01:30:15 -05:00
5364d9cb62 New spells that can be attached to items:
- 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
2015-01-30 17:12:16 -05:00
2de0b76454 Merge all the shopping talk nodes together into a single node type
Also:
- Fix items in magic shops respawning when re-entering the shop
- Remove unused food shop type
2015-01-30 12:56:01 -05:00
7a59776189 Various special node fixes/tweaks
- Fix secret passage nodes (CANT_ENTER with ex1a = 0, ex2a = 1) not working
- Set many flags now sets the entire row of 50 flags
- Division node now accepts either SDF to be null
- New mode for append item to buffer - adds the item's "interesting string" rather than its name
- Affect mage/priest spell inverted the meaning of ex1b relative to other affect nodes; this has been fixed
- Fix affect party status being confused about which fields mean what (the implementation had one idea, and the porting of old scenarios had a different idea, and the scenario editor had yet a different idea). In addition, it now allows removing the statuses.
- Fix some typos in special node information for the editor
2015-01-29 22:48:42 -05:00
a4350ca8b2 Add two new monster races to account for previously-hardcoded special cases
- Skeletal undead are distinguished from normal undead in that they leave sfx bones when they die; normal undead leave no sfx. In all other respects, they are the same.
- Goblins are distinguished from other humanoids in their death sound. In all other respects, they are the same.
- The sleep() function for players now checks for racial immunity - eg undead, plants, etc
- Protect form humanoids now also protects from sliths, nephilim, vahnatai, and goblins, as it should (this is legacy behaviour)
- Protect from undead still also protects from skeletal undead
- The special case for the ogre death sound is removed; that might mean that ogres can now have a femal death sound? I'm not quite sure what the purpose of the exception was.
- The if species node can now check for non-standard races in the party
- When loading a legacy scenario, it attempts to detect skeletal undead and goblins by the presence of the words "Skeleton" and "Goblin" in the name, respectively
2015-01-28 17:04:01 -05:00
a23682306c Finish edit terrain type dialog in the editor and tweak some terrain properties
- Introduce enum for step sounds
- Remove union for treating terrain flags as either signed or unsigned
Editor:
- Add Choose button to select the "transform to" terrain.
- Implement Choose buttons as appropriate for the terrain flags, including editing the special that a terrain calls.
- Range-check the terrain flags.
- Add Custom button to choose a town as the combat arena.
- Fix/tweak/improve several of the terrain flag prompts.
- Fix placing shortcut key in field as its ASCII code instead of the letter
- Fix some of the range checks that were already in place but were incorrect or improperly static
Game:
- The wilderness terrain types now allow specifying how many d6's of food you get when hunting there.
- Crumbling terrain uses flag 2 instead of 3 to determine method (flag 2 was supposed to be strength but was never used)
- Merge two functions that did almost exactly the same thing (namely altering a terrain space and potentially updating conveyor/lights info)
- Merge switch_level into handle_lever since it was the only place it was called
- Remove global store_special_loc; the location is stored in the stuff_done array now
- Change when use/step on terrains will now update lighting if they changed to a terrain with a different light level
- Terrains that call a special no longer support mixed global/local modes - they either always call a local special or always call a global special
- Use previously unused swap_ter function (which did the exact same thing as the swap terrain special node)
Dialog Engine:
- Don't "erase" invisible icons or buttons; it's not necessary, since the entire window is filled with background before the draw() method is called, and it causes problems in case of overlapping elements.
2015-01-28 15:43:58 -05:00
38401d651b Extend the generic to have the same capabilities as the non-generic stair
- That means properly handling stairways during combat or talking
2015-01-26 23:50:11 -05:00
12d1760fd3 Split "if looking", "if in boat", "if on horse" into separate special node types rather than filing them under "if context" 2015-01-26 22:50:16 -05:00
0069ef7df0 Implement some new preset combat arenas (camp, crops) and generalized loading of a town as the arena 2015-01-26 21:50:36 -05:00
d0ea2064c5 Use the extra boom type for magic damage and add special node support for super-huge booms
(Like the one when you destroy a slime pool in Exile III.)
2015-01-26 19:31:52 -05:00
a3c998eaad Enable the hunting code path for an additional advantage of cave lore/woodsman traits
- However, this won't be enabled in legacy scenarios since it requires setting terrain special abilities
2015-01-26 15:16:26 -05:00
d877df5101 Lots of fixes large and small
- Fix crash while resting outdoors
- Fix screen not going dark while resting
- Fix crash when starting a new game from the death dialog
- Fix several typos that completely broke combat and special encounters
- Fix bless/curse being inverted when applied to PCs
- Fix booms not showing when stepping in damaging fields in combat
- Fix crash when attempting to save a game that has never before been saved (due to clicking cancel at the initial save dialog)
- Fix some of the flickering during animations
- Support "special" damage on PCs - pierces invulnerability much like it does for monsters
- Fix monster missiles sometimes being mistargeted in combat mode
- Fix iLiving->index conversion
- Add special damage to scenario editor list
2015-01-25 23:06:13 -05:00
d396e459a3 Pass around iLiving references instead of target indices in most combat contexts (and some non-combat)
- Fixes PC melee attacks using webs from the wrong PC
- Support for PC-on-PC attacks is in place, though these code paths are currently not entered; could be used for charmed PCs, for example
- In many cases, status effects that don't affect monsters are now supported for them (but still don't affect them... yet)
- The "special" damage from assassination is now handled differently; support for it is no longer hard-coded into damage_monst(), and the message display for it is handled externally from damage_monst(). Also, it's no longer used for any kind of magic weapons.
- Select target special node has changed its way of selecting a specific monster/PC as the target
- Fix monster-on-monster attacks applying poison on all three attacks instead of just the first
2015-01-25 18:24:47 -05:00
f574281c3f Make monster/item lists in party town record dynamic 2015-01-23 02:53:36 -05:00
5315655bc6 Fix up some minor issues with the special node editing dialog
- Also: merge "nuke monsters" and "destroy monster" nodes, since the action of the "destroy monster" node isn't what it sounds like; now it simply destroys a single monster on a specific space
2015-01-21 22:36:00 -05:00
311a3c0702 Get the item abilities dialog working and updated for new stuff
- Add additional treasure type for "unique" items
- Main item dialog now shows the item ability's display name, and also has more space for the item's full name
- (Game) No-ammo missiles (eg slings) are now counted as weapons by shops
- (Dialog Engine) Fix LED groups being drawn when invisible
2015-01-21 14:04:40 -05:00
74ed88f2f3 Several new item abilities and one new monster ability
- Range augment ability for missiles
- Seeking ability for missiles (can strike an adjacent space if targeted space lacks a target, including chance of hitting invisible monsters)
- Weapon that calls node when attacking with it (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- Armour that calls node when attacked while wearing (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- Monster ability that calls node when monster attacked (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- The above three only apply to non-magical attacks - some things don't trigger it, like spells, monster rays and breath weapons, possible a few others
- Armour that protects from all melee damage (including demon/undead, though less)
- Armour that decreases chance to be hit (both in range and melee, against non-magical attacks only)
- Armour that behaves like to the martyr's shield effect but also has a chance of adding some extra bonus damage
- Armour that's more encumbering than advertised (best for cursed items with concealed ability)
- Multiple items with the accuracy ability now stack
- Fix nephilim not getting their racial bonus to missile weapons
- In specials called as part of an attack, the reserved pointer -20 contains the target in a form ready to pass to a SELECT_TARGET node, while -21 and -22 contain the location of the target. This includes the new cases added in this commit plus the monster ability to call a special node on its turn. It does not include specials called in the spell targeting context (to do so would break legacy scenarios), nor specials called after a targeting node.
- If a PC is carrying more than their max weight, they gain encumbrance equal to one-tenth of the excess.
- Add some missing context cases to IF_CONTEXT node
2015-01-20 21:40:48 -05:00
42639882e3 Add option to call a scenario special node to apply the effect of a trap
Also:
- The possible traps resulting from "random trap" is expanded to include the knife trap
- A custom picture can be specified for the trap dialog
- A given custom trap special node can be reused for the same trap with different levels - the pointer -5 holds the trap level passed to the ONCE_TRAP node
2015-01-20 17:18:46 -05:00
5450ae1caf Implement editing dialogs for individual monster abilities
Changes to game:
- Permanent martyr's shield is now customizable - extra1 is per-mille chance to activate each time damage is taken, and extra2 is percent of damage taken to apply to attacker
- Absort spells is now customizable - extra1 is per-mille chance to activate each time damage is taken or a magic effect is applied, and extra2 is how much hp to gain from non-damaging magic effects
- Splits ability is now customizable - extra1 is per-mille chance of splitting each time damage is taken
- Special node ability is now called before the monster tries its normal attack, and multiple monsters can use them per round (though each can only use theirs once)
- Fix issue with breath weapons and icy touch abilities conflicting (legacy import issue)
- Add two variations of the summoning ability - summon according to summoning level (like the spells), or summon a random creature of a particular species
- Fix touch abilities using the range as chance to use

Changes to dialog engine:
- Fix tab order handling to exclude fields that are currently hidden
- Add method to retrieve the parameter passed to toast(), as a quick way to distinguish between the user clicking OK or Cancel after run() has exited
- Fix hidden fields being drawn anyway
- Fix setting stack page sometimes crashing if the current page was invalid due to earlier reducing the page count to 0
2015-01-20 17:18:41 -05:00
3d7fcbd60e New special node to initiate conversation (should even work outdoors) 2015-01-17 15:00:22 -05:00
544cc80e56 Add special nodes that hook into the spell targeting system
- Node to initiate targeting mode and call a special once targets are chosen
- Nodes to place a spell pattern (one for fields and one for booms)
2015-01-17 02:09:50 -05:00
4ae1bf1d24 Make room to add more town specials by shifting the rectangle specials up 2015-01-17 01:48:41 -05:00
e2093b5997 Update special node opcodes 2015-01-16 23:14:30 -05:00
c5e302e0cc Several new special nodes
- A set of nodes for building complex strings in a string buffer; to reference the string buffer anywhere a string is expected, you can use -8 as the string number
- A node to pause the action for a specified period of time
- Nodes to alter traits, action points (only in combat), and PC/monster names
- Node to create a new level 1 PC with a specified race, name, graphic, hp, sp, basic stats; custom graphics supported too
- Nodes to test for deadness, spells, alchemy, and status effects
- Node to centre the view on an arbitrary space
- Node to lift the "fog of war", which currently means the unseen and light masks (which can actually be disabled in preferences anyway)
- Node to edit maps (ie, specify which areas are explored)
Changes to existing nodes:
- All the rectangle nodes that affect terrain now work outdoors.
- Play sound node now has an asynchronous option
- Fix min and max modes being swapped in the check statistic node
- Select PC now allows restricting to dead PCs or to PCs with free inventory space
- Select PC now calls the "on cancel" node if a non-interactive selection fails
- Affect deadness node now allows: setting/clearing the "fled outdoor combat" flag; setting/clearing the "absent" flag used for splitting the party; (un)deleting a PC
- If context node can now check if the party is in a specific boat/horse as opposed to any boat/horse
2015-01-16 22:57:39 -05:00
d729bcc86b Merge all the status effect special nodes
- It's now possible to affect weapon poison, martyr's shield, acid, and life detection from a special node
- Affect nodes now always take resistances into account when harming, but never when helping
2015-01-16 10:33:57 -05:00
71ce8946a0 Changes to split party implementation
- Supports playing arbitrary sound along with the split (rather than just teleport sound or no sound)
- Correctly imported from older save files
- Support for splitting off an arbitrary subgroup of the party rather than just a single PC (though the special node doesn't yet allow this)
- Support for leaving town while split - if you leave town, the absent PC's items are not dropped on the ground when later entering a town
- Option to not change location when reuniting
- If you reunite in a different town than you started, you are returned to the town you split from
2015-01-16 01:51:59 -05:00
9433060890 Changes to select/affect special nodes
- Select PC node can now select a specific monster, rather than a PC; it's renamed to Select Target
- Damage node no longer allows setting pic to 1 to damage active PC in combat
- Damage node now accepts a sound to accompany the damage
- Damage node now works on monsters
- All affect nodes that can work on monsters no longer get the monster to affect from ex2a - instead, they use the currently selected target

The default target selected when a special node chain begins execution has changed.
- When called in certain contexts (kill/see monster, monster special ability), the monster that triggered the node is the default target.
- In the use/target space contexts, if there's a monster on the space, it's selected as the default target.
- If neither of the above hold and the game is in combat mode, the currently active PC is selected
- Otherwise the previous behavour is used - if the party is split, select the sole PC, otherwise select the whole party.
2015-01-16 00:14:41 -05:00
aaa3cde16b Lots of special node changes
- Moved change/swap/transform terrain to the General section
- Merge change outdoor terrain into general change terrain
- Merge if town/outdoor terrain nodes
- Merge the if+take nodes with the equivalent base nodes
- Merge secret passage node into the can't enter node
- Move outdoor shop to the General section since it's not restricted to outdoors
- New story dialog node displays a sequence of strings one at a time, like the Exile 2 intro dialog
- New town nodes for animations: run missile, animate monster attack, draw simple boom with optional damage number
- If fields node expanded - now checks if the count of the desired field type existing within a specified rectangle falls within a given range
- Place items and move items nodes can now set the items as contained, provided there's a container on the destination space
- All rectangle nodes can now be restricted to just the boundary, as per the documentation
2015-01-16 00:06:12 -05:00
7b55262ed4 Several little fixes
- Fix custom missiles causing a crash if graphic not found
- Fix display in transcript of damage taken by monsters
- Fix missile start items not having their missile graphic set
- Fix immunity fields being signed (which would've prevented immunities from working properly)
- Don't bother generating a random number if min and max are the same
- Fix monster attack types not showing right
- Fix checking for item abilities returning 0 instead of 24 when not found
- Fix not updating screen when switching active PC
2015-01-15 15:03:32 -05:00
04b9aec921 Reform PC editor menu -> command mapping so that the non-platform-dependent code doesn't need to know where the menuitem is
- Also disable edit menus when no party loaded and fix item menus not being populated if the party is in a scenario
2015-01-05 17:17:34 -05:00
e9f6e63b25 Fix up the monster editing dialogs 2014-12-28 11:31:57 -05:00
ab57e71d90 Convert the two dialogue editing dialogs. 2014-12-28 00:12:59 -05:00
df25711e87 Implement the remaining Choose buttons for the special node edit dialog.
Also:
- Fix text response node using wrong string for response matching
- Fix inability to change PC race during party creation
- Info string area in select trait dialog widened considerably
2014-12-27 17:25:46 -05:00
57a0e728bb Reform the dialog special node types.
- Any picture type is now possible; the nodes split by picture type alone were merged
- Town portal now honours your chosen picture. Town stairway also allows you to choose.
- The two one-shot dialogs now use msg3 where they previously used msg2; this is to make way for later expansion
2014-12-26 23:04:09 -05:00
bdcd2fc67c Complete rewrite of special node edit dialog
- Now has space for the additional fields that have been added.
- The dialog text has been updated so that labels, names, etc reflect all (or at least most) changes that have been made to specials so far.
- A lot more fields provide a Choose button than previously. A few of these are still unimplemented though.
- Rect specials have their own button now, instead of being filed under Town specials.
- New help button (not yet implemented)
- You can now cancel when deep into a node chain. You're given a choice of discarding the entire chain or just the current node; choosing the latter is similar to clicking "Go Back", but doesn't save your changes.
- Nodes are no longer saved prior to clicking OK (which saves all the nodes you were working on) or "Go Back" (which saves just the current node). So, choosing the first option when clicking Cancel could lead to a lot lost.
- Incidental change: The arithmetic special nodes now use the message 1 and 2 fields in the standard way.

Supporting dialog engine changes:
- Picture choice dialog now has a way to get the index of the selection, rather than just the picture selected.
- Picture choice dialog no longer sorts the list of pictures. If sorting is desired, the list should be sorted prior to passing it in.
- Picture and string choice dialogs now support attaching a "select handler" to be called when the selected item changes, because the normal way to do this would override the all-important focus handler that the dialog uses to track the currently selected item.
2014-12-26 02:02:56 -05:00
2ef6d01ec7 Update spell data
- Fireball mistakenly required you to select a PC target while Haste did not.
- Forgot the two special monster priest spells
- Changed display name of ICE_WALL_BALL
2014-12-16 18:40:54 -05:00
d88ace968f Use the spell enum for monster spells
- Enemy priests now cast Goo instead of Stumble; this was changed to match the effect of the spell.
- Enemy priests now cast Minor Heal instead of Light Heal; this is merely a name change to match the equivalent PC spell.
- PCs now cast Bless All instead of Bless Party; this is merely a name change to match the equivalent monster spell.
2014-12-16 14:45:32 -05:00
0f140d3d86 The names of spells and alchemy were duplicated in several places, all slightly different; this unifies them all in one place 2014-12-16 00:39:24 -05:00
a3edc5cba6 Spread out magic-names string list to make sure there's room for special spells 2014-12-15 23:35:31 -05:00
0344cf2525 Introduce a spell enum, and use it everywhere for PC spellcasting
- Monster spellcasting is untouched
- Also updated the spells documentation, which had some old information from Exile III and omitted a lot of ranges.
2014-12-15 08:46:43 -05:00
f331d3d6db Allow placing low-level spells in shops 2014-12-12 13:26:26 -05:00