PDA: Is there a way to auto-start a chapter _without_ the player needing to press a button?

Discussion in 'Scenarios' started by Needleship, Jul 22, 2019.

  1. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Probably the Devs have a similar problem: Lots of complicated stuff, has to be rather well documented or it won't work, and a lot of 'more pressing' things on the table...?

    Really don't have much time, but maybe I can start an example 'PDA' with all those checks included, and adding to it slowly over time.
    "WIP, not finsished, not endorsed by Devs, but might work."
    That way you could copy snippets directly into another scenario, and don't have to worry too much about the format.

    Preamble: Yes. But only at a game start.


    Try this file. I copied some stuff in there. Might not work properly, but don't have time to test it right now :/
     

    Attached Files:

    • PDA.zip
      File size:
      5.7 KB
      Views:
      136
    #21
    Bollen and ravien_ff like this.
  2. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    Needle, I really appreciate your help. Thanks to the previous post I managed to at least create a start which directs you to the actual mission on the PDA to activate it manually. Then the preamble starts fine... I would of course prefer it to start automatically...

    The strange thing is that I have literally copied the Yaml from working games (such as Shadows Of Starlight), but it still won't automatically start on my scenario...? I have of course changed the necessary elements to trigger my game and it does work fine if activated manually. Makes me thing there's something wrong with my scenario at another level...

    Yes, I only need it at the start of the game. I will try this file today and see how it goes. Thank you so very much again!
     
    #22
    Needleship likes this.
  3. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    There seems to be something that influences PDA missions, outside of the PDA.

    E.g. when starting a Coop game, you won't get the 'skip' button at the preamble - Even if you defined it there.
    (That is a bug, already reported)

    That PDA example file is for a SP game... There it should work?
     
    #23
    Bollen likes this.
  4. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    I can't believe I wasted nearly a year trying to make this work...! I finally discovered what the problem was and it has to do with how you spawn in the game. If you spawn in an escape pod or in a spawner plate then the preamble activates as expected, but if you use position then it doesn't, I don't know if it's a bug, but I'll report it just in case. It's unfortunate because I really wanted to spawn the player in a specific position, looking in a certain direction.

    So thank you again for all the help and particularly that last file , which makes everything nice a clean! I will finally be able to create this bloody story once and for all!
     
    #24
    ravien_ff and Needleship like this.
  5. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Please report the bug! :)
    - For spawing on a BA the preamble works.

    Suggestion: Create or use a 'micro BA' consisting only of a player spawner.
    Place that manually as fixed BA.
    Rotate the 'BA' itself to change player view direction
    BA that are placed with the playfield can still be freely rotated?


    (The spawner plate has to be a little above the terrain, so that you don't glitch through.)


    .... I'm using these BA to spawn players directly into water, or on land.
    See attachment.


    (with random placement, as a 'POI')
    It has the group name 'InvisiblePlayerWater' (no BA name, though)
    Code:
            - GroupName: _BA_InvisiblePlayerWater    # just realized, that this is the file name, but should work
              Faction: None
              AvoidFactionTerritory: True
              CountMinMax: [ 1, 1 ]
              IsImportant: True
              SpawnPOINear: [START]             # or wherever
              SpawnPOINearRange: [100, 400]
              Properties:
                - Key: Discovery
                  Value: False

    For fixed placement:


    Probably like this:
    (code & placement untested)
    Code:
        Fixed:
            - Type: BA_Player
              Faction: Public
              Prefab: _BA_InvisiblePlayerWater
              Mode: Survival                    
              Name: NoNameShown   
              Pos: [ 15, 0, 0 ]            #  Wherever
              Rot: [ 0, -85, 0 ]          # Whatever
              InitPower: False
              Properties:
                - Key: MapDistance
                  Value: 0
                - Key: Discovery
                  Value: False


    Then :

    Code:
        FixedPlayerStart:
            - Mode: Survival
              Spawn: Structure
              Structure: "_BA_InvisiblePlayerWater" 
             # (....)
    
     

    Attached Files:

    #25
    ravien_ff and Bollen like this.
  6. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    I love the fact that you're as interested as I am in these tools! :D

    In my case I need/want the player to spawn in the middle of an already placed POI (in fact it's a cemetery and I wanted the character to begin the game looking at a specific tomb). So the base trick won't work... At the moment I can't even get it to work with the spawner plate!!! For some reason the game keeps spawning me at 0,32,0. If I try other POIs with spawners it works fine, but not the bloody cemetery...!
     
    #26
  7. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    Oh! And by the way, I reported the bug and they said it would be solved in 10.5, so perhaps I won't need the silly plate after all...
     
    #27
  8. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,424
    Likes Received:
    12,030
    The spawner should work for what you're trying to do. Maybe you need to upload the blueprint and post the poi and player spawn code and we can find the problem.
     
    #28
    Needleship and Bollen like this.
  9. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    Will try again next weekend and check whether the bug is gone... If not I'll post it here! Thanks for the offer...!
     
    #29
    Needleship and ravien_ff like this.
  10. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    Hmmm...! Well now nothing works, scenario won't start. I've gone back in the yaml version all the way back to July and still nothing will load. The console tells me nothing:
    Console error.PNG

    Anybody have any ideas? Is there something new that needs to be added to the yaml?
     
    #30
  11. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Didn't have that error message, yet. - -Sorry, no clue.

    Although... parameter 'key' is something in the playfield.yaml or playfield_static.yaml - -used during the POI generation.
    And the exception seems to be during the playfield loading, not the PDA (in that case, it will tell you it got stuck there)

    ... Could be an extra character, that got added there by a random keystroke to a 'key' parameter at a POI definition?


    Last line of defense:
    - Turn off your PDA completely. If the bug is still there, it is in the playfield.
    (That could be the reason, if you have a PDA that was 'formerly working'.)
    In that case, turn off the playfields (or use 'minimal working' stand-ins, or a copy of the 'official' ones.)

    If you have isolated the file:
    - Comment out parts of your yaml, and check if it still loads.
    That way you can get a grip rather 'quick' where the error is.

    (Comment out half of a file section, test the rest.
    E.g. remove all POI.
    If that loads ok, the error must be in the POI section.
    Use incrementally smaller steps to get closer to the source.
    - - That was the only way to get some really strange stuff out of my files.)

    And: Please tell, what it was, so it can be of future reference :)
     
    #31
    ravien_ff and Bollen like this.
  12. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    OK, tried your method of changing one thing at a time and found that it was the sector yaml that was screwing things up. Something must've changed with the new update. It's fixed now!
     
    #32
    ravien_ff and Needleship like this.
  13. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Good that it works now! - - Thanks for the info! :)
     
    #33
    ravien_ff likes this.
  14. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,424
    Likes Received:
    12,030
    I once spent 2 hours trying to fix my solarsystemconfig.yaml file because I forgot to include a sun. :eek:
     
    #34
    Bollen and Needleship like this.
  15. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    So I decided to go back to the failed version and do some forensics to see if there's was anything to learn from the incident. It turns out I had a placeholder moon with a nonsense yaml and since 10.5 now fetches the yaml info to produce the space view it was unable to load the scenario. Damn! Cause I have a lot of placeholders...! Maybe I should ask @ravien_ff if I could use some his/hers lovely custom planets on my scenario... :D
     
    #35
  16. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,424
    Likes Received:
    12,030
    Yes go ahead! I just ask for credit. :D
     
    #36
    Bollen likes this.
  17. Bollen

    Bollen Captain

    Joined:
    Mar 22, 2017
    Messages:
    253
    Likes Received:
    250
    You got it baby! [​IMG]
     
    #37

Share This Page