Jump to content

LordXaosa

Members
  • Posts

    4
  • Joined

  • Last visited

LordXaosa's Achievements

0

Reputation

  1. Hi there! I found an error, that cause Swoks not to spawn. in /data/scripts/lib/pirategenerator.lua line 100 you should move local ship var outside of if else block, becase it can't be returned after it. Also you should move local faction outside too, becase local race = faction:getValue("AvorionMultiverse_Rasse") calls earlier then faction initializes. Fixed function should be like this: function PirateGenerator.create(position, volumeFactor, title) ----------------------------------------------- ---------- AvorionMultiverse Changes ---------- ----------------------------------------------- local faction = Galaxy():getPirateFaction(PirateGenerator.pirateLevel) local race = faction:getValue("AvorionMultiverse_Rasse") local ship if (race ~= nil and race ~= "") then position = position or Matrix() local x, y = Sector():getCoordinates() PirateGenerator.pirateLevel = PirateGenerator.pirateLevel or Balancing_GetPirateLevel(x, y) local volume = Balancing_GetSectorShipVolume(x, y) * volumeFactor; local plan = PlanGenerator.makeShipPlan(faction, volume) package.path = package.path .. ";data/mods/avorionmultiverse/?.lua" avorionMultiverse = require("AvorionMultiverse") local material = PlanGenerator.selectMaterial(faction) --Possible title from "pirategenerator.lua" and "asyncpirategenerator.lua" --"Outlaw", "Bandit", "Pirate", "Marauder", "Disruptor", "Raider", "Ravager", "Pirate Mothership" local raceObject = {} if string.match(title, "Mothership") then raceObject = avorionMultiverse.GetRaceObject(faction, plan, material, "CarrierShip") else raceObject = avorionMultiverse.GetRaceObject(faction, plan, material, "DefenderShip") end plan = raceObject.plan ship = Sector():createShip(faction, "", plan, position) PirateGenerator.addPirateEquipment(ship, title) if (raceObject ~= nil) then ship.name = ship.name.." by "..raceObject.Creator if (raceObject.IngameName ~= nil and raceObject.IngameName ~= "") then ship.name = raceObject.IngameName.." by "..raceObject.Creator end if (raceObject.Title ~= nil and raceObject.Title ~= "") then ship.title = raceObject.Title end end ship.crew = ship.minCrew ship.shieldDurability = ship.shieldMaxDurability else -- original code!! position = position or Matrix() local x, y = Sector():getCoordinates() PirateGenerator.pirateLevel = PirateGenerator.pirateLevel or Balancing_GetPirateLevel(x, y) --local faction = Galaxy():getPirateFaction(PirateGenerator.pirateLevel) local volume = Balancing_GetSectorShipVolume(x, y) * volumeFactor; local plan = PlanGenerator.makeShipPlan(faction, volume) ship = Sector():createShip(faction, "", plan, position) PirateGenerator.addPirateEquipment(ship, title) ship.crew = ship.minCrew ship.shieldDurability = ship.shieldMaxDurability end ----------------------------------------------- return ship end
  2. I think it is quite easy to make this well. Just reset "despawn timer", whatever, when been salvaged (or damaged). With this all other wreck would despawn as usually and not causing memory leak or lags, but that entity, that player is salvaging now - won't disappear until it needs to player.
  3. So, there are NPC traders, but what about prices? I can't believe that there is possibility to produce goods and trade to other players and even NPCs, but no possibility to set prices...
  4. Guys, could you tell me how to set up prices on own factory?
×
×
  • Create New...