[DiscordArchive] do you need to label certain scripts as map / world context?
[DiscordArchive] do you need to label certain scripts as map / world context?
Archived author: robinsch • Posted: 2023-01-12T13:10:03.388000+00:00
Original source
do you need to label certain scripts as map / world context?
Archived author: Foe • Posted: 2023-01-12T13:10:36.751000+00:00
Original source
For sure, the only way that people will have the ability to communicate across maps will be through the key value store core side, and that won't accept any userdata
Archived author: Foe • Posted: 2023-01-12T13:11:16.180000+00:00
Original source
Scripts are by default flagged as loaded by all map states unless they are placed in a map prefixed subfolder, or you specify in the script header which maps should have access to it
Archived author: Foe • Posted: 2023-01-12T13:11:35.011000+00:00
Original source
That's to make sure libs, extensions and helper functions work as expected
Archived author: robinsch • Posted: 2023-01-12T13:11:37.727000+00:00
Original source
hmm wouldnt it be easier for people to label certain subtypes of "scripts" that then supplies additional APIs?
Archived author: robinsch • Posted: 2023-01-12T13:12:03.088000+00:00
Original source
since I could think of a few cases where scripts in threadsafe context should access multiple maps
Archived author: Foe • Posted: 2023-01-12T13:13:06.016000+00:00
Original source
In those cases I'm more in favor of said data store, then you can just check that store in the map context side
Archived author: Foe • Posted: 2023-01-12T13:13:29.683000+00:00
Original source
That or we'll have to look into a proper message broker with topic subscription
Archived author: robinsch • Posted: 2023-01-12T13:13:35.596000+00:00
Original source
and that would lock then?
Archived author: Foe • Posted: 2023-01-12T13:14:50.442000+00:00
Original source
It wouldn't, you'd have to assume the data in the store is current when you process it per map, it'll be a bit slower but it's still within margin of error for an mmo if you have to delay an event a tick