Commit Graph

246 Commits

Author SHA1 Message Date
ed0810df66 Finish documentation of scenario format 2015-07-10 15:29:00 -04:00
4104e08481 Factor out some common definitions from the XML schemas 2015-07-10 15:02:50 -04:00
353ed28795 More documentation of scenario format 2015-07-10 14:46:58 -04:00
1863554154 Make the scenario validating script validate embedded dialogs, if present 2015-07-10 14:46:21 -04:00
21c5c98c24 Some tweaks to scenario format 2015-07-10 14:43:15 -04:00
72effbd05b More documentation for scenario format 2015-07-10 01:50:20 -04:00
ce24fc8d25 Tweaks and updates to scenario format docs 2015-07-09 20:37:53 -04:00
5458bc0d7b Scenario format tweaks
- Fix monster attitude enumerator not being reflected in schemas
- Store the sound ID for sound names, instead of the index into the sound name array
2015-07-09 20:32:45 -04:00
c0ab32453b Add some documentation on the new scenario format 2015-07-09 16:53:55 -04:00
ea17fe364b More scenario reading test cases 2015-07-07 20:41:53 -04:00
9ad0681205 Fix scenario editor build 2015-07-07 19:07:02 -04:00
137a3aa5d4 A few more scenario read tests
- Introduce enum for scenario content rating
2015-07-07 18:58:35 -04:00
7b76d37237 Store talk node type in scenario file as enumerator instead of numer
- Also, don't write empty CDATA sections when dialogue name/look/job sections are completely empty.
2015-07-05 23:30:43 -04:00
6cc9e81a7b Widen spellcasting dialog so that Weak Summoning fits 2015-07-05 08:32:06 -04:00
aa72575270 Fix Show PC Spells dialog and the Alchemy button in PC Info 2015-07-05 08:31:30 -04:00
26cb146d4f Fix magic/identified mixup in item info dialog 2015-07-05 08:03:27 -04:00
d682a2b856 Some updates/reformatting of graphics credits 2015-07-04 17:20:35 -04:00
973e765efd Fix Set SDF dialog (debug mode / PC editor)
- No longer crashes when pressing enter
- Enter now sets the SDF, escape exits the dialog
2015-07-04 17:02:29 -04:00
2d73bb01ae Nuke oopsError and out-dated "can't load game" error dialogs 2015-07-03 18:11:03 -04:00
9a2881ef66 Fix title message opcode 2015-07-01 16:12:15 -04:00
ee9c089829 Add a Display Message With Title special node
- Remove Wandering Will Fight, which has been made redundant
2015-06-30 22:19:52 -04:00
c045c315aa Add a missing referenced dialog 2015-06-30 22:12:12 -04:00
74273783b9 Misc little things
- Some item abilities didn't appear in the editor ability selection dialog
- If have (+take) nodes took by default (ie when left at -1)
- Rename button in edit terrain dialog, as the old name barely fit
2015-06-30 12:53:42 -04:00
5a3637c370 Now you can hold Alt while starting a scenario to skip party creation
(Only if party not loaded)
2015-06-30 12:49:01 -04:00
c1fa65a01d Much better error-checking when loading scenarios
- First of all, the program no longer crashes after an error.
- A lot more constraints are now checked for, such as required elements; even some constraints not expressed in the schema
- Special node parsing now has actually useful error messages
- Map data parsing now has error messages for the few invalid cases
- Fix the XML utility exception classes originally used only by the dialog engine; they're now correctly caught and properly report the error
- Fix loading of special shop entries
- Fix accepting any character as the separator in dice constants
- Verify that the monster ability type is on the right ability tag, that the extra element is present only if needed for general abilities, and that the missile and range elements are present for non-touch general abilities
- Use "infinite" for quantity in special shop items, instead of 0
- Tweak ticpp to fill out file/line/col information for _all_ exceptions, not just parse errors
- Raise error (ie, set stream failbit) when failing to convert an enumerator, instead of silently returning a default value (they do still return a default value though, if you don't bother to check stream state)
- Fix status effect enumerator not being correctly saved/loaded
2015-06-29 19:55:59 -04:00
f6d9ac7633 Make the background-removing script more generic 2015-06-28 15:49:15 -04:00
56d878a4db Add a big scenario icon for eventual use with Bandit Busywork
(Credit to The Almighty Doer of Stuff for creating this icon)
2015-06-28 12:16:12 -04:00
7fd6c85e37 Update status icon help to include new icons 2015-06-28 12:15:40 -04:00
4c4b0a131b Fix last two item graphics including black guide lines 2015-06-28 12:15:17 -04:00
d11e34b41b Adjust If Party Size node to match documentation 2015-06-27 20:49:02 -04:00
21435082c9 Add optional space insertion to string buffer append nodes 2015-06-27 20:48:14 -04:00
dafe6c2790 Some character editor changes:
- Move Own Boats/Horses to Scenario menu
- Disable Scenario menu if not in a scenario
- Don't bother converting notes from legacy saves if not in a scenario (affects game too)
2015-06-27 02:08:15 -04:00
a0ec2490c7 Fix text overflow in edit outdoor encounter dialog 2015-06-26 22:03:28 -04:00
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