Modding Help Question about replacing stats of object.

Discussion in 'Starbound Modding' started by Outcast, Jan 3, 2014.

  1. Outcast

    Outcast Void-Bound Voyager

    Say i want to replace some stats on the item "apexbed".

    I copy over the apex bed folder to my mod folder. (IF i do not copy all files the bed will turn invisible, anyway around this?)

    I now have the whole apexbed folder and 4 files, the .frames file, the .object file, and 2 pictures, one for the item and one for the icon.

    I know the .frames file is vital as it gives information about how big the item is et.c..

    Inside the object file i make my changes (im not a noob here), fixing all the errors and make sure that there are a ] or a } or a , in the right place et.c.

    when loading the game it gives me this in the starbound.log file.

    i understand the problem, however i can't really understand how to fix it.

    Problem : The game identify my .object file after the games .object file, and as such its defined twice. It continues to load my file and replace the original which is what i want, however this makes the ingame loading time alot longer (especially when you add alot of changes), how am i suppose to get around this error?

    Does it have to do with the __merge thingy, and if so, can someone give me an example of how to do it, i figured how to use __merge in the player.config file but cant really tell how to make it work with a simple object file.

    Thanks in advance, and if you need more information don't hasitate to ask, i can even upload my code for the apexbed (not really needed).
     
  2. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Are you simply trying to modify the healing rate of the apexbed? Because that should be simple. Due to the new __merge logic that was added, you only need the file(s) that you want to change in your mod directory.

    An example is my personal modified lantern-on-a-stick that is twice as bright and grants breath (like the airtank):

    Code:
    {
      "__merge" : [],
      "statusEffects" : [
      { "kind" : "glow",
      "amount" : 2,
      "color" : [89, 83, 71]
      },
       { "kind" : "breathprotection"
       }
      ]
    }
    That just lives in $INSTALL_DIR/mods/$MODNAME/items/armors/backitems/lanternstick.

    If you're doing something similar with the apexbed, try:

    Code:
    {
      "__merge" : [],
      "sitStatusEffects" : [
      { "kind" : "Nude" },
      { "kind" : "Health", "amount" : 0.08 }
      ]
    }
    
    That would make the healing 4 times as powerful (that 0.08 is a 0.02 normally), and about 1.5x stronger than the Sacrificial Altar's healing.

    Edit: That would also just be apexbed.object, living in $INSTALL_DIR/mods/$MODNAME/objects/apex/apexbed/
     
  3. Outcast

    Outcast Void-Bound Voyager

    Figured it wasen't that hard, thanks for the help. :)
     
  4. Outcast

    Outcast Void-Bound Voyager

    when adding the __merge code and removing all the rest of the code (so that only the parts in the merge code will be merged with the original code, it seems at first as it's working fine, however now i get this error instead.

    If i add the object name inside the merge code it spits out another error (similiar) that looks like this instead.

    Should i keep adding everything it ask me to add until the error go away, because i've figured if i add orientations to the merge code it will just ask me for a third thing, and then a fourth thing after that and go on and on and on....

    Am i doing anything wrong here? Cause i just added the merge code pretty much as you wrote it, also added warmth, made sure no errors made by me in code.
     
  5. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    What is your file structure? As stated, you need to have it as:

    $INSTALL_DIR/mods/$MODNAME/objects/apex/apexbed/apexbed.object

    I have no idea why there are calls to entirely unrelated items (unless you're modifying those, too, in which case you should really stick to one item at a time until it works).
     
  6. Outcast

    Outcast Void-Bound Voyager

    Yes, i should really try to stick to one item at a time... i'm really bad in that aspect. xD

    So, to make this work i need to be like... whats the word here... i need to be so precise in naming my folders? no freedom at all there?

    Because yeah, i have renamed my folders and have a whole diffrent built order when it comes to my folders, made alot of sense to me. IF thats the problem i guess i'll fix the folders as they appear in the asset folder for my mod folder too.
     
  7. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Yes, your folder structure must match the game's exactly, but don't use an "assets" folder, because your mod's root directory (where you put your .modinfo file) is the "assets" directory for your mod structure.
     
  8. Outcast

    Outcast Void-Bound Voyager

    Yeah, i figured that much out... The game loads without any errors now. Thanks for all the advice. :)
     
  9. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Excellent, I'm quite glad to hear it. Good luck with your future modifications!
     
  10. MasterPO

    MasterPO Space Hobo

    I used Kyrosiris suggestion to mod my Lantern on a Stick but only the glow works I can't get the breathprotection to function. I even went back and copied the code and pasted it exactly as it was posted here, still nothing...
     
    Last edited: Jun 13, 2014

Share This Page