26304 Posts in 4431 Topics - by 9750 Members - Latest Member: Gethe1975

Author Topic: [mod] Ship Script Loader (A small mod to auto load scripts onto a players ship)  (Read 9129 times)

Raio_Verusia

  • Newbie
  • *
  • Posts: 10
    • View Profile
Dear me, I think I edited the server.lua but never saved it? Which confused me when I closed Sublime and opened it and it remembered the changes but then I opened it in notepad and it was nowhere to be found.

Dirtyredz

  • Full Member
  • ***
  • Posts: 213
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
remember to only edit the files while the server is offlines, I sometimes hear people forgetting that.

saving a document usually helps too :)
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com


Raio_Verusia

  • Newbie
  • *
  • Posts: 10
    • View Profile
I may have actually edited the wrong server.lua with that fix, so I just wiped the mods folder clean and will redo it. Will let you know.

Edit: Can confirm, Raio derped. All works now, except me, off for coffee now.
« Last Edit: February 01, 2018, 07:57:15 PM by Raio_Verusia »

Ivanes

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi.

First off, thanks for a great mod :).

I have stumbled upon a small bug with version 1.1.0. If there is a problem with the mod that is being loaded, then it just writes "failed to locate script at %path".

To reproduce, add the CarrierCommand mod and check the aggressiveCommand.lua file, line 222. If it looks like
Code: [Select]
elseif entity.isStation and then priority = cc.Config.basePriorities.station
then the load will fail. ShipScriptLoader version 1.0.0 does show an error message at line 222 but version 1.1.0 states it cannot locate the script.

Deleting the unneeded AND and the mod loads just fine in both version 1.1.0 and 1.0.0.

I hope it is an easy fix to get a good error message and keep up the good work  :)

Rudolf Pflanz

  • Newbie
  • *
  • Posts: 30
    • View Profile
hi there,

thanks for the mod.  i however, cant work out for the life of me whats wrong, as i cant load carrier commander mods either.

Ive installed it all to the letter,  but im not that experienced with mods like scripting.  i can confirm that it looks identical to yours, and the instructions, and that the carrier commander is also installed how it should be.

any ideas?   what do i need to post?

Dirtyredz

  • Full Member
  • ***
  • Posts: 213
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
Client log, server.lua, and shipscriptconfig.lua

That will help us lead you in the right direction
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com


Rudolf Pflanz

  • Newbie
  • *
  • Posts: 30
    • View Profile
hi,

this is the server

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")

    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
else
    print("failed to load ShipScriptLoader", b)
end

this is the ships script

