Bit new to modding could use some help on two issues.

Greetings.

I’ll like to apologise if I seem to appear a lot. My problem is that I am deaf and most tutorials on different subjects are on videos, which makes it very hard for me to understand what is going on. So I hope that by posting here some people might take their time and help me out a bit. Thanks in advance.

I just recently finished and uploaded my first mod, that spawns in the scorched dinos on the Center map (not customised ones, the real ones) and as mentioned in the title I have two issues I hope someone could help with :slight_smile:

  1. How to I go about adding the saddle for the scorched dinos? Not customised ones but the same ones used in scorched earth.

  2. How do I add wild hatch-able fertilised wyvern eggs? Since the wyverns in the scorched earth uses nests with eggs that you can hatch. I was wondering how I either add nests or just some fertilised wild one for players to pick up from the wild and hatch. That either has parental levels or just a random level. Again not customised ones but the same eggs from the DLC.

Thanks again for your time.

To add saddle, you need to make sure the saddle have the same tag as your dino. If you gave your dino a name like John as a tag ( where you search “tag” in the dinos character_bp ) you need to give the same tag on the saddlearmor_bp. otherwise they will not fit.
If you want to use the original ones, you have to make sure that the tag is not touched, meaning you can’t name them in the tags.
Bring up the character_bp and the saddle for a SE dino ( use any of the one that you can saddle ) and search for “tag” . in both you will see that they have the same “tag” name. THIS is what you need to ensure.
Then, to add the saddle to your mod, simply copy the primalarmor_saddle and an engramentry for the saddle into you mod, edit to fit the dino you need, and add them to your additional engram list in primalgamedata. I am not sure but you might need to add the saddle to “additional structure to build” … but this I am not sure of. I have all my saddles to my dinos in a structure itself, so I only have the engram to learn the structure, and then all saddles are already in there, so I can’t say if the need to be in the structure list or not.

When it comes to Wyverns, to be honest I have no idea how to make them lay fertilized eggs for you to grab. I know in the wyverns character blueprint, there is in the beginning a section that will tell them so be able to spawn an nest that will have an egg… but I never have fiddled around this. You can add a fertilized egg to their death inventory, in such they need to be killed to get it … and you can add them to a lootlist, so there is only a chance to get them… but to make them spawn naturally on the map, I will let others help you there, this is way beyond my little knowledge of modding sadly.

I can’t find the primalarmor_saddle (did a search with nothing ticked), I can however find the saddles that belongs to the dinos. Like Camelsaurus_Character_BP_Saddle etc, would that do?
I assume you mean “Additional Engram Blueprint Classes” that I need to add them in? That one seems to let me add in engramentires so would I still need to place an engramentry blueprint in?
One issues I did run into is that one of the saddles (the spineylizard) requires clay to be built with and the Center doesn’t have clay, so I would obviously need to edit that one. How would I go about that?

I rather not touch/alter the Wyverns as doing so will make them bound to the mod, so if the mod were removed, so would the wyverns. I really want to find a way to add eggs without doing that.


EDIT:*** About the saddle I seem to have found what was spoken about, problem is just I have no clue where to put them in the PrimalGameData file. Do I add the entry in the “Master list” and then add the primalarmor_saddle to “additional engram blueprint classes” or?

Items don’t have to be “added” - the fact that you have the PrimalItem file means it is added. You use the PrimalGameData when you need to add a way to get the item usually. Adding something to the Master List gives it an item ID (cheat giveitemnum) but you don’t need to do that, and it’s bad practice to mess with WildCard’s list. For a saddle, you’ll want to add EngramEntry_Saddle to “Additional Engrams” and the reason is the same as with Master List, don’t add anything to WildCard’s engram list. In EngramEntry_Saddle just make sure it says PrimalArmor_Saddle in there.

As for crafting it, you’ll want to make it craftable in the player inventory. Make sure to enable “give to player inventory” in the engram. Then in the primalitem/armor/whatever file, you’ll want to search for “craft” and adjust the exp, craft time, resource requirements, and ensure that “requires inventory component” is empty. Then you’ll be able to learn the engram and craft it in your inventory.

Right I did what I think you meant and encountered two problems.

  1. The saddle ended up in the scorched engram group section where the whole section is greyed out. I went to the saddle entry and selected “ARK PRIME” instead of it “SCORCHED EARTH”
  2. After I had changed the engram group to Ark Prime the engram light up when I hit the right level, but I couldn’t learn it. So I copied the Primalarmor_saddle and edit the EngramEntry_saddle blueprint that I also had copied pasted to the mod folder to use the one I had jut copied. Then it worked.

So it all works now, my question is just if that’s how its suppose to be done? XD I mean is the mod able to spawn the saddle and engram without me having to copy paste the blueprints in the mod folder or?

It doesn’t “have” to be per se… But when you cook and upload a mod, it only uploads what’s in that specific mod folder. So you’ll want to include your modded items in your mod folder. But yeah the proper way is:

