So ive been dabbling. I have a series of spawnguns. I got the nonhostile part down pat and buffed health on the monsters that plop out. But Im trying to figure out the bit of script to make the monsters into pets because i want certain "unique" monsters to follow the person using the gun. If it works out, ill be stoked. Im VERY new to this btw. No codong experience, and this is day 2 of dabbling for me. So help/advice tutorial links or premade script lists are welcone. Also. Usual smarphone grammar disclaimer.
This would be fun for lab rp... have zero experience with monster training and breeding/raising myself
Im trying to get the "Avian Sentry" to follow the user after spawning. Basicly portable representation of a Guard Npc. plus avian sentry is sexy on his vanilla hoverbike/canon
You'll want to examine filled capture pods in StarCheat, as well as monsters/capturepod.lua. From what I recall capture pods store the owner's UUID and that's how it determines who owns the pet.
Yes. Use your character's UUID inside the spawnmonster arguments object. Example "ownerUuid": "987017y990sf7y432fdsysdsdfa90" They will then follow the specified character and behave like creatures spawned from a filled capture pod. UNFORTUNATELY, they also drop filled capture pods on death and I have no idea how to get rid of this functionality.
monsters/ground/groundmonster.lua Looking at die(), it seems to check if the creature is a capture pod monster, then does stuff with it. I haven't looked too in-depth, but it could be possible to trick the script into not thinking the creature is a capture pod monster. Maybe.
It will probably be trial and error until Chucklefish makes an AI or type of critter which follows the player, fights for them, and doesn't drop a filled capture pod.
Oh, right, I forgot; NPCs don't use the same AI as monsters - NPCs being humanoids (avian, glitch, floran, etc.) while monsters being creatures (bosses and so on).
I think I must've left a line out, I had a launcher without my tester's Uuid and one with. Both acted the same, wandering at random, not following, and basicallyjust frolicking everywhere, other than with me I'll definately poke around the capture pods some more. Thanks for the help ya'll
NPC's might not have the same parameters as monsters. I can't think of a single one which follows the player, so a vanilla friendly example may be hard to come by.