Modding Help Operation Milk Carton ( closed )

Discussion in 'Starbound Modding' started by The | Suit, Sep 4, 2016.

  1. The | Suit

    The | Suit Agent S. Forum Moderator

    Operation Milk Carton is a Long Term Project I am working on to add compatibility between mods.
    [ For those who don't get the reference - back in 1984 Milk Cartons were used to help find missing children.- with that said these items are missing which should have been there originally. ]


    Project Timeline:
    Phase 1:
    Add Learn Blueprints on Pickup to all items and objects which are currently missing it.

    Completed:
    • Folder: Items \ Generic \ Crafting

    For those who wish to help:
    https://github.com/xxswatelitexx/Starbound/tree/master/OMC

    Simply state - either the folder you wish to do. Or file names by letter ( example: Folder Objects \ Generic - Letters A - C ) in a post below.
    Once completed - edit the post ( saying it is completed ) and attach the files as a zip file to a new post ( this is so it is easier to know when files are done ) or commit directly to the git.

    Important things to keep in mind.
    Only add the code to files which do not have Learn Blueprints on Pickup
    Do not include files which already have Learn blueprints on pick up.
    Make sure you are patching only - no dirty edits allowed.
     
    Inf_Wolf14 likes this.
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Currently Doing:
    • Items \ Generic \ Dyes
    • Items \ Generic Food \ Tier 1 to Tier 3
     
  3. origamania

    origamania Subatomic Cosmonaut

    You mean like kelp unlocking rice cake and such?
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    Sort of - but this is simply adding a blank parameter for sake of compatibility.
    Basically a lot of files do not have the empty parameter learn blueprints on pick up.

    So if one mod adds it , the code to add in new value is different from one adding to an existing value.
    One option of course is to test function to see if it exists or not - but there really is not a proper "if" sort of condition you can do.

    This mods the blank parameter to all files so - you can simply add to the existing parameter without having to worry about compatibility.
     
  5. v6ooo

    v6ooo Space Kumquat

    Code:
    [
        [
            { "op": "test", "path": "/learnBlueprintsOnPickup", "inverse": true },
            { "op": "add", "path": "/learnBlueprintsOnPickup", "value": [] }
        ],
        [
            { "op": "add", "path": "/learnBlueprintsOnPickup/-", "value": "pearlpeabroth" }
        ]
    ]
     
  6. C0bra5

    C0bra5 Oxygen Tank

    wait, i'm not getting what this would do?
    we just need to add the learn blueprint on pickup thing to files that doesn't have one or all of them that do have one? because i could probably just write a c# script that could do that easy in both cases.
    and i think that this part of the project could be done on a module format so that modders can only add certain parts of it so that it reduces load time or something.
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    Ya - I know how do it - but most users do not.
    Personally I think the easiest option is devs to add it in them selves.

    Otherwise having something do it for them.


    Learn blueprint on files which do not have one at all.
     
  8. C0bra5

    C0bra5 Oxygen Tank

    the script took 21 second to run and produced this master piece where it created a file looking like this for each items missing a learnBlueprintsOnPickup element:
    Code:
    [
        [
            { "op": "test", "path": "/learnBlueprintsOnPickup", "inverse": true },
            { "op": "add", "path": "/learnBlueprintsOnPickup", "value": [] }
        ]/*,
        [
            { "op" : "add", "path": "/learnBlueprintsOnPickup/-", "value": "Your Item Here" }
        ]*/
    ]
    
     

    Attached Files:

  9. The | Suit

    The | Suit Agent S. Forum Moderator

    Thanks - but the code wouldn't.
    v6ooo was actually talking about how each individual modder would get around the issue - without using such a mod.
    It is a different issue all together.

    Not a 100% sure about if the escape characters will cause an issue all together.
    The only line actually needed was
    Code:
    [
    {"op":"add","path":"/learnBlueprintsOnPickup","value": [ ] }
    ]
    
    But thanks though.
    In the end of the day though - I think @v6ooo - is right.
    My method though easier for new modders would add unncessary overhead.

    Teaching them the proper method from the beginning is much better thing to do.
     
  10. C0bra5

    C0bra5 Oxygen Tank

    i can't find the post v6ooo wrote, but meh. I do agree, as I said that thing would probably be best used as a pick a file from the thing if you need so that the modder has a template or someting. having all of them would be cause some unnecessary loading time on slower systems. anyway i reran the script with the new code so have the thing if you want it.
     

    Attached Files:

  11. The | Suit

    The | Suit Agent S. Forum Moderator

    well you are free to upload it as your mod - since you actually did all the work.
    It would be a nice useful tool for beginner modders.
     
  12. C0bra5

    C0bra5 Oxygen Tank

    maybe tommorow it's late and my brain is dead.
     

Share This Page