Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
T: 11
Object: 6Sector
Execution Context (inner to outer):
#0: PlayerlessEvents.update F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua
could not execute function 'PlayerlessEvents.update' in '"F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua"':
F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua:121: attempt to index a nil value
stack traceback:
F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua:121: in function 'validSector'
F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua:203: in function <F:\AvorionData\Mine_galaxy\workshop\content\445220\2030638849\data/scripts/sector/jceventscheduler.lua:200>
wondering if you may have any idea as to what could be causing this. i must admit.. i do run the server with 99 other mods, exactly.. so i expect it to be a compatibility issue but i just want your opinion if you will give it :)
We've been having some issues since the recent update, however; it seems that random events aren't spawning in non-player sectors at all anymore. I suspect that it might be that an attack is still in progress either in an unloaded sector or one where a player ship died previously, thus preventing any new events from happening. Are there any debug commands/logs in the mod that can check what events are currently in progress? Alternatively, do you think that re-installing the mod or doing something else along those lines may fix the issue?
https://imgur.com/a/VlBD71o
Also, looking through I see a note about random():test() not working right for you? I'm not sure why... the devs use it themselves in several places throughout their code and I haven't noticed any issues with it in the areas where it's used in my mods. Only thing I can think of, I wonder if this script only applies to newly generated sectors? IE, if you make a change to it, in order to get an existing sector to see the change, I wonder if you need to delete the sector file and let it regen?
if not PlayerlessEvents.currentEvent() and random():test(0.5) then
The 0.5 gives a 50% chance.
Mind you, I haven't finished play testing to make sure my syntax was correct, but that should work. :)
In jceventscheduler.lua, right after maybe line 93, I'd recommend including a rand:test(value) check, where value is a % chance for the event to occur. If it fails (returns false), then reset the counter, otherwise play out the event. This will prevent all sectors from (more or less) having simultaneously occurring events, or always having events every 20-30 minutes. Then you can change the timer up some, too.
In this same file where you do the weight selections, if you wanted (or maybe just for future reference), you could have used the selectByWeight function from the randomext.lua file. Just need to feed it a table of weighted values (ex: {7,4,2,1,1}) and it will return you the element position of the weighted value it selected. Then you use this to select your actual event (ex: local chosenEvent = events[selectByWeight(tableOfWeights)])
Hope some of this is of use to you. :)
eventuility.lua, lines 14-18 should probably be removed/commented out. In its current form, if there are no players in the sector, it will just return true and bypass the other two checks for playtime and entities that are supposed to stop events from happening (such as the energy suppressors).
I don't know if there is a way or not, I haven't looked through everything enough yet, but if there is a way to detect player assets (ships & stations) vs just players, then it might be good to include a check in this same file for that. If there is nothing for player assets, then there's no point in the event (I've noticed empty sectors filling up with pirates from this...).
local frequency = math.random(20,30)*60
Right now it is set for an event to happen every 20-30 minutes, but you can decrease the frequency of events by increasing those two numbers. Also you can use an energy suppressor as well which should stop pirate attacks.(Not to sure about the alien ones though) As far as synchronizing the sectors so it only happens to one sector at a time, that I'm not too sure about, if its even possible.
I honestly love that something like this exists, but yeah, it can get to quite a lot quite quickly :D
@Prokon Any feedback is much appreciated! This is my first mod, and I had made it kinda with farming in mind such as having a heavily guarded station destroy ships and salvage the remains.
Thanks