self.props.base is nil for the smart terrain, which should not occur. Could be a script error or you forgot to add or inherit the base prop in
simulation_objects_props.ltx which would be unlikely if you are using purely vanilla smarts in coc.
I see a few things wrong in sim_board though:
Code: Select all
local bandit = "bandit" or "bandit_novice" or "bandit_advanced" or "bandit_veteran"
local dolg = "dolg" or "dolg_novice" or "dolg_advanced" or "dolg_veteran"
local freedom = "freedom" or "freedom_novice" or "freedom_advanced" or "freedom_veteran"
local killer = "killer" or "killer_novice" or "killer_advanced" or "killer_veteran"
local army = "army" or "army_novice" or "army_advanced" or "army_veteran" or "army_patrol"
local monolith = "monolith" or "monolith_novice" or "monolith_advanced" or "monolith_veteran" or "monolith_patrol"
local stalker = "stalker" or "stalker_novice" or "stalker_advanced" or "stalker_veteran"
local csky = "csky" or "csky_novice" or "csky_advanced" or "csky_veteran"
local ecolog = "ecolog"
local monster_day = "monster_flesh" or "monster_boar" or "monster_mix_boar_flesh" or "monster_cat" or "monster_dog" or "monster_mix_dogs" or "monster_pseudodog" or "monster_izlom" or "monster_zombie" or "monster_snork" or "monster_poltergeist" or "monster_controller" or "monster_burer" or "monster_gigant" or "monster_tushkano"
local monster_night = "monster_psydog" or "monster_borya" or "monster_bloodsucker" or "monster_psybloodsucker" or "monster_psycontroller" or "monster_chimera" or "monster_rat"
'or' is used for conditionals. Basically the value that is not nil or false will occur.
Code: Select all
local bandit = "bandit" or "bandit_novice" or "bandit_advanced" or "bandit_veteran"
Will always equal "bandit"
If you want a variable to hold different values then you need to make a hash table like:
Code: Select all
local dolg = { ["dolg"] = true,["dolg_novice"] = true }
Then check it with:
Code: Select all
if dolg[squad.player_id] == true then
Also keep in mind if you are adding new squad behavior types you need to add them to
simulation_objects_props.ltx which can be overwhelming with that amount of new behaviors. And honestly there is not much point in having more then what is already there, like what was done in Misery and M.S.O.
Adding new communities or factions doesn't require you to add them to squad behaviors. These are just specific to what squads do when they are offline. It goes by "faction" field in the squad descriptions. This field doesn't have to reflect the actual faction of the npcs in the squad. So what you are doing isn't necessary.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."