Announcement

Collapse
No announcement yet.

References and You - Down the Rabbit Hole

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    References and You - Down the Rabbit Hole

    When doing Data Mods, always keep in mind that the data structures in Ark can be very complex and in some cases they are referenced together in ways that a change in one entry can cause a cascading effect where you can get crashes, odd behavior, or your item magically swapping to a vanilla one when used in something. When you're planning out your mod, and figuring out what you'd like to change you need to also note what else that change is going to impact, as you also have to change those impact points to reference your modification.

    When doing this planning phase, the Reference Viewer should be your best friend. When you right click on a blueprint and hit 'Reference Viewer' it will give you a lovely flowchart style window of what else connects to that blueprint in some way. Up in the top left corner there's a little box with the options for "Search Depth Limit" and "Search Breadth Limit", these are what can tell you just how far down the rabbit hole you have to go for making your changes. Do you need to screw around with ALL of those blueprints? Not entirely, but you should keep in mind how interconnected they are with each other.

    Lets say for example, you want to change the Water Jar item, so that it weighs less, or requires Dino **** to craft, or any other basic change. Easy right? You subclass (you ARE subclassing, right?) the following blueprints to your mod folder, make your changes and then add the new engram to your Remap array:
    • EngramEntry_WaterJar
    • PrimalItemConsumable_WaterJarCraftable


    Start up your test, go to learn the engram, and awesome! There's my new water jar! Craft the new water jar that weighs 1 unit, and only takes 5 large dino **** to craft. Wait just a minute though, as soon as you go in the river and fill up that water jar, suddenly it goes back up to 5 units worth of weight. You now have the vanilla version of the filled water jar, and as soon as you drink out of it you will get the vanilla version of the water jar back. That happens because the water jar has 2 separate PrimalItem entries, and when it changes states from full to empty, it actually is giving you a different item. Easy fix! Find the PrimalItemConsumable_WaterJarRefill blueprint, and subclass it into your mod. Go through both PrimalItem blueprints with a fine toothed comb to make sure they're both referencing the items from your mod and not the vanilla items.

    Give it another bash, and tada! You should now have a water jar that empties and refills from the river without turning back into a vanilla item.

    Wait a minute though, there are two other ways of filling up a water jar. You can fill it up via the water tank, or the water tap as well as dunking it in the ocean. NP Bro, your mod skillz are awesome and filling it up in the water tap will work properl---...oh ****** there's that vanilla water jar again.

    What happened? Well the tap/tank have a built in engram to automatically craft the PrimalItemConsumable_WaterJarRefill item when there's a PrimalItemConsumable_WaterJarCraftable placed in its inventory. Wait a minute, but I didn't put that in there! I put in a PrimalItemConsumable_WaterJarCraftable_lolpoop item! Well that's one of the wonderful things about subclassing, in that it can work in your favor and also should inherit updates from patches. When it's looking for the PrimalItemConsumable_WaterJarCraftable resource, it will also take an item that was subclassed from it. This can be VERY useful since your next change is to twiddle around with the Cementing Paste isn't it? ISN'T IT?!?!

    This means that you now have to make a modified copy of the Stone Tank, Stone Tap, Metal Tank, and Metal Tap, and when you're modifying the Taps you have to change the BASE blueprint, as the taps inherit their inventories from being child items, neat huh? I'm not going to go through all the blueprints and steps for creating all of those, as if I write all of that out I'm going to need to find a publisher for a book deal. Also keep in mind that when you need to change a PrimalInventoryBP the primary component that contains the PrimalInventoryBP item can NOT be subclassed, it MUST be a copy or you can't modify the attached inventory properly.

    The stone components are no big deal, because you can craft them by hand, but the metal ones you have to craft at the Smithy. You know what that means right? It means your own smithy!

    Got all that stuff created and working properly? Great!
    Think you're done? Nope!

    What did you miss? Take one of the new Taps that you created, and try to use it to water things planted in the various crop plots. Your nice Stimberry Seeds just don't seem to be growing anymore do they? That's good, you've probably had too many, you're looking a little twitchy.

    Why aren't the crops growing? That's because the CropPlotSmall_SM blueprint is checking the variable "Water Nearby Structure Template" to see if it's being watered or not. Normally that would be looking for the "WaterTap_Base" item to provide water, which in most cases would be perfectly fine as you would have been using blueprints that at some point have subclassed from that item. That isn't going to work for us now is it? Of course not, we're troublemakers, we made our own WaterTap_Base! With blackjack! and hooker! ....or just one with a custom inventory so that our modded water jar would work properly. Why can't we just subclass the WaterTap_Base item, and then go from there? Because we can't change the PrimalInventory if it has been added to the object by a parent item!

    Ugh what now? More work?
    You bet your backside skippy, you'll need your own modified versions of the Crop Plots, and their associated items. Fortunately that's fairly easy as they only have 3 main blueprints each to get that step done.

    Am I done now? Please? Come on I need a nap.
    As long as you have all your references right, your custom water jar made from **** should work just like a normal one would!

    For your viewing/screaming pleasure, I've also attached a reference diagram from my devkit that should have the majority of the referenced blueprints in this water jar adventure all smushed into one screen.
    [screenshot]http://www.cwmftw.com/arkmodding/ark-waterjar-refs.jpg[/screenshot]

    Are the rest of the items this much of a nightmare to edit? No not by a long shot, this example I just wanted to write up as one of the 'worst case' modifications I've done that had the largest scope of impact from the changes.

    Hopefully someone finds this useful.
    Last edited by cwm33; 07-27-2015, 03:52 PM. Reason: My image got gobbled.
    Main Mod: Statera Vis | Other Neglected Mod: Rebalance Mod Lite
    Guides: References and You - Down the Rabbit Hole

    #2
    Any guides you make you should do what JasonFJ did and throw a link to it in your signature. Thanks for the contribution! I find it amusing the different ways people teach/explain things
    Creator of the ARK mods TorchBoost, PogLoot, and DinoWipe.

    Comment


      #3
      I suppose I could do that.
      Last edited by cwm33; 07-27-2015, 03:53 PM.
      Main Mod: Statera Vis | Other Neglected Mod: Rebalance Mod Lite
      Guides: References and You - Down the Rabbit Hole

      Comment


        #4
        thats a really nice one ^^

        Comment


          #5
          Thanks for the write-up, haven't used that part of the editor yet but will be now that I know. Wish the forums had a 'thanks' button and a way to bookmark.

          Comment


            #6
            Originally posted by 3ndoflin3 View Post
            Thanks for the write-up, haven't used that part of the editor yet but will be now that I know. Wish the forums had a 'thanks' button and a way to bookmark.
            Threads can be rated at least on the top right to show stars in the forum's list of threads
            Creator of the ARK mods TorchBoost, PogLoot, and DinoWipe.

            Comment


              #7
              This is an amazing guide! Very enjoyable read with a real world example!

              Comment

              Working...
              X