Announcement

Collapse
No announcement yet.

Making fertilized eggs from *wild* dinosaurs be hatch-able

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

    Making fertilized eggs from *wild* dinosaurs be hatch-able

    Hi,

    I suppose this one is mostly for the devs... but maybe modders have got some ideas on how to approach this.

    I've done testing with fertilized eggs spawned in PlayerPawnTest as well as produced by wild dinosaurs (basically added fertilized eggs to the array) coming out of statis.

    The problem is.. when you drop these fertilized eggs on the ground.... they just vanish.

    I suppose the issue is that there are no "parents" .. or at least, the egg isn't inheriting the initial stats off its parents in the case of wild dinosaurs... and just bugs out when it's dropped (I don't see any errors or logs).

    Ideas/inputs appreciated.
    Mod author of Realism Plus and Scorched Crops

    #2
    I don't know if these eggs are one's your mod has "created" but I'd double check the dropped item template override?

    I'm not sure what actually happens if an item is dropped and doesn't have this set or incorrectly set.

    There's a droppeditemgeneric_fertilizedegg or something that the eggs use from what I've seen, other than that I couldn't say.

    -WM
    Workshop: My Workshop
    ARK Modding Discord Admin: Join here!

    Comment


      #3
      They are vanilla fertilized eggs.

      I checked out DroppedItemGeneric_FertilizedEgg that you pointed out. Sure enough, in the construction script graph there is an orange-coloured "Parent: Construction Script" which is "the place to spawn components and do other setup." according to the hover-over text.

      Which is non-exposed code.. and must be failing due to the lack of valid tamed actors as the source.

      Maybe the devs could tweak the code and source randomized stats from the dinosaur parent blueprint when there is no actor??? Somehow I doubt this request will get much priority but you never know!
      Mod author of Realism Plus and Scorched Crops

      Comment


        #4
        Having the same problem. I think it is because the initial health of the spawned eggs is zero (i.e., if you mouse over such an egg in the player's inventory its health bar is empty).

        Comment


          #5
          Found the solution for disappearing eggs - you need to set item rating, which actually represents egg health. The range seems to be from 0.0 (default) to 1.0 (full health).

          Comment


            #6
            Sounds promising... but where exactly are you configuring this? I tried the various Item Stat Infos in PrimalItemConsumerable_Egg_(name)_Fertilized, but I'm still seeing 0 health.
            Mod author of Realism Plus and Scorched Crops

            Comment


              #7
              I am using "ItemRating" variable in PrimalItemConsumable_Egg_(name)_Fertilized.

              Comment


                #8
                Originally posted by JasonFJ View Post
                Sounds promising... but where exactly are you configuring this? I tried the various Item Stat Infos in PrimalItemConsumerable_Egg_(name)_Fertilized, but I'm still seeing 0 health.
                I don't have my DevKit open and I couldn't be bothered waiting for it as then I'd need to close F:NV, lol, but I think there's a box that needs to be checked to "use" that specific variable. Like how Durability is set to be used, as I believe they use durability as the hatch timer for eggs.

                Should be the first one in the section for the stat type. If the item rating settings are in that area, that is.

                -WM
                Workshop: My Workshop
                ARK Modding Discord Admin: Join here!

                Comment


                  #9
                  I found an "ItemRating" float... it was in the Graph tab, not the Default. Needed to click "Show Inherited variables" checkbox to expose it.

                  Alter... maybe you could clarify more on how you set this variable? I can't see any event handlers to do the set operation.

                  I really should learn visual scripting more... but SWTOR Fallen Empire has just released and I've gotta get my characters prepped for raiding again!
                  Mod author of Realism Plus and Scorched Crops

                  Comment


                    #10
                    I use "Add New Item" function (you have to uncheck "Context Sensitive") to spawn a fertilized egg in an inventory. Then I use the return value to set "Item Rating" (egg health), "Item Durability" (egg incubation), etc.

                    Comment


                      #11
                      Thanks Alter, appreciate the clarification.

                      Good to know this is how egg health is determined. For my purposes, I'm really wanting the eggs laid by wild dinosaurs to have a low chance of being fertilized.

                      So that ItemRating needs to be set on blueprint creation (when the egg is laid by the dino as it comes out of statis).

                      Strangely, there is no constructor script associated with the fertilized egg blueprints, so I can't see a way of setting the ItemRating variable with any other event.

                      I'll keep digging around for ideas.. in the meantime if anyone comes up with a way to achieve the setting of ItemRating when laid it would be appreciated.
                      Mod author of Realism Plus and Scorched Crops

                      Comment


                        #12
                        Not sure how you are approaching this, but have you tried placing scripts in either "DroppedItemGeneric_NoStasisDelete" or "DroppedItemGeneric_FertilizedEgg" blueprint? The former is used by normal eggs and the latter by fertilized ones.

                        Comment


                          #13
                          I did look at both those bluepints.... the construction scripts contain only an orange box ... which I guess is unexposed script that reads in dino parents character BPs and does the cross-breeding RNG stuff... as well as set ItemRating.

                          I'm also hunting for ways to half the amount of food required to raise baby dinos... I wonder if this is also defined in this script.
                          Attached Files
                          Mod author of Realism Plus and Scorched Crops

                          Comment


                            #14
                            This is normal - you can still add your script elements to the construction script (e.g., after or before the parent script function call). The problem is that birth mechanics are not fully exposed yet, as far as I can tell. For example, I see that dino bleuprints have "DinoID1" and "DinoID2" variables - presumable IDs of parents, but the editor does not recognize the type of these variables.

                            As for baby food consumption, there is "Baby Dino Consumping Food Rate Multiplier" in "DinoCharacterStatusComponent_BP_[DINO]". I would try messing around with that. You can also change this value at runtime, through scripting. I think either modifying dino construction script or adding a "Begin Play" event should do the trick.

                            Click image for larger version

Name:	sample_baby_food_consumption.png
Views:	1
Size:	48.3 KB
ID:	1092251

                            Comment


                              #15
                              Made some more tests:

                              1. Spawned fertilized dino eggs hatch into baby dinos normally, even though parent dinos are not set. Not sure what happens with their stats and levels though.

                              2. You can indeed slow down baby food consumption. Best of all, you can do this without changing existing dino or egg blueprints. For example, in my test I made a special consumable that, once fed to a baby dino, will change its food consumption rate. Here is the script that I used in the blueprint:
                              Click image for larger version

Name:	test_rawmeat_for_dino_babies_2.png
Views:	1
Size:	126.1 KB
ID:	1092268

                              P.S. Make sure to enable "Use Blueprint Equipped Notifications" in the blueprint, otherwise the event will not be triggered.
                              Last edited by AlterSomnium; 10-30-2015, 09:56 AM.

                              Comment

                              Working...
                              X