Jump to content

Cruzz999

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Cruzz999's Achievements

0

Reputation

  1. So, I removed all mods, verified game cache, and reinstalled all the mods I had again except for two (findstation, and automatic research, which didn't work), and after reinstalling this mod, it worked!
  2. Quick reply, thanks! Still can't get it to work though. I noticed in the mods/ShipScriptLoader/scripts/server/server.lua file that there should be a printout with "Script Loaded" which I do not get, which leads me to believe something's wrong with the installation of the script loader. I should probably mention that I'm on the beta branch, if that matters.
  3. I must be doing something wrong, I can't get the new interface to show up. My Avorion/mods/ShipScriptLoader/config/ShipScriptLoader.lua looks like this local Config = {} Config.author = 'Dirtyredz' Config.name = 'Ship Script Loader' Config.homepage = "https://github.com/dirtyredz/AvorionBoilerPlate" Config.version = { major=1, minor=0, patch = 0, string = function() return Config.version.major .. '.' .. Config.version.minor .. '.' .. Config.version.patch end } Config.Scripts = {} function Config.Add(scriptPath) table.insert(Config.Scripts,scriptPath) end -- Example use to add a script to a players ship -- Config.Add("mods/YourMod/scripts/entity/YourMod.lua") Config.Add("mods/CarrierCommander/scripts/entity/CarrierCommander.lua") return Config and my Avorion/data/scripts/server/server.lua looks like so package.path = package.path .. ";data/scripts/lib/?.lua" package.path = package.path .. ";data/scripts/server/?.lua" require ("factions") require ("stringutility") function onStartUp() Server():registerCallback("onPlayerLogIn", "onPlayerLogIn") Server():registerCallback("onPlayerLogOff", "onPlayerLogOff") Galaxy():registerCallback("onPlayerCreated", "onPlayerCreated") Galaxy():registerCallback("onFactionCreated", "onFactionCreated") end function onShutDown() end function update(timeStep) local server = Server() local guardianRespawnTime = server:getValue("guardian_respawn_time") if guardianRespawnTime then guardianRespawnTime = guardianRespawnTime - timeStep; if guardianRespawnTime < 0 then guardianRespawnTime = nil end server:setValue("guardian_respawn_time", guardianRespawnTime) end local serverRuntime = server:getValue("online_time") or 0 serverRuntime = serverRuntime + timeStep server:setValue("online_time", serverRuntime) end function onPlayerCreated(index) local player = Player(index) Server():broadcastChatMessage("Server", 0, "Player %s created!"%_t, player.name) end function onFactionCreated(index) end function onPlayerLogIn(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name) player:addScriptOnce("headhunter.lua") player:addScriptOnce("eventscheduler.lua") player:addScriptOnce("story/spawnswoks.lua") player:addScriptOnce("story/spawnai.lua") player:addScriptOnce("story/spawnguardian.lua") player:addScriptOnce("story/spawnadventurer.lua") player:addScriptOnce("mods/oosp/scripts/player/oosproduction.lua") --oosp matchResources(player) end function onPlayerLogOff(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s left the galaxy"%_t, player.name) end local s, b = pcall(require, 'mods/ShipScriptLoader/scripts/server/server') if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function(c) a(c); b.onPlayerLogIn(c); end end end Both of those files appear identical to the functioning examples given previously in this thread. What am I missing? Do I need to initialize this mod or the shipscriptloader in some different way?
  4. 'Ello, I guess I might as well introduce myself here. I was introduced to this game a week ago by a streamer and youtuber, it looked neat, so I bought it. I have logged 107 hours in it so far, for an average of about 15 hours a day. Considering the fact that I also work at 50%, I feel like this game is robbing me of quite a bit of my free time. All of it, actually. But that's all good, I'm enjoying it! Haven't tried the multiplayer yet, but I might check that out if there are something akin to public servers. I can imagine several competing factions building up their wealth to gain power and control of the galaxy being incredibly cool. See you in the center!
×
×
  • Create New...