Jump to content

[Mod] CarrierCommander - continuation of Nexus' Carrier commands


Hammelpilaw

Recommended Posts

- Open file `Avorion/mods/ShipScriptLoader/config/ShipScriptLoader.lua`

- Before the last line containing `return Config` add this:

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

- Copy the directory `mods` contained in the CarrierCommander .zip file into the game directory `Avorion`

 

 

Where does one find the 'CarrierCommander.zip' file? I dont see a link to download it anywhere. Thanks!

Link to comment
Share on other sites

- Open file `Avorion/mods/ShipScriptLoader/config/ShipScriptLoader.lua`

- Before the last line containing `return Config` add this:

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

- Copy the directory `mods` contained in the CarrierCommander .zip file into the game directory `Avorion`

 

 

Where does one find the 'CarrierCommander.zip' file? I dont see a link to download it anywhere. Thanks!

 

You have to be registered to the forums and the file will be on the first post in this thread.

 

Link to comment
Share on other sites

cant get it to work.

tried avorion Version 14.5 and the latest beta 0.15.4 (german Version)

deleted all in avorium Folder, installed new, only These 2 mods like its in here, tried all 2 times

i started new single Player creative mode for Tests, get a fully hangared ship aith fightes out, but no additional menue appears.

installed fresh new english Version of the game and nothing either.

 

Server.lua:

    local s, b = pcall(require, 'mods/ShipScriptLoader/scripts/server/server')

    if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function© a©; b.onPlayerLogIn©; end end end

ShipScriptloader.lua:

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

 

btw: im playing over Steam so full game path is over steamapps, maby this is the Problem?

Link to comment
Share on other sites

Hi Hammelpilaw,

 

first and foremost: Thank you for this awesome mod! Without it - literally unplayable  ;D.

 

I've found an error concering alliance ships with fighters. Scenario first:

 

-2 Players

-Player A in alliance ship with salvaging fighters on board and activated salvaging command. This player is currently offline and in a different sector then Player B

-Player B in non-alliance ship but also in alliance.

 

If Player B connects, the ship of Player A is loaded and tries to run the function "updateServer" in "CarrierCivilCommandSalvage.lua". This causes the following error:

 

2017-12-18 08-41-46| could not execute function 'updateServer' in '"mods/CarrierCommander/scripts/entity/ai/CarrierCivilCommandSalvage.lua"':
2017-12-18 08-41-46| ...mmander/scripts/entity/ai/CarrierCivilCommandSalvage.lua:106: attempt to index local 'player' (a nil value)
2017-12-18 08-41-46| stack traceback:
2017-12-18 08-41-46| 	...mmander/scripts/entity/ai/CarrierCivilCommandSalvage.lua:106: in function 'clearFighterTargets'
2017-12-18 08-41-46| 	...mmander/scripts/entity/ai/CarrierCivilCommandSalvage.lua:132: in function 'updateSalvaging'
2017-12-18 08-41-46| 	...mmander/scripts/entity/ai/CarrierCivilCommandSalvage.lua:13: in function <...mmander/scripts/entity/ai/CarrierCivilCommandSalvage.lua:11>

 

Reasonably, because Player B ist not online, so no player can be assigned. It's getting worse, because this code is executed once every second and will fill the log-files really quickly. Furthermore the server can't stop and thus not save the galaxy.

 

To fix this, I've added code in the UpdateServer functions in all scripts/entity/ai LUA-files:

 

-- this function will be executed every frame on the server only
function updateServer(timeStep)
    if Sector().numPlayers > 0 then
      --Start looking for a wreck to assign fighters to.
      updateSalvaging(timeStep)
    elseif Sector().numPlayers == 0 then
      local entity = Entity()
      for index, name in pairs(entity:getScripts()) do
        if string.match(name, "mods/CarrierCommander/scripts/entity/ai/") then
          entity:removeScript(index)
        end
      end
    end
end

 

I hope you find this useful.

 

Kind regards,

  ReBooT

 

P.S. Sorry if some of the language is a bit wonky, english is not my first language.

Link to comment
Share on other sites

This mod moved to another topic:

http://www.avorion.net/forum/index.php/topic,4268.0.html

 

Laserzwei did a lot of changes and compatibility fixes to this mod, before I found the time to do so. This is why I gave this project to him, Im sure it will be maintained very well. Thanks Laserzwei  alt=:)http://www.avorion.net/forum/Smileys/default/smiley.gif[/img]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...