Commit Graph

464 Commits (1f2349ef6e82b7b1b82e1de6db2776e2043fb18d)

Author SHA1 Message Date
David Cernat 023ead937f [Server] Fix stack overflows by preventing infinite growth in Lua stack 6 years ago
David Cernat 3805edaf78 [Server] Don't crash when adding a requiredDataFile w/ no checksum twice 6 years ago
David Cernat 7523a73346 [Server] Fix return values for server functions providing system info 6 years ago
David Cernat d8919dcec6 [Server] Refer to data files instead of plugins in var & function names 6 years ago
David Cernat 91f82d845c [Server] Add GetMillisecondsSinceServerStart() server function 6 years ago
David Cernat bd677726bf [Server] Add StatsFunctions that get/set damage to attributes/skills 6 years ago
David Cernat ece39748de [Server] Fix typo causing recursion in deprecated actor list function 6 years ago
David Cernat 5c4d3df551 [Server] Deprecate DoesFileExist(), add DoesFilePathExist() 6 years ago
David Cernat 2cdabddc0e [Server] Move most MiscellaneousFunctions to ServerFunctions 6 years ago
David Cernat b46767de6e [Server] Clean up recent additions to ServerFunctions 6 years ago
David Cernat a0ec9dfd2e [Server] Rename OnRequestPluginList into OnRequestDataFileList 6 years ago
David Cernat 986528c67d [Server] Add error message as argument to OnServerScriptCrash 6 years ago
David Cernat 552a94a0ca [Server] Add OnServerScriptCrash script event 6 years ago
David Cernat a508a0faf8 [Server] Turn GetArguments() from ScriptFunctions into Utils function 6 years ago
Koncord 0df32accca [Server] Fix ARM build 6 years ago
David Cernat 6e1504f0a1 [Server] Use clearer variable & function names in TimerAPI 6 years ago
David Cernat 42b5a8054f [Server] Remove unusable position functions for players 6 years ago
Koncord 4ce0331f1b [Server] Fix GCC build 6 years ago
Koncord 55cea491ca [Server] Introduce MS VC++ 2017 support 6 years ago
Koncord 6af2400752 [Server] Remove usages of get/set env. Add GetModDir function 6 years ago
David Cernat 5e38e8abdb [Server] Add GetArchitectureType() script function
Additionally, bring GetOperatingSystem() up-to-date by making it use the renamed function in Utils.
6 years ago
David Cernat fa1700e2ab [Server] Add GetOperatingSystemType() script function 6 years ago
David Cernat b7090b2550 [Server] Add experimental option for not crashing from Lua script errors
Additionally, fix return type of GetPluginEnforcementState()
6 years ago
David Cernat d8ca268067 [Server] Move plugin enforcement functions to ServerFunctions 6 years ago
David Cernat 2933526995 [Server] Include errors related to Lua calls in server logs 6 years ago
Koncord e162af0003 [Server] Disallow non void callbacks 6 years ago
Koncord 07a5f5296c [Server] Rework OnRequestPluginList callback. Add AddPluginHash function 6 years ago
Koncord 20a7619a4a [Server] Remove result from the OnPlayerConnect callback
Now it's recommended to use tes3mp.Kick() function
6 years ago
Koncord f1e8569291 [Server] Remove result from the OnPlayerSendMessage callback 6 years ago
Koncord efa362031e [Server] Remove unused Main callback 6 years ago
Koncord b83e4056a8 [Server] Remove CallFF dependency as it not fully supported by Windows and MacOS 6 years ago
Koncord 585557ad8a [Server] Remove argument cast in the Call with va_args 6 years ago
Koncord 3101de5f02 [Server] Add kicked load status 6 years ago
David Cernat 99f8ef88a5 [Server] Add SetObjectActivatingPid() script function 6 years ago
David Cernat bb834748c5 [Server] Log player kicks 6 years ago
David Cernat 292536439e [Server] Rename script functions for clearing packet vectors for players 6 years ago
David Cernat c79660f721 [Server] Make inventory script functions consistent with others
Functions that add elements to a vector should not change the action. This fixes the last remaining oddity in Koncord's original implementation of inventory sync.
6 years ago
Koncord 48f4792bc1 [Server] Add GetMaxPlayers, GetPort and HasPassword functions to API 6 years ago
David Cernat 75a64a69c7 [Server] Add GetInventoryChangesAction() script function
Additionally, fix a typo in the description of GetSpellBookChangesAction()
6 years ago
David Cernat 5fd4113978 [General] Implement sending of ActorSpeech packets from server scripts 6 years ago
David Cernat aec0c5bd49 [Server] Make capitalization consistent for AI-related script functions 6 years ago
David Cernat 8df08c7d10 [General] Implement PlayerItemUse packet
Players can no longer unilaterally use items on themselves in their inventory. When they try to use an item, they send a PlayerItemUse packet to the server with the item's details. A serverside script can then check the item and either send the packet back to make the item use go through or drop it.
6 years ago
David Cernat 888e1dfff8 [General] Allow setting of AI fight & dynamic stats in record packets
Additionally, allow the setting of the Autocalc flag for an NPC record based on an existing record.
6 years ago
David Cernat 6498bcb22b [Server] Add script functions for getting player draw & sneak states 7 years ago
David Cernat b57807407a [General] Implement RecordDynamic packet, part 1
Spell, potion, enchantment, creature, NPC, armor, book, clothing, miscellaneous and weapon record data can now be sent in a RecordDynamic packet. Additionally, the packets include data related to associated magical effects (for spells, potions and enchantments), data related to default inventory contents (for creatures and NPCs) and data related to body parts affected (for armor and clothing).

The server now has associated script functions for setting most of the details of the above, with the main exception being individual creature and NPC stats.

Records can either be created entirely from scratch or can use an existing record (set via the baseId variable) as a starting point for their values. In the latter case, only the values that are specifically set override the starting values. Creature and NPC records also have an inventoryBaseId that can be used on top of the baseId to base their inventories on another existing record.

The client's RecordHelper class has been heavily expanded to allow for the above mentioned functionality.

When players create spells, potions and enchantments as part of regular gameplay, they send RecordDynamic packets that provide the server with the complete details of the records that should be created. When they create enchantments, they also provide the server with armor, book, clothing and weapon records corresponding to the items they've enchanted.

This functionality added by this packet was originally supposed to be exclusive to the rewrite, but I've gone ahead and tried to provide it for the pre-rewrite in a way that can mostly be reused for the rewrite.
7 years ago
David Cernat d93b67ef21 [General] Sync soul refIds for items and add related script functions 7 years ago
David Cernat d778bc3b8a [Server] Turn readWorldstate and writeWorldstate into static variables 7 years ago
David Cernat b4802e4201 [General] Use Time struct for time in BaseWorldstate 7 years ago
David Cernat a4b588d1b5 [General] Add optional timestamps to journal entries in PlayerJournal 7 years ago
David Cernat b79221efcc [Server] Rename variable i into index in ActorFunctions 7 years ago