Jump to content

MMaster

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by MMaster

  1. I'm sorry it doesn't work for you. I'm not sure where you could have made a mistake / what doesn't work.

    It definitely worked for me. All mods survived game update and were successfully applied even tho shipyard.lua was changed in game. I would have helped you get it working, but I'm not even sure what went wrong since 'this doesn't work' doesn't give me any hints what went wrong.

     

    What is your directory structure? Did it generate patch.diffs in directories? What was the output of generatediffs.bat and what was the output of patchgame.bat? Also how technically skilled are you? Do you know what 'diff' and 'patch' is?

  2. Maybe I misunderstood, but there is one thing I don't like very much about it is the 'shipyard.lua.1' 'shipyard.lua.2' because that would mean that mods still need to make the file names unique between mods.

     

    If I can suggest I would like to see each mod having its own folder with similar folder structure as game and the game automatically loading scripts just as you described but from mod folders. That way the mod can still call the file 'shipyard.lua'.

    This way each mod will have its own directory that can contain even other content, like textures, sounds etc and it will be easy to manage.

    I know that it may be a bit more work, but in my opinion it would be worth it.

     

    Otherwise it sounds great, it's definitely better than what we have now :)

  3. This is exactly why I've made the Mod Patch Generate & Apply batch tool (http://www.avorion.net/forum/index.php/topic,1304.0.html). It automatically generates diffs against vanilla game for each mod and then patches the game using those diffs instead of just replacing files. It works great so far.

     

    I definitely support idea of distributing diffs instead of whole files. There needs to be some standard established soon otherwise it will become unmanageable. I've already exchanged some messages with bit that works on mod management tool. My suggestion was to take a look at tool like CKAN for Kerbal Space Program and maybe make a fork of it for Avorion.

  4. Hi,

     

    I want to share with you 2 windows batch scripts I've made to make mod management a bit easier.

     

    First one is used to generate diff files for Avorion mods that can be later used to easily patch the game after game update without overwriting whole files.

     

    Second one is used to patch the game from the generated diff files.

     

    NOTE: This currently works only for scripts mods that modify only files in data\scripts directory (afaik the only mods currently available).

     

    This can theoretically be also used when multiple mods modify the same file, but I did not try it and it may require some tweaking and conflicts need to be resolved by user.

     

    It is not at all sanitized and you can mess things up if you don't know what you are doing so take care! Always backup everything, I'm not responsible for damage this may cause. I just share what I've made for myself.

     

    Package uses GNU diff and patch utilities from:

    http://gnuwin32.sourceforge.net/packages/diffutils.htm

    http://gnuwin32.sourceforge.net/packages/patch.htm

     

    These utilities are already packaged inside. If you don't want to use them you don't need to. Just delete the _diffAndPatch directory and recreate it yourself by downloading the packages from the URLs above.

     

    HOW TO USE:

    1. extract the package to directory of your choice (not the game dir!)

    2. go to AvorionMods directory you extracted

    3. create one directory for each mod you want to use

    for example I create:

    shipyard-sethome

    MiningSystem

    4. in each mod directory create following directory: data/scripts/

    example directory tree:

    AvorionMods/

    - shipyard-sethome/

      - data/

        - scripts/

    - MiningSystem/

      - data/

        - scripts/

    - _diffAndPatch/

    - generatediffs.bat

    - patchgame.bat

     

    5. As you can see you are recreating game directory structure for each mod. Now that you have prepared basic structure you need to copy files from mods to their respective directories to the same place where you would normally put them in game directory.

    for example:

    copy shipyard.lua from shipyard mod to

    shipyard-sethome/data/scripts/entity/merchants/shipyard.lua

    copy miningsystem.lua from miningsystem mod to

    MiningSystem/data/scripts/systems/miningsystem.lua

     

    6. Make sure that your game is not modded before generating diff files

    You can clean your game by deleting data\scripts directory from your game directory and in steam you:

    right click your game - properties - local files - verify integrity of game files

    This will automatically download fresh copies of your deleted files.

     

    7. Edit generatediffs.bat and patchgame.bat with your favorite text editor

    Change MODS_DIR to your AvorionMods directory

    Change AVORION_PATH to your game directory

     

    Make sure that you modified both generatediffs.bat and patchgame.bat

     

    8. Run generatediffs.bat

    This will generate patch.diff in each mod directory if it was not generated yet

     

    9. Run patchgame.bat

    This will patch the game using patch.diff files from mod directories

     

    10. If the game was updated:

    run patchgame.bat again and unless some conflicting changes were made it should work

    (if you already had some files patched which were not changed by game update this may result in confusing results for non-technical user and I suggest you clean your game dir as described in step 6 before patching it)

     

    11. If the mod was updated:

    update the files in mod directory

    delete the patch.diff file of the mod

    make sure your game is not modded (make it fresh using step 6)

    run generatediffs.bat

    run patchgame.bat

     

    12. Enjoy

     

    DOWNLOAD:

    http://www.mediafire.com/file/fneoull0roo89xm/AvorionMods.zip

     

    Please feel free to use this in any projects you have, improve it, do whatever you want to do with it. I will be happy if you credit me but it's not required.

     

    While this batch script is for Windows if you are Linux person I'm sure you can easily make similar shell script and on Linux you already have diff and patch utilities available for it.

     

    -MMaster

     

  5. Hi,

     

    I've been looking around the docs and code and I couldn't find a way to set turret to auto-fire mode using script. Since the game resets turret fire mode to mouse every time you jump, I would like to set all my independent firing turrets to auto-fire by default.

     

    I feel like this is a bug in game and I reported it, but I would be interested in fixing it on my side meanwhile.

     

    Can anyone help me find the code / confirm that it is not possible to do with script yet?

×
×
  • Create New...