Commit Graph
43 Commits
Author SHA1 Message Date
David Cernat b368b386d9 [General] Update names for script functions that clear packet vectors 2018-10-03 02:28:54 +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 1c3e9ac808 [General] Clean up logging by using easily adjustable log level values 2018-09-08 19:11:27 +03:00
David Cernat 6684326e5e [General] Rename BaseWorld's loadedRegions into storedRegions
There was a discrepancy in the meaning of "loaded" between the LoadedCells table and BaseWorld's loadedRegions table. The former contained only currently loaded cells, while the latter contained all the regions that had ever been loaded since the start of the server. To remove the inconsistency, the latter has been renamed.
2018-08-27 23:16:01 +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 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 764bb6245d [General] Rename variable i into index in Player and World methods 2018-07-24 23:27:21 +03:00
David Cernat 27af81bb34 [General] Implement weather sync and setting of region authorities 2018-07-21 05:34:25 +03:00
David Cernat 689b3c140a Revert "[World] Allow LoadTime with nil pid"
This reverts commit 82286b043c.
2018-07-17 04:03:59 +03:00
David Cernat 82286b043c [World] Allow LoadTime with nil pid 2018-07-17 02:46:58 +03:00
David Cernat bb62a5abc7 [General] Replace deprecated functions for reading last received packets 2018-07-13 02:45:48 +03:00
David Cernat fc9d803d99 [General] Remove unnecessary semicolons for consistency 2018-07-07 13:27:15 +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 57c4899c4f [General] Update map saving/loading to new system 2018-06-07 12:50:06 +03:00
David Cernat bfc5811328 [General] Move defaultTimeTable from BaseWorld to config 2018-05-26 00:11:51 +03:00
David Cernat 5576fb64ea [World] Save and load year 2018-05-25 03:33:52 +03:00
David Cernat 57fec68972 [World] Save and load number of days passed 2018-05-24 13:59:52 +03:00
David Cernat 87d859af6a [General] Update usage of WorldTime script functions 2018-05-24 12:32:19 +03:00
David Cernat 41eec72f33 [World] Fix crash when starting new year in world time 2018-05-24 05:28:59 +03:00
David Cernat 1bd97f0a0e [General] Load world time for everyone once every world hour 2018-05-23 10:45:34 +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 9b7875bf56 [General] Implement saving and loading of global map tiles for players 2018-05-09 23:18:14 +03:00
David Cernat 84cfcf38ef [General] Implement reputation, including an option to share it or not 2018-01-30 22:58:17 +02:00
David Cernat 1a77722498 [General] Add option for sharing player bounties 2018-01-29 19:46:01 +02:00
David Cernat b27dcf36f7 [World] Reorder methods for more consistency with Player's methods 2018-01-29 01:12:00 +02:00
David Cernat bf9d32abe0 [General] Add option for sharing player topics 2017-10-23 19:42:17 +03:00
David Cernat 8cee25eadd [General] Add manual fixes for skipping the Seyda Neen Census Office 2017-07-28 23:21:42 +03:00
David Cernat 6565f79bcf [General] Save and load faction reputations 2017-07-13 13:37:59 +03:00
David Cernat 41dcd6d7e4 [General] Add toggleable option for sharing journal 2017-07-08 13:53:00 +03:00
David Cernat 497a9be088 [General] Add toggleable options for sharing faction ranks and expulsion
Create a new StateHelper class to help with saving/loading state that can be per player or per world

Separate faction ranks from expulsion states when saving/loading faction data
2017-07-08 12:07:33 +03:00
David Cernat b77a29aa30 [General] Use new initialization methods for player changes vectors 2017-07-07 09:31:20 +03:00
David Cernat 7f254a8dad [World] Use new faction actions when saving faction data 2017-07-05 07:09:47 +03:00
David Cernat 2c65bbdef8 [World] Save and load actor refIds for journal entries 2017-06-23 08:17:03 +03:00
David Cernat 0474984d1e [General] Save and load kill counts
Additionally, set a specific order for world data keys
2017-06-10 14:51:53 +03:00
David Cernat 2b595da5ee [General] Save and load dialogue topics 2017-05-24 23:24:48 +03:00
David Cernat 9159e7a840 [World] Use better structure for saving and loading faction data 2017-05-19 10:39:26 +03:00
David Cernat 99e1def97f [General] Save and load factions 2017-05-18 21:53:27 +03:00
David Cernat c02c5817a4 [General] Load World's journal items for Players 2017-05-18 12:14:35 +03:00
David Cernat 46480b2242 [World] Save journal items 2017-05-18 11:51:34 +03:00
David Cernat b324303a96 [World] Load, save and set the current mpNum 2017-04-05 01:39:38 +03:00
David Cernat fac45a0178 [General] Add World class and use WorldInstance in myMod 2017-04-05 00:38:45 +03:00