Modding Help New generic quest with random localisation

Discussion in 'Starbound Modding' started by Arsakes, Jan 21, 2017.

  1. Arsakes

    Arsakes Phantasmal Quasar

    Hi, I want to implement new generic quest type - repel invasion quest.
    What i need is a way of searching invasion start point for that I wanted to use generated quest system that searches special points of map and mark it as spawn point for invasion force.

    Got a few questions:

    • Can I set preconditions for generated quests that searches for location?
    • Can I start generated quests automatically whenever player is in given range of quest giver?
    • What is the stagehand entity?????
  2. Arsakes

    Arsakes Phantasmal Quasar

    Regarding location generetaion, there's locations.config file in `/assets/quest/generated `directory, but i still wonder how are those mapped into actual world location.
    Script refer to location id, however id is never generated.

    Does someone know how the
    is mapped into actual list of locations with id

    in script:
    there's a constructor

    function, ...)
    does anyone knows how are those ids generated???
    Rest of code seem to rely on location ids howevere there nowhere to be found.


    I have following theory:

    When world is generated along it stagehand entites are, some of those stagehand entities are marked as questlocations, they are scripted, during their init() function they add themselves into wolrd property named "quesLocations" along with tags, ids, etc.

    So one can rely on world property questLocation in order to search for possible places.

    So any given world has property named "questLocation" accessible from world.getProperty
    Last edited: Jan 21, 2017
  3. magewish4

    magewish4 Pangalactic Porcupine

    Take a look at my spacestations mod - I have a random "event" on the apex and protectorate stations. If you want your invasion to happen in a town that players build, you can't use questlocations - they destroy themselves when a player builds in their scan area. I use custom stagehands - they don't even have a script, I just use them to mark locations.
  4. Arsakes

    Arsakes Phantasmal Quasar

    Thax, man I wanted to use quest locations as place where to force is spawned and go into the player build colony - the thing that is required is exsitence of such place On the planet were colony is - no in the colony per se - but thanks.

    But anyway u use custom stagehands and what u have script associated with them? That is fired again and again?
  5. magewish4

    magewish4 Pangalactic Porcupine

    I have a 'stationmanager' stagehand that spawns an 'event' stagehand every 20 minutes. It randomly chooses an event based on the type of station it is on. The 'event' stagehand manages the event and kills itself when the event ends. If the event is still around after 15 minutes, the 'stationmanager' kills it so it doesn't overlap with the next event. The raiders event I have is most similar to what you are thinking. It spawns enemy npcs every 20 seconds at locations around the station. The locations are marked with 'stationlocation' stagehands that don't have a script.

    I wouldn't use the questlocations for this. The randomly generated quests that spawn npcs won't send them to your player's colony and the location won't load unless your player is near it. I'd find a way to mark the left and right ends of your player's colony and use those as spawnpoints for the invasion.
  6. Arsakes

    Arsakes Phantasmal Quasar

    Thanks for that, but if waht you saying is true how it happens that I receive quests randomly generated from quest givers which is located many tiles away from quest location (which at the time i go near him isn't loaded).
    Spawning within a base could be lame coz there's na interaction with defences.

    Sending them to colony is a matter of behaviour change - one thing at a time..

    I also want to have raiders to have specific verifable goal - not only to "exist" and shoot

Share This Page