Jump to content

Aki

Members
  • Posts

    166
  • Joined

  • Last visited

Posts posted by Aki

  1. I didn't find (yet?) any particular reason why this happens so posting here instead with bugtracker.

     

    Image describes the problem:

    avorion-dance.gif

     

    For now it happens for every passing trader in that spot. Pretty sure it is just this spot, near this station, in this sector, in this galaxy, but still... It may happen somewhere else in the full game (if it wasn't repaired already in there).

  2. lol why didn't you simply make the demo basically the full version but with a set of booleans in place to turn off the features not suppose to be in it?  Would make it easier to maintain compatibility.  That said it'd open the door to hackers turning the full version only stuff on. >_>  Other than that little snag it'd make things easier to maintain so you don't maintain two games at the same time.

     

    It's past. No purpose in thinking about that.

  3. For pirates just open

    data/scripts/startsector.lua

    find line

        Sector():addScript("data/scripts/sector/events.lua", "events/pirateattack.lua")

    change to

        Sector():addScript("data/scripts/sector/events.lua")

    And it should work.

     

    For ayy lmaos

    in data/scripts/player/attack.lua

        if Server().difficulty == Difficulty.Insane then
            updateSuperAction()
        else
            updateNormal()
        end

    change to

        if Server().difficulty == Difficulty.Insane then
            updateSuperAction()
        else
    	local x,y = Sector():getCoordinates()
    	if x ~= -139 or y ~= 427 then
    		updateNormal()
    	end
        end

    Note that you will need to change -139 and 427 to your home sector coordinates.

  4. Protip: Use lua.  8)

     

    But seriously, right now there isn't a lot to write about. What I am doing is simply reading and analysing what I see. Wait for the API documentation which will be hopefully released one day.

     

    I really don't see anything special I could share with you, but if you have some specific questions then just ask. Someone will answer them for sure.

  5. especially not the hundreds/thousands of asteroids

     

    thousands of asteroids

     

    ca. 1,200 asteroids in sector.

    I have just deleted over 4,000 wrecks from home sector  8).

     

    I wonder if I can do it more selective way, just to leave some newer wrecks in their place. Anyway, thanks again. (:

  6. Actually I almost did it after writing this post using some really weird logic and ideas but it seems to work. Anyway, thanks a lot. Your suggestion will help it making cleaner (haha, got it? Cleaner code for clean-up script  8)) for sure!

  7. I'm in need and I have ran out of ideas. Maybe someone in here has an idea or even completed script.

     

    I need to clean up wreckages in a sector. Can't call Sector() in command or even serverstartup.lua. Most of Galaxy() function names I have tried do no work too. I was thinking of attaching script to a ship but I would need to modify existing one (Station Founder maybe?). But the part of guessing name of getWreckages() (I would laugh if it is the one) function will still be a problem. Another thing will be trying to run proper loop if wreckages function does not return proper array.

     

    Any ideas?

  8. RarityType is a hard-coded table; at least that's what lua says about its type.

     

    Rarity(n) function takes <-1; 5> as a parameter and returns selected RarityType value.

    n color .. RarityType key

    -1 Grey ... RarityType.Petty

    0 White .. RarityType.Common

    1 Green .. RarityType.Uncommon

    2 Blue ... RarityType.Rare

    3 Yellow . RarityType.Exceptional

    4 Red .... RarityType.Exotic

    5 Purple . RarityType.Legendary

  9. After trying creating station with a custom scripts it throw an error that the custom script  is illegal and cannot be used. Is there any work-a-round for that? Or is it hard-coded demo limitation?

     

    (same goes for system upgrades)

  10. avorion-turret.png

     

    Working, simple turret merchant script. Just change your current turret merchant's source to this one.

     

    package.path = package.path .. ";data/scripts/lib/?.lua"
    require ("galaxy")
    require ("utility")
    require ("faction")
    require ("player")
    require ("randomext")
    
    total = 15
    
    if onClient() == 1 then
    current = 1
    end
    
    function interactionPossible(playerIndex)
        local relationLevel = Player():getRelations(getParentFaction().index)
    local station = getParentEntity()
    
    local dist = Player().craft:getNearestDistance(station)
    if dist > 500 then
    	return 0, "You need to be at maximum of 5km from station."
    end
    
        local threshold = -5000
        if relationLevel < threshold then
            return 0, "This faction doesn't like you enough."
        end
    
        return 1
    end
    
    -- create all required UI elements for the client side
    function initUI()
        local res = getResolution();
        local size = vec2(500, 300)
    
        local menu = Menu()
        window = menu:createWindow(Rect(res * 0.5 - size * 0.5, res * 0.5 + size * 0.5));
        menu:registerWindow(window, "Buy Turrets");
    
    window.caption = "Turret Merchant"
        window.showCloseButton = 1
        window.moveable = 1
    
    local fontSize = 14
    
    window:createFrame(Rect(60, 10, 500-60, 300-10));
    window:createButton(Rect(60+10, 300-10-10-50, 500-60-10, 300-10-10), "Buy", "onBuyTurretButtonPressed")
    window:createButton(Rect(10, 100, 50, 200), "<", "onPrevButtonPressed")
    window:createButton(Rect(500-50, 100, 500-10, 200), ">", "onNextButtonPressed")
    label_title  = window:createLabel(vec2(70, 20),  "",  fontSize+6)
    label_damage = window:createLabel(vec2(70, 50),  "",  fontSize)
    label_rate   = window:createLabel(vec2(70, 70),  "",  fontSize)
    label_range  = window:createLabel(vec2(70, 90),  "",  fontSize)
    label_cost   = window:createLabel(vec2(70, 110),  "",  fontSize)
    
    invokeServerFunction("getTurretInfo", Player().name, current)
    end
    
    function getTurretInfo(name, number)
    local turret = turrets[number]
    
    -- TITLE
    local title = turret.weaponPrefix .. " Turret";
        -- add number predicate
        local prefix = "";
        if turret.numVisibleWeapons == 1 then
            prefix = ""
        elseif turret.numVisibleWeapons == 2 then
            prefix = "Double "
        elseif turret.numVisibleWeapons == 3 then
            prefix = "Triple "
        elseif turret.numVisibleWeapons == 4 then
            prefix = "Quad "
        else
            prefix = "Multi "
        end
        if turret.weaponType == WeaponType.MiningLaser then
            prefix = prefix .. turret.material.name .. " "
        end
        if prefix ~= "" then
            title = prefix .. title;
        end
    
    -- RANGE
    local range = "Range: " .. round(turret.reach * 10 / 1000, 2)
    
    -- DAMAGE and RATE
    local damage
    local rate
    if turret.weaponType == WeaponType.Laser then
    	damage = "Damage/s: " .. round(turret.dps, 1)
    	rate = ""
    elseif turret.weaponType == WeaponType.MiningLaser then
    	damage = "Damage/s: " .. round(turret.dps, 1)
    	rate = "Efficiency: " .. round(turret.efficiency * 100) .. "%"
    elseif turret.weaponType == WeaponType.ChainGun then
    	damage = "Damage: " .. round(turret.damage, 1) .. "x" .. turret.shotsPerFiring
    	rate = "Fire rate: " .. round(turret.fireRate, 1)
    end
    
    -- COST
    local cost = "Cost: " .. getTurretCost(number)
    
    local requester = Player(Galaxy():findFaction(name).index)
    invokeClientFunction(requester, "setTurretInfo", title, damage, rate, range, cost)
    end
    
    function setTurretInfo(title, damage, rate, range, cost)
    label_title.caption  = title
    label_damage.caption = damage
    label_rate.caption   = rate
    label_range.caption  = range
    label_cost.caption   = cost
    end
    
    function getTurretCost(number)
    local cost = 100
    local turret = turrets[number]
    if turret.weaponType == WeaponType.Laser then
    	cost = cost * turret.dps * round(turret.reach * 10 / 1000, 2) * 1.5
    elseif turret.weaponType == WeaponType.MiningLaser then
    	cost = cost * turret.efficiency * 10 * turret.dps
    elseif turret.weaponType == WeaponType.ChainGun then
    	cost = cost * turret.damage * turret.shotsPerFiring * turret.fireRate * 0.4 * round(turret.reach * 10 / 1000, 2) * 1.5
    end
    return round(cost, 0)
    end
    
    -- this function gets called on creation of the entity the script is attached to, on client and server
    function initialize()
        local station = getParentEntity()
    
    local x, y = Sector():getCoordinates()
    local dps, tech = Balancing_GetSectorWeaponDPS(x, y)
    if onServer() == 1 then
    	turrets = {}
    	for i=0, 4 do
    		table.insert(turrets, InventoryTurret(GenerateTurretTemplate(random():createSeed(), WeaponType.ChainGun, dps, tech, Rarity(0), Material(MaterialType.Iron))))
    	end
    	for i=0, 4 do
    		table.insert(turrets, InventoryTurret(GenerateTurretTemplate(random():createSeed(), WeaponType.Laser, dps, tech, Rarity(0), Material(MaterialType.Iron))))
    	end
    	for i=0, 4 do
    		table.insert(turrets, InventoryTurret(GenerateTurretTemplate(random():createSeed(), WeaponType.MiningLaser, dps, tech, Rarity(0), Material(MaterialType.Iron))))
    	end
    end
    
        if station.title == "" then
            station.title = "Turret Merchant"
        end
    end
    
    function onBuyTurretButtonPressed()
    invokeServerFunction("buyTurret", Player().name, current)
    end
    
    function onPrevButtonPressed()
    current = current - 1
    if current < 1 then
    	current = total
    end
    invokeServerFunction("getTurretInfo", Player().name, current)
    end
    
    function onNextButtonPressed()
    current = (current % total) + 1
    invokeServerFunction("getTurretInfo", Player().name, current)
    end
    
    function buyTurret(name, number)
    local buyer = Player(Galaxy():findFaction(name).index)
    local station = getParentEntity()
    local requiredMoney = getTurretCost(number)
    local canPay, msg = buyer:canPay(requiredMoney)
    
        if canPay == 0 then
            Server():sendChatMessage(buyer, msg, station.title, 1);
            return
        end
    
        buyer:pay(requiredMoney)
    
    buyer:getInventory():add(turrets[number])
    end

  11. Stay with us, Storm, you can learn things here too!

     

    Anyway, I have got screenshot that is terribly wrong and only people who were on server can get what's wrong in it. Its title is "Hauling cargo to The Luseodcyebh Station"

     

    avorion-wrong.png

  12. If you don't mind I would strongly suggest to release dedicated server separately as a tool on Steam (a lot of games do that, actually). It will help server hosters in updating and managing Avorion servers (making it easier even for normal person) which may possibly result in bigger amount of servers leading to easier popularity gain.

  13. Hey Aki. What are you running the server on? I have  16gb linux 4core machine 4U rackmount server i wanna host this game on. So some assistance would be cool :p

    I have couple of 32GB, i7-4790K running mostly on Ubuntu 14.04.4 LTS. If I find time then I could help a little bit, but, like I said, "if I find time"... I'm preparing guide on hosting Avorion servers on linux, but to be honest, I'm waiting for Steam version arrival to write it only once.  ;)

     

     

    Anyyyyway. It took 14 day of pirates and alien attack to destroy repair dock in our home sector. Shall we do a reset?

    CiaVNDxWUAAMoFx.jpg:large

  14. Ok, so you are going to be on Steam. And here goes the question.

     

    How will be server software provided? With the game after purchase or will it be available for any Steam user as a Tool for game? Or maybe it will be downloadable from the website. Or maybe it won't be available separately from the game?

     

    And I mean just the server files. Not game itself.

  15. StarMade is a voxel-based 3D sandbox space shooter (copied from their site).

     

    From the Depths is about boats but it is also focused on combat.

     

    On the other hand Avorion is more into space-sim genre. At least I feel so. By space-sim I mean games like X, Elite, Freelancer, Pioneer, XFrontier, Evochron series (Starwraith games), Vendetta Online or even EVE Online. A game in which you can do anything you want and building your own ship is just an addition.

     

    I hope it will have much higher focus on economic, management or long-term combat aspects than just pure building.

     

    Avorion describes itself as procedurally generated sci-fi sandbox.

×
×
  • Create New...