Modding Help "globalTagDefaults" : [array] Is it possible?

Discussion in 'Starbound Modding' started by zekrom_vale, Jan 31, 2018.

  1. zekrom_vale

    zekrom_vale Tentacle Wrangler

    Is it possible to use globalTagDefaults outside of a string and use them with arrays (and objects?) instead? I have tried
    Code:
    "rearThrusterOffset" : [-4.75, 0.9]
    Code:
    "bottomThrusterOffset" : "[0.1, -2.0]"
    Even putting quotations around the arrow brackets
    Code:
    "offset" : "<lightOffset>"
    And still can't get it to work. Plus, I don't see an example in the unpackedAssets for an example. Thanks for the response!

    Code:
    [16:32:03.453] [Error] Exception while invoking lua function 'activate'. (LuaException) Error code 2, [string "/items/active/vehiclecontroller/vehiclecontro..."]:40: (JsonException) Cannot convert from int to string
    [0] 7ff66bf17153 Star::captureStack
    [1] 7ff66bf15ede Star::StarException::StarException
    [2] 7ff66bebc8c6 Star::Json::toString
    [3] 7ff66c162b39 Star::NetworkedAnimator::NetworkedAnimator
    [4] 7ff66c411779 Star::Vehicle::Vehicle
    [5] 7ff66c41f24a std::_Ref_count_obj<Star::Vehicle>::_Ref_count_obj<Star::Vehicle><Star::Json const & __ptr64,Star::String const & __ptr64,Star::Json const & __ptr64>
    [6] 7ff66c41f53b std::make_shared<Star::Vehicle,Star::Json const & __ptr64,Star::String const & __ptr64,Star::Json const & __ptr64>
    [7] 7ff66c420109 Star::VehicleDatabase::create
    [8] 7ff66c62ee21 Star::LuaBindings::WorldCallbacks::spawnVehicle
    [9] 7ff66c5deda9 std::_Invoker_functor::_Call<Star::Maybe<int> (__cdecl*const & __ptr64)(Star::World * __ptr64,Star::String const & __ptr64,Star::Vector<float,2> const & __ptr64,Star::Json const & __ptr64),Star::World * __ptr64 const & __ptr64,Star::String,Star::Vector<float,2>,Star::Json>
    [10] 7ff66c5f28ba std::invoke<Star::Maybe<int> (__cdecl*const & __ptr64)(Star::World * __ptr64,Star::String const & __ptr64,Star::Vector<float,2> const & __ptr64,Star::Json const & __ptr64),Star::World * __ptr64 const & __ptr64,Star::String,Star::Vector<float,2>,Star::Json>
    [11] 7ff66c5e385b std::_Invoke_ret<Star::Maybe<int> (__cdecl*const & __ptr64)(Star::World * __ptr64,Star::String const & __ptr64,Star::Vector<float,2> const & __ptr64,Star::Json const & __ptr64),Star::World * __ptr64 const & __ptr64,Star::String,Star::Vector<float,2>,Star::Json>
    [12] 7ff66c5e0eaa std::_Call_binder<std::_Unforced,0,1,2,3,Star::Maybe<int> (__cdecl*const)(Star::World * __ptr64,Star::String const & __ptr64,Star::Vector<float,2> const & __ptr64,Star::Json const & __ptr64),std::tuple<Star::World * __ptr64,std::_Ph<1>,std::_Ph<2>,std::_Ph<3> > const ,std::tuple<Star::String && __ptr64,Star::Vector<float,2> && __ptr64,Star::Json && __ptr64> >
    [13] 7ff66c5dbb3f std::_Binder<std::_Unforced,Star::Maybe<int> (__cdecl&)(Star::World * __ptr64,Star::String const & __ptr64,Star::Vector<float,2> const & __ptr64,Star::Json const & __ptr64),Star::World * __ptr64 & __ptr64,std::_Ph<1> const & __ptr64,std::_Ph<2> const & __ptr64,std::_Ph<3> const & __ptr64>::operator()<Star::String,Star::Vector<float,2>,Star::Json>
    [14] 7ff66c609355 <lambda_0be554de68dcad343c569c43b1c9b670>::operator()
    [15] 7ff66c5dc21f std::_Invoker_functor::_Call<<lambda_0be554de68dcad343c569c43b1c9b670> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [16] 7ff66c5f11f0 std::invoke<<lambda_0be554de68dcad343c569c43b1c9b670> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [17] 7ff66c5e45d9 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_0be554de68dcad343c569c43b1c9b670> & __ptr64,Star::LuaEngine & __ptr64,unsigned __int64,Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> * __ptr64>
    [18] 7ff66c6179fb std::_Func_impl<<lambda_0be554de68dcad343c569c43b1c9b670>,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
    [19] 7ff66bee481d 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()
    [20] 7ff66bee37af <lambda_a03bcae4599b53751a446949639a4d5e>::operator()
    [21] 7ff66be6b938 luaD_precall
    [22] 7ff66be846e1 luaV_execute
    [23] 7ff66be6b443 luaD_call
    [24] 7ff66be6bc1b luaD_rawrunprotected
    [25] 7ff66be6b650 luaD_pcall
    [26] 7ff66be61b64 lua_pcallk
    [27] 7ff66beeb930 Star::LuaEngine::pcallWithTraceback
    [28] 7ff66c518feb Star::LuaEngine::callFunction<Star::String,bool,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > >
    [29] 7ff66c51a25a Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::String,bool,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > >
    [30] 7ff66c519ddb Star::LuaBaseComponent::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::String const & __ptr64,bool & __ptr64,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > & __ptr64>
    [31] 7ff66c52ab46 Star::ActiveItem::update
    [32] 7ff66c3bc780 Star::ToolUser::tick
    [33] 7ff66c223221 Star::Player::update
    [34] 7ff66c44a178 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [35] 7ff66c06a5d7 Star::EntityMap::updateAllEntities
    [36] 7ff66c462659 Star::WorldClient::update
    [37] 7ff66c3cb753 Star::UniverseClient::update
    [38] 7ff66be5e557 Star::ClientApplication::updateRunning
    [39] 7ff66be5ce4f Star::ClientApplication::update
    [40] 7ff66c65aa72 Star::SdlPlatform::run
    [41] 7ff66c65ac2d Star::runMainApplication
    [42] 7ff66be5ff76 WinMain
    [43] 7ff66c848daf __scrt_common_main_seh
    [44] 7ffe9d2f2774 BaseThreadInitThunk
    [45] 7ffe9f6a0d51 RtlUserThreadStart
    stack traceback:
        [C]: in ?
        [C]: in field 'spawnVehicle'
        [string "/items/active/vehiclecontroller/vehiclecontro..."]:40: in function <[string "/items/active/vehiclecontroller/vehiclecontro..."]:27>
    [0] 7ff66bf17153 Star::captureStack
    [1] 7ff66bf15ede Star::StarException::StarException
    [2] 7ff66beea4c1 Star::LuaEngine::handleError
    [3] 7ff66c519004 Star::LuaEngine::callFunction<Star::String,bool,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > >
    [4] 7ff66c51a25a Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::String,bool,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > >
    [5] 7ff66c519ddb Star::LuaBaseComponent::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData>,Star::String const & __ptr64,bool & __ptr64,Star::MapMixin<Star::FlatHashMap<Star::String,bool,Star::hash<Star::String,void>,std::equal_to<Star::String>,std::allocator<std::pair<Star::String const ,bool> > > > & __ptr64>
    [6] 7ff66c52ab46 Star::ActiveItem::update
    [7] 7ff66c3bc780 Star::ToolUser::tick
    [8] 7ff66c223221 Star::Player::update
    [9] 7ff66c44a178 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [10] 7ff66c06a5d7 Star::EntityMap::updateAllEntities
    [11] 7ff66c462659 Star::WorldClient::update
    [12] 7ff66c3cb753 Star::UniverseClient::update
    [13] 7ff66be5e557 Star::ClientApplication::updateRunning
    [14] 7ff66be5ce4f Star::ClientApplication::update
    [15] 7ff66c65aa72 Star::SdlPlatform::run
    [16] 7ff66c65ac2d Star::runMainApplication
    [17] 7ff66be5ff76 WinMain
    [18] 7ff66c848daf __scrt_common_main_seh
    [19] 7ffe9d2f2774 BaseThreadInitThunk
    [20] 7ffe9f6a0d51 RtlUserThreadStart
    Code:
    {
      "globalTagDefaults" : {
        "id" : "hoverbike",
        "frontid" : "",
        "backid" : "",
        "color" : "",
    
        "lightOffset" : [3.1875, -0.0625 ],
    
        "rearThrusterOffset" : [-4.75, 0.9],
        "bottomThrusterOffset" : [0.1, -2.0],
    
        "headlightBeamPosition" : [4.5, 0.0],
        "headlightBeamColor" : [250, 250, 200],
    
        "lightsPosition" : [2.0, 0.5],
        "lightsColor" : [120, 80, 0]
      },
      "animatedParts" : {
        "stateTypes" : {
          "movement" : {
            "default" : "idle",
            "states" : {
              "warpInPart1" : {
                "frames" : 4, 
                "cycle" : 0.33,
                "mode" : "transition",
                "transition" : "warpInPart2"
                },
              "warpInPart2" : {
                "frames" : 4, 
                "cycle" : 0.33,
                "mode" : "transition",
                "transition" : "idle"
                },
              "idle" : {},
              "warpOutPart1" : {
                "frames" : 4, 
                "cycle" : 0.33,
                "mode" : "transition",
                "transition" : "warpOutPart2"
                },
              "warpOutPart2" : {
                "frames" : 4, 
                "cycle" : 0.33,
                "mode" : "transition",
                "transition" : "invisible"
                },
              "invisible" : {}
            }
          },
          "onfire" : {
            "default" : "off",
            "states" : {
              "off" : {},
              "on" : {
                "frames" : 6,
                "cycle" : 0.5,
                "mode" : "loop"
              }
            }
          },
          "rearThruster" : {
            "default" : "off",
            "states" : {
              "off" : {},
              "on" : {
                "frames" : 1,
                "cycle" : 0.125,
                "mode" : "loop"
              }
            }
          },
          "bottomThruster" : {
            "default" : "off",
            "states" : {
              "off" : {},
              "on" : {
                "frames" : 1,
                "cycle" : 0.125,
                "mode" : "loop"
              }
            }
          },
           "headlights" : {
            "default" : "off",
            "states" : {
              "off" : {},
              "on" : {}
            }
          }
        },
        "parts" : {
          "background" : {
            "properties" : {
              "centered" : true,
              "zLevel" : -1,
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "movement" : {
                "warpInPart1" : {
                  "properties" : {}
                },
                "warpInPart2" : {
                  "properties" : {
                    "image" : "<id>background<color><backid>.png:move.<damageState>"
                  }
                },
                "idle" : {
                  "properties" : {
                    "image" : "<id>background<color><backid>.png:move.<damageState>"
                  }
                },
                "warpOutPart1" : {
                  "properties" : {
                    "image" : "<id>background<color><backid>.png:move.<damageState>"
                  }
                },
                "warpOutPart2" : {
                  "properties" : {}
                },
                "invisible" : {
                  "properties" : {}
                }
              }
            }
          },
          "foreground" : {
            "properties" : {
              "centered" : true,
              "zLevel" : 1,
              "transformationGroups" : ["flip", "rotation"],
              "drivingSeatPosition" : [0, 1.5],
              "passengerSeatPosition" : [-2, 1.5]
            },
            "partStates" : {
              "movement" : {
                "warpInPart1" : {
                  "properties" : {
                    "image" : ""
                  }
                },
                "warpInPart2" : {
                  "properties" : {
                    "image" : "<id>foreground<color><frontid>.png:move.<damageState>"
                  }
                },
                "idle" : {
                  "properties" : {
                    "image" : "<id>foreground<color><frontid>.png:move.<damageState>"
                  }
                },
                "warpOutPart1" : {
                  "properties" : {
                    "image" : "<id>foreground<color><frontid>.png:move.<damageState>"
                  }
                },
                "warpOutPart2" : {
                  "properties" : {}
                },
                "invisible" : {
                  "properties" : {}
                }
              }
            }
          },
          "warp" : {
            "properties" : {
              "centered" : true,
              "zLevel" : 3,
              "fullbright" : true,
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "movement" : {
                "warpInPart1" : {
                  "properties" : {
                    "image" : "hoverbikewarp.png:warpInPart1.<frame>"
                  }
                },
                "warpInPart2" : {
                  "properties" : {
                    "image" : "hoverbikewarp.png:warpInPart2.<frame>"
                  }
                },
                "idle" : {
                  "properties" : {}
                },
                "warpOutPart1" : {
                  "properties" : {
                    "image" : "hoverbikewarp.png:warpOutPart1.<frame>"
                  }
                },
                "warpOutPart2" : {
                  "properties" : {
                    "image" : "hoverbikewarp.png:warpOutPart2.<frame>"
                  }
                },
                "invisible" : {
                  "properties" : {}
                }
              }
            }
          },
           "lights" : {
            "properties" : {
              "centered" : true,
              "zLevel" : 2,
              "fullbright" : true,
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "headlights" : {
                "off" : {
                  "properties" : {
                  }
                },
                "on" : {
                  "properties" : {
                    "image" : "hoverbikeheadlights.png:headlights.<damageState>",
                    "offset" : <lightOffset>
                  }
                }
              }
            }
          },
          "fire" : {
            "properties" : {
              "centered" : true,
              "zLevel" : 2,
              "fullbright" : true,
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "onfire" : {
                "on" : {
                  "properties" : {
                    "image" : "hoverbikefire.png:burn.<frame>"
                  }
                }
              }
            }
          },
          "rearThrust" : {
            "properties" : {
              "centered" : true,
              "zLevel" : -1,
              "fullbright" : true,
              "light" : [87, 148, 150],
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "rearThruster" : {
                "on" : {
                  "properties" : {
                    "image" : "/animations/hoverbikethruster/backthruster.png:thrust.<rearThrusterFrame>",
                    "offset" : <rearThrusterOffset>
                  }
                }
              }
            }
          },
          "bottomThrust" : {
            "properties" : {
              "centered" : true,
              "zLevel" : -1,
              "fullbright" : true,
              "light" : [87, 148, 150],
              "transformationGroups" : ["flip", "rotation"]
            },
            "partStates" : {
              "bottomThruster" : {
                "on" : {
                  "properties" : {
                    "image" : "/animations/hoverbikethruster/bottomthruster.png:thrust.<bottomThrusterFrame>",
                    "offset" : <bottomThrusterOffset>
                  }
                }
              }
            }
          }
        }
      },
      "transformationGroups" : {
        "rotation" : {
          "interpolated" : true
        },
        "flip" : {}
      },
      "particleEmitters" : {
        "rearThrusterIdle" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 5.0,
          "offsetRegion" : [ -5, 0.5, -5, 1.5],
          "particles" : [{ "particle" : "hoverbikethrust"}]
        },
        "rearThrusterDrive" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 15.0,
          "offsetRegion" : [-3.5, 0.5, -3.5, -0.5],
          "particles" : [{ "particle" : "hoverbikethrust"}]
        },
        "ventralThrusterIdle" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 5.0,
          "offsetRegion" : [-0.5, -1.5, 0.5, -1.55],
          "particles" : [{ "particle" : "hoverbikedownthrust"}]
        },
        "ventralThrusterJump" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 15.0,
          "burstCount"  : 2,
          "offsetRegion" : [-0.5, -1.5, 0.5, -1.55],
          "particles" : [{ "particle" : "hoverbikedownthrust"}]
        },
        "smoke" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 0.0,
          "offsetRegion" : [-1.5, -1.5, 0.5, -1],
          "particles" : [{ "particle" : "burningvehiclesmokefront"}]
        },
        "fire" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 0.0,
          "offsetRegion" : [2, 0, 3, 0.75],
          "particles" : [ { "particle" : "burningdust"},
            { "particle" : "campfireflames"},
            { "particle" : "fireshard"},
            { "particle" : "burningvehiclesmokeback"}
          ]
        },
        "damageIntermittent" : {
          "transformationGroups" : ["flip", "rotation"],
          "emissionRate" : 0.0,
          "burstCount"  : 5,
          "offsetRegion" : [-3.25, -1.5, -3, -1.25],
          "particles" : [{ "particle" : "burningvehiclesmokefront"},
            { "particle" : "fireshard"}]
        }
      },
    "lights" : {
       "dashboardGlow" : {
          "active" : false,
          "transformationGroups" : ["flip", "rotation"],
          "position" : <lightsPosition>,
          "color" : <lightsColor>,
          "pointLight" : true,
          "pointAngle" : 140,
          "pointBeam" : 5
        },
        "headlightBeam" : {
          "active" : false,
          "transformationGroups" : ["flip", "rotation"],
          "position" : <headlightBeamPosition>,
          "color" : <headlightBeamColor>,
          "pointLight" : true,
          "pointAngle" : -5,
          "pointBeam" : 5
        }
      },
      "sounds" : {
        "collisionNotification" : [ "/sfx/tech/hoverbike_bump1.ogg",
          "/sfx/tech/hoverbike_bump2.ogg",
          "/sfx/tech/hoverbike_bump3.ogg"  ],
        "collisionDamage" : ["/sfx/melee/bite_robotic1.ogg"],
       "changeDamageState" : [  "/sfx/gun/grenadeblast_small_fire1.ogg",
          "/sfx/gun/grenadeblast_small_fire2.ogg",
          "/sfx/gun/grenadeblast_small_fire3.ogg" ],
       "explode" : [  "/sfx/gun/grenadeblast_small_fire1.ogg",
          "/sfx/gun/grenadeblast_small_fire2.ogg",
          "/sfx/gun/grenadeblast_small_fire3.ogg" ],
        "engineStart" : ["/sfx/tools/teleport_up.ogg"],
        "engineLoop" : ["/sfx/tech/hoverbike_drive_loop.ogg"],
        "engineStartDamaged" : ["/sfx/tools/teleport_up.ogg"],
        "engineLoopDamaged" : ["/sfx/tech/hoverbike_idle_loop.ogg"],
        "damageIntermittent" : [ "/sfx/gun/grenadeblast_small_fire1.ogg",
          "/sfx/gun/grenadeblast_small_fire2.ogg",
          "/sfx/gun/grenadeblast_small_fire3.ogg" ],
        "hornLoop" : ["/sfx/tech/honk.ogg"],
        "headlightSwitchOn" : ["/sfx/objects/floodlights_on.ogg"],
        "headlightSwitchOff" : ["/sfx/objects/floodlights_off.ogg"],
        "returnvehicle" : ["/sfx/tech/vehicle_disappear1.ogg"]
      }
    }
    P.S. Upload does not like .vehicle or .animation :wut:
     
  2. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    can you give use just the line or lines you changed? idk the original file, so idk what to look for for changes
    what you're putting in is effectively a string. since it is looking for a 2 variable float or integer ([x.x,y.y]), it doesn't know what to do despite that string being defined
     

Share This Page