Does anybody know how to do this? I’m testing out weapon effects and want immediately-spawned footmen and weapons, as well as goblins (preferably appearing after 10s or so).
I had a look at the latest twitch stream, and Tom seems to be running a players_vs_goblins.json world with two ‘teams’ coded in. It doesn’t look anything like the current worlds (both of which are .lua files).
Here’s the current worker spawning code:
-- create all the workers.
local workers = {}
for x = 1,3 do
for z = 1,2 do
local worker = microworld:place_citizen(-5 + (x * 3), -5 + (z * 3))
table.insert(workers, worker)
end
end
-- give some of the workers some starting items.
local player_id = microworld:get_local_player_id()
local pop = stonehearth.population:get_population(player_id)
local function pickup(who, uri)
local item = pop:create_entity(uri)
radiant.entities.pickup_item(who, item)
end
pickup(workers[6], 'stonehearth:resources:wood:oak_log')
pickup(workers[2], 'stonehearth:footman:wooden_sword_talisman')
pickup(workers[3], 'stonehearth:mason:talisman')
pickup(workers[4], 'stonehearth:blacksmith:talisman')