Jump to content

Recommended Posts

Hello!

I am implementing the unused chickens from Hamlet to the game, but I'm having a major issue:
city_builder is NOT mod compatible, meaning I have to rely on placing set-pieces after world generation.

I have attached a new world component I made that when ran via console

GetWorld().components.chickenhomespawner:SpawnCoop()

Will spawn the chicken coop (at least it's SUPPOSED to) in-game.
But it doesn't work, because the placement location is invalid.

What I'm trying to achieve:
1. The size of the set-piece will be as big as the static_layout (if it's 3 turfs width and 4 turfs height it'll be 3x4)
2. The prefabs of the set-pieces will be spawned normally (and maybe, if even remotely possible, make them have scenarios ran to them)
3. One set-piece should be spawned in the entirety of the Hamlet post-worldgen somewhere in specific turfs (cultivated turf to be precise) and once it's placed there delete any unwanted prefabs nearby (preferably not anything that is pig-owned, like towers, farm houses, crops, berry bushes, even Piko Trees shouldn't be deleted)

If anyone is interested in helping me, that'd be amazing!

chickenhomespawner.lua

 

Edited by mathem99

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...