Jump to content

Mangomania

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Mangomania

  1. I selected ogonite. I tried it again and it hung again, but I clicked "wait" on the firefox warning a few times and it finished. The output window was empty after that, but I was still able to copy the file. I didn't try that ship anyway because I wasn't sure it wasn't corrupted.

     

    If I may suggest a methodology for your script/page. Instead of filling output window after scale pass immediately, do scale pass then replace pass (or replace pass then scale pass), then fill output window. You'd have to use click boxes for scale and replace instead of buttons, then add a proceed button. This way, we can select scale and replace individually or together.

     

    On my current ship, I use framework as ablative armor in a layered/spaced template so it's cheap to replace and light so it barely affect maneuverability. Spaced/layered armor looks really cool. Anyways, I'd like to be able to replace the material for the framework.

     

    I have to tweak a lot. The reason that there was no armor replaces is simply, that I forgot there is actually ogonite armor. The script simply doesn't allow ogonite as armor which is an error on my side. Will fix that asap.

     

    And thanks for the feedback!

     

    Mango

  2. Nice one, Mango! It's looking good, even if I can't test it right now :)

     

    On a technical note: I have skimmed your code and I saw that you do scale the durabilities. Have you investigated whether the durability falloff is just depending on the distance from the root block in the tree structure or if it is dependent on the actual distance to the root block? I would assume its the former, but in case it's the latter you should also have to account for that.

     

    That's where the "Quick and Dirty" Programming kicks in :D

    I have just multiplied the "currentDurability" and "maxDurability" with the cubic scale to address the relation between volume and durability. This works fine, as long as all blocks stay the same.

     

     

    TLDR: Only volume affects scaling and falloff affects all blocks in different ways depending on distance to the root block of the tree.

     

     

    To come back to your question, the durability falloff depends on the distance to the root block in the tree structure.

    I need to take a few more looks, but it seems, that there is a limit at how many blocks receive the falloff. After I placed a few blocks of the same type, material and size in line, the falloff stopped. The lowest durability for an iron block with the size 2X2X2 was 32. This is also the amount of the falloff for each subsequent block. For a 4X4X4 Block, the min. durability was 256.

    After this min. durability is reached, all blocks above this (in the tree) increase their durability by the min. durability.

     

    Example 1:

    I got 4 blocks of 4X4X4 in a row, the durability is as follows (nearest to farthest): 1024, 768. 512, 256.

     

    Example 2:

    I got 9 blocks of 4X4X4 in a row, the durability is as follows (nearest to farthest): 2304, 1792, 1536, 1280, 1024, 768, 512, 256.

     

    Result: The durability has a min. amount. The falloff also affects already placed blocks but instead increases their durability. For the process of scaling only the volume is of interest. At some point, the blocks direct to the root block seem to get even more than the min. durability per block.

     

    Greets,

    Mango

  3. Hey guys,

    I wrote myself a little script in JavaScript to rescale my Ships and decided to share it with you.

    I'm pretty sure there is an easier way, but this is how I solved it for me.

     

    You can find it here: www.seven-parsec.net/index.php?site=avorionscaler

     

    It is completely on your end, no data is transmitted.

     

    How to:

    [*]Click on "choose file" and select the savefile of your ship.

    Your ships savefiles are located at "%appdata%/Avorion/ships".

    You can paste that address into the address bar of the explorer that opens up.

    [*]Insert your desired scale.

    [*]Click on "Scale".

    [*]Click now on "Save File" and it should download a file.

    [*]Paste the downloaded file into the savefile folder.

     

    If your file selection doesn't work:

     

     

     

     

    Important notes:

    [*]Never override an old file. Scaling doesn't always work when below or above certain sizes.

    [*]You may have to restart your Game to see the new ship in the "Saved ships".

    [*]The code is written "quick and dirty". Take it as it is.

     

    Greetz,

    Mango

     

    Edit:

    Now also supports changing the material type of armored blocks!

    [*]Go to the savefile folder at "%appdata%/Avorion/ships".

    [*]Open the ships savefile with your favorite text editor.

    [*]Select all the text and copy it to your clipboard.

    [*]Paste the text in the "Input" text area.

    [*]Insert your desired scale.

    [*]Click on "Scale".

    [*]Select all the text in the Output text area and copy it to your clipboard.

    [*]Create a new file in your savefile folder, open it with your text editor and paste the text into it.

    [*]Save the file. Give it a name you like. Important: Save it as "myfilename.xml"

     

×
×
  • Create New...