Announcement

Collapse
No announcement yet.

Possible way to track ship component state

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Possible way to track ship component state

    Looking for a way to track ship component state in Star Citizen. I'm wondering if this would be a potential (albeit somewhat crude) solution. Create states using text tokens - sort of like how you're tracking ~~Role. This would allow for more comprehensive interaction with the "AI". For example, if I say something like "Gear Down" and it is already down, ELI can berate my ignorance.
    It would also let us swap configurations that may need certain components to change state while others would not. For example, if I am in Mining Configuration with the gear down and I want to go to a Landing Configuration, I would want the gear to stay down - so in the Landing Configuration command, I would check states and if the gear is already down, it would move on.

    So...On start-up, the default ship state would be loaded. For example, ~~ShipGear = 1, ~~ShipPowerNormal=1, ~~ShipPowerGroup1-3 = 33, etc. Then, every time you change your ship's configuration, it would be tracked accordingly by changing the values below. I'm going to play around with some of the easier ones that can only have 2 states but let me know if this is craziness.

    There is a clear problem with this - if a command doesn't function properly, it may cause the state token to become out of sync with the actual state in the game - so I'm going to add a "Normalize Configuration" commands that loads the default values. Then a player can simply power down their ship manually and it should sync *actual* back up with what we have in the tokens.


    ~~ShipGear [0,1] 0 =retracted and 1 = extended
    ~~ShipPowerNormal [0,1] Normal = 1, anything other than Normal = 0
    ~~ShipPowerGroup1 [0,1633,66,99] The next 3 would have to be relative and would also have to affect ~~ShipPowerNormal]. Assuming that "Normal = 33" for all values, every time you increase one, the other two would be halved. Not sure the math works out here but it should be do-able.
    ~~ShipPowerGroup2 [0,16,33,66,99]
    ~~ShipPowerGroup3 [0,16,33,66,99]
    ~~ShipShieldNormal [0,1] Normal = 1, anything other than Normal = 0
    ~~ShipShieldLeft [0,25,50,75,100] Pretty much same as ~~ShipPowerGroup variables. Just have to figure out the math and how to implement it.
    ~~ShipShieldRight [0,25,50,75,100]
    ~~ShipShieldFront [0,25,50,75,100]
    ~~ShipShieldRear [0,25,50,75,100]
    ~~ShipShieldTop [0,25,50,75,100]
    ~~ShipShieldBottom [0,25,50,75,100]
    ~~ShipJumpDriveSpool [0,1] 0 = off, 1 = spool
    ~~ShipJumpDriveEngage [0,1] Not sure this will work. Would have to add a timer or something but jumps are not consistent in time. Jumps between Delamar and Crusader and its moons are longer than jumps between Crusader and moons.
    ~~ShipMiningLazer [0,1] 0 = Retracted, 1 = Extended
    ~~ShipScanner [0,1] 0 = off, 1 = on
    ~~ShipCM [0,1] 0 = Flare, 1 = Chaff
    ~~ShipDoor [0,1] 0 = Closed, 1 = Open
    ~~ShipDoorLock [0,1] 0 = Unlocked, 1 = Locked

  • #2
    /me starts giving commands when in a state that doesn't allow the event to happen but VA still runs said command.
    1) I reject your reality.... and substitute my own
    2) Not to be used when upset... will void warranty
    3) Stoke me a clipper i will be back for dinner
    4) Never tell Gangrel to do anything... he will probably get it wrong
    WARNING! Swedish wall-of-text hits you for bork-bork-bork damage!

    Comment


    • #3
      Are you referring to the problem I pointed out in the third paragraph or something else? If something else, do you have an example that I might understand? I'm getting a little long in the tooth so you may need crayons.

      Comment


      • #4
        Yeah, the 4th paragraph issue. It is really one of those things that some users got annoyed with (so we also had a toggle version of the command, which just hit the key, no matter the state you were in) Guess which commands got used most often
        1) I reject your reality.... and substitute my own
        2) Not to be used when upset... will void warranty
        3) Stoke me a clipper i will be back for dinner
        4) Never tell Gangrel to do anything... he will probably get it wrong
        WARNING! Swedish wall-of-text hits you for bork-bork-bork damage!

        Comment


        • #5
          Got it. I have it working for me for now, but I can understand why it wouldn't work for everyone. I just added the "Normalize Configuration State" command to the "Ready ship for Launch" and "Power Down the Ship" commands so it would periodically reset everything when I know the actual state of the ship.

          Comment


          • #6
            I think it's interesting, I did an advanced command with state analyse and correction.

            When I say : Lights on

            Begin Boolean Compare : [lights] Equals False
            Execute command, 'KB Toggle Lights' (by name) (and wait until it completes)
            Set Boolean [lights] to True
            Play random sound (2 items)
            Else
            Play random sound (2 items)
            Pause 1,5 seconds
            Play sound, '{VA_SOUNDS}\hcspack-EDEN\Role\Shall I take over.mp3'
            Write [Blue] 'Waiting for reply...' to log
            Wait for spoken response: 'affirmative;negative'
            Begin Text Compare : [~response] Has Not Been Set
            Play sound, '{VA_SOUNDS}\hcspack-EDEN\Acknowledgements\Cancelled.mp3'
            Else If Text Compare : [~response] Equals 'affirmative'
            Execute command, 'KB Toggle Lights' (by name) (and wait until it completes)
            Play random sound (3 items)
            Set Boolean [lights] to True
            Else
            Play sound, '{VA_SOUNDS}\hcspack-EDEN\Profile Sounds\Generic\Crew commands\((RS - Crew Assigned Captain))\non-verbose\Okay.mp3'
            End Condition
            End Condition


            In this case if I ask to turn lights on, the she toggles lights and says "lights on" / "on"
            If lights are already on with voice attack, then she says, "already on, shall I take over ?"
            Now three options ...

            1. I answer affirmative, then she toggles lights and says "lights on" / "attempting repairs" and the light state is on.
            2. I answer negative, the she does nothing and says "okay" and the light state is unchanged.
            3. I answer nothing during 10 seconds, then she does nothing and says "cancelled", light state unchanged.

            The negative point, is that this command refers to the last order given via voice attack. Let's say you turned the lights on in your current ship and died,after respawning, voice attack remembers the lights were on.
            Last edited by Hillgue; 09-28-2018, 02:10 PM.

            Comment


            • #7
              I'd even consider to add an engine state check.
              If engines are on then the command works, else the command is denied.

              Comment


              • #8
                Engine state is not possible to check directly.... or even keep track of, unless you purely use voice commands to set the speed.
                1) I reject your reality.... and substitute my own
                2) Not to be used when upset... will void warranty
                3) Stoke me a clipper i will be back for dinner
                4) Never tell Gangrel to do anything... he will probably get it wrong
                WARNING! Swedish wall-of-text hits you for bork-bork-bork damage!

                Comment


                • #9
                  Was thinking about a command like "engine on" or "power on the ship" to etablish the engine state like I did with lights.

                  Comment

                  Working...
                  X