Commit Graph
32 Commits
Author SHA1 Message Date
David Cernat 9ceacbd09b [CommandHandler] Use PacketBuilder in /createrecord
Additionally, insert a shallow copy of a player's storedTable into the record data instead of inserting a direct reference to the storedTable.
2018-08-13 20:57:24 +03:00
David Cernat ed23c1a69f [General] Use consistent capitalization for function names, part 2 2018-08-13 06:38:45 +03:00
David Cernat 19d839e532 [General] Use consistent capitalization for function names 2018-08-13 06:33:17 +03:00
David Cernat 560be9ae93 [CommandHandler] Make it possible to add effects via /storerecord 2018-08-12 01:17:59 +03:00
David Cernat 022f84a6af [General] Use new capitalization for script function that sets AI fight 2018-08-11 18:59:04 +03:00
David Cernat bb5be8e1c7 [General] Add handling of AI fight & dynamic stats for custom records
Additionally, when setting details for an NPC record that is not based on an existing record, autoCalc now defaults to 1 temporarily instead of being set to 1 in the record's table, and a message is displayed about it.
2018-08-05 11:03:26 +03:00
David Cernat 426187a171 [General] Implement dynamic records, part 1
A new RecordStore class has been implemented, used for saving and loading spell, potion, enchantment, creature, NPC, armor, book, clothing, miscellaneous and weapon record data, as well as accompanying magical effects (for spells, potions and enchantments), inventory items (for creatures and NPCs) and body parts (for armor and clothing). RecordStore data is kept in the new data/recordstore folder.

The OnRecordDynamic event has been implemented in eventHandler, with records received from players first being saved to their associated RecordStores, then being forwarded to players with their new server-set ids, and finally having their associated items added to the players they were received from.

Utility methods for getting and loading RecordStores have been added to logicHandler.

The commands /storerecord and /createrecord have been implemented for on-the-fly record creation.

The help menu has been expanded with examples for creating records.

All records are currently "global", i.e. when players join the server, they receive all the records created on it. This is a temporary, flawed approach that will be replaced with the correct approach in part 2.
2018-07-31 17:46:29 +03:00
David Cernat 18fcf2e27f [CommandHandler] Fix crash when / is used without subsequent command
Thanks to Texafornian for pointing out the crash that was causing.
2018-07-23 02:17:27 +03:00
David Cernat 642255cc9f [CommandHandler] Add newlines to /disguise messages 2018-07-19 15:01:06 +03:00
David Cernat 8bcac4e821 [CommandHandler] Allow /advex as short form of /advancedexample 2018-07-17 05:14:01 +03:00
David Cernat 8142b34d7e [MenuHelper] Add advancedExample menu with examples of running functions 2018-07-17 02:55:20 +03:00
David Cernat 7ee485e095 [CommandHandler] Always convert commands (but not args) to lowercase
The command arguments themselves sometimes require correct capitalization to be retained, which is why they will be dealt with later.
2018-07-16 03:37:28 +03:00
David Cernat f27fed7048 [General] Move all handling of player-sent messages to eventHandler 2018-07-14 21:59:20 +03:00
David Cernat c3407bac45 [General] Rename refIndex into uniqueIndex
This helps improve clarity by preventing confusion between the refNum and the combination of a refNum and an mpNum that is now called the uniqueIndex.
2018-07-13 04:31:38 +03:00
David Cernat 8037b6f940 [General] Clean up AI-setting and save AI packets to cell object data 2018-07-11 20:18:28 +03:00
David Cernat 814595e6ab [CommandHandler] Avoid having overly long lines 2018-07-11 03:38:24 +03:00
David Cernat 5ff3d2f0a1 [General] Rename remaining logic-handling myMod into logicHandller 2018-07-11 03:23:21 +03:00
David Cernat 212010a33c [Commands] Add /overridecollision command 2018-07-11 02:48:47 +03:00
David Cernat 35fac26fd4 [Commands] Clean up /setcollision command 2018-07-11 00:32:59 +03:00
David Cernat a22bd6cc4f [Commands] Add true/false argument to /setai WANDER action message 2018-07-11 00:06:02 +03:00
David Cernat d720702e0d [Commands] Allow repetition for AiWander to be turned on & off in /setai 2018-07-10 23:20:35 +03:00
David Cernat e02c76e39f [Commands] Fix spacing issue in /setai 2018-07-10 10:45:38 +03:00
David Cernat 14f5710672 [Commands] Fix typo in /setai message 2018-07-10 08:52:07 +03:00
David Cernat 1de97b09db [Commands] Handle wandering in /setai 2018-07-10 07:17:52 +03:00
David Cernat 4799794587 [Commands] Rework /setai command, part 2
Using TRAVEL now works and makes sense, alongside CANCEL, FOLLOW and COMBAT.
2018-07-10 06:41:21 +03:00
David Cernat 2c9d17b59d [Commands] Rework /setai command, part 1
Using CANCEL as an action now works and makes sense, though the other actions require additional parameters that will be added in part 2.
2018-07-10 05:09:41 +03:00
David Cernat 57e64f2443 [Commands] Fix problem with getting player target name in /setai debug 2018-07-10 02:52:22 +03:00
David Cernat 97d58d0402 [Commands] Add newlines to messages for /setai 2018-07-10 01:09:32 +03:00
David Cernat 11de032f11 [Commandsl] Message player about result of /setai command 2018-07-09 20:06:47 +03:00
David Cernat ef0c35ddeb [General] Move help menu to a menuHelper menu in scripts/menu 2018-07-08 19:55:16 +03:00
David Cernat 45cab9f52f [Commands] Remove superman command 2018-07-07 21:23:12 +03:00
David Cernat f7dc4b6062 [General] Move commands from server.lua to new commandHandler.lua file 2018-07-07 21:10:29 +03:00