Modding Help is it possible to make a custom "mission"?

Discussion in 'Starbound Modding' started by jokekid, Feb 18, 2015.

  1. jokekid

    jokekid Space Spelunker

    basically, i want to know if it is possible to make a dungeon and make it be instanced in S.A.I.L.'s mission section.

    so basically:
    -make a dungeon.(not harvestable)
    -make it so that this dungeon never spawns on world-gen.
    -load the dungeon through SAIL's mission panel.

    stretch-goals:
    -NPC in outpost that activates this mission.
    -NPC only gives quest when X criteria has been met.
     
  2. Olxinos

    Olxinos Scruffy Nerf-Herder

    Yes it is!
    You'll have to add it to unique_worlds.config, dungeon_worlds.config (and of course create the dungeon), then create the corresponding aimission file for your dungeon to be accessed through SAIL, and mod some npc in npcs/outpost so that he gives you a quest unlocking the mission (or modify the outpost to add a brand new npc). Unfortunately, it's quite a large topic and i can't detail it (at least not in a few minutes), but here are some related topics:
    http://community.playstarbound.com/index.php?threads/custom-quest-with-custom-world.90578/ (basically the same question)
    http://community.playstarbound.com/index.php?threads/new-mission-world-universeserver-error.91451/ (an attempt)
    http://community.playstarbound.com/index.php?threads/how-to-make-your-own-dungeon-sets.63430/ (about dungeon creation)

    Edit: also, for your dungeon to spawn in planets, you'd have to patch terrestrial_worlds.config, so if you don't touch that file, don't worry about that
     
    CerberusAngelakis and jokekid like this.
  3. jokekid

    jokekid Space Spelunker

    thanks a bunch. :D

    EDIT: this is for my own reference:

    -ai/mission1.aimission (notice "missionName" : "mission1" and "missionWorld" : "lunarbase")
    -dungeon_worlds.config (notice "lunarbase" : {"primaryDungeon" : "lunarbase", ...})
    -unique_worlds.config (notice lunarbase" : {"dungeonWorld" : "lunarbase", ...})
    -the content of dungeons/missions/lunarbase
    And for unlocking the mission:
    -quests/outpost/outpostmission1.questtemplate (notice "associatedMission" : "mission1")

    EDIT2:

    what about having a quest NPC in your ship?
     
  4. Olxinos

    Olxinos Scruffy Nerf-Herder

    You want to add an npc in your ship? That didn't really crossed my mind.
    I'm not sure you can actually add npcs to your ship the way you add npcs to your dungeon, but there's at least one way: add an object which will destroy itself at initialization and spawn the npc inside the ship (a bit like the spawners, with a more specific npc and at initialization). That should work.

    Edit: better yet (since you may kill that npc): don't destroy the item, make it undestructible, and allow it to respawn the npc if killed
     
  5. jokekid

    jokekid Space Spelunker

    and how would one go about actually assuring the spawner won't spawn a new NPC on every ship reload?
    is there some way to check for an existing NPC?

    like, give the spawner a NPC ID, which will be passed onto the spawned NPC, and make the spawner check if a NPC with this ID exists, and if not, spawn a new one?

    also, would it be possible to make this item ONLY placeable in your ship?

    so many questions :p
    i guess i'll start setting up a custom mission in the AI pannel before i get into the more nifty stuff :p
     
  6. Olxinos

    Olxinos Scruffy Nerf-Herder

    Yup, that's exactly what i was thinking, but there's a difficulty i didn't think of: when you reload your game, the npc id isn't necessarily the same. So we could either kill the npc when guitting the game (assuming there is a callback upon quitting, and i don't think there is), or look for the npc with an npc query at startup (assuming the npc didn't run too far and that you can distinguish between the spawned npc and another one without its id), or find a way to have a persistent entity.id (players have one, but i don't think entities do), or something i didn't think of.

    Well, if the player can't get it (except in admin mode) he can't place it elsewhere. Otherwise, maybe you can make an object which smashes itself when placed elsewhere but i don't know if it's possible (or maybe the init function can actually prevent an object from being placed? i should test that)
     
  7. jokekid

    jokekid Space Spelunker

    i was actually thinking of a custom variable, not a true ID as the ID the game uses, but just a regular String variable which is unique and equal between the spawner and the NPC
     

Share This Page