Copy and engram (so it’s parented to primal engram)
Copy/child modded item (depending on its purpose)
Point engram to item
Add engram to additional engrams

Then that’s it

We are talking about the blueprints right?
I copied EngramEntry_Saddle_CamelSaurus and PrimalItemArmor_CamelsaurusSaddle into my mod folder. Then edited EngramEntry_Saddle_CamelSaurus to use the PrimalItemArmor_CamelsaurusSaddle in the mod folder. I then edited PrimalGameData_BP_Generic to use the EngramEntry_Saddle_CamelSaurus from the mod folder, by adding it to “Addition Engram Blueprint Classes” I did that for all 5 dinos I needed to.

Did I do it correctly?

As long as that’s PrimalGameData_BP_Generic_Child you did it perfectly

Well it works so I assume I did. Thanks for all your help! Now I just need to do the wild fertilised eggs.

It won’t work on a dedicated server if your PrimalGameData isn’t a child of the original.

Huh? What? The PrimalGameData was the one from the generic mod folder in the ark dev kit the starter one. I just copied it and renamed it and made all the saddles, dinos etc work with that Primal file, it all shows up in my game (single player tho) not sure what’s meant by child o.O

PrimalEarth -> PrimalGameData -> Drag to your mod folder -> “Create child here”

A child is a subclass, it inherits all variables from the parent. A great example would be the engram list. You’ll notice that some older mods simply don’t register newer items. That’s a bad PrimalGameData. I just made an egg collector, and the fridge is the perfect example of how parenting works. If you look in the fridge, the allow inventory is just PrimalItemConsumable, yet you can put all that food in there! Well, all the food are children of PrimalItemConsumable.

I see. Can’t I just create the child from the folder its already in instead of having to move it, and then just move the child instead?
Anyways, my dev kit has recently been installed (few days ago) and the PrimalGameData I use got the new dinos in it (the squid and the jellyfish) so I believe it is uptodate. But yeah.

You have to create a child from the parent file directly. If you go into PrimalEarth, just search for PrimalGameData then drag that to your mod folder and hit Create Child Here.

Alright thanks. Do you know what “Fertilized Additional Egg Item to Spawn” and “Fertilized Additional Egg Wieght to Spawn” does? Do they add in fertlized eggs or?

You can spawn proper fertilized egg via the CreateCloneFertlizedEgg function. Check out the blueprint graphs in Wyvern_Character_BP_Base to see how it works.

Mind you I’m new at this as well and am working on the same thing more or less for learning purposes. I’ve only had the devkit a few days and I’m still figuring it all out as well so I could be very wrong on a few points. Hopefully someone else will clear up anything that I am incorrect about.

The blueprint for me was pretty confusing the understand until I wrote it out code style in notepad, but more or less what happens is.

Bear with me and my “psuedo-code” and shotty explanations that may be wrong :smiley:

Psuedo-code for the Wyvern_Character_BP_Base :: Event Graph :: BPUnstasis Event



// Happens when a wyvern comes out of stasis
Event Wyvern_Character_BP_Base::BPUnstasis()
{
	// if this wyvern is tamed
	// then we don't need to check anything else
	// so we exit the code block
	if ( BPIsTamed(*this) )
		return;

	// Has enough time passed since our last "m_LastUnstasisStructureTime"
	float time = GetGameTimeinSeconds();
	float temp1 = (int)(time - m_LastUnstasisStructureTime);
	if ( temp1 > m_UnstasisStructureCheckforDamInterval )
	{
		// reset last unstasis time to "now"
		m_LastUnstasisStructureTime = time;

		// delay for (float) 3 seconds? Not sure..
		RetriggerableDelay(Duration = 3);

		// has enough time passed since we last spawned a wyvern nest?
		time = GetGameTimeinSeconds();
		float temp2 = (int) (time - m_LastBeaverDamSpawn);
		if (temp2 > m_UnstasisStructureCreateDamInterval)
		{
			// reset last wyvern nest spawn time to "now"
 			m_LastBeaverDamSpawn = time;

			// if we (the wyvern) are not in "stasis"
			if (!m_Stasised)
			{
				// then it's ok for us to attempt to
				// spawn a wyvern egg in a nest
				Wyvern_Character_BP_Base::SpawnNestEgg();
			}
		}
	}
}


Even worse psuedo-code for Wyvern_Character_BP_Base :: SpawnNestEgg

So anyways if you’ve grasped all of that then it should give you some ideas of where to start. I’m “assuming” that it will be a pain to get it to work with wyvern nests and will want to just create a fertilized egg at the wyverns location. If you don’t want to overwrite any of the wyvern classes then I’m “assuming” that you’ll be able to use some sort of world tick or server tick option that loops through all the wyverns, cast to Wyvern_BP_Base (or their specific type) to get a reference to them and have them lay eggs via the CreateCloneFertilizedEgg function. Would be a good idea to get clarification from someone more experienced with the devkit before digging in deep.

I do not want to touch any dinosaur blueprints in order to spawn an egg, since they’ll get bound to the mod and get removed if the mod is as well.

