Commit Graph
93 Commits
Author SHA1 Message Date
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 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 1b2b9bef63 [Cell] Recreate any missing packet tables when sending cell data 2018-08-26 03:42:49 +03:00
David Cernat 474450bc5e [General] Use config's generatedRecordIdPrefix for generating record IDs 2018-08-23 04:39:20 +03:00
David Cernat 857248e57d [General] Reuse disallowedNameStrings for custom item names
Players are not just prevented from using certain strings in their own names, but also prevented from using them in the names of the items they create through regular gameplay.

logicHandler's IsPlayedNameAllowed method has been renamed into IsNameAllowed to reflect the change.
2018-08-12 03:27:57 +03:00
David Cernat fad97a4111 [Config] Avoid saving id twice in recordstore data for effects 2018-08-12 01:21:03 +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 999ac67cb8 [General] Add config option for coloring Admin and Mod denoters in chat
Change the order of requires in serverCore so that colors are loaded before the config.

Update wording in logicHandler.CreateObjectAtLocation() description so it refers to an object list instead of an event.
2018-08-05 20:56:30 +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 046acd4f56 [Config] Use value of 1 for daysPassed in defaultTimeTable 2018-07-26 00:42:04 +03:00
David Cernat 1f0ad2e910 [Config] Use consistent spacing for table values 2018-07-23 21:40:58 +03:00
David Cernat 3ec55a11ed [Config] Move banned names lower in config.lua 2018-07-19 14:29:59 +03:00
David Cernat 80038fc12b [Config] Add default collision for 2nd pillow type 2018-07-19 05:12:09 +03:00
David Cernat 403aed98b7 [Config] Add config.pingDifferenceRequiredForAuthority option 2018-07-17 23:34:45 +03:00
David Cernat 8142b34d7e [MenuHelper] Add advancedExample menu with examples of running functions 2018-07-17 02:55:20 +03:00
David Cernat 1e58b564a7 [Config] Fill in cellKeyOrder with most missing values 2018-07-15 18:23:27 +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 2ae2954f01 [Config] Place disallowed object placements and spawns in the same table 2018-07-08 05:28:34 +03:00
David Cernat 9eff08c9bb [General] Handle OnVideoPlay event and add shareVideos config option 2018-07-07 17:08:17 +03:00
David Cernat be42c4f233 [General] Process object packets and only use them if they are valid 2018-07-07 12:41:42 +03:00
David Cernat c4117e2707 [Config] Rename undeletableRefIds into disallowedDeleteRefIds 2018-07-06 23:48:07 +03:00
David Cernat 0a008af2e9 [Config] Add a few keys to cellKeyOrder
Additionally, use a more generic variant of a disallowed name string.
2018-07-03 22:35:20 +03:00
David Cernat 5bafd596c3 [Config] Implement playersRespawn setting 2018-07-03 01:17:34 +03:00
David Cernat 1040fb7e99 [Config] Add clarification note to disallowedNameStrings 2018-06-28 18:49:17 +03:00
David Cernat e7086166c1 [Config] Add enforcedCollisionRefIds & include pillows in it by default 2018-06-28 04:55:52 +03:00
David Cernat 775f77201d [General] Add option for sharing map exploration, part 1
Progress in exterior exploration is, as before, always saved to the data files of players. However, if config.shareMapExploration is enabled, that progress is now saved to and loaded from the world's data file instead.
2018-06-26 23:37:22 +03:00
David Cernat 7a006e5f9c [Commands] Add /fixme command and its accompanying config options 2018-06-26 18:48:45 +03:00
David Cernat 3ba6383a54 [Config] Make packets show up before objectData in cell data files 2018-06-26 17:02:13 +03:00
David Cernat fb422c5a16 [General] Only save and forward ObjectDelete packets if they are valid
By default, they are determined to be valid if none of the objects in them match an array of undeletable refIds in the config.
2018-06-20 02:07:44 +03:00
David Cernat e5c71bd95b [General] Make it possible to disallow certain player names 2018-06-18 00:41:45 +03:00
David Cernat c68c8d87cb [Config] Start using key order for Cell data 2018-06-05 20:46:15 +03:00
David Cernat baae61c2da [General] Implement collision overrides based on config options 2018-05-28 02:34:47 +03:00
David Cernat bfc5811328 [General] Move defaultTimeTable from BaseWorld to config 2018-05-26 00:11:51 +03:00
David Cernat e67e7fde38 [Config] Add option for whether time passes on a server without players 2018-05-25 03:43:52 +03:00
David Cernat 074ca90676 [General] Implement timeScale and base frametimeMultiplier on it
The timeScale is now saved to and loaded from the world data. It corresponds to the world timeScale used in OpenMW.

The /settimescale command can be used to change it.

timeMultiplier has been removed as an option from the config file, as it is fully replaced by the timeScale.
2018-05-23 09:32:43 +03:00
David Cernat 7d43579dd8 [General] Rework time sync
The current hour, day and month are now saved to the world data and loaded back in when restarting the server.

The server's hour counter (renamed from timeCounter to hourCounter) is now set back to 0 when reaching a value of 24. However, reaching a value of 24 makes the day get incremented by 1 in the WorldInstance. If the day value exceeds the number of days in that particular month, the month value is incremented by 1 instead and the day is set to 1.

The /time command has been replaced by /sethour, /setday and /setmonth commands.
2018-05-23 03:51:16 +03:00
David Cernat f6dd63d770 [Config] Add config option for gameMode and use it when starting server 2018-04-29 19:06:51 +03:00
David Cernat 367fee9015 [Config] Move rarely modified options to bottom of config 2018-04-29 19:01:10 +03:00
David Cernat fdcb6c4d8a [Config] Increase default caps for attributes & skills 2018-04-03 16:34:46 +03:00
David Cernat dea31dbfc1 [General] Implement setting of enforced log level for clients 2018-03-11 04:52:53 +02:00
David CernatandGitHub fac0536d6a Merge pull request #33 from TES3MP/0.6.2
Add 0.6.2 commits up to 9 March 2018
2018-03-09 19:33:34 +02:00
David Cernat 3939cd828a [General] Add /craft command and associated menus as menuHelper example 2018-03-09 18:50:38 +02:00
David Cernat 961c3e9616 [Config] Set custom menu IDs from config 2018-03-09 11:34:56 +02:00
David Cernat e583b08202 [General] Implement setting of physics framerate 2018-02-14 05:55:52 +02:00
David Cernat bc5b2c4470 [General] Fix player and cell filenames using fileHelper 2018-02-13 17:24:36 +02:00
David Cernat a0c7734919 [General] Add config.invalidFilenames and check it for JSON files 2018-02-13 06:55:58 +02:00
David CernatandGitHub b10e08cb89 Merge pull request #30 from TES3MP/0.6.2
Add 0.6.2 commits up to 10 Feb 2018
2018-02-10 07:19:49 +02:00
David Cernat eba459e68e [General] Add config.bannedEquipmentItems & use it when saving equipment 2018-02-10 04:28:42 +02:00
TexafornianandGitHub 7fa3122b2a Add booleans that control player bounties after death 2018-01-30 18:41:12 -06:00
David Cernat 84cfcf38ef [General] Implement reputation, including an option to share it or not 2018-01-30 22:58:17 +02:00