local Config = {}
Config.author = 'Dirtyredz'
Config.name = 'Ship Script Loader'
Config.homepage = "https://github.com/dirtyredz/AvorionBoilerPlate"
Config.version = {
    major=1, minor=1, 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

return Config
Config.Add("mods/CarrierCommander/scripts/entity/CarrierCommander.lua")


but im not sure how to find client log.....

Dirtyredz

  • Full Member
  • ***
  • Posts: 213
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
these two look good, the client log is the most important also the server log, you can find both located in your %appdata% directory or if the server is on a seprate machine (usually linux) then taht can be found in /home/user/.avorion/
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com


Rudolf Pflanz

  • Newbie
  • *
  • Posts: 30
    • View Profile
Morning!

This?

2018-03-23 06-35-15| Client started: "C:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" "--serverpath=bin/AvorionServer.exe"
2018-03-23 06-35-15| Enabled Traces:
2018-03-23 06-35-15| Client Beta 0.15.8 r10262, running on Windows 8.1+.
2018-03-23 06-35-15| CPU: AuthenticAMD 16 Cores
2018-03-23 06-35-15| RAM: 16GB
2018-03-23 06-35-15| Init Steamworks...Installed Steam exception handler
2018-03-23 06-35-15| Init Steamworks... ok
2018-03-23 06-35-15| Init Steamworks ok
2018-03-23 06-35-15| Init SDL2... ok
2018-03-23 06-35-15| SDL version (compiled): 2.0.3
2018-03-23 06-35-15| SDL version (linked): 2.0.3
2018-03-23 06-35-15| Getting display mode... ok
2018-03-23 06-35-15| Current display mode: 2560 x 1440
2018-03-23 06-35-15| Creating settings... loading... setting language... ok
2018-03-23 06-35-15| Creating client window...Creating window ...
2018-03-23 06-35-15| Detected 1 displays
2018-03-23 06-35-15| Display 0: x: 0, y: 0, w: 2560, h: 1440
2018-03-23 06-35-15| Using display 0
2018-03-23 06-35-15| Trying to create OpenGL 4.0 core window ...
2018-03-23 06-35-15| Creating window, x: 0, y: 0, w: 2560, h: 1440... ok
2018-03-23 06-35-15| Creating GL context... ok
2018-03-23 06-35-15| Initializing GLEW... ok
2018-03-23 06-35-15| Setting display mode 2560 x 1440 (WindowedSeamless)... ok
2018-03-23 06-35-15| GetDrawableSize: 2560 1440
2018-03-23 06-35-15| GetWindowSize: 2560 1440
2018-03-23 06-35-15| Creating client window ok
2018-03-23 06-35-15| Init rendering... starting rendering... initialize...OpenGL Context Information:
2018-03-23 06-35-15| Version: 4.0
2018-03-23 06-35-15| VersionString: 4.0.0 NVIDIA 388.13
2018-03-23 06-35-15| Vendor: NVIDIA Corporation
2018-03-23 06-35-15| Renderer: GeForce GTX 1070/PCIe/SSE2
2018-03-23 06-35-15| GLSL Version: 4.00 NVIDIA via Cg compiler
2018-03-23 06-35-15| GL_MAX_CUBE_MAP_TEXTURE_SIZE: 32768
2018-03-23 06-35-15| GL_MAX_ELEMENTS_INDICES: 1048576
2018-03-23 06-35-15| GL_MAX_ELEMENTS_VERTICES: 1048576
2018-03-23 06-35-15| GL_MAX_RENDERBUFFER_SIZE: 32768
2018-03-23 06-35-15| GL_MAX_TEXTURE_SIZE: 32768
2018-03-23 06-35-15| GL_MAX_VERTEX_ATTRIBS: 16
2018-03-23 06-35-15| GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: 32
2018-03-23 06-35-15| Init Debug Message Callback... ok
2018-03-23 06-35-15| Set VSync... ok
2018-03-23 06-35-15| Secure BackBuffer... ok
2018-03-23 06-35-15| Init Canvas...Create canvas of size 2560 x 1440... ok
2018-03-23 06-35-15| Init Canvas ok
2018-03-23 06-35-15| Init Refraction Texture... ok
2018-03-23 06-35-15| Init Post Processing... ok
2018-03-23 06-35-15| Init Debug Renderers... ok
2018-03-23 06-35-15| DepthTexturesSupported: yes
2018-03-23 06-35-15| IntVertexAttributesSupported: yes
2018-03-23 06-35-15| DeferredSupported: yes
2018-03-23 06-35-15| LowSpecGPUDetected: no
2018-03-23 06-35-15| Available video memory: 7.28711 GB
2018-03-23 06-35-15| Rendering initialized
2018-03-23 06-35-15| Init rendering ok
2018-03-23 06-35-15| Check problematic drivers... ok
2018-03-23 06-35-15| Init shader level... ok
2018-03-23 06-35-15| Init loading screen... ok
2018-03-23 06-35-16| Draw first loading screen... draw... ok
2018-03-23 06-35-16| Init SFX... ok
2018-03-23 06-35-16| Init Input... ok
2018-03-23 06-35-16| Init GameInput... ok
2018-03-23 06-35-16| Init WorkerPool... ok
2018-03-23 06-35-16| Init Main Menu... ok
2018-03-23 06-35-17| Init Music... ok
2018-03-23 06-35-17| Apply loaded settings... ok
2018-03-23 06-35-17| Adjust settings to GPU... ok
2018-03-23 06-35-17| Client initialized
2018-03-23 06-35-17| Received stats and achievements from Steam
2018-03-23 06-35-17| STAT_PIRATES_DESTROYED: 776i
2018-03-23 06-35-17| STAT_XSOTAN_DESTROYED: 501i
2018-03-23 06-35-17| STAT_CIVIL_SHIPS_DESTROYED: 11i
2018-03-23 06-35-17| STAT_SHIPS_DESTROYED: 71i
2018-03-23 06-35-17| STAT_STATIONS_DESTROYED: 4i
2018-03-23 06-35-17| STAT_RESOURCES_MINED: 1616099i
2018-03-23 06-35-17| STAT_GOODS_TRADED: 972i
2018-03-23 06-35-17| STAT_GOODS_SOLD: 243i
2018-03-23 06-35-17| STAT_GOODS_BOUGHT: 729i
2018-03-23 06-35-17| STAT_GATES_USED: 78i
2018-03-23 06-35-17| STAT_WORMHOLES_USED: 30i
2018-03-23 06-35-17| STAT_JUMPS_USED: 767i
2018-03-23 06-35-17| STAT_SECTORS_DISCOVERED: 619i
2018-03-23 06-35-17| STAT_SECTORS_TRAVELED: 9607.45f
2018-03-23 06-35-17| STAT_METERS_FLOWN: 28960322i
2018-03-23 06-35-17| Finished download of workshop plan Trinium battleship
2018-03-23 06-35-17| Finished download of workshop plan Homeworld Junkyard Dawg (rough)
2018-03-23 06-35-17| Finished download of workshop plan [Fighter Blueprint] N'Daal 'Adze' Fighter Drone
2018-03-23 06-35-18| Startup successful.
2018-03-23 06-35-36| Starting server 'bin/AvorionServer.exe' with arguments '--galaxy-name PS1 --server-name RudolfPflanz's Server --port 27000 --public 0 --safe-player-input false --pausable true --alive-sectors-per-player 500 --listed 0 --authentication 0 --exit-on-last-admin-logout --admin 76561198031156927 --use-steam-networking 1 --threads 15 '
2018-03-23 06-35-36| Connecting to 127.0.0.1:27000, query port: 27003
2018-03-23 06-35-37| Waiting for Online polling threads
2018-03-23 06-35-37| Online polling threads finished
2018-03-23 06-35-37| Waiting for LAN polling threads
2018-03-23 06-35-37| LAN polling threads finished
2018-03-23 06-35-37| Client UDP: Error receiving from 127.0.0.1, error: An existing connection was forcibly closed by the remote host, received bytes: 0
2018-03-23 06-35-38| remote address: ip, init: steam
2018-03-23 06-35-38| Connecting to server at 127.0.0.1:27000
2018-03-23 06-35-38| Client UDP: Error receiving from 127.0.0.1, error: An existing connection was forcibly closed by the remote host, received bytes: 0
2018-03-23 06-35-38| Initiating connection with server ID 90113916854777863
2018-03-23 06-35-42| Authentication successful!
2018-03-23 06-35-45| <Server> Player RudolfPflanz joined the galaxy
2018-03-23 06-35-46| Finished download of workshop plan [Fighter Blueprint] N'Daal 'Adze' Fighter Drone
2018-03-23 06-35-46| Finished download of workshop plan Homeworld Junkyard Dawg (rough)
2018-03-23 06-35-46| Finished download of workshop plan Trinium battleship
2018-03-23 06-36-09| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-36-54| <> The Nav-Computer is calculating the jump route. Please stand by.
2018-03-23 06-37-09| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-37-25| <> The jump route is still being calculated.
2018-03-23 06-37-27| <> The jump route is still being calculated.
2018-03-23 06-37-27| <> The jump route is still being calculated.
2018-03-23 06-37-28| <> Jump route calculated.
2018-03-23 06-38-08| <Server> Your Ship Iron Fighter has been destroyed!
2018-03-23 06-38-30| Finished download of workshop plan [Fighter Blueprint] N'Daal 'Adze' Fighter Drone
2018-03-23 06-38-30| Finished download of workshop plan Homeworld Junkyard Dawg (rough)
2018-03-23 06-38-30| Finished download of workshop plan Trinium battleship
2018-03-23 06-38-47| <> Paid 13.712 credits to build a fighter.
2018-03-23 06-38-58| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-38-59| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-40-01| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-41-45| Auto saving ship to "C:\Users\Baba Dada\AppData\Roaming\Avorion\ships\MCRN Enterprise5.xml"
2018-03-23 06-41-46| Auto saved ship to "C:\Users\Baba Dada\AppData\Roaming\Avorion\ships\MCRN Enterprise5.xml".
2018-03-23 06-48-08| <> Received 100000 iron from RudolfPflanz.
2018-03-23 06-48-08| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-48-08| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-48-46| <> The Nav-Computer is calculating the jump route. Please stand by.
2018-03-23 06-49-03| <> Jump route calculated.
2018-03-23 06-49-12| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-49-12| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-49-36| <> The Nav-Computer is calculating the jump route. Please stand by.
2018-03-23 06-49-47| <> The Nav-Computer is calculating the jump route. Please stand by.
2018-03-23 06-49-58| <> Jump route calculated.
2018-03-23 06-50-14| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-50-14| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-51-17| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-51-17| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-52-20| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-52-20| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-53-23| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-53-23| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-53-34| <Server> Pirates are attacking the sector!
2018-03-23 06-54-26| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-54-26| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-55-30| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-55-30| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-56-33| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-56-33| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-57-10| <Server> Your sensors picked up a short burst of subspace signals.
2018-03-23 06-57-36| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-57-36| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-58-39| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-58-39| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-59-41| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 06-59-41| <> Paid 4099 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 07-00-09| <Server> More strange subspace signals, they're getting stronger.
2018-03-23 07-01-09| <Server> A small group of alien ships appeared!
2018-03-23 07-08-59| <> Paid 3952 Iron for production of a fighter on MCRN Enterprise.
2018-03-23 07-10-27| <Unknown> This is a distress call! Our position is (34:442) We are under attack by pirates, please help!
2018-03-23 07-10-27| <> You have received a distress signal by an unknown source.
2018-03-23 07-16-19| UDP closed
2018-03-23 07-16-19| Client UDP: Connection closed
2018-03-23 07-16-19| Client UDP: Error receiving from 127.0.0.1, error: An existing connection was forcibly closed by the remote host, received bytes: 0
2018-03-23 07-16-19| UDP closed
2018-03-23 07-16-19| Client UDP: Connection closed
2018-03-23 07-16-20| Client UDP: Error receiving from 127.0.0.1, error: No connection could be made because the target machine actively refused it, received bytes: 0
2018-03-23 07-16-20| Client UDP: Error receiving from 127.0.0.1, error: An existing connection was forcibly closed by the remote host, received bytes: 0
2018-03-23 07-16-20| Server shutdown successful.
2018-03-23 07-16-20| UDP closed
2018-03-23 07-16-20| Client UDP: Connection closed
2018-03-23 07-16-21| Startup successful.
2018-03-23 07-16-25| Exiting client.
2018-03-23 07-16-25| Exited client main loop.
2018-03-23 07-16-25| Waiting for Online polling threads
2018-03-23 07-16-25| Online polling threads finished
2018-03-23 07-16-25| Waiting for LAN polling threads
2018-03-23 07-16-25| LAN polling threads finished
2018-03-23 07-16-25| Stopping local server ...

Rudolf Pflanz

  • Newbie
  • *
  • Posts: 30
    • View Profile
aaarrgh the waiting is killing me XD

im so eager to clear up these wasted hunks of junk!!

Dirtyredz

  • Full Member
  • ***
  • Posts: 213
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
 I'm not seeing anything directly in the logs to why its not working,  send me a pm on discord and i can help you more directly with what's going on.

http://Https://discord.gg/aMXFP5
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com


Alusares

  • Newbie
  • *
  • Posts: 4
    • View Profile
I started playing Avorion a few weeks ago, and after I really started experimenting with fighters, I realized that I wanted some kind of mod to assist with fighter related micromanagement. Ship script loader + Carrier command works perfectly with the current beta branch! It took a few minutes of tinkering with code to get it to do, but I'm definitely impressed! Great work on modding guys :D

Metatron

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hallo zusammen,

Ich schreibe in Deutsch da mein Englisch zu schlecht ist für mein Problem. Also Ich haben vorgestern die Mods ShipScriptLoader und CarrierCommander installiert wie in der Anleitung beschrieben und es hat super Funktioniert, nun musste ich aber (nicht wegen der Mod) mein Windows 10 neu installieren und somit alles neu machen.

Nun habe ich Avorion wieder runter geladen und installiert und auch die beiden Mods installert so wie es in der Anleitung steht aber jetzt Funktioniert die Mod nicht mehr. Ich habe auch nich das Jäger Icon rechts oben im Spiel wo ich die Befehle einstellen kann.

Ich hoffe ihr findet dort ein Fehler und ich kann diesen mit eure Hilfe beseitigen. Danke schon mal im vorraus. :)

