Jump to content

Laserzwei

Members
  • Posts

    399
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Laserzwei

  1. local minute = 0
    local attackType = 1
    
    function initialize(attackType_in)
        attackType = attackType_in or 1
        deferredCallback(1.0, "update", 1.0)
    end

    This method defines the attacktype which will spawn. Especially "attackType_in" needs to be your type (4-6).

    It gets set in eventscheduler.lua on top.

    add some lines like these:

     

    {schedule = random():getInt(80, 120) * 60, script = "alienattack", arguments = {4-6}, minimum = 120 * 60, to = 300},

     

    That way you will get all your waves spawning. You might want to experiment with the random, minimum and to variables to get more desirable amounts in size/frequency of spawns.

     

    Edit:

    I going to try this.. no idea if this will work lol

       

    attackType = attackType_in or 1 or 4 or 5 or 6

    This will not work the way you think. The "a or b" operator in context of an assignment works the same as:

    if a ~= nil then
        return a
    else
        return b
    end

    It's pretty much syntactic sugar for nil-object-checks.

  2. Not looking for a 100% example, but some tips on where I should be putting the code and maybe file structure.

    Too bad: I recommend you to look into my mods for some examples  :P

    Edit: For an example on how to use callbacks, I recommend looking at the server.lua and player/asteroidMover.lua in the moveAsteroids mod[mOS], since their code base is very small and might be providing what you need.

     

    but now for some real talk:

    You should only attach Callbacks to loaded objects. Of the 1,000,000 Sectors ingame only those where Players are in are loaded.

     

    Try using: "onSectorEntered"-Callback from player or Entities.

    I recommend using the player one. Because if you get an callback to an unloaded Entity the game freezes.

     

    Player(playerIndex):registerCallback("onSectorEntered", "methodnameWithoutBrackets")

     

    your receiver method gets 3 Parameters:

     

    methodnameWithoutBrackets(playerIndex, x, y) 

    playerIndex: selfexplaining

    x: the x Coordinate of the sectory the Player(playerIndex) just entered

    y: the y Coordinate of the sectory the Player(playerIndex) just entered

     

    Don't forget to unregister your Hooks as soon as a Player logs off.

    Player(playerIndex):unregisterCallback("onSectorEntered", "methodnameWithoutBrackets")

    Using the

    Server():registerCallback("onPlayerLogOff", "onPlayerLogOffMethod")

     

     

    Not looking for a 100% example, but some tips on where I should be putting the code and maybe file structure.

    If you need to watch every Sector entered:

    You should add your script to the player in the "onPlayerLogIn"-Method in server.lua.

    Your file, since it runs on a player, should go into /scripts/player/. But that is not mandatory.

     

    If this all didn't help you much. I suggest you tell us about your

    cool mod ideas.

    So we can help you with your specific problems.

     

  3. That means it is installed corectly on the server.

     

    Does everyone get this message or only some?

    Are you using hamachi?

     

    your version (no version received)

    This can only happen if

    1) The message receiver has OOSP not installed

    2) OOSP crashed on the client side

    3) The server didn't get the answer from the client fast enough.

     

    If 2) is the case please send me the crashlog

    3) can be resolved if you change

    derefferedTimeout = 10

    in "oosproduction.lua" on the server to a higher value.

     

    Also don't worry about [0.9_6c] in the message. I forgot to rename it.

  4. The title says it.

     

    Has anyone been able to read:

    -the current energy Production

    -the current energy consumption

    -Energy consumption by components

     

    or change:

    -the current energy consumption

    -energy consumption by components

    of an Entity?

     

    I was able to change the current energy production via "addMultiplyableBias(int type, float value)".

    And most Entities seem to have a component called "EnergySystem".

    But that is the furthest I have come.

     

    I am talking about these Values:

    FwMYARL.png

     

  5. Devious brought the idea/need up to me and now here it is :D

     

    Something similar to this mod has been added to the vanilla game. It's called "secure sectors".

     

    This is a small script that will protect playerowned Property when he logs off.

    It is limited to only those Entities(Stations, Asteroids, ships etc.) which are in the same Sector as the Player when he logs off.

    Therefore the Playership is always protected.

    Other Entities  in different Sectors are not protected.(game limitation)

     

    Has a DANGERZONE-Value. Everything between the core and the DANGERZONE will not be secured.

    To make only the core a PvP zone use DANGERZONE = 147-150.

     

     

    Version

    1.2

    -Clients need this installed to work properly. They always had to. Added an Client Folder, for clients of an server only.

    1.1

    -added DANGERZONE value. default is 0

    1.0

      -release

     

    Filestructure

    [overrides]

    /data/server/server.lua (only 1 line added; simple to merge with other mods)

    [added]

    /data/player/pvpSecure.lua

     

    License

    Public Domain

    pvpSecure_1.2.zip

  6. Version 0.9_7 released.

    Splitted the mod into move Asteroids and its core component of updating out-of-sector-production

    If you upgrade: make sure you install "move Asteroids" as well or you might loos your claimed asteroids.

    If you really don't like the move Asteroid aspect

     

    have a look in the "move Asteroid" Uninstall folder's instructions. All at your own risk! Don't ask for help if you lost something. You haven been warned!

     

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

  7. This is the main overview of my mods.

    Have a look around. There is probably something useful for you :D

     

    Economic Mods

    move Asteroids [mOS]

    You found 3 claimable asteroids in a Sector that is within Pirate territory, but you need them to build Mines ontop? Here is the solution.

    [mOS]

    all Production Chains:

    Since the game lacked 3 Resources (Coal, Raw Oil, Diamonds) as player Buildable Factories, I saw myself in the need to supply them.

    all Production Chains

    Simple Asteroid Respawner:

    This mod modifies the vanilla asteroid respawn script, to also work in loaded sectors.

    Simple Asteroid Respawner

     

    CompleX3s [CPX3] Discontinued

    [CPX3]

    This mod allows you to combine multiple factories into a single Complex.

     

    Utility Mods

     

    Advanced Shipyard

    This mod allows shipyards to build your own or workshop designs.

    Advanced Shipyard

    Carrier Commander

    This mod allows you to efficiently order your fighters on your ships.

    Carrier Commander

    Sector Manager

    This mod allows you to select which sectors you want to keep loaded.

    Sector Manager

    Overpowered weaponry [OPW] Discontinued

    This mod adds commands to create overpowered weapons.

    [OPW]

     

    License

    QPL-1.0

     

    DEPRECATED mods have been included into vanilla

     

    out-of-sector-production [OOSP] DEPRECATED

    [OOSP]

    A mod that emulates factories even when you are not in a sector!

     

    PvP Secure [PvPS] DEPRECATED

    This mod prevents playergrieving on logged off players

    [PvPS]

  8. The current game is missing 2 (supply-)factories that prevent you from building fully independent Productionchains:

     

    1) Diamonds

    2) Gems*

     

    This small addon adds

    A different way of getting Biogas:

    Bio Gas Fermenter

    40xPlant -> 4xBio Gas + 10xWater + garbage: 1xToxic Waste

     

    Version M

    1) Diamond Mine

     

    Version S

    1)Diamond Factory

    2xEnergy Cell + 2xCoal -> 2xDiamond

     

    *Gems are not provided.

     

    You can only install one Version at a time!

    From Avorion 0.23 on, this mod will be continued in the workshop

    S (https://steamcommunity.com/sharedfiles/filedetails/?id=1692693432)

    M (https://steamcommunity.com/sharedfiles/filedetails/?id=1692693709)

    Since 0.23+ became the main gameversion, there is no download here.

     

    Version History

     

     

    -- 1.4 for beta 0.21 [2019-02-26]

      - renamed modfile to productionChains

      - added names for special factories (vanilla)

    -- 1.3 for 0.20.x [2018-12-04]

      - anti-grav -> antigrav

      - removed 2 double Noble metal mines (vanilla)

    -- 1.2

      - double silicon removed

      - using vanilla Raw Oil and Coal production

      - adjusted Diamond production

    -- 1.1

      - 0.15 economy update compatibility

    -- 1.0

      - Cink->Zinc(0.12)

    -- 0.99

      - release

     

     

    Installation: like any other mod drop the content of the zip file into your /Avorion/ installation folder. By default Version S is selected.

    To swtich to Version M you have to uncomment line 130 and comment line 131 out:

     

    if not pcall(require, "mods/extraminesM/scripts/lib/productionsindex") then print("Failed to load extraminesM") end
    --if not pcall(require, "mods/extraminesS/scripts/lib/productionsindex") then print("Failed to load extraminesS") end

    There should only be 2 if at the end of the file.

     

    Files

    /data/scripts/lib/productionsindex.lua

     

    Uninstall: just replace /data/scripts/lib/productionsindex.lua with the Vanilla one.

    Already build Player/NPC stations will KEEP the mod's Production.

     

    License

    Public Domain

  9. Version history

    -- 0.20.1 [2019-01-22]

      - Default max transfer range now 50 sectors

      - Now uses "onSelectMapCoordinates" event, instead of busy waiting

      - Now remembering your selected sector

     

    -- 0.19.0 [2018-11-08]

      - dropped complicated and dated way of deleting and recreating asteroids and the as tedious way of detecting sector changes. As a result the code is much smaller and uses less hooks (no modification of server.lua required anymore!)

      - Instead uses Galaxy():transferEntity(type 1)

      - The target sector can be individually selected and jumping out of a system does not inherently transfer asteroids with you.

      - This lifts the previously implied jump-range limit. To prevent unlimited transfer range there is now a config option (MAXTRANSFERRANGE)

     

     

     

    -- 0.20.0 [2018-12-04]

      - Now uses "callable"

      - Now with namespace™

    --0.97b for 0.17.1

      - EntityDescripters are only used as deep-copy, to prevent unwanted invalidation. Can now jump multiple asteroids at a time again

    --0.96 for 0.17.0

      - systemTimeMs() -> appTimeMs() // WTF Koonschi!

      - removed obsolete (0.14) compatibility scripts

      - New 0.17 Server.lua

      - prints are now Logs

    --0.95b for 0.15.x and 0.16.1-0.16.6

      - properly added the config, thanks Dirtyredz

    --0.95 for 0.15

    [Changes]

      - moved to /mods/

      - added config

    --0.93

    [Changes]

      - removed unneccessary Event-unregister, which could cause crashes.

    --0.92

    [Changes]

      - Asteroids can now be transferred to the Alliance (this takes no faction permissions)

      - For every other action with Alliance-Asteroids you need the following permissions:  "Manage Stations", "Found Stations", "Modify Crafts", "Spend Resources"

      - If owned by the Alliance, the Alliance will pay the transportation fee

      - You can take Alliance Asteroids back

    --0.91

    [Changes]

      - updated for v0.12.7 r 8782

    --0.9

      - release

     

     

     

     

    Filestructure

     

     

    Overrides

    data/scripts/entity/claim.lua

     

    added

    data/scripts/entity/moveAsteroid.lua

     

     

     

  10. This mod allows you to move asteroids between Sectors.

     

    AqfjDZI.png

     

    1) Be closer than 15km

    2) Click the menu-option  "move Asteroid"

    3) Select your target sector

    4) Pay the fee of 500.000Cr and watch it getting transferred

     

    Installation

    Copy the content of "mos_X.X.X.zip" into your Avorion's matching folders (you might need to create the mods folder).

     

    This mod has a Wiki. With more detailed install instructions and a How-To.

     

    Asteroids that were claimed before the mod got installed do not offer the "move asteroid" option and therefore can't be jumped.

     

    From Avorion 0.23 on, this mod will be continued in the workshop (https://steamcommunity.com/sharedfiles/filedetails/?id=1691539727)

    Since 0.23+ became the main gameversion, there is no download here.

     

    Licensed under:

    QPL-1.0

  11. I'm using the beta branch .7633

     

    You probably get a crash like this:

    Fri Mar 03 09:25:49 2017| Error: EXCEPTION_ACCESS_VIOLATION
    Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 000000000066cb93 2>&1
    Fri Mar 03 09:25:49 2017| ScriptLine.cpp:?
    Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 000000000066eccb 2>&1
    Fri Mar 03 09:25:49 2017| ScriptLine.cpp:?
    Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 0000000000afe54d 2>&1
    Fri Mar 03 09:25:49 2017| ldo.c:?

    right?

    This happens when you call an invalid Entry count:

    invalidEntrycount = -1
    myListBox:getEntry(invalidEntrycount)

     

    If you click in the Empty space below your List,  myListBox.selected will return -1 and trigger the crash.

    I'm doing a wild guess and say you didn't sanitize such an input?

  12. The option stays after claiming an Asteroid and you need to activate the jump manually

     

    how to activate the jump manually ? i lost two asteroid i didn't find it anywhere

     

    Did you try this:

    If you cant find it, look in your strategy view (scroll out very far) and search it.

     

    If you tried it and still have trouble locating your asteroids, please pm me and send me the logfile where you jumped.

  13. Useful mod

     

     

    JkPJIu8.jpg

     

     

    I'm guessing this is a game bug? if you click the empty space in the listbox it will crash the game. Don't click the empty space in the listbox.

     

     

    I don't have any problems with my Listbox:

     

     

    961AA0E9BB86292F48F4F832A321F9B45F894198

     

     

×
×
  • Create New...