Commit Graph

68 Commits

Author SHA1 Message Date
Laurent alonso
baa0bf81c4 Scenario Editor: display town's name when selecting a town... 2022-06-30 01:10:46 -04:00
ALONSO Laurent
da703c1159 Scenario Editor: continue to regroup some static variables in a class,
gfxsheets.hpp: do not remove party sheet when we enter a scenario,
+ minor cleanings...
2022-06-30 01:10:46 -04:00
ALONSO Laurent
8efa23debb boe.actions.cpp: correct a mistake when using arrows to move target
Scenario Editor: some cleaning + reset the terrain center correctly if it is
  outside the terrain bounds...
2022-06-30 01:10:46 -04:00
ALONSO Laurent
a7a24e7e7a cPict: begin to differentiate the picture type and the dialog type
+ begin to merge the drawing functions, to be continued
all: try to use the pict.cpp functions to draw items..
2022-06-30 01:10:46 -04:00
ALONSO Laurent
f52c227516 Scenario editor: add a function get_item to check bounds... 2022-06-30 01:10:46 -04:00
ALONSO Laurent
1b7dcaab1f Scenerio Editor: try to allow to edit scenario with bogus terrain type or
bogus terrain picture nums.
2022-06-30 01:10:46 -04:00
ALONSO Laurent
cabe7beff1 Scenario editor: try to simplify the code used to draw terrain texture +
use cPictNum to retrieve the big terrain pictures...
2022-06-30 01:10:46 -04:00
ALONSO Laurent
7e189847ee widgets/pict.hpp: add a class cPictNum to store a picture number and its type,
game[legacy]: only prevent walking on portail in combat mode
Scenario Editor: begin to use cPictNum to avoid crashing when displaying some
  terrain animations, to be continued...
2022-06-30 01:10:46 -04:00
ALONSO Laurent
f1a04987c0 Scenario Editor: add left/right arrows when editing town messages
+ fix a problem when trying to load a bad scenario...
2022-06-30 01:10:45 -04:00
ALONSO Laurent
6c753ee0f0 [calref/cboe]: Split out cContainer, cLed, and cLedGroup into their own files 2022-06-30 01:10:44 -04:00
c2ce2a2cd1 Split up the graphtool files 2017-04-14 15:43:07 -04:00
4f91f6a679 Make undo system a little safer, and improve docs 2017-04-11 15:00:22 -04:00
683ab805ec Initial framework for scenario editor undo/redo
In addition to the framework, this enables undo/redo of one action - adding a new town
2017-02-12 18:27:01 -05:00
6b857e6e43 Fix some isses with editing outdoor encounters 2017-02-07 22:17:58 -05:00
889b0663d1 Fix some issues with incorrect range errors from the talk node editor 2016-09-29 17:12:52 -04:00
88d6afce27 Merge all the town classes and remove the unimplemented templated towns
This also adds a common superclass shared by towns and outdoor sectors, and
enables towns of arbitrary sizes.
2016-09-03 02:50:29 -04:00
9363ab2fcf Eliminate function-scope loop index variables
This makes all loop index variables local to their loop and
fixes some issue arising from the loop variables being present
through the whole function, such as using the wrong index variable.

