Modding Help Creating a Passive Monster

Discussion in 'Starbound Modding' started by ThatForgottonGuy, Aug 13, 2018.

  1. ThatForgottonGuy

    ThatForgottonGuy Void-Bound Voyager

    I am trying to create a passive monster that friendly NPCs and Monsters DO NOT attack, but that is capable of using the concurrent action "action-spawncompanions"... Farm animals such as the Mooshi are passive, but if I set a monster's behavior to "farmable", the world crashes... Normal monsters can use "action-spawncompanions", but I can't find a way to stop friendlies from attacking them... I have searched around, and I can't find anything about a passive script/behavior that allows the monster to spawn companions, but I assume it's possible as the features both exist in game and combining features has never been an issue in the past, but I cannot make it work this time... Any help would be greatly appreciated!

    Also, if anyone needs files from what I'm working with to help troubleshoot, let me know and I'll upload them!
     
  2. projectmayhem

    projectmayhem Ketchup Robot

    You can try this inside the periodic-actions { }

    {"name" : "action-spawnmonster",
    "cooldown" : 10.0,
    "parameters" : {
    "offset" : [0,1],
    "monsterType" : "monster_you_want_to_spawn",
    "replacement" : false
    }
    }
     
  3. ThatForgottonGuy

    ThatForgottonGuy Void-Bound Voyager

    Unfortunately, putting that in the "periodic-actions" of a farmable monster causes the world to crash...
    Code:
    [07:07:17.393] [Info] UniverseServer: listening for incoming TCP connections on 0.0.0.0:21025
    [07:07:17.494] [Info] UniverseServer: Warping player 1 to CelestialWorld:132132430:-720922363:-297565379:4=1827.65.1035
    [07:07:22.511] [Error] Exception while invoking lua function 'update'. (LuaException) Error code 2, [string "/monsters/monster.lua"]:150: (StarException) Lua Exception caught running action node setAnimationState in behavior farmable: (LuaException) Error code 2, [string "/scripts/actions/animator.lua"]:90: (MapException) Key 'spawn' not found in OrderedMap::get()
    [0] 7ff7b6e77153 Star::captureStack
    [1] 7ff7b6e75ede Star::StarException::StarException
    [2] 7ff7b6e80202 Star::OrderedMapWrapper<Star::FlatHashMap,Star::String,std::shared_ptr<Star::AnimatedPartSet::State const >,std::allocator<std::pair<Star::String const ,std::shared_ptr<Star::AnimatedPartSet::State const > > >,Star::hash<Star::String,void>,std::equal_to<Star::String> >::get
    [3] 7ff7b6e8109d Star::AnimatedPartSet::setActiveState
    [4] 7ff7b70da3bc Star::NetworkedAnimator::setState
    [5] 7ff7b7503a21 <lambda_7a2e7bcd02dadb482af2723c43d2ef2d>::operator()
    [6] 7ff7b74ff8af std::_Invoker_functor::_Call<<lambda_7a2e7bcd02dadb482af2723c43d2ef2d> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [7] 7ff7b7500a80 std::invoke<<lambda_7a2e7bcd02dadb482af2723c43d2ef2d> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [8] 7ff7b7500499 std::_Invoke_ret<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,<lambda_7a2e7bcd02dadb482af2723c43d2ef2d> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [9] 7ff7b7504b5b std::_Func_impl<<lambda_7a2e7bcd02dadb482af2723c43d2ef2d>,std::allocator<int>,Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::_Do_call
    [10] 7ff7b6e4481d std::_Func_class<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::operator()
    [11] 7ff7b6e437af <lambda_a03bcae4599b53751a446949639a4d5e>::operator()
    [12] 7ff7b6dcb938 luaD_precall
    [13] 7ff7b6de46e1 luaV_execute
    [14] 7ff7b6dcbc1b luaD_rawrunprotected
    [15] 7ff7b6dcbf3f lua_resume
    [16] 7ff7b6eea0cc Star::LuaEngine::resumeThread<Star::LuaTable,std::weak_ptr<Star::Blackboard>,unsigned __int64,float>
    [17] 7ff7b6ee97c1 Star::LuaThread::resume<Star::LuaTupleReturn<enum Star::NodeStatus,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >,Star::LuaTable,std::weak_ptr<Star::Blackboard>,unsigned __int64,float>
    [18] 7ff7b6ef4b74 Star::BehaviorState::runAction
    [19] 7ff7b6ef569f Star::BehaviorState::runNode
    [20] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [21] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [22] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [23] 7ff7b6ef52d5 Star::BehaviorState::runDecorator
    [24] 7ff7b6ef56aa Star::BehaviorState::runNode
    [25] 7ff7b6ef5c5d Star::BehaviorState::runSelector
    [26] 7ff7b6ef501a Star::BehaviorState::runComposite
    [27] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [28] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [29] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [30] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [31] 7ff7b6ef52d5 Star::BehaviorState::runDecorator
    [32] 7ff7b6ef56aa Star::BehaviorState::runNode
    [33] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [34] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [35] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [36] 7ff7b6ef4958 Star::BehaviorState::run
    [37] 7ff7b74ec97e <lambda_c00a27f6cddfafb872d0f8c0617836e5>::operator()
    [38] 7ff7b74ebe69 <lambda_8b39829c64d733afef46ba23ecb7c7c1>::operator()
    [39] 7ff7b74e4cef std::_Invoker_functor::_Call<<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [40] 7ff7b74e6240 std::invoke<<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [41] 7ff7b74e54c9 std::_Invoke_ret<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [42] 7ff7b74edddb std::_Func_impl<<lambda_8b39829c64d733afef46ba23ecb7c7c1>,std::allocator<int>,Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::_Do_call
    [43] 7ff7b6e4481d std::_Func_class<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::operator()
    [44] 7ff7b6e437af <lambda_a03bcae4599b53751a446949639a4d5e>::operator()
    [45] 7ff7b6dcb938 luaD_precall
    [46] 7ff7b6de46e1 luaV_execute
    [47] 7ff7b6dcb443 luaD_call
    [48] 7ff7b6dcbc1b luaD_rawrunprotected
    [49] 7ff7b6dcb650 luaD_pcall
    [50] 7ff7b6dc1b64 lua_pcallk
    [51] 7ff7b6e4b930 Star::LuaEngine::pcallWithTraceback
    [52] 7ff7b70394fe Star::LuaEngine::callFunction<float>
    [53] 7ff7b703cca5 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [54] 7ff7b703cbc0 Star::LuaBaseComponent::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [55] 7ff7b704394c Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [56] 7ff7b70438bc Star::LuaActorMovementComponent<Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> > >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [57] 7ff7b70798ea Star::Monster::update
    [58] 7ff7b741b31e <lambda_5251ea3b435705ab973fc9e3a86aa323>::operator()
    [59] 7ff7b6fca5d7 Star::EntityMap::updateAllEntities
    [60] 7ff7b743e824 Star::WorldServer::update
    [61] 7ff7b7444b66 Star::WorldServerThread::update
    [62] 7ff7b7444558 Star::WorldServerThread::run
    [63] 7ff7b6e73c5e Star::ThreadImpl::runThread
    [64] 7ffe644e3034 BaseThreadInitThunk
    [65] 7ffe669b1431 RtlUserThreadStart
    stack traceback:
        [C]: in field 'setAnimationState'
        [string "/scripts/actions/animator.lua"]:90: in function <[string "/scripts/actions/animator.lua"]:84>
    [0] 7ff7b6e77153 Star::captureStack
    [1] 7ff7b6e75ede Star::StarException::StarException
    [2] 7ff7b6e76225 Star::StarException::StarException
    [3] 7ff7b77c48dc `Star::BehaviorState::runAction'::`1'::catch$193
    [4] 7ffe41bec8c0 _C_specific_handler
    [5] 7ffe41be2e83 _TypeMatch
    [6] 7ffe669de273 RtlCaptureContext
    [7] 7ff7b6ef4b74 Star::BehaviorState::runAction
    [8] 7ff7b6ef569f Star::BehaviorState::runNode
    [9] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [10] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [11] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [12] 7ff7b6ef52d5 Star::BehaviorState::runDecorator
    [13] 7ff7b6ef56aa Star::BehaviorState::runNode
    [14] 7ff7b6ef5c5d Star::BehaviorState::runSelector
    [15] 7ff7b6ef501a Star::BehaviorState::runComposite
    [16] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [17] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [18] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [19] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [20] 7ff7b6ef52d5 Star::BehaviorState::runDecorator
    [21] 7ff7b6ef56aa Star::BehaviorState::runNode
    [22] 7ff7b6ef5e2a Star::BehaviorState::runSequence
    [23] 7ff7b6ef5000 Star::BehaviorState::runComposite
    [24] 7ff7b6ef56b5 Star::BehaviorState::runNode
    [25] 7ff7b6ef4958 Star::BehaviorState::run
    [26] 7ff7b74ec97e <lambda_c00a27f6cddfafb872d0f8c0617836e5>::operator()
    [27] 7ff7b74ebe69 <lambda_8b39829c64d733afef46ba23ecb7c7c1>::operator()
    [28] 7ff7b74e4cef std::_Invoker_functor::_Call<<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [29] 7ff7b74e6240 std::invoke<<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [30] 7ff7b74e54c9 std::_Invoke_ret<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,<lambda_8b39829c64d733afef46ba23ecb7c7c1> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [31] 7ff7b74edddb std::_Func_impl<<lambda_8b39829c64d733afef46ba23ecb7c7c1>,std::allocator<int>,Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::_Do_call
    [32] 7ff7b6e4481d std::_Func_class<Star::Variant<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::LuaVariadic<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> > >,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>::operator()
    [33] 7ff7b6e437af <lambda_a03bcae4599b53751a446949639a4d5e>::operator()
    [34] 7ff7b6dcb938 luaD_precall
    [35] 7ff7b6de46e1 luaV_execute
    [36] 7ff7b6dcb443 luaD_call
    [37] 7ff7b6dcbc1b luaD_rawrunprotected
    [38] 7ff7b6dcb650 luaD_pcall
    [39] 7ff7b6dc1b64 lua_pcallk
    [40] 7ff7b6e4b930 Star::LuaEngine::pcallWithTraceback
    [41] 7ff7b70394fe Star::LuaEngine::callFunction<float>
    [42] 7ff7b703cca5 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [43] 7ff7b703cbc0 Star::LuaBaseComponent::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [44] 7ff7b704394c Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [45] 7ff7b70438bc Star::LuaActorMovementComponent<Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> > >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [46] 7ff7b70798ea Star::Monster::update
    [47] 7ff7b741b31e <lambda_5251ea3b435705ab973fc9e3a86aa323>::operator()
    [48] 7ff7b6fca5d7 Star::EntityMap::updateAllEntities
    [49] 7ff7b743e824 Star::WorldServer::update
    [50] 7ff7b7444b66 Star::WorldServerThread::update
    [51] 7ff7b7444558 Star::WorldServerThread::run
    [52] 7ff7b6e73c5e Star::ThreadImpl::runThread
    [53] 7ffe644e3034 BaseThreadInitThunk
    [54] 7ffe669b1431 RtlUserThreadStart
    stack traceback:
        [C]: in ?
        [C]: in method 'run'
        [string "/monsters/monster.lua"]:150: in function <[string "/monsters/monster.lua"]:94>
    [0] 7ff7b6e77153 Star::captureStack
    [1] 7ff7b6e75ede Star::StarException::StarException
    [2] 7ff7b6e4a4c1 Star::LuaEngine::handleError
    [3] 7ff7b7039517 Star::LuaEngine::callFunction<float>
    [4] 7ff7b703cca5 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [5] 7ff7b703cbc0 Star::LuaBaseComponent::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [6] 7ff7b704394c Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [7] 7ff7b70438bc Star::LuaActorMovementComponent<Star::LuaUpdatableComponent<Star::LuaWorldComponent<Star::LuaBaseComponent> > >::update<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,float>
    [8] 7ff7b70798ea Star::Monster::update
    [9] 7ff7b741b31e <lambda_5251ea3b435705ab973fc9e3a86aa323>::operator()
    [10] 7ff7b6fca5d7 Star::EntityMap::updateAllEntities
    [11] 7ff7b743e824 Star::WorldServer::update
    [12] 7ff7b7444b66 Star::WorldServerThread::update
    [13] 7ff7b7444558 Star::WorldServerThread::run
    [14] 7ff7b6e73c5e Star::ThreadImpl::runThread
    [15] 7ffe644e3034 BaseThreadInitThunk
    [16] 7ffe669b1431 RtlUserThreadStart
    [07:07:22.514] [Error] WorldServerThread exception caught: (InvalidMaybeAccessException)
    [0] 7ff7b6e77153 Star::captureStack
    [1] 7ff7b6e75ede Star::StarException::StarException
    [2] 7ff7b6e7d28e Star::AnimatedPartSet::activeStateIndex
    [3] 7ff7b70d575c Star::NetworkedAnimator::netElementsNeedStore
    [4] 7ff7b6e503de Star::NetElementSyncGroup::writeNetDelta
    [5] 7ff7b6e50025 Star::NetElementGroup::writeNetDelta
    [6] 7ff7b7018b30 Star::NetElementTop<Star::NetElementCallbackGroup>::writeNetState
    [7] 7ff7b707a6cd Star::Monster::writeNetState
    [8] 7ff7b7436b65 Star::WorldServer::queueUpdatePackets
    [9] 7ff7b743f0c2 Star::WorldServer::update
    [10] 7ff7b7444b66 Star::WorldServerThread::update
    [11] 7ff7b7444558 Star::WorldServerThread::run
    [12] 7ff7b6e73c5e Star::ThreadImpl::runThread
    [13] 7ffe644e3034 BaseThreadInitThunk
    [14] 7ffe669b1431 RtlUserThreadStart
    [07:07:22.614] [Error] UniverseServer: World CelestialWorld:132132430:-720922363:-297565379:4 has stopped due to an error
    [07:07:22.614] [Info] UniverseServer: World CelestialWorld:132132430:-720922363:-297565379:4 shutdown, kicking 1 players to their own ships
    [07:07:22.715] [Info] UniverseServer: Loading client ship world ClientShipWorld:91fd39fba804296d39f9d94a75d7b285
    [07:07:22.914] [Info] Protected dungeonIds for world set to (65524)
    [07:07:24.132] [Info] UniverseServer: Warping player 1 to ClientShipWorld:91fd39fba804296d39f9d94a75d7b285
    [07:07:24.146] [Info] Client received world stop packet, leaving: Removed
    [07:07:28.100] [Info] UniverseClient: Client disconnecting...
    [07:07:28.186] [Info] Client received world stop packet, leaving: Removed
    [07:07:28.460] [Info] UniverseServer: Client 'ThatForgottonGuy' <1> (local) disconnected for reason:
    [07:07:28.460] [Info] UniverseServer: Stopping idle world ClientShipWorld:91fd39fba804296d39f9d94a75d7b285
    [07:07:29.125] [Info] UniverseServer: Stopping UniverseServer
    [07:07:29.125] [Info] UniverseServer: Stopping TCP Server
    [07:07:29.506] [Info] Clearing steam rich presence connection
    [07:07:30.965] [Info] Application: quit requested
    [07:07:30.965] [Info] Application: quitting...
    [07:07:30.965] [Info] Application: shutdown...
    [07:07:31.136] [Info] Root: Shutting down Root
    [07:07:31.442] [Info] Application: Destroying SDL Window
    [07:07:31.484] [Info] Application: stopped gracefully
     
  4. iamyoyoman

    iamyoyoman Star Wrangler

    do you want it to spawn on a planet? if so i think you can do it like that:

    Code:
            {
            "op":"add",
            "path":"/-",
            "value":{
                    "name" : "your monster",
       
                    "spawnParameters" : {
                        "area" : "surface",
                        "region" : "exposed",
                        "time" : "all"
                    },
                    "spawnChance" : 0.02,
                    "monsterType" : "your monster",
                    "monsterParameters" : {
                        "aggressive" : false
                    }
                }
        }
    in uniques.spawntypes.patch
     
  5. ThatForgottonGuy

    ThatForgottonGuy Void-Bound Voyager

    That's not quite what I'm looking for... I'm trying to create a passive monster that can spawn monsters like the Mother Poptop, but that friendly NPCs don't attack...
     
    Last edited: Aug 13, 2018
  6. ThatForgottonGuy

    ThatForgottonGuy Void-Bound Voyager

    Actually, you may have given me the answer indirectly... Do you know how I could set:
    Code:
    "monsterParameters" : {
           "aggressive" : false
    }
    
    in a .monstertype file?

    That is theoretically the only thing I would need to change to make this work...
     
    Last edited: Aug 14, 2018
  7. ThatForgottonGuy

    ThatForgottonGuy Void-Bound Voyager

    SOLVED! Thanks to everyone who helped troubleshoot, especially iamyoyoman for pointing me in the right direction. For anyone who finds this thread in the future and wants to know what I did to make things work, I give you spawner.behavior:
    Code:
    {
      "name": "spawner",
      "description": "",
      "scripts": [
        "/scripts/behavior.lua",
        "/scripts/actions/entity.lua",
        "/scripts/actions/builders.lua",
        "/scripts/actions/notification.lua",
        "/scripts/actions/pets.lua",
        "/scripts/actions/world.lua",
        "/scripts/actions/status.lua",
        "/scripts/actions/monsters/farmable.lua",
        "/scripts/actions/movement.lua",
        "/scripts/actions/animator.lua",
        "/scripts/actions/math.lua",
        "/scripts/actions/time.lua"
      ],
      "parameters": {
        "damageOnTouch": false,
        "periodicActions": [],
        "hostileActions": [],
        "foundTargetActions": [],
        "approachActions": [],
        "wanderActions": [
            {
              "name" : "wander-fly",
              "parameters" : {
                "wanderTime" : [2,4],
                "groundDistance" : 5,
                "ceilingDistance" : 5,
                "xVelocity" : 15,
                "yVelocity" : 15
              }
            }
            ],
        "concurrentActions": [],
        "concurrentHostileActions": [],
        "fleeActions": [],
        "damageTakenActions": [],
        "spawnActions": [],
        "followDistance": 5,
        "followActions": [],
        "attackKnockbackThreshold": 15
      },
      "root": {
        "title": "sequence",
        "type": "composite",
        "name": "sequence",
        "parameters": {},
        "children": [
          {
            "title": "entityConfigParameter",
            "type": "action",
            "name": "entityConfigParameter",
            "parameters": {
              "default": {"value": false},
              "path": {"value": "aggressive"}
            },
            "output": {
              "bool": "aggressive"
            }
          },
          {
            "title": "setDamageOnTouch",
            "type": "action",
            "name": "setDamageOnTouch",
            "parameters": {
              "touchDamage": {"value": false}
            }
          },
          {
            "title": "succeeder",
            "type": "decorator",
            "name": "succeeder",
            "parameters": {},
            "child": {
              "title": "spawnActions",
              "type": "action",
              "name": "sequenceActions",
              "parameters": {
                "actions": {"key": "<spawnActions>"}
              }
            }
          },
          {
            "title": "setNumber",
            "type": "action",
            "name": "setNumber",
            "parameters": {
              "number": {"value": 0}
            },
            "output": {
              "number": "heading"
            }
          },
          {
            "title": "setAggressive",
            "type": "action",
            "name": "setAggressive",
            "parameters": {
              "aggressive": {"key": "aggressive"}
            }
          },
          {
            "title": "parallel",
            "type": "composite",
            "name": "parallel",
            "parameters": {
              "fail": {"value": -1},
              "success": {"value": -1}
            },
            "children": [
              {
                "title": "receivedNotification",
                "type": "action",
                "name": "receivedNotification",
                "parameters": {
                  "type": {"value": "setOwner"}
                },
                "output": {
                  "target": "ownerOverride"
                }
              },
              {
                "title": "selector",
                "type": "composite",
                "name": "selector",
                "parameters": {},
                "children": [
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "monster-targeting",
                        "type": "module",
                        "name": "monster-targeting",
                        "parameters": {
                          "queryTargets": {"key": "aggressive"}
                        }
                      },
                      {
                        "title": "setFlag",
                        "type": "action",
                        "name": "setFlag",
                        "parameters": {
                          "name": {"value": "hostile"}
                        }
                      }
                    ]
                  },
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "unsetFlag",
                        "type": "action",
                        "name": "unsetFlag",
                        "parameters": {
                          "name": {"value": "hostile"}
                        }
                      },
                      {
                        "title": "selector",
                        "type": "composite",
                        "name": "selector",
                        "parameters": {},
                        "children": [
                          {
                            "title": "tetherEntity",
                            "type": "action",
                            "name": "tetherEntity",
                            "parameters": {},
                            "output": {
                              "entity": "target"
                            }
                          },
                          {
                            "title": "ownerEntity",
                            "type": "action",
                            "name": "ownerEntity",
                            "parameters": {
                              "owner": {"key": "ownerOverride"}
                            },
                            "output": {
                              "entity": "target"
                            }
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "title": "parallel",
                "type": "composite",
                "name": "parallel",
                "parameters": {
                  "fail": {"value": 1},
                  "success": {"value": -1}
                },
                "children": [
                  {
                    "title": "inverter",
                    "type": "decorator",
                    "name": "inverter",
                    "parameters": {},
                    "child": {
                      "title": "entityExists",
                      "type": "action",
                      "name": "entityExists",
                      "parameters": {
                        "entity": {"key": "target"}
                      }
                    }
                  },
                  {
                    "title": "succeeder",
                    "type": "decorator",
                    "name": "succeeder",
                    "parameters": {},
                    "child": {
                      "title": "concurrentActions",
                      "type": "action",
                      "name": "parallelActions",
                      "parameters": {
                        "actions": {"key": "<concurrentActions>"}
                      }
                    }
                  },
                  {
                    "title": "runner",
                    "type": "action",
                    "name": "runner",
                    "parameters": {}
                  }
                ]
              },
              {
                "title": "sequence",
                "type": "composite",
                "name": "sequence",
                "parameters": {},
                "children": [
                  {
                    "title": "inverter",
                    "type": "decorator",
                    "name": "inverter",
                    "parameters": {},
                    "child": {
                      "title": "hasFlag",
                      "type": "action",
                      "name": "hasFlag",
                      "parameters": {
                        "name": {"key": "crawling"}
                      }
                    }
                  },
                  {
                    "title": "setNumber",
                    "type": "action",
                    "name": "setNumber",
                    "parameters": {
                      "number": {"value": 0}
                    },
                    "output": {
                      "number": "heading"
                    }
                  }
                ]
              },
              {
                "title": "sequence",
                "type": "composite",
                "name": "sequence",
                "parameters": {},
                "children": [
                  {
                    "title": "entityExists",
                    "type": "action",
                    "name": "entityExists",
                    "parameters": {
                      "entity": {"key": "target"}
                    }
                  },
                  {
                    "title": "hasFlag",
                    "type": "action",
                    "name": "hasFlag",
                    "parameters": {
                      "name": {"key": "hostile"}
                    }
                  },
                  {
                    "title": "setDamageOnTouch",
                    "type": "action",
                    "name": "setDamageOnTouch",
                    "parameters": {
                      "touchDamage": {"key": "<damageOnTouch>"}
                    }
                  },
                  {
                    "title": "setAggressive",
                    "type": "action",
                    "name": "setAggressive",
                    "parameters": {
                      "aggressive": {"value": false}
                    }
                  },
                  {
                    "title": "selector",
                    "type": "composite",
                    "name": "selector",
                    "parameters": {},
                    "children": [
                      {
                        "title": "parallel",
                        "type": "composite",
                        "name": "parallel",
                        "parameters": {
                          "fail": {"value": 1},
                          "success": {"value": -1}
                        },
                        "children": [
                          {
                            "title": "hasFlag",
                            "type": "action",
                            "name": "hasFlag",
                            "parameters": {
                              "name": {"key": "hostile"}
                            }
                          },
                          {
                            "title": "entityExists",
                            "type": "action",
                            "name": "entityExists",
                            "parameters": {
                              "entity": {"key": "target"}
                            }
                          },
                          {
                            "title": "succeeder",
                            "type": "decorator",
                            "name": "succeeder",
                            "parameters": {},
                            "child": {
                              "title": "concurrentHostileActions",
                              "type": "action",
                              "name": "parallelActions",
                              "parameters": {
                                "actions": {"key": "<concurrentHostileActions>"}
                              }
                            }
                          },
                          {
                            "title": "runner",
                            "type": "action",
                            "name": "runner",
                            "parameters": {}
                          }
                        ]
                      },
                      {
                        "title": "failer",
                        "type": "decorator",
                        "name": "failer",
                        "parameters": {},
                        "child": {
                          "title": "sequence",
                          "type": "composite",
                          "name": "sequence",
                          "parameters": {},
                          "children": [
                            {
                              "title": "setDamageOnTouch",
                              "type": "action",
                              "name": "setDamageOnTouch",
                              "parameters": {
                                "touchDamage": {"value": false}
                              }
                            },
                            {
                              "title": "setAggressive",
                              "type": "action",
                              "name": "setAggressive",
                              "parameters": {
                                "aggressive": {"key": "aggressive"}
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                ]
              },
              {
                "title": "sequence",
                "type": "composite",
                "name": "sequence",
                "parameters": {},
                "children": [
                  {
                    "title": "hasFlag",
                    "type": "action",
                    "name": "hasFlag",
                    "parameters": {
                      "name": {"key": "attacking"}
                    }
                  },
                  {
                    "title": "addStatModifier",
                    "type": "action",
                    "name": "addStatModifier",
                    "parameters": {
                      "amount": {"key": "<attackKnockbackThreshold>"},
                      "category": {"value": "monsterattack"},
                      "stat": {"value": "knockbackThreshold"}
                    }
                  },
                  {
                    "title": "parallel",
                    "type": "composite",
                    "name": "parallel",
                    "parameters": {
                      "fail": {"value": -1},
                      "success": {"value": 1}
                    },
                    "children": [
                      {
                        "title": "inverter",
                        "type": "decorator",
                        "name": "inverter",
                        "parameters": {},
                        "child": {
                          "title": "hasFlag",
                          "type": "action",
                          "name": "hasFlag",
                          "parameters": {
                            "name": {"key": "attacking"}
                          }
                        }
                      },
                      {
                        "title": "runner",
                        "type": "action",
                        "name": "runner",
                        "parameters": {}
                      }
                    ]
                  },
                  {
                    "title": "clearPersistentEffects",
                    "type": "action",
                    "name": "clearPersistentEffects",
                    "parameters": {
                      "category": {"value": "monsterattack"}
                    }
                  }
                ]
              },
              {
                "title": "dynamic",
                "type": "composite",
                "name": "dynamic",
                "parameters": {},
                "children": [
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "wasDamaged",
                        "type": "action",
                        "name": "wasDamaged",
                        "parameters": {}
                      },
                      {
                        "title": "damageTakenActions",
                        "type": "action",
                        "name": "selectorActions",
                        "parameters": {
                          "actions": {"key": "<damageTakenActions>"}
                        }
                      }
                    ]
                  },
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "hasFlag",
                        "type": "action",
                        "name": "hasFlag",
                        "parameters": {
                          "name": {"key": "hostile"}
                        }
                      },
                      {
                        "title": "hasFlag",
                        "type": "action",
                        "name": "hasFlag",
                        "parameters": {
                          "name": {"key": "foundTarget"}
                        }
                      },
                      {
                        "title": "unsetFlag",
                        "type": "action",
                        "name": "unsetFlag",
                        "parameters": {
                          "name": {"value": "foundTarget"}
                        }
                      },
                      {
                        "title": "entityExists",
                        "type": "action",
                        "name": "entityExists",
                        "parameters": {
                          "entity": {"key": "target"}
                        }
                      },
                      {
                        "title": "foundTargetActions",
                        "type": "action",
                        "name": "selectorActions",
                        "parameters": {
                          "actions": {"key": "<foundTargetActions>"}
                        }
                      }
                    ]
                  },
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "hasFlag",
                        "type": "action",
                        "name": "hasFlag",
                        "parameters": {
                          "name": {"key": "hostile"}
                        }
                      },
                      {
                        "title": "entityExists",
                        "type": "action",
                        "name": "entityExists",
                        "parameters": {
                          "entity": {"key": "target"}
                        }
                      },
                      {
                        "title": "flee",
                        "type": "action",
                        "name": "selectorActions",
                        "parameters": {
                          "actions": {"key": "<fleeActions>"}
                        }
                      }
                    ]
                  },
                  {
                    "title": "parallel",
                    "type": "composite",
                    "name": "parallel",
                    "parameters": {
                      "fail": {"value": 1},
                      "success": {"value": -1}
                    },
                    "children": [
                      {
                        "title": "entityExists",
                        "type": "action",
                        "name": "entityExists",
                        "parameters": {
                          "entity": {"key": "target"}
                        }
                      },
                      {
                        "title": "hasFlag",
                        "type": "action",
                        "name": "hasFlag",
                        "parameters": {
                          "name": {"key": "hostile"}
                        }
                      },
                      {
                        "title": "inverter",
                        "type": "decorator",
                        "name": "inverter",
                        "parameters": {},
                        "child": {
                          "title": "repeater",
                          "type": "decorator",
                          "name": "repeater",
                          "parameters": {
                            "maxLoops": {"value": -1},
                            "untilSuccess": {"value": true}
                          },
                          "child": {
                            "title": "inverter",
                            "type": "decorator",
                            "name": "inverter",
                            "parameters": {},
                            "child": {
                              "title": "hostileActions",
                              "type": "action",
                              "name": "selectorActions",
                              "parameters": {
                                "actions": {"key": "<hostileActions>"}
                              }
                            }
                          }
                        }
                      }
                    ]
                  },
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "inverter",
                        "type": "decorator",
                        "name": "inverter",
                        "parameters": {},
                        "child": {
                          "title": "hasFlag",
                          "type": "action",
                          "name": "hasFlag",
                          "parameters": {
                            "name": {"key": "hostile"}
                          }
                        }
                      },
                      {
                        "title": "periodicActions",
                        "type": "action",
                        "name": "selectorActions",
                        "parameters": {
                          "actions": {"key": "<periodicActions>"}
                        }
                      }
                    ]
                  },
                  {
                    "title": "parallel",
                    "type": "composite",
                    "name": "parallel",
                    "parameters": {
                      "fail": {"value": 1},
                      "success": {"value": -1}
                    },
                    "children": [
                      {
                        "title": "entityExists",
                        "type": "action",
                        "name": "entityExists",
                        "parameters": {
                          "entity": {"key": "target"}
                        }
                      },
                      {
                        "title": "hasFlag",
                        "type": "action",
                        "name": "hasFlag",
                        "parameters": {
                          "name": {"key": "hostile"}
                        }
                      },
                      {
                        "title": "succeeder",
                        "type": "decorator",
                        "name": "succeeder",
                        "parameters": {},
                        "child": {
                          "title": "approach",
                          "type": "action",
                          "name": "selectorActions",
                          "parameters": {
                            "actions": {"key": "<approachActions>"}
                          }
                        }
                      }
                    ]
                  },
                  {
                    "title": "cooldown",
                    "type": "decorator",
                    "name": "cooldown",
                    "parameters": {
                      "cooldown": {"value": 3},
                      "onFail": {"value": true},
                      "onSuccess": {"value": true}
                    },
                    "child": {
                      "title": "parallel",
                      "type": "composite",
                      "name": "parallel",
                      "parameters": {
                        "fail": {"value": 1},
                        "success": {"value": -1}
                      },
                      "children": [
                        {
                          "title": "inverter",
                          "type": "decorator",
                          "name": "inverter",
                          "parameters": {},
                          "child": {
                            "title": "hasFlag",
                            "type": "action",
                            "name": "hasFlag",
                            "parameters": {
                              "name": {"key": "hostile"}
                            }
                          }
                        },
                        {
                          "title": "entityExists",
                          "type": "action",
                          "name": "entityExists",
                          "parameters": {
                            "entity": {"key": "target"}
                          }
                        },
                        {
                          "title": "inverter",
                          "type": "decorator",
                          "name": "inverter",
                          "parameters": {},
                          "child": {
                            "title": "entityInRange",
                            "type": "action",
                            "name": "entityInRange",
                            "parameters": {
                              "entity": {"key": "target"},
                              "position": {"key": "self"},
                              "range": {"key": "<followDistance>"},
                              "xRange": {"key": ""},
                              "yRange": {"key": ""}
                            }
                          }
                        },
                        {
                          "title": "succeeder",
                          "type": "decorator",
                          "name": "succeeder",
                          "parameters": {},
                          "child": {
                            "title": "follow",
                            "type": "action",
                            "name": "selectorActions",
                            "parameters": {
                              "actions": {"key": "<followActions>"}
                            }
                          }
                        }
                      ]
                    }
                  },
                  {
                    "title": "sequence",
                    "type": "composite",
                    "name": "sequence",
                    "parameters": {},
                    "children": [
                      {
                        "title": "inverter",
                        "type": "decorator",
                        "name": "inverter",
                        "parameters": {},
                        "child": {
                          "title": "hasFlag",
                          "type": "action",
                          "name": "hasFlag",
                          "parameters": {
                            "name": {"key": "hostile"}
                          }
                        }
                      },
                      {
                        "title": "wander",
                        "type": "action",
                        "name": "selectorActions",
                        "parameters": {
                          "actions": {"key": "<wanderActions>"},
                          "dynamic": {"value": true}
                        }
                      }
                    ]
                  },
                  {
                    "title": "runner",
                    "type": "action",
                    "name": "runner",
                    "parameters": {}
                  }
                ]
              }
            ]
          }
        ]
      }
    }
    Thanks again to everyone who helped troubleshoot this, and suggest possible solutions which eventually led to success!
     
    Last edited: Aug 14, 2018
    iamyoyoman likes this.

Share This Page