Commit Graph
55 Commits
Author SHA1 Message Date
David Cernat 9f79b9c40b [SpeechHelper] Rework speechHelper around easy to add speech collections 2019-03-10 08:19:19 +02:00
David Cernat 88c71dfa6f [CommandHandler] Update function references in locals when using /load 2019-03-10 03:57:15 +02:00
David Cernat dad68f5e1f [CommandHandler] Add /load command for loading scripts on the fly 2019-03-08 04:26:18 +02:00
David Cernat 7df8f10abd [CommandHandler] Add /resetkills command 2019-02-20 20:16:08 +02:00
SchnibbselandGitHub 61e6022eec [commandHandler] Add missing Line break
Adds a line break ( \n ) to a message
2019-02-19 22:11:18 +01:00
David Cernat 70d094d757 [CommandHandler] Explain usage of /speech even when args are missing 2019-02-01 10:00:09 +02:00
David Cernat a69fe54eb9 [CommandHandler] Only allow /fixme to be used in exteriors
Additionally, add color to its associated text.
2018-12-17 14:48:12 +02:00
perfectcolors 27f117316e Prevent non-moderators from using /advancedexample 2018-11-11 04:54:31 -08:00
David Cernat 67ab8f956f [General] Get indexes by value instead of pattern in various places
This prevents Lua pattern operators from having their special meaning in the values searched for, which was especially causing problems when removing certain spells from players.
2018-10-28 03:48:42 +03:00
David Cernat 8d1dfe5aaf [General] Remove unnecessary spaces 2018-10-22 09:16:09 +03:00
David Cernat 743d4ee0a5 [CommandHandler] Don't crash the server when kicking players 2018-10-22 06:42:39 +03:00
David Cernat d6675fa586 [CommandHandler] Clean up determination of invalid input in /storerecord
Additionally, always rcreate any missing storedRecords tables for players using that command.
2018-10-21 00:38:09 +03:00
David Cernat 46698c1d18 [General] Shorten long lines 2018-09-21 04:16:48 +03:00
David Cernat 4dc340480e [General] Change code style by using "not" operator whenever possible 2018-09-21 03:14:24 +03:00
David Cernat 9cd5dc8556 [General] Implement dynamic records, part 2
Records are now split into 2 categories: permanent records and generated records.

Permanent records are kept forever once created and are sent to all players when they join the server.

Generated records are linked to players, cells or other records, are deleted once those links disappear, and are only sent to players who encounter them. For instance, if a player creates hundreds of potions in a house and then drops the potions there, those potion records will only be sent to players who enter that house. If the potions are drunk and there are no longer any instances of them, their associated records are deleted.

By default, permanent records are created by using the /createrecord command after specifically setting an ID for the record about to be created.

Generated records are created through regular gameplay or by using the /createrecord command without specifying an ID for the record.
2018-08-30 03:32:58 +03:00
David Cernat be40d64c28 [CommandHandler] Remove outdated menu for invalid usage of /createrecord 2018-08-28 21:53:26 +03:00
David Cernat c3f4f771cc [General] Rename guiIds into guiHelper 2018-08-27 22:35:19 +03:00
David Cernat 2ab7ec43df [General] Add /regions command to display loaded regions & authorities
Additionally, clean up guiIds.
2018-08-27 22:13:31 +03:00
David Cernat 88d7f47799 [General] Rename settings.admin into settings.staffRank for players 2018-08-27 16:02:02 +03:00
David Cernat a54d498f76 [General] Add server owner rank & commands for promoting/demoting admins
Additionally, remove unused PromoteModerator() method in BasePlayer.
2018-08-27 15:33:27 +03:00
David Cernat 2d18c05c8d [CommandHandler] Don't let /createrecord with too many args go through
I've noticed myself using /createrecord by mistake when I mean to use /storerecord, which sometimes undesirable consequences, hence this change.
2018-08-27 12:22:01 +03:00
David Cernat 1dda9260e2 [CommandHandler] Rework /placeat & /spawnat by allowing spaces in refIds
The downside is that the count and interval arguments have been removed, but they were not very useful anyway.
2018-08-25 10:22:12 +03:00
David Cernat 474450bc5e [General] Use config's generatedRecordIdPrefix for generating record IDs 2018-08-23 04:39:20 +03:00
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