hier mal die beiden .lua Inhalte von mein Spiel.


F:\Steam\steamapps\common\Avorion\data\scripts\server\Server.lua

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")

    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





F:\Steam\steamapps\common\Avorion\mods\ShipScriptLoader\config\ShipScriptLoader.lua

local Config = {}
Config.author = 'Dirtyredz'
Config.name = 'Ship Script Loader'
Config.homepage = "https://github.com/dirtyredz/AvorionBoilerPlate"
Config.version = {
    major=1, minor=1, 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")

return Config
Config.Add("mods/CarrierCommander/scripts/entity/CarrierCommander.lua")

Dirtyredz

  • Full Member
  • ***
  • Posts: 213
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
Hallo zusammen,

Ich schreibe in Deutsch da mein Englisch zu schlecht ist für mein Problem. Also Ich haben vorgestern die Mods ShipScriptLoader und CarrierCommander installiert wie in der Anleitung beschrieben und es hat super Funktioniert, nun musste ich aber (nicht wegen der Mod) mein Windows 10 neu installieren und somit alles neu machen.

Nun habe ich Avorion wieder runter geladen und installiert und auch die beiden Mods installert so wie es in der Anleitung steht aber jetzt Funktioniert die Mod nicht mehr. Ich habe auch nich das Jäger Icon rechts oben im Spiel wo ich die Befehle einstellen kann.

Ich hoffe ihr findet dort ein Fehler und ich kann diesen mit eure Hilfe beseitigen. Danke schon mal im vorraus. :)

hier mal die beiden .lua Inhalte von mein Spiel.

The last line in your config file:

Code: [Select]
Config.Add("mods/CarrierCommander/scripts/entity/CarrierCommander.lua")
Needs to be moved up two lines ABOVE:
Code: [Select]
return Config
I hope this helps.

Google Translate:


Die letzte Zeile in Ihrer Konfigurationsdatei:

Code: [Select]
Config.Add ("Mods / CarrierCommander / scripts / entity / CarrierCommander.lua")
Muss in zwei Zeilen nach OBEN verschoben werden:

Code: [Select]
return Config
Ich hoffe das hilft.
« Last Edit: June 15, 2018, 05:28:18 AM by Dirtyredz »
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com


Metatron

  • Newbie
  • *
  • Posts: 2
    • View Profile
YES Thank it works.  :D :D :D :D :D