Jump to content

Treexter

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by Treexter

  1. Updated to v1.2:

    - Claimable asteroids should be fixed (see screenshot)

     

    jCmQ1RB.png

     

    - Do not show wreckages with resources amount below MIN_RESOURCE_THRESHOLD (changable at the header of the .lua file, default is "150")

     

     

     

    "Is it possible to get a version that doesn't highlight dropped cargo?"

    Unfortunatelly, I did not find a way to determine cargo.

    EntityType enum has "Loot" group which also contains cargo, so it seems to be impossible right now because I don't want to remove entire "Loot" group.

     

    If anyone finds a hint or have more ideas please let me know.

  2. Asteroids are still not being highlighted.

     

    Same for me.

     

    I like this mod a lot, makes this system much more usable IMO. I thought it was practically worthless before.

     

    Is it possible to get a version that doesn't highlight dropped cargo?

    Also maybe to ignore wrecks under a certain size or material amount threshold as well? I'm asking about this in particular because when I start breaking down several wrecks and each one has broken into like a dozen pieces the highlighting of them is quite overwhelming.

     

    Either way, thanks for this mod!

     

    >> maybe to ignore wrecks under a certain size or material amount threshold as well?

    Was thinking about this enhance as well.

    Will try to fix issues and update the mod next week.

     

  3. Okay, tried this... still rotation is incorrect...

     

           

    local entity = Sector():getEntity(objectIndex)
    local plan = entity:getPlan()
    local block = plan:getBlock(blockIndex)
    local material = block.material.name
    
    local entityPos = entity.translationf
    local drop = block.box.center * entity.look
    drop = entityPos + drop
    
            Sector():dropMoney(drop, nil, nil, 1)
    

     

    I can see how money drop position gets affected by block position but rotation is incorrect so it drops somewhere left or right, up or down of the entity.

  4. Ahaa...

     

    To clarify what i'm trying to do... let's say there is a huge entity, and I damage some block on the side, i want to spawn something at the exact block location.

     

    So as far as i understood my last snippet was missing rotation element.

    The correct way should be...

    1) obtain block center vector

    2) Multiply it by entity rotation vector

    3) add it to the entity center

     

    But what math functions I should use for this? I think it's "mul" and "add"...

    Oh... need to experiment...

  5. I was trying some stuff and I cannot make this properly.

    Maybe I don't good at math or something...

     

    Sooo, for example, I want to obtain the center position of a block for like... this callback of a Sector

    onBlockDamaged(objectIndex, blockIndex, inflictorId, damage, damageType)

     

    So I've tried the following (Spawning the money piece to check if the coordinates is correct)

    function onBlockDamaged(objectIndex, blockIndex, inflictorId, damage, damageType) 
    local entity = Sector():getEntity(objectIndex)
    local plan = entity:getPlan()
    local block = plan:getBlock(blockIndex)
    
    Sector():dropMoney(block.box.position, nil, nil, 1)
    end

     

    But in fact the money spawns were miles away from damaged block... So I've tried this

    function onBlockDamaged(objectIndex, blockIndex, inflictorId, damage, damageType) 
    local entity = Sector():getEntity(objectIndex)
    local plan = entity:getPlan()
    local block = plan:getBlock(blockIndex)
    
    local entityPos = entity.position.position
    local drop = block.box.position
    drop.x = drop.x + entityPos.x
    drop.y = drop.y + entityPos.y
    drop.z = drop.z + entityPos.z
    
    Sector():dropMoney(drop, nil, nil, 1)
    end

     

    That thing was a bit closer to the truth, but still not accurate...

     

    So, what is the correct way to obtain block center?

  6. Agree that difficulty should matter something, however...

     

    All being said is only my thoughts...

     

    1) Both resources AND crew should be vastly restricted and much more rare.

    This will only make a game more grindy.

    Jumping around or login/logout for finding required crew? No fun in such chagnes. At all. Just more numbers to the played hours counter.

     

    2) Make hyperspace jumps much smaller with increased difficulty

    Again, will only increase the amount of bored played hours rather than having fun and exploring.

     

    3) Combat is trivialized by simply and easily adding ridiculous shields

    I can agree with that, however, i do wonder

    how it's possible to improve combat for large (i mean, laaaaarge) ships? It's two big pieces of metal flying in the middle of nowhere shooting to each other.

     

    4) Make the cost of running a massive ship force the player into using "sector building"

    The game is a sandbox. Which means every player can play it how he want. Forcing one playstyle to be only one viable is not a good idea.

     

    My main point is that DIFFICULTY is not connected to GRIND/Hours Spent. It's too different things.

  7. What's holding you from typing in search field smth like "salvag avori indepen" to sort out all avorion salvage turrets with autotargeting?

     

    Other point as "pros" for suggestion is that inventory filter doesn't work correctly in other languages.

    For example, in russian if you type "salvag avori indepen" it will sort nothing and highlight random stuff in inventory.

  8. Hi,

     

    This mod will change C43 Object Detector to be useful and more interesting than it's now.

     

    Feedback are welcome since it's my first experience with Lua and with Avorion modding.

     

    The following items will be highlighed by C43 Object Detector:

    - Dropped Turrets (green)

    - Dropped Ship Systems (green)

    - Wreckages (white)

    - Lootable Colors (green)

    - Claimable Asteroids (yellow) (fun fact - I did not knew about such feature until I've tested this mod (vanilla C43 had this feature, I've just changed color))

    From vanilla C43:

    - Exodus mission beacons (white)

    - Claimable stashes (white)

    - Claimable ships (white)

     

    Also Changed:

    - Prices

    - Ranges (each rarity tier adds 4 KM to the highlight range + random variations)

    - Max items on Radar (each rarity tier adds 3 + random variations) - if there are more items it will highlight the nearest ones

    - Energe Consumption - common, 0.8 GW for Exotic was a joke. (Still a joke, 1.5GW is nothing in mid-game)

    - Tooltip

     

    Some screenshots:

    Without Mod

    https://imgur.com/YQqf4zW

    With Mod

    https://imgur.com/M0L2nYX

     

    [spoiler=More Some Screenshots]

    https://imgur.com/a/jWE3x

     

     

     

    Installation:

    unzip valuablesdetector.lua file into the "Avorion\data\scripts\systems" folder

     

     

    [spoiler=Changelog]

    V 1.2

    - Do not show wreckages with resources amount below MIN_RESOURCE_THRESHOLD (changable at the header of the .lua file, default is "150")

    - Fixed a bug: Claimable Asteroids now should work along with other vanilla detection objects

     

    V 1.1

    - Removed Arrows for Wreckages objects - was too annoying when there are lot of them

    - Claimable Asteroid now should be yellow as promised by description

     

    V 1.0

    Initital Release - game version 0.15.5 v10141

     

     

    Plans:

    - Distinct colors for Loot Rarity - but I cannot find how to obtain rarity values from loot nor how to obain component from Entity - does anyone know?

    Useful_C43_Object_Detectors_v1.0_-_0.15.5_r10141.zip

    Useful_C43_Object_Detectors_v1.1_-_0.15.6_r10159.zip

    Useful_C43_Object_Detectors_v1.2_-_0.15.8_r10262.zip

  9. So, I was wandering around in scripts folder, looking for clues for some stuff i want to do and i found that in

    Avorion\data\scripts\systems\miningsystem.lua

     

    function getBonuses(seed, rarity)
    <...>
        local range = 200 -- base value
        -- add flat range based on rarity
        range = range + (rarity.value + 1) * 40 -- add 0 (worst rarity) to +240 (best rarity)
        -- add randomized range, span is based on rarity
        range = range + math.random() * ((rarity.value + 1) * 20) -- add random value between 0 (worst rarity) and 120 (best rarity)
    <...>
    
    function onPreRenderHud()
    <...>
    local sphere = Sphere(shipPos, 500)
    local nearby = {Sector():getEntitiesByLocation(sphere)}
    <...>
    

    So it seems that variable "range" is only used for tooltips and price values, while actual range is always hardcoded to be 500.

     

    Update:

    Yep, tested it with 2 different ranges systems. Both highlight radius are the same and ~ 5 km (500 value)

  10. There are quite often you can find wreckages with small pieces but with huge amount of HP for some blocks.

     

    It seems that faction ships affected by this more ofter than others.

    So your auto-aiming salvaging turrets trying to salvage the small piece of a ship and it takes couple of minutes to salvage.

     

    I assume it happens because wreckage blocks HP is calculated based on ship total hull HP.

     

    I think it will be a good idea to just limit wreckage blocks hp based on their volume.

    Something like

    block HP = volume * materialGrade

  11. Thanks!

     

    I get it.

     

    The final correct code without errors looks like this

    This is the starting point for my further experiments.

    function getNumTurrets(seed, rarity)
    local numTurrets = math.max(1, rarity.value + 1)
    local ship = Entity()
    
    if ship == nil then return numTurrets end
    
            <... some stuff here with ship properties ...>
    
            return numTurrets
    end

  12. Hi,

     

    I'm trying to experiment with turrets systems.

    But every attempt to get player craft leads to this

    a5f0a607a4.jpg

     

    Spent couple of hours playing with the code with no luck.

    The current code is (Avorion\data\scripts\systems\militarytcs.lua):

    function getNumTurrets(seed, rarity)
    local numTurrets = math.max(1, rarity.value + 1)
    
    local player = Player().craft
    
    return numTurrets
    end
    

     

    What's the problem? Is this a bug?

    How to obtain player craft properly here?

  13. File: Avorion\data\localization\ru.po

     

    Orignal lines:

    #: goods_template.xml:

    msgctxt "plural"

    msgid "Energy Tubes"

    msgstr "Энерго-тюбики"

     

    Fixed Lines:

    #: goods_template.xml:

    msgctxt "plural"

    msgid "Energy Tubes"

    msgstr "Энерготрубы"

     

    Orignal lines:

    #: goods_template.xml:

    msgctxt "prefix"

    msgid "Energy Tube"

    msgstr "Энерго-тюбиков "

     

    Fixed Lines:

    #: goods_template.xml:

    msgctxt "prefix"

    msgid "Energy Tube"

    msgstr "Энерготруб"

     

    I'm not sure if this is perfect adoptaion for Russian, but at least it consistent.

    Very often I get a mission to bring "Энерго-тюбики", while in inventory and at factories this item have another name. So it's confusing each time.

    Please include in patch.

×
×
  • Create New...