CreateCloneFertilizedEgg function? I am assuming that’s something in the graph section and not actually blueprint or something? World tick xD man I am way behind on this. At first I tried to find a dino spawner to see if I could actually change the dinos with an egg instead and have the spawner spawn eggs as well, but nope, no such luck. I wasn’t able to find a spawner than spawns objects or eggs, which I get the feeling are connected to the dinosaur’s blueprint (since it seemed that the eggs dinos sometimes drop if a mate is near, seems to be in the blueprint) How I effect a world/server to actually spawn an egg I have no clue on how to do.
I obviously need to find another why to spawn one in without altering the dinosaurs’s blueprint, I don’t mind altering the egg blueprint or a spawner. Just not a dino blueprint. But I am not sure how, I know I can spawn in a fertilized wyvern egg in by admin cheats in the game itself but those eggs are on health 1 so they tend to disappear as soon as you put them down, so the blueprint needs altering so the health is 100 instead of 1, which is also something I am not sure on how to do. I can find the egg blueprint no problems, but I am not sure which element contains the health. But to be honest I rather find a way to have the mod spawn in a fertilized egg first before fixing the other issues tho.

If I were to add the egg in a wyvern’s inventory the same way milks is (aka when you have knocked them unconscious) how would I add the egg as well as give it a low chance of being in the inventory?

I have found out how to add an egg to the inventory when they are dead. But I can’t figure out how to give the egg a random level and 100 health. The eggs has 1 health and is level 1.

More or less I don’t think you’re able to edit the egg’s properties, but you can work around that problem by spawning a dino, have it lay an egg via the CreateCloneFertilizedEgg function, then immediately delete the dino that you just spawned in.

Here’s a blueprint graph that I posted the other day Spawning a fertilized egg posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

I try to be descriptive as possible when I code anything in a graph via the comment feature, but just to further iterate i’ll explain it more in detail.

In the “event play just for testing purposes” section:
I’m only using begin play here to quickly test out what I’m trying to do. I spawned an ankylo directly on the by dragging my remapped version of the ankylo blueprint into the test level. Note: I’m using are mapped version of the ankylo, but I don’t think it’s 100% necessary, however since you don’t want to remap any dinos you’ll have to figure out way to get a reference to the dinos that you want to lay eggs. For right I would suggest just temporarily remapping a dino just so you can play around with the code and test things to figure out exactly how it works.

In the “get dino’s world position” section:
Here I’m getting the world position of the dino that I can see walking around on the map (this is the dino that I directly added to the level with the editor for testing). Honestly I don’t really know exactly understand K2_GetWorld, but it doesn’t matter. I’m “assuming” that “the world” it returns is the level that the test dinos resides in. K2_GetActorLocation returns a vector that tells us the exact position in the world where our test dino is. K2_GetActorRotation tells us what direction it is facing.

In the “spawn a temporary dino at our position…” section:

This is where the actual fun stuff starts w/ the “Spawn Dino” function. We could skip spawning this temporary dino if we wanted to the egg to be the same level as the dino that we see on the map. I wanted to spawn an egg that was the same level as if you were to tame the dino, otherwise tamed dinos through the traditional process will always be higher level than the ones created through the fertilized egg. If you want to set the eggs level to something other than the test dino’s level then you must “check” the boolean “Override Base NPCLevel” to true, then you must set a dino level integer in “NPCAbsoluteBaseLevel”. The “return value” of “Spawn Dino” is a reference to the dino that I just spawned. I should have set the “K2_GetActorLocation” and “K2_GetActorRotation” to reference the test dino and not the dino that I created with SpawnDino. The CreateCloneFertilizedEgg forces the dino to lay a proper egg with a proper amount of health and the level that we choose. K2_DestroyActor deletes the temporary dino that I spawned in.

Note: CreateCloneFertilizedEgg gives a reference to egg that was just laid. This reference will allow you to manipulate the egg. You should be able to put this egg into a dinos inventory if you want.

Since you don’t want to overwrite any dino bps, you’re gonna have to find someway to get a reference to the dino that you want to lay the egg.

There are other options that are probably easier. You could do something like make a “vending machine” type item that if a player clicks on it or something then it will spawn a dino, like i did in my link, have it lay an egg, then delete the dino.

You can create admin commands that spawn in the temporary dino to lay a proper egg.

You can probably create a blueprint that makes an invisible item that the admin places around the map and have the item run a timer. When the timer goes off, it checks dinos in a radius around the item to get a reference to them and have the invisible item take care of the logic that spawns the egg. If you go this route, you’ll also want to check all of the referenced dinos to see what gender they are, if they’re in stasis (stasis means no players are around so the dinos and “sleeping” and not being updated by the server normally), and also the random chance to lay an egg.

You could probably even make a new type of weapon that when it hits a dino, it grabs a reference to the dino, and handles all the logic inside the weapon to get the dino to lay the egg. I’m picturing a “cupid bow w/ pink arrows” for some reason :confused:

The possibilities are endless :slight_smile: