Commit Graph

463 Commits

Author SHA1 Message Date
9bdc4f00d7 more tiny icons 2015-06-26 17:33:17 -04:00
ef0cdebec4 New editor commands: Resize Outdoors and Import Sector
This includes the following changes (mostly related to the above):
- Move loc_compare functor to location.hpp
- Add reattach() function to rebind a town or outdoor section to a different scenario object. (I don't think this is strictly necessary, as the scenario reference is only used in limited situations in the game itself, not in the editor, but it's better not to keep a reference to freed memory around when importing a town or sector from another scenario, even if the reference is never accessed.)
- Fix imported towns not being officially "loaded" until you explicitly use Load a New Town to reload them
- Fix Choose button in Load New Sector dialog
- More functions in the vector2d implementation
2015-06-25 23:55:55 -04:00
8a4e7a7a72 Mass fix use of curly quotes in dialogs 2015-06-24 16:00:15 -04:00
2951e0228c Tweak New Scenario dialog and add Save As option
- You now specify your name instead of the scenario filename in the first dialog
- A file dialog pops up after the second dialog, to let you choose the filename and location
- Fixed using Warrior's Grove even if you chose not to
- Fixed not recognizing .EXS as a valid legacy-scenario extension and appending .boes, resulting in .EXS.boes
- Adjust Difficulty scenario flag set on by default
2015-06-24 14:43:41 -04:00
269daedcd1 Add visual indication when there's more than one special node assigned to a space 2015-06-24 01:54:42 -04:00
0fbb872b73 Add Give Equipment node for giving a specific PC an item,
possibly with modifiers (like equipping it)
2015-06-24 01:54:41 -04:00
c30c9fca5f Fix some erroneous node information due to misordering 2015-06-24 01:54:40 -04:00
cb14a9c5d7 Add a Swap Buffer node, giving you an infinite number of string variables
- Also fix the string buffer so that it actually works.
- Also add a node to change the text of a sign
2015-06-23 20:17:28 -04:00
9d74f78df3 Implement all the missing parts of the Edit Sheets and Edit Sounds dialogs
- 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
2015-06-17 04:29:10 -04:00
580f70f49a Add a dialog in scenario editor to import/export custom sounds in WAV format 2015-06-17 01:03:17 -04:00
e055b97c9f Add dialog allowing you to alter the scenario's graphics sheets from within the scenario editor
- You can copy/paste images into the sheet, or import/export to/from png files

Also:
- Picture controls in the dialog engine have a new "scaled" flag; if set, the picture will be scaled into the provided bounds rather than overflowing. Currently, only full sheets honour the setting.
2015-06-15 16:20:03 -04:00
0798f98523 Symbolic I/O for more enums
- Nearly every enum that gets written to a file now uses a symbolic form rather than a numeric form. Input supports both forms.
- The special node type enum, however, no longer has a symbolic form output operator, as the only place it's output is in the special nodes file which uses the opcode.
- Collected some enums scattered around the files into one place in simpletypes.hpp
2015-06-13 15:43:29 -04:00
a990921e90 Several tweaks/fixes
- 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
2015-06-11 22:32:28 -04:00
6ef885c3ef Expand three special node types
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
2015-06-10 22:51:53 -04:00
f6be40618b Overhaul and improve force cages
- 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
2015-06-10 11:45:14 -04:00
233a50a1e2 More fixes/tweaks to the installer
- Add Windows icon for scenario files (using the old Mac icon)
- Fix OpenAL not being deleted, causing the program directory to remain
- Fix association for old scenarios (.exs) not being removed
Also:
- Fix build broken in previous commit (due to header renames)
2015-06-09 10:26:08 -04:00
1a3543ebf6 Move resources out of the src directory 2015-06-09 08:37:53 -04:00
2d9c3ba2d9 Remove the arbitrary limits on the following quantities:
- Number of terrain types - as long as the last terrain in the list is unused, you can delete it
- Number of monster types - as long as the last monster in the list is unused, you can delete it
- Number of item types - as long as the last item in the list is unused, you can delete it
- Number of special items
- Number of strings (scenario, journal, outdoors, town)
- Number of signs (outdoors, town)
- Number of description rectangles (outdoors, town)
- Number of town entrances (outdoors)
- Number of dialog nodes (town); number of personalities per town is still limited, but since you can use personalities from any town and the number of towns is unlimited, you still have effectively unlimited personalities

Other related stuff:
- Fix ability to select nonexistent terrains/items/monsters from the palette
- Fix inability to find unused special strings in some cases
- Fix sometimes incorrectly selecting the current node as the next node in the chain, instead of a new node
- When cancelling from the special node dialog, it's a bit more intelligent about whether or not to drop nodes from the end of the list
- Edit string dialog now has a cancel button
- Save otherwise unused talk nodes if they contain strings, to avoid loss of data that might be important
- Fix scenario and journal strings loading incorrectly if some strings were blank
- Fix some issues with list modes activated by menu not appearing until the mouse moves over the window
- Fix incorrect instructions in list modes (it's alt-click, not command-click as the instructions indicated)
- Implement "erase town entrance" button and create a visual difference between town entrances with an assigned town and those without
- Fix inability to erase monsters after the first 60 in town
- Fix escape key accepting changes in the shop dialog, instead of cancelling
- Fix quest/shop list resetting to top after editing one
2015-06-08 22:14:47 -04:00
aa5dfe4f69 Add two special nodes
- Node to make a monster target a specific PC or monster
- Node to force town entry from outdoors
2015-06-08 22:14:40 -04:00
58fbf3b287 Lots of monster stuff, particularly documenting monster abilities
- 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
2015-06-06 21:03:35 -04:00
510da3cf72 Update terrain dialog and some other tweaks/fixes
- 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)
2015-06-06 02:51:30 -04:00
aaf3443900 Add choose buttons for the SDF fields in rectangle special nodes 2015-06-05 02:48:05 -04:00
548825745b Rearrange editor tool palette and refactor the code to make it easier to rearrange again in the future
- New buttons: "place forcecage", "place stone block", and (currently non-functional) "erase town entrance"
- Forcecages with no creature inside them are now permanent
- Fix forcecages leaving the top half behind when they disappear
2015-06-05 02:13:41 -04:00
5bcf220204 Add support for custom explosions with custom sound choice 2015-06-04 18:47:01 -04:00
6c5e2b5118 Several tweaks and fixes
Bugs:
- Arrow keys activated the arrow buttons in the list-mode edit string dialog
- Graphics classification was not saved correctly in some cases
- Contact info was not correctly saved/loaded
- Place Monster node didn't have a choose button for the monster type
- Alt-Backspace and Alt-Delete did not work correctly in dialog text fields
- When clicking Edit Terrain Types, sometimes the list of items or monsters would appear instead
- Fix monster 0 being selectable in the choose monster dialog
- Fix the hotspots of all the cursors to be more intuitive

New:
- When interrupting a special node sequence with Cmd-. / Ctrl-C, the dialog that appears is more relevant.
- In the choose sound dialog, the sound now plays when you select a choice, so you can hear what it will sound like
- Added a tiny icon so you can distinguish fire and force barriers in the editor
2015-06-04 15:50:05 -04:00
49ec6278d3 Fix a few scenario load/save issues
- More uninitialized data issues
- Some values incorrectly loaded (monster radiate chance, terrain horse blockage, town lighting type)
- Some values incorrectly saved (item magic-use flag)
2015-06-04 01:14:57 -04:00
ae0e3cfd0d Add special node step-through mode for debugging
- Also fix debug/ghost mode not being deactivated when you start a new game
2015-06-04 01:14:42 -04:00
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
7dddcdb86e Several little tweaks and fixes
- Fix some uninitialized fields getting populated with random data
- Fix identity of last edited town and outdoor section not being saved
- Fix editor sometimes saving to application directory instead of overwriting the loaded scenario
- Fix town specials being saved to outdoors list and vice versa
- Fix right-most column of map not being loaded properly
- Fix town entry node for start town being called after the first turn of the scenario
- Add option to call a special node at startup (right after the intro dialog)
2015-06-01 22:43:41 -04:00
2dee8e81f7 Add editor support for the new Affect special nodes 2015-06-01 14:59:14 -04:00
2149d8159b Add PNG versions of all the original icons 2015-02-21 18:10:44 -05:00
Ben Scott
df9e095417 Added Editor Icon, converted also to *.icns and *.ico 2015-02-21 18:10:43 -05:00
Ben Scott
ba34f050ed Brightened icons, this and that. 2015-02-21 14:10:43 -05:00
Ben Scott
d387fe1368 Brightened icons, this and that. 2015-02-21 14:08:46 -05:00
Ben Scott
09ec873710 Created some new icons 2015-02-21 00:39:39 -05:00
c99b205088 Remove old versions of dialog box schema 2015-02-20 12:19:03 -05:00
f2f334551c Fix town advanced dialog
- Also remove now-unused Windows accelerator table resources
2015-02-14 22:58:41 -05:00
0aaa299642 Implement the close and revert menu choices, as well as PC editor help
- Fix storing directions in save file as control characters
2015-02-14 13:20:41 -05:00
4fbc6cfa77 Various code cleanup stuff 2015-02-14 12:24:25 -05:00
Ben Scott
1477fef7ce Fixed warnings and IMPLEMENTED A THING in the menu item switch. 2015-02-12 01:47:48 -05:00
Ben Scott
6b275c9ed9 Little fixes 2015-02-11 21:00:47 -05:00
120561ae64 Include new-format scenarios in the Custom Scenario list
- Note: It still assumes the basic scenarios are old-format.
2015-02-11 17:02:28 -05:00
1894b31e20 Implement loading of scenarios
- This also tweaks the scenario schemas for consistency between schemas and code, adds some unique key restraints, and makes some attributes required.
2015-02-11 14:03:03 -05:00
965dcc1201 Add ability for an item to call a special node when dropped 2015-02-07 13:10:28 -05:00
2e88b55759 Add new type of item that gives a quest when picked up 2015-02-07 12:50:35 -05:00
a1da743a47 Move scenario schemas to the schemas directory 2015-02-05 22:56:57 -05:00
e1babdef66 Tweak some proportions so that costs and info strings won't overlap in shops 2015-02-05 22:54:37 -05:00
1778cd9a61 Tweak scenario output and schema so that they match; write script to XML-validate a whole scenario 2015-02-05 22:18:19 -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