Modding Help Custom Tech Help [SOLVED]

Discussion in 'Starbound Modding' started by Omeruin, Sep 29, 2019.

  1. Omeruin

    Omeruin Void-Bound Voyager

    Heya, I'm back to modding Starbound again, with my custom Race mod.
    I wanted to add a custom Tech for my race (although no idea how to make it exclusive to JUST one race, but oh well), but I can't seem to get the quest to work. The tech itself works great, but has to be enabled via admin commands. The tech guy in the Outpost just doesn't want to give the quest no matter what. I tried looking through the game's files and even other mods, and I have no idea what's wrong! The Tech is supposed to allow "flying" via jumping forever. Here are the various files (I think all of them, right?) needed to make a tech quest appear:

    -The angelflight.tech file-
    Code:
    {
        "name" : "angelflight",
        "type" : "legs",
    
        "scripts" : ["angelflight.lua"],
        "animator" : "angelflight.animation",
    
        "description" : "You can now fly; the skies are yours once again!",
        "shortDescription" : "Angelic Flight",
        "rarity" : "Legendary",
        "icon" : "/tech/angelflight/angelflight.png",
    
        "chipCost" : 0,
       
      "multiJumpCount" : 999
    }
    -The angelflight.questtemplate file-
    Code:
    {
      "id" : "angelflighttech",
      "prerequisites" : [],
      "title" : "^orange;Learn to Fly!",
      "text" : "Hey, you want to fly, right? I can ^orange;help^white;! I'll teach you if you ^green;bring me ^orange;10 Copper Bars^white;! Deal?",
      "completionText" : "Oh thank goodness, you got the Ore! Now, let me teach you how to fly..",
      "moneyRange" : [100, 100],
      "rewards" : [
        [ [ "manipulatormodule", 1 ] ]
      ],
    
    "updateDelta" : 10,
      "script" : "/quests/scripts/main.lua",
      "scriptConfig" : {
        "portraits" : {
          "questStarted" : {
            "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
            "title" : "Elliott"
          },
          "questComplete" : {
            "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
            "title" : "Elliott"
          }
        },
        "requireTurnIn" : true,
    
        "turnInDescription" : "Deliver the Copper Bars to ^orange;Elliott^reset; at the ^orange;Outpost^reset;",
        "conditions" : [
          {
            "type": "gatherItem",
            "itemName": "copperbar",
            "count": 10,
            "consume": true
          }
        ],
       
        "showTech": [
          "angelflight"
        ],
        "equipTech" : [
          "angelflight"
        ]
      }
    }
    
    -The angelflight.lua file-
    Code:
    function init()
      self.multiJumpCount = config.getParameter("multiJumpCount")
      self.multiJumpModifier = config.getParameter("multiJumpModifier")
    
      refreshJumps()
    end
    
    function update(args)
      local jumpActivated = args.moves["jump"] and not self.lastJump
      self.lastJump = args.moves["jump"]
    
      updateJumpModifier()
    
      if jumpActivated and canMultiJump() then
        doMultiJump()
      else
        if mcontroller.groundMovement() or mcontroller.liquidMovement() then
          refreshJumps()
        end
      end
    end
    
    -- after the original ground jump has finished, start applying the new jump modifier
    function updateJumpModifier()
      if self.multiJumpModifier then
        if not self.applyJumpModifier
            and not mcontroller.jumping()
            and not mcontroller.groundMovement() then
    
          self.applyJumpModifier = true
        end
    
        if self.applyJumpModifier then mcontroller.controlModifiers({airJumpModifier = self.multiJumpModifier}) end
      end
    end
    
    function canMultiJump()
      return self.multiJumps > 0
          and not mcontroller.jumping()
          and not mcontroller.canJump()
          and not mcontroller.liquidMovement()
          and not status.statPositive("activeMovementAbilities")
          and math.abs(world.gravity(mcontroller.position())) > 0
    end
    
    function doMultiJump()
      mcontroller.controlJump(true)
      mcontroller.setYVelocity(math.max(0, mcontroller.yVelocity()))
      self.multiJumps = self.multiJumps - 1
      animator.burstParticleEmitter("multiJumpParticles")
      animator.playSound("multiJumpSound")
    end
    
    function refreshJumps()
      self.multiJumps = self.multiJumpCount
      self.applyJumpModifier = false
    end
    -And even the angelflight.animation file-
    Code:
    {
      "particleEmitters" : {
        "multiJumpParticles" : {
          "burstCount" : 8,
          "particles" : [
            {
              "particle" : "doublejump",
              "offset" : [0.2, -3]
            }
          ]
        }
      },
    
      "sounds" : {
        "multiJumpSound" : ["/sfx/tech/tech_doublejump.ogg"]
      }
    }
    Here's the starbound.log as well, which shows nothing wrong (with the tech):
    Code:
    [21:14:01.387] [Info] Root: Preparing Root...
    [21:14:01.387] [Info] Root: Done preparing Root.
    [21:14:01.387] [Info] Client Version 1.4.1 (windows x86_64) Source ID: 3c51d7607bf30e362eb59e1bace0ef0043f9a868 Protocol: 746
    [21:14:01.387] [Info] Root: Scanning for asset sources in directory '..\assets\'
    [21:14:07.582] [Warn] Root: Overriding duplicate asset source '..\assets\packed' named 'base' with higher or equal priority source '..\assets\packed.pak
    [21:14:07.623] [Info] Root: Scanning for asset sources in directory '..\mods\'
    [21:14:07.874] [Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
    [21:14:07.874] [Info] Root: Detected asset source named 'base' at '..\assets\packed.pak'
    [21:14:07.874] [Info] Root: Detected asset source named 'xbawks' at '..\mods\xbawks'
    [21:14:07.874] [Info] Root: Detected asset source named 'Dragon Pet Pack' at '..\mods\Dragon Pet Pack'
    [21:14:07.874] [Info] Root: Detected asset source named 'Smol Weapon Pack' at '..\mods\Smol Weapon Pack'
    [21:14:07.874] [Info] Root: Detected asset source named 'Skittles Advanced Race Template' at '..\mods\Snale Race'
    [21:14:07.875] [Info] Root: Detected asset source named 'The Angels of Starbound' at '..\mods\The Angels of Starbound'
    [21:14:07.875] [Info] Root: Detected unnamed asset source at '..\assets\user'
    [21:14:07.875] [Info] Loading assets from: '..\assets\packed.pak'
    [21:14:08.321] [Info] Loading assets from: '..\mods\xbawks'
    [21:14:08.322] [Info] Loading assets from: '..\mods\Dragon Pet Pack'
    [21:14:08.327] [Info] Loading assets from: '..\mods\Smol Weapon Pack'
    [21:14:08.331] [Info] Loading assets from: '..\mods\Snale Race'
    [21:14:08.356] [Info] Loading assets from: '..\mods\The Angels of Starbound'
    [21:14:08.409] [Info] Loading assets from: '..\assets\user'
    [21:14:09.430] [Info] Assets digest is a88ee3edd1b18c799f7ef7b04d0fe4822370a8c35350ef316764272a41d37b5a
    [21:14:09.430] [Info] Root: Loaded Assets in 8.04255 seconds
    [21:14:09.447] [Info] Application: Initializing SDL Video
    [21:14:09.454] [Info] Application: Initializing SDL Joystick
    [21:14:09.510] [Info] Application: Initializing SDL Sound
    [21:14:09.678] [Info] Failed to initialize Steam platform services
    [21:14:09.680] [Error] Failed to instantiate discord core (err 4)
    [21:14:09.680] [Info] Was not able to authenticate with Discord and create all components, Discord services will be unavailable
    [21:14:09.680] [Info] Application: Creating SDL Window
    [21:14:09.900] [Info] Application: Enabling VSync with late swap tearing
    [21:14:09.915] [Info] Application: Opened default audio device with 44.1khz / 16 bit stereo audio, 2048 sample size buffer
    [21:14:09.929] [Info] OpenGL version: '4.6.0 NVIDIA 391.35' vendor: 'NVIDIA Corporation' renderer: 'GeForce GTX 960/PCIe/SSE2' shader: '4.60 NVIDIA'
    [21:14:09.935] [Info] Application: initialization...
    [21:14:09.950] [Info] Root: Loaded Configuration in 0.0156204 seconds
    [21:14:10.222] [Info] Application: renderer initialization...
    [21:14:10.349] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 128
    [21:14:10.362] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 64
    [21:14:10.362] [Info] Root: Loaded ImageMetadataDatabase in 3.9208e-06 seconds
    [21:14:10.461] [Info] Application: main update loop...
    [21:14:10.544] [Info] Root: Loaded NameGenerator in 0.0809321 seconds
    [21:14:11.061] [Info] Root: Loaded PlantDatabase in 0.516936 seconds
    [21:14:11.748] [Info] Root: Loaded ProjectileDatabase in 0.686972 seconds
    [21:14:12.136] [Info] Root: Loaded ObjectDatabase in 1.67292 seconds
    [21:14:12.555] [Info] Root: Loaded NpcDatabase in 0.419337 seconds
    [21:14:12.568] [Info] Root: Loaded StagehandDatabase in 0.0125804 seconds
    [21:14:12.569] [Info] Root: Loaded MonsterDatabase in 0.821676 seconds
    [21:14:12.589] [Info] Root: Loaded VehicleDatabase in 0.0214012 seconds
    [21:14:12.590] [Info] Root: Loaded PlayerFactory in 0.0208915 seconds
    [21:14:12.591] [Info] Root: Loaded VersioningDatabase in 0.000995392 seconds
    [21:14:12.591] [Info] Root: Loaded EntityFactory in 0.00223828 seconds
    [21:14:12.794] [Info] Root: Loaded ParticleDatabase in 0.203049 seconds
    [21:14:13.803] [Info] Root: Loaded MaterialDatabase in 1.21152 seconds
    [21:14:13.831] [Info] Root: Loaded TerrainDatabase in 0.0278842 seconds
    [21:14:14.138] [Info] Root: Loaded BiomeDatabase in 0.307352 seconds
    [21:14:14.153] [Info] Root: Loaded LiquidsDatabase in 0.0145947 seconds
    [21:14:14.263] [Info] Root: Loaded StatusEffectDatabase in 0.110158 seconds
    [21:14:14.499] [Info] Root: Writing runtime configuration to '..\storage\starbound.config'
    [21:14:14.997] [Info] Root: Loaded DamageDatabase in 0.733538 seconds
    [21:14:15.097] [Info] Root: Loaded EffectSourceDatabase in 0.100628 seconds
    [21:14:15.131] [Info] Root: Loaded FunctionDatabase in 0.0333356 seconds
    [21:14:15.221] [Info] Root: Loaded TreasureDatabase in 0.0898666 seconds
    [21:14:17.165] [Info] Root: Loaded DungeonDefinitions in 1.94366 seconds
    [21:14:17.166] [Info] Root: Loaded TilesetDatabase in 7.84159e-05 seconds
    [21:14:17.175] [Info] Root: Loaded StatisticsDatabase in 0.00964662 seconds
    [21:14:17.175] [Info] Root: Loaded EmoteProcessor in 8.33169e-05 seconds
    [21:14:17.253] [Info] Root: Loaded SpeciesDatabase in 0.0780218 seconds
    [21:14:17.309] [Info] Root: Loaded QuestTemplateDatabase in 0.0559615 seconds
    [21:14:17.311] [Info] Root: Loaded AiDatabase in 0.00185454 seconds
    [21:14:17.312] [Info] Root: Loaded TechDatabase in 0.000952263 seconds
    [21:14:17.417] [Info] Root: Loaded CodexDatabase in 0.104274 seconds
    [21:14:17.907] [Info] Root: Loaded BehaviorDatabase in 0.490089 seconds
    [21:14:17.963] [Info] Root: Loaded DanceDatabase in 0.0562061 seconds
    [21:14:18.006] [Info] Root: Loaded SpawnTypeDatabase in 0.0426935 seconds
    [21:14:18.020] [Info] Root: Loaded RadioMessageDatabase in 0.01458 seconds
    [21:14:23.013] [Info] Root: Loaded ItemDatabase in 10.4223 seconds
    [21:14:23.213] [Info] Root: Loaded CollectionDatabase in 5.19282 seconds
    [21:14:23.686] [Error] Could not instantiate item '[ANGELoutfit4chest, 1, {"colorIndex":1165500702}]'. (ItemException) No such item 'ANGELoutfit4chest'
    [21:14:23.698] [Error] Could not instantiate item '[ANGELoutfit4legs, 1, {"colorIndex":1443408713}]'. (ItemException) No such item 'ANGELoutfit4legs'
    [21:14:23.716] [Error] Could not instantiate item '[ANGELsword, 1, {"primaryAbilityType":"broadswordcombo","altAbilityType":"downstab"}]'. (ItemException) No such item 'ANGELsword'
    [21:14:23.925] [Error] Exception caught loading asset: /player.config:defaultCodexes.ANGEL, (AssetException) Could not read JSON value /player.config:defaultCodexes.ANGEL
    [0] 13fa7a463 Star::captureStack
    [1] 13fa791ee Star::StarException::StarException
    [2] 13fa792d8 Star::StarException::StarException
    [3] 13fa890a0 Star::AssetException::AssetException
    [4] 14037fa82 `Star::Assets::loadJson'::`1'::catch$43
    [5] 7fef137c2e0 _C_specific_handler
    [6] 7fef1372a23 _FrameUnwindFilter
    [7] 77b3bad3 RtlRestoreContext
    [8] 13fa948d7 Star::Assets::loadJson
    [9] 13fa93ae3 Star::Assets::loadAsset
    [10] 13fa8fe7f Star::Assets::doLoad
    [11] 13fa91bab Star::Assets::getAsset
    [12] 13fa93769 Star::Assets::json
    [13] 13fd72118 Star::PlayerCodexes::learnInitialCodexes
    [14] 13fd51c29 Star::Player::Player
    [15] 13fd79f48 std::make_shared<Star::Player,std::shared_ptr<Star::PlayerConfig> const & __ptr64,Star::Json const & __ptr64>
    [16] 13fd7ae5c Star::PlayerFactory::diskLoadPlayer
    [17] 13fbb4eb2 Star::EntityFactory::diskLoadEntity
    [18] 13fd9b28e Star::PlayerStorage::PlayerStorage
    [19] 13f9b6970 std::make_shared<Star::PlayerStorage,Star::String>
    [20] 13f9bd90c Star::ClientApplication::changeState
    [21] 13f9c44a2 Star::ClientApplication::update
    [22] 14018b781 Star::SdlPlatform::run
    [23] 14018b93d Star::runMainApplication
    [24] 13f9c74b1 WinMain
    [25] 14036d59f __scrt_common_main_seh
    [26] 778c556d BaseThreadInitThunk
    [27] 77b2385d RtlUserThreadStart
    Caused by: (TraversalException) No such key 'ANGEL' in pathGet("defaultCodexes.ANGEL")
    [0] 13fa7a463 Star::captureStack
    [1] 13fa791ee Star::StarException::StarException
    [2] 13fa179bb Star::JsonPath::TraversalException::TraversalException
    [3] 13fa14736 Star::JsonPath::TraversalException::format<Star::String,Star::String>
    [4] 13fa16162 Star::JsonPath::pathGet<Star::Json>
    [5] 13fa20ff9 Star::Json::query
    [6] 13fa948d7 Star::Assets::loadJson
    [7] 13fa93ae3 Star::Assets::loadAsset
    [8] 13fa8fe7f Star::Assets::doLoad
    [9] 13fa91bab Star::Assets::getAsset
    [10] 13fa93769 Star::Assets::json
    [11] 13fd72118 Star::PlayerCodexes::learnInitialCodexes
    [12] 13fd51c29 Star::Player::Player
    [13] 13fd79f48 std::make_shared<Star::Player,std::shared_ptr<Star::PlayerConfig> const & __ptr64,Star::Json const & __ptr64>
    [14] 13fd7ae5c Star::PlayerFactory::diskLoadPlayer
    [15] 13fbb4eb2 Star::EntityFactory::diskLoadEntity
    [16] 13fd9b28e Star::PlayerStorage::PlayerStorage
    [17] 13f9b6970 std::make_shared<Star::PlayerStorage,Star::String>
    [18] 13f9bd90c Star::ClientApplication::changeState
    [19] 13f9c44a2 Star::ClientApplication::update
    [20] 14018b781 Star::SdlPlatform::run
    [21] 14018b93d Star::runMainApplication
    [22] 13f9c74b1 WinMain
    [23] 14036d59f __scrt_common_main_seh
    [24] 778c556d BaseThreadInitThunk
    [25] 77b2385d RtlUserThreadStart
    [21:14:23.939] [Error] Failed to valid player with uuid 4b1d2d32ec1c0a06bdbdf1ef096f7d53 : (AssetException) Error loading asset /player.config:defaultCodexes.ANGEL
    [0] 13fa7a463 Star::captureStack
    [1] 13fa791ee Star::StarException::StarException
    [2] 13fa8599a Star::AssetException::format<Star::AssetPath>
    [3] 13fa91c72 Star::Assets::getAsset
    [4] 13fa93769 Star::Assets::json
    [5] 13fd72118 Star::PlayerCodexes::learnInitialCodexes
    [6] 13fd51c29 Star::Player::Player
    [7] 13fd79f48 std::make_shared<Star::Player,std::shared_ptr<Star::PlayerConfig> const & __ptr64,Star::Json const & __ptr64>
    [8] 13fd7ae5c Star::PlayerFactory::diskLoadPlayer
    [9] 13fbb4eb2 Star::EntityFactory::diskLoadEntity
    [10] 13fd9b28e Star::PlayerStorage::PlayerStorage
    [11] 13f9b6970 std::make_shared<Star::PlayerStorage,Star::String>
    [12] 13f9bd90c Star::ClientApplication::changeState
    [13] 13f9c44a2 Star::ClientApplication::update
    [14] 14018b781 Star::SdlPlatform::run
    [15] 14018b93d Star::runMainApplication
    [16] 13f9c74b1 WinMain
    [17] 14036d59f __scrt_common_main_seh
    [18] 778c556d BaseThreadInitThunk
    [19] 77b2385d RtlUserThreadStart
    [21:14:24.235] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 256
    [21:14:27.853] [Info] UniverseServer: Acquiring universe lock file
    [21:14:27.854] [Info] UniverseServer: Loading settings
    [21:14:27.856] [Info] UniverseServer: Starting UniverseServer with UUID: 2e1d96e6600a5d4db3826990665c4f1f
    [21:14:27.865] [Info] UniverseServer: Logged in player 'Xolalia' locally
    [21:14:27.865] [Info] UniverseServer: Logged in account '<anonymous>' as player 'Xolalia' from address local
    [21:14:27.944] [Info] UniverseServer: Loading system world (100280647, 702885142, -17021445) from disk storage
    [21:14:27.945] [Info] UniverseClient: Joined server as client 1
    [21:14:27.996] [Info] UniverseServer: Reviving player at CelestialWorld:100280647:702885142:-17021445:10
    [21:14:27.997] [Info] UniverseServer: Client 'Xolalia' <1> (local) connected
    [21:14:28.044] [Info] UniverseServer: Loading celestial world 100280647:702885142:-17021445:10
    [21:14:28.058] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 64
    [21:14:28.058] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 128
    [21:14:28.064] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 256
    [21:14:28.064] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 256
    [21:14:28.355] [Info] Protected dungeonIds for world set to (1, 65524)
    [21:14:30.263] [Info] UniverseServer: Warping player 1 to CelestialWorld:100280647:702885142:-17021445:10=248.525.674
    [21:14:32.908] [Error] Could not instantiate item '[angeltier3legs, 1, {}]'. (ItemException) No such item 'angeltier3legs'
    [21:15:03.588] [Error] Could not load image asset '/objects/generic/angelcouch/angelcouchcover.png', using placeholder default.
    (AssetException) No such asset '/objects/generic/angelcouch/angelcouchcover.png'
    [21:15:23.072] [Info] UniverseClient: Client disconnecting...
    [21:15:23.106] [Info] Client received world stop packet, leaving: Removed
    [21:15:23.217] [Info] UniverseServer: Client 'Xolalia' <1> (local) disconnected for reason:
    [21:15:23.218] [Info] UniverseServer: Reaped 1 dead connections
    [21:15:23.239] [Info] UniverseServer: Stopping idle world CelestialWorld:100280647:702885142:-17021445:10
    [21:15:24.707] [Info] UniverseServer: Stopping UniverseServer
    [21:15:26.240] [Info] Application: quit requested
    [21:15:26.240] [Info] Application: quitting...
    [21:15:26.240] [Info] Application: shutdown...
    [21:15:26.505] [Info] Root: Shutting down Root
    [21:15:27.507] [Info] Application: Destroying SDL Window
    [21:15:27.978] [Info] Application: stopped gracefully
    Any help would be awesome, thank you!
     
  2. bk3k

    bk3k Oxygen Tank

    Ah I'm about to go to pass out so I can't go through all the files ATM. However check out my Tech Helper mod.
    1. You won't need a quest to get people the tech.
    2. You can use custom items instead of just tech chips for unlocking it, or you can just give it free if you want.
    3. You can easily limit the techs by race. Via race whitelists (exclusive) or blacklists (useful if a race had a special version of a tech and shouldn't use a generic version).
    4. You can optionally use several other conditions. Particular mission complete, universe flags, another tech already enabled, etc.
    5. I'm open to requests for more conditions.

    Come to think of it, I had a minor update that I didn't upload here but that's no big deal for now.
     
    Omeruin likes this.
  3. Omeruin

    Omeruin Void-Bound Voyager

    Actually, I WAS looking at your mod, but I dunno.. I've seen other Race mods have their custom tech work without any other mod, not saying that your mod isn't good / not enough / worthless, I just think I kinda wanna do it the "vanilla way". And it's so weird how it works for other mods except mine. I do the exact same thing other modders / the game does. But anyways.. Thanks for the offer! Hope you have a good rest 'n' all!
     
  4. Omeruin

    Omeruin Void-Bound Voyager

    It seems I forgot to actually patch the scientist at the Outpost so he can even give the quest anyway..
    So, I thankfully solved this problem. *sigh*
     

Share This Page