David Cernat
8db396d10a
[General] Distinguish between shorts & longs in ClientScriptGlobal
...
Adjust ClientScriptLocal so it refers to its previously handled integers as shorts.
2020-02-17 18:19:03 +02:00
Michal Marchewka
bf7041b067
[Server] Fix credentials generation. Used static variable as a workaround.
2020-02-16 12:34:05 +01:00
David Cernat
ffead444db
[Server] Use consistent order for WorldstateFunctions
2020-02-14 11:51:31 +02:00
David Cernat
a13cef9913
Merge branch '0.7.0reset' of https://github.com/uramer/openmw into 0.7.1
...
# Conflicts:
# apps/openmw-mp/Script/Functions/Worldstate.cpp
# apps/openmw-mp/Script/Functions/Worldstate.hpp
# apps/openmw/mwbase/world.hpp
# apps/openmw/mwmp/CellController.cpp
# apps/openmw/mwworld/cellstore.cpp
# apps/openmw/mwworld/worldimp.cpp
# apps/openmw/mwworld/worldimp.hpp
2020-02-11 15:41:38 +02:00
David Cernat
abd18745df
[General] Include ScriptLocalFloat as part of ClientScriptLocal
2020-02-10 07:58:35 +02:00
David Cernat
975797c09b
[General] Implement ObjectRestock packet
...
Restocking object containers via trading now requires the server to send back an ObjectRestock packet before it can happen.
The unused packet ID ID_SCRIPT_GLOBAL_FLOAT has been replaced with ID_OBJECT_RESTOCK.
2020-01-23 12:50:34 +02:00
David Cernat
e6c626f127
[General] Move handling of client globals to ClientScriptGlobal packet
...
ClientScriptGlobal is a new Worldstate packet that handles short, long and float values for global variables in clientside scripts.
Previously, short values were handled by the ScriptGlobalShort packet, while a partially implemented ScriptGlobalFloat packet also existed, but both of those packets were Object packets because they were added near the end of 2016 when only Player and Object packets existed (with the latter actually being called WorldEvent packets at the time). Both ScriptGlobalShort and ScriptGlobalFloat have now been removed.
The serverside script functions previously used to interact with ScriptGlobalShort have, however, been kept so they can be adjusted to work with local variables in clientside scripts instead in a future commit.
2020-01-04 09:56:37 +02:00
David Cernat
c9b3ec1ca4
[Server] Use consistent ordering for kills & map worldstate functions
2020-01-03 02:00:21 +02:00
David Cernat
32c7406eda
[General] Implement OnObjectHit packet, part 3
...
Include damage, block states and knockdown states in ObjectHit packets about successful hits. Add serverside script functions for reading that information.
2019-12-19 13:53:18 +02:00
David Cernat
bc093c8596
[General] Implement OnObjectHit packet, part 2
...
ObjectHit is now also sent when local actors succeed or fail in hitting other actors with melee attacks, with the packet including the success state of their attack.
It is also sent when creatures hit a non-actor object.
2019-12-13 14:00:51 +02:00
David Cernat
2973cc4f4d
[General] Implement OnObjectHit packet, part 1
...
ObjectHit is now sent when an NPC hits a non-actor object.
2019-12-08 16:14:01 +02:00
David Cernat
0e0ac7a60f
[Server] Add OnConsoleCommand event and associated script function
2019-12-07 10:13:10 +02:00
David Cernat
980edac942
[General] Rename PlayerTeam into PlayerAlly
...
Considering that you can be allies with someone without being allied to their allies, changing the name makes the system more intuitive.
2019-12-05 19:15:11 +02:00
David Cernat
a383b7b612
[General] Include death animations in ActorDeath packets
2019-12-05 13:27:55 +02:00
David Cernat
ecf00af548
[General] Implement WorldDestinationOverride packet, part 1
...
Destinations for doors with cell transitions are now overridden.
2019-12-04 16:43:56 +02:00
David Cernat
753e310dd4
[General] Implement PlayerTeam packet
2019-12-02 19:08:03 +02:00
David Cernat
9a772d737f
[Server] Add script functions relating to summons' effect & spell IDs
2019-12-01 13:32:34 +02:00
David Cernat
610e0558c8
[Server] Use correct argument for SetObjectSummonDuration()
2019-12-01 10:41:07 +02:00
David Cernat
47b666c1f9
[Server] Add ObjectFunctions for setting summoner identity for spawns
2019-12-01 10:12:13 +02:00
David Cernat
c6542ffec4
[Server] Move ObjectFunctions for setting summoning to their own spot
2019-11-30 20:44:27 +02:00
David Cernat
397cdf400b
[Server] Reorder record types in RecordsDynamic script functions
...
They are now consistent with the ordering from 42b002e8db
2019-11-30 19:12:57 +02:00
David Cernat
23d410f473
[General] Implement body part records for RecordDynamic packet
2019-11-29 14:06:17 +02:00
David Cernat
b3747839c0
[General] Add hasRace to record overrides in RecordsDynamic packet
2019-11-29 13:28:07 +02:00
David Cernat
8da6a7fd9b
[Server] Fix mixed-up bindings for Chat functions
2019-11-20 21:01:18 +02:00
David Cernat
8f7a267129
[General] Add scale and bloodType to creature records in RecordDynamic
2019-11-10 09:20:45 +02:00
David Cernat
afb9bd7eb5
[General] Implement script records for RecordDynamic packets
2019-11-09 21:34:09 +02:00
David Cernat
b97322b4b1
[General] Modernize packet style for PlayerInventory
2019-10-26 14:01:08 +03:00
David Cernat
cbe58b1c24
[General] Modernize packet style for PlayerFaction
2019-10-26 11:42:40 +03:00
David Cernat
904f804ea2
[General] Modernize packet style for PlayerSpellbook
2019-10-24 19:27:37 +03:00
David Cernat
4f9e6b0e3e
[General] Modernize packet style for PlayerCellState
2019-10-23 17:46:21 +03:00
David Cernat
96a71c1ced
[General] Modernize packet style for PlayerBook
2019-10-23 02:02:27 +03:00
David Cernat
d66bca8605
[General] Modernize packet style for PlayerTopic
2019-10-23 01:24:13 +03:00
David Cernat
0206d1813c
[General] Modernize packet style for PlayerQuickKeys
2019-10-21 16:55:21 +03:00
David Cernat
4f98d67ed4
[General] Modernize packet style for PlayerJournal
2019-10-21 07:01:36 +03:00
David Cernat
d163f1b6da
[General] Turn WorldKillCount into a Worldstate packet
...
Rename the old WorldKillCount that was a Player packet into PlayerPlaceholder. Rename the unused CellCreate that was a Worldstate packet into WorldKillCount. On the server, move kill count-related script functions from QuestFunctions to WorldstateFunctions.
2019-10-08 11:09:08 +03:00
David Cernat
031acffcbe
[General] Implement cell records for RecordDynamic packets, part 1
...
New interior cells can be now be created that are either blank or based on existing interior cells.
2019-09-28 13:12:48 +03:00
David Cernat
3903ac6526
[Server] Add script functions for getting SHA256 hashes & random strings
2019-09-21 14:22:19 +03:00
David Cernat
ca21bc35c2
[Server] Add script functions that read & send ScriptGlobalShort packets
2019-09-19 08:46:54 +03:00
David Cernat
afa704ce95
[Server] Add OnScriptGlobalShort event
2019-09-14 13:09:01 +03:00
David Cernat
e424bd9bc3
[General] Implement ClientScriptSettings packet, part 2
...
The packet can now set which client globals get packets sent about them when their values change on clients.
2019-09-14 09:37:19 +03:00
David Cernat
3acfbad55d
[General] Implement ClientScriptSettings packet, part 1
...
For starters, the new packet can set which client scripts have all of their variables synchronized between players. The previous hardcoded list of IDs for synchronized scripts has been removed.
2019-09-09 10:28:35 +03:00
David Cernat
e15428e139
[General] Remove "created by" stamps added by IntelliJ
2019-08-26 12:33:28 +03:00
David Cernat
0339958e21
[General] Rename Log class into TimedLog
2019-08-19 21:39:33 +03:00
David Cernat
ae5200cbb2
[General] Implement light records for RecordDynamic packets
2019-08-14 21:10:53 +03:00
David Cernat
14af0be657
[General] Include AI alarm & flee for creatures/NPCs in RecordDynamic
2019-08-07 11:21:22 +03:00
David Cernat
ef432d1419
[General] Include AI services for creatures/NPCs in RecordDynamic
2019-08-07 10:44:07 +03:00
David Cernat
18e2a14645
[General] Implement tool-related records for RecordDynamic packets
2019-08-04 17:53:18 +03:00
David Cernat
4100d93dea
[General] Implement ingredient records for RecordDynamic packets
2019-08-03 06:19:22 +03:00
David Cernat
300cef0073
[Server] Allow setting of container record flags in SetRecordFlags()
2019-08-01 21:28:03 +03:00
David Cernat
0189d19d14
[Server] Clear new types of records in ClearRecords()
2019-08-01 15:47:13 +03:00
David Cernat
247d2fad30
[General] Implement activator & static records for RecordDynamic packets
2019-08-01 09:48:57 +03:00
David Cernat
e9336e53fc
[General] Implement container and door records for RecordDynamic packets
2019-07-27 03:45:50 +03:00
Andrei Kortunov
792fbfe2e1
Fix type in the preprocessor directive
2019-05-30 09:19:33 +04:00
David Cernat
023ead937f
[Server] Fix stack overflows by preventing infinite growth in Lua stack
2019-05-12 01:58:18 +03:00
David Cernat
3805edaf78
[Server] Don't crash when adding a requiredDataFile w/ no checksum twice
2019-05-05 17:39:49 +03:00
David Cernat
7523a73346
[Server] Fix return values for server functions providing system info
2019-04-23 23:40:41 +03:00
David Cernat
d8919dcec6
[Server] Refer to data files instead of plugins in var & function names
2019-04-23 22:45:25 +03:00
uramer
c89efd251c
[General] Implement CellReset packet, stage 2
2019-04-07 01:27:15 +02:00
uramer
6cb4d5ec35
[General] Implement CellReset packet, stage 1
2019-03-24 13:23:13 +01:00
David Cernat
91f82d845c
[Server] Add GetMillisecondsSinceServerStart() server function
2019-03-20 20:02:31 +02:00
David Cernat
bd677726bf
[Server] Add StatsFunctions that get/set damage to attributes/skills
2019-03-20 18:54:35 +02:00
David Cernat
ece39748de
[Server] Fix typo causing recursion in deprecated actor list function
2019-03-20 17:01:21 +02:00
David Cernat
5c4d3df551
[Server] Deprecate DoesFileExist(), add DoesFilePathExist()
2019-03-19 04:52:58 +02:00
David Cernat
2cdabddc0e
[Server] Move most MiscellaneousFunctions to ServerFunctions
2019-03-19 04:25:33 +02:00
David Cernat
b46767de6e
[Server] Clean up recent additions to ServerFunctions
2019-03-19 03:57:16 +02:00
David Cernat
a0ec9dfd2e
[Server] Rename OnRequestPluginList into OnRequestDataFileList
2019-03-12 03:18:57 +02:00
David Cernat
986528c67d
[Server] Add error message as argument to OnServerScriptCrash
2019-03-12 02:15:20 +02:00
David Cernat
552a94a0ca
[Server] Add OnServerScriptCrash script event
2019-03-10 00:46:40 +02:00
David Cernat
a508a0faf8
[Server] Turn GetArguments() from ScriptFunctions into Utils function
2019-02-24 01:43:04 +02:00
Koncord
0df32accca
[Server] Fix ARM build
2019-01-21 12:02:02 +08:00
David Cernat
6e1504f0a1
[Server] Use clearer variable & function names in TimerAPI
2018-12-30 04:15:53 +02:00
David Cernat
42b5a8054f
[Server] Remove unusable position functions for players
2018-12-30 03:17:37 +02:00
Koncord
4ce0331f1b
[Server] Fix GCC build
2018-12-29 15:54:08 +08:00
Koncord
55cea491ca
[Server] Introduce MS VC++ 2017 support
2018-12-29 11:57:26 +08:00
Koncord
6af2400752
[Server] Remove usages of get/set env. Add GetModDir function
2018-12-29 11:40:31 +08:00
David Cernat
5e38e8abdb
[Server] Add GetArchitectureType() script function
...
Additionally, bring GetOperatingSystem() up-to-date by making it use the renamed function in Utils.
2018-12-17 11:55:50 +02:00
David Cernat
fa1700e2ab
[Server] Add GetOperatingSystemType() script function
2018-12-17 11:32:31 +02:00
David Cernat
b7090b2550
[Server] Add experimental option for not crashing from Lua script errors
...
Additionally, fix return type of GetPluginEnforcementState()
2018-12-01 03:03:39 +02:00
David Cernat
d8ca268067
[Server] Move plugin enforcement functions to ServerFunctions
2018-11-30 22:43:10 +02:00
David Cernat
2933526995
[Server] Include errors related to Lua calls in server logs
2018-11-30 22:01:02 +02:00
Koncord
e162af0003
[Server] Disallow non void callbacks
2018-10-30 15:32:52 +08:00
Koncord
07a5f5296c
[Server] Rework OnRequestPluginList callback. Add AddPluginHash function
2018-10-30 14:56:54 +08:00
Koncord
20a7619a4a
[Server] Remove result from the OnPlayerConnect callback
...
Now it's recommended to use tes3mp.Kick() function
2018-10-30 13:18:32 +08:00
Koncord
f1e8569291
[Server] Remove result from the OnPlayerSendMessage callback
2018-10-30 13:13:07 +08:00
Koncord
efa362031e
[Server] Remove unused Main callback
2018-10-30 13:03:37 +08:00
Koncord
b83e4056a8
[Server] Remove CallFF dependency as it not fully supported by Windows and MacOS
2018-10-30 12:59:47 +08:00
Koncord
585557ad8a
[Server] Remove argument cast in the Call with va_args
2018-10-30 12:58:15 +08:00
Koncord
3101de5f02
[Server] Add kicked load status
2018-10-30 12:56:50 +08:00
David Cernat
99f8ef88a5
[Server] Add SetObjectActivatingPid() script function
2018-10-22 16:25:50 +03:00
David Cernat
bb834748c5
[Server] Log player kicks
2018-10-13 09:34:29 +03:00
David Cernat
292536439e
[Server] Rename script functions for clearing packet vectors for players
2018-10-03 02:26:47 +03:00
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.
2018-10-01 18:29:50 +03:00
Koncord
48f4792bc1
[Server] Add GetMaxPlayers, GetPort and HasPassword functions to API
2018-09-05 18:19:34 +08:00
David Cernat
75a64a69c7
[Server] Add GetInventoryChangesAction() script function
...
Additionally, fix a typo in the description of GetSpellBookChangesAction()
2018-08-21 10:06:40 +03:00
David Cernat
5fd4113978
[General] Implement sending of ActorSpeech packets from server scripts
2018-08-13 20:39:03 +03:00
David Cernat
aec0c5bd49
[Server] Make capitalization consistent for AI-related script functions
2018-08-11 18:57:36 +03:00
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.
2018-08-09 18:25:20 +03:00
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.
2018-08-05 11:00:25 +03:00
David Cernat
6498bcb22b
[Server] Add script functions for getting player draw & sneak states
2018-08-03 18:26:44 +03:00
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.
2018-07-30 10:56:26 +03:00