Modding Help Attempting to make an alternate start for a custom species

Discussion in 'Starbound Modding' started by Isaac MacPherson, Jan 14, 2020.

  1. Isaac MacPherson

    Isaac MacPherson Scruffy Nerf-Herder

    For the last week, I've been trying to create an alternate start for two or so custom species that I made. I have a good understanding of JSON and a minimal understanding of LUA, but I cannot seem to start my species where I want them to start. As it was with beta/penguin to koala, the character started on their ship, while everything from giraffe and onward starts in the protectorate. What I'd like to do- if possible -is have a species or two start on their ship instead of the protectorate without having all species start on their ship with their starting items as though the player selected "skip intro" during character creation.

    Any suggestions, inquiries, comments?
     
  2. vuurrobin

    vuurrobin Void-Bound Voyager

    I know you can set a custom startmission per species, but I'm not sure if you can automatically skip the mission per species with a mod.

    But why create a mod for this if players can just select "skip intro".
     
  3. Isaac MacPherson

    Isaac MacPherson Scruffy Nerf-Herder

    It's not a mod just to skip the intro mission. It's 2-3 of my custom species mods that would have a non-protectorate intro. It's whole species that would have a different intro.
     
  4. rl.starbound

    rl.starbound Phantasmal Quasar

    Have a look at the code for my "Origins of Species" mod:

    https://community.playstarbound.com/resources/origins-of-species.5922/

    https://github.com/rl-starbound/rl_speciesorigins

    This implements new origin missions for the non-human vanilla species. It should make a reasonable tutorial for you to use to create unique intro missions for modded species. Minimally, you'll have to define a dungeon mission (a .dungeon file and a .json file containing a Tiled map), a quest script (.lua), a .questtemplate file, and a mission stagehand (.stagehand file and a .lua file). Then you'll need to patch quests/quests.config, dungeon_worlds.config, instance_worlds.config, and universe_server.config to invoke your intro missions for your species.

    As far as I can tell, while the game allows you to set per-species intro missions, it assumes one single intro cinematic to start all new characters (the "wake up" cinematic in vanilla). I assume you don't want that generic intro cinematic in your new intro missions. You'll notice that in client.config.patch I patch in a reference to an empty cinematic. Then, I patch quests/story/protectorate.questtemplate.patch to put a reference to the original intro cinematic back in so that new characters using the protectorate mission will see it. Also, I had to copy quests/scripted/tutorial/protectorate.lua and patch in a call to invoke the intro cinematic explicitly. If you do a diff of that lua file with the original Starbound asset, you'll see the changes I made. If you want your mod to be compatible with mine, you'll have to copy these files into your mod. Once you've done that, you can make your new cinematics (if you want to) and reference them in your new .questtemplate files and quest .lua scripts.
     
  5. Isaac MacPherson

    Isaac MacPherson Scruffy Nerf-Herder

    I'll give that a look and get back to you with the results.
     
  6. vuurrobin

    vuurrobin Void-Bound Voyager

    You can set a different intro cinematic per species. The mod 'Racial Intro Restore' (https://steamcommunity.com/sharedfiles/filedetails/?id=1806729191) (not to be confused with Racial Intros) adds per species intro cinematics (some of them are from the beta version of the game). It does this with the following line in 'client.config':

    Code:
    "introCinematic" : "/cinematics/<species>/intro.cinematic",
    I'm not sure what happens if a species doesn't have an intro cinematic. Might cause problems for modded races. And to be honest, setting the cinematic as part of the quest seems 'cleaner' to me.


    I've actually been thinking about creating another way to start the game and intro missions. In the skyrim mod 'live another live' you start in a dungeon and you can choose there how you want to start. This can range from the default intro to starting with a house to being left for dead in a random place. Plus other mods can add there own intros to it. I think it should be possible to do something similar for starbound. That way we're not stuck with 1 fixed mission per species, but can have multiple missions that may or may not be species specific. Sadly, I don't think we can change the starting planet dynamically, so that will always stay the same for each intro.

    I'll see if I can make a proof of concept or something.
     
  7. rl.starbound

    rl.starbound Phantasmal Quasar

    Good to know about using string interpolation on the introCinematic. I agree that it feels cleaner invoking the cinematic from the quest script.

    I'm working on the same concept as part of Origins of Species, so you can start in a small shim mission and decide whether to join the Protectorate (and do that intro) or do the species-specific origin.
     
  8. Isaac MacPherson

    Isaac MacPherson Scruffy Nerf-Herder

    So I finally looked over rl's code, and it would seem that I'm gonna have to either: make an alternate start like rl did, or I'm gonna have to abandon the notion of starting in the ship, or... I'm gonna have to get a lot better at json/lua. Good mod, btw, rl. I noticed a few spelling errors, but nothing that sullied my experience.
     
  9. rl.starbound

    rl.starbound Phantasmal Quasar

    You're driving me crazy with the knowledge that there are unspecific spelling errors in my mod ;-) Can you let me know what you've found? I've found a couple of small errors and I'm going to push out an update in the not so distant future.
     
  10. Isaac MacPherson

    Isaac MacPherson Scruffy Nerf-Herder

    Your speciesorigin_stargazer says 'sore' when it should should be 'soar'. Checking again, that may have been the only error.
     
  11. rl.starbound

    rl.starbound Phantasmal Quasar

    Thanks. I caught a couple of other spelling or grammar errors but missed that one!
     

Share This Page