In addition, there has been some reduction of code duplication in
the scenario editor.
2016-08-21 00:46:40 -04:00
785943b9be More usage of standard containers instead of bare arrays 2016-08-15 12:31:45 -04:00
4cd7368fbf Some fixes to scenario dirty flag 2016-05-07 12:42:47 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
a455941d92 New scroll pane control in the dialog engine
Also:
- Use a scroll pane for the credits in the about dialog, so that new credits can be added without altering other elements
- Use a scroll pane for the list of sections to be deleted in the resize outdoors dialog
- New cContainer superclass for controls that contain other controls
- Scrollbars consider their maximum as part of their state
2015-10-02 17:03:25 -04:00
0a97824033 Use spaces instead of 'x' for an inactive dialogue keyword 2015-10-01 21:49:40 -04:00
43e82281af More read/write tests for town and outdoors, including maps/dialogue
Fixes:
- For towns, the "has tavern" flag was not saved or loaded
- Outdoor roads were not saved or loaded
- For outdoor encounters, the "can't flee" and "forced" flags were not loaded, and "forced" was not saved
--> These two flags have also been separated in the code
2015-09-30 17:00:05 -04:00
249e0e0027 Add UI for scenario init special and hail townsperson special 2015-09-24 10:13:36 -04:00
6cf37c3daa Fix outdoor encounter dialog being unusable 2015-09-20 23:40:45 -04:00
5762c2bb90 Tweak to error dialogs and add separate warning dialogs
(Also some error messages tweaked)
2015-08-14 23:30:18 -04:00
9ad0681205 Fix scenario editor build 2015-07-07 19:07:02 -04:00
9ae91feee6 Tiny scenario editor fixes
- Advanced monster edit dialog used stored node instead of node in text field
- Several preset item graphics missing from pick picture dialog
2015-06-28 12:14:58 -04:00
b307516d48 Fix several scenario editor dialogs still assuming there's a fixed number of special nodes 2015-06-28 11:58:23 -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
63531d14ff Fix erroneous errors when editing talk nodes that call specials 2015-06-24 01:54:38 -04:00
21291e168c Some tweaks/fixes
- Show monster name in description of summoning item abilities (in-game and in the scenario editor)
- Don't call drop special nodes when storing an item in a container
- Don't use exceptions to determine whether a slot in the get window has an item in it
- Fix placed items defaulting to 0 charges instead of -1 (fortunately, this didn't actually cause a bug)
- Fix ability description in item dialog not updating after you edit the abilities
- Fix off-by-one issues in several cases of the pick monster dialog
- Show charges field in placed item dialog if the item is given the Shoot Flames enchantment
- Fix enchantment field not being filled with the current value when opening the edit placed item dialog
- Fix placed item dialog not updating after you set a new enchantment by editing the field (rather than using the Choose button)
- (Dialog engine) Fix initial focus handler call passing wrong control ID
2015-06-11 12:22:04 -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
01d317b007 .h -> .hpp 2015-06-08 22:14:43 -04:00
8272878cea Fix some editor issues with dialogue
- Basic dialog (look/name/job) was not saved when you clicked OK (though the arrow buttons did save it)
- When changing the type of a talk node, the node was reverted to its state when the editing dialog was opened
- If you changed the type of a talk node but then clicked cancel, the change was saved anyway
2015-06-07 00:50:40 -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
2cf301eece Reduce reliance on hard-coded limits 2015-02-06 23:00:29 -05:00
f609711e27 Combine timer data into a single structure 2015-02-06 16:54:44 -05:00
7f6992da56 Store sign locations and text in the same structure 2015-02-06 14:43:26 -05:00
fcd29fb2ac Fix scenario editor build and update data/docs regarding shop nodes 2015-02-03 13:53:03 -05:00
7df8f84258 Fix a few missing switch cases 2015-02-02 11:38:39 -05:00
eaeb9690c3 Remove the limits on the total number of special nodes in the game 2015-02-02 11:38:37 -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
92a20b1c67 Fill in a lot of missed cases (mostly just messages)
- Increase strength of slayer weapons that weren't in the original BoE by making sure that each race applies some multiplier to the ability strength
- Messages for every occasional status effect, both negative and positive. If charm/forcecage, ignore.
- Fix weapon poison not being applied
- Forcecage supported for damaging terrain (in town only, of course) and "affect status" items
- Weapon poison supported for "affect status" items; it differs from "poison weapon" items in that it honours the magic use type and doesn't risk messing up (like the Envenom spell)
- Show error messages when encountering an unimplemented spell or special node
- Fix missing handling of NPCs appearing after town dies when loading a saved town
2015-01-27 23:52:47 -05:00
495a0dab54 PC creation tweaks
- Allow scenario designer to specify exactly which towns allow character creation in them
- Clicking the "Empty" name in the edit party dialog is now equivalent to clicking the create button
- Fix dialog not properly focusing after deleting a PC
2015-01-26 19:34:51 -05:00
91c52fca77 Implement customizable background patterns to be displayed behind the game interface based on which town/sector the player is in and whether they are in combat mode, with cascading defaults.
- All the hard-coded background changes are no longer present and not even preserved.
2015-01-26 18:42:54 -05:00
99bb11dd3b Split up files so that the scenario editor will build
- cCreature split into seperate file-pair from cMonster/cTownperson
- fileio.cpp split into general, party, and scenario sections
- classes.h file deleted
2015-01-24 21:29:34 -05:00
869c629b8b Update the edit placed item dialog
- Fix weapon enchantments
2015-01-23 15:56:18 -05:00
78cdadc13c Fix arrow buttons in edit special item dialog 2015-01-23 14:40:15 -05:00
c63544054f Mass rename of variables in the scenario editor dialog handlers 2015-01-23 14:33:10 -05:00