Commit Graph

277 Commits

Author SHA1 Message Date
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
e689ed93ef Update the in-game item info dialog and restore support for long item descriptions 2015-01-21 21:26:23 -05:00
41fbd73ef9 Get the scenario, town, and outdoor details dialogs updated for new stuff
- Advanced town details now offers edit buttons to edit the specials immediately

Changes to dialog engine:
- Fix tiny buttons stretching to fill label area
- Fix LEDs stretching if label area is higher than LED button
- Fix LEDs ignoring font setting
2015-01-21 15:59:09 -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
7837459177 New item variety: Special
- When picked up or purchased, the party gains a special item
2015-01-20 17:45:15 -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
bbe8e766ca Update the edit item dialog for new things (missiles, arbitrary key weapon skills)
- Also, missile weapons now use the key skill as well
- Fix guessing of missile types - using the item level didn't work out since the levels weren't what the original code expected, so now it just goes by the name
2015-01-20 17:18:42 -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
7084991e55 Get the edit monster abilities dialog all working and updated (except for editing individual abilities)
Game changes:
- Remove support for playing a sound and displaying strings when a monster is first seen, since these behaviours can easily be obtained by using the special node called in the same context.
Dialog engine changes:
- Support for changing the font size of LEDs
- When setting the page, a stack now applies a default value if the map is missing the required data
- Add utility "addPage" method to stacks
- If reducing the page count means the current page is deleted, a stack now switches to the last page
2015-01-20 17:18:39 -05:00
1441f6bfe9 Fix misalignment of statue attack graphic 2015-01-20 17:18:38 -05:00
967438ecec Add dialog to the scenario editor to let it know what type of graphics are in the custom sheets
- If you do this, it adds the graphics to all relevant select graphic dialogs, at the end, allowing you to choose custom graphics without having to remember the number schemes
2015-01-20 17:18:37 -05:00
3852ca37cd Make monster resistances a percentage and update monster info dialog
- Fix monster roster menu not working
2015-01-17 18:56:15 -05:00
cdeb02c214 Get the edit monster dialog completely working and updated for new stuff
(Just the main dialog, not the abilities dialog)
2015-01-17 16:56:37 -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
31b63b1ab7 Change party status effect display to use small icons instead of text
Also:
- Redo PC status effect drawing to use a loop
- Add status icon for hyperactivity effect
- Fix display of monster name/AP on the text bar
2015-01-16 03:22:50 -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
f282c06bfa Write the code to save the general scenario data to a file
- See monster strings are now fetched from the same list as the special encounter strings instead of a list of their own
- There is now a possibility for the scenario intro dialog to have a different icon than the scenario icon
- Remove unused intro_mess_len field
- Add method to the XML printer class to push a simple element with no attributes or child elements
- Automatically close any elements before writing the document to the stream
- Fix scenario editor File menu having an invisible "Close All" option that appeared when the option key was pressed
2015-01-13 20:54:51 -05:00
2a41b68129 Split monster immunities bitfield into more comprehensible chunks.
- Monsters now properly decide whether they can enter damaging terrains
- The possibility of being unusually vulnerable to a damage type is introduce - such monsters would take double damage from that type
2015-01-13 12:33:04 -05:00
6cae5d8bbd Add rudimentary error messages to the special nodes parser
- It tells you the line number, but not the nature of the error
- Unfortunately it can't currently cope with files that don't end in a newline
2015-01-10 19:12:33 -05:00
8a692b16d4 Create a script to build a Windows installer 2015-01-09 18:06:04 -05:00
f25a6e58f3 Reform game menu -> command mapping so that the non-platform-dependent code doesn't need to know where the menuitem is
- Also fix some issues with the notes dialogs
- Journal is now available; has a different icon now
2015-01-05 18:39:54 -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
5bbda27a1c Convert the last of the scenario editor dialogs 2014-12-28 10:47:25 -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
ddbc143c84 The select town/sector dialogs now offer a Choose button 2014-12-27 16:18:05 -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
0aaf7636a4 Rearrange special node dialog XML into a more logical order 2014-12-22 22:13:36 -05:00
dcd28b363b Finally implemented the stack control, and used it for town comments in the town details dialog 2014-12-22 13:22:06 -05:00
e88eb9b949 Convert more dialogs related to town settings 2014-12-19 16:29:15 -05:00
7a2b6e2349 Add a field to outdoor details dialog for editing the sector's comment string (which has been uneditable since I reformed the string system). 2014-12-18 19:05:46 -05:00
72200a57f3 Convert several more dialogs, mostly related to outdoors stuff 2014-12-18 18:55:21 -05:00
c1d489c636 Convert area description dialogs 2014-12-18 12:51:28 -05:00
2f64789003 Rearrange the new graphics on the terrain sheets and add all of the graphics Mistb0rn made for the project
- Also add credits and fill in termap.png
2014-12-17 18:48:35 -05:00
5de6d3d661 Convert two more dialogs 2014-12-17 13:13:23 -05:00
e864d9f7eb Replace living statue and crystal soul graphics with versions that don't have a background
- Also included is details on how this was done, in case someone else can improve on it.
- Living statue attack graphic is derived from Exile III.
2014-12-17 11:39:07 -05:00
045e49543c Convert the last two core scenario dialogs
- Edit special encounter dialog now expects a parent and returns false if the user cancelled.
2014-12-16 21:47:07 -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