Improvements to Display Block variables

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    • Add more variables! These include:
      • Speed
      • MaxSpeed (If it becomes relevant due to thrust revamp)
      • WarpStatus (Off/Charging (x%)/Charged/Jumping)
      • Current Sector
      • Pilot Waypoint Sector
      • etc.
    • Implement a way to do simple calculations in display blocks, for things like percentages.
    • Implement a way to do if and if/else statements for displaying things. For instance,
    Code:
    Shields:
    [if:[[shield]/[shieldCap]>0.2]CRITICAL[else]Holding]
    at: [exp:[shield]/[shieldCap]*100] %
    Should output, if shields are above 20%:

    Shields:
    Holding
    at: <shield percentage>%

    And if they are below 20%:

    Shields:
    CRITICAL
    at: <shield percentage>%
     
    Last edited:

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    It would be neat to be able to reference logic blocks and describe what they are for and their status.

    Example:
    [Logic_138497235 as "Hanger Door"] is [0 as "Closed"|1 as "Open"]
    When the logic block is off, the display block says "Hanger Door is Closed". When the logic block is on (and the plexdoors it controls are supposedly open/invisible), then it says "Hanger Door is Open".

    The problem is I don't know a good way to reference the logic blocks. Maybe block unique ID (something like "Logic_138497235") could be made visible in Build mode in addition to the block description (currently something like "Activation Block") when you are looking straight at the block.

    Or maybe instead of using a block ID reference, you could attach the display block directly to the logic block, and use a generic word like "
    " to reference the attached logic block to get its current status. That way, when the logic block is changed, it will automatically change the associated display block.
     
    • Like
    Reactions: RoyalWolfe

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Maybe add a whole new layer of string logic...
    Equals(= 1.equals(2) ) : (red slave: String 1, green slave: String 2) -> 0..1
    Concatenate(= 1+2 ) : (red slave: String 1, green slave: String 2) -> String
    Subtract(= 1-2 ) : (red slave: String 1, green slave: String 2)
    Contains(= 1.contains(2) ) : (red slave: String, green slave: SubString) -> 0..1
    abstract StringLogic(red slave: String [, green slave: string 2] [, blue slave: logic 0..1 set-able])​

    All accept 1 logic input (= blue slave : default = true) which allows them change their output if the inputs change

    Connect StringLogic:
    try{ connect as red slave }
    -> special case(red already set) -> try to connect as green slave
    try{ connect as green (=second) slave }
    -> special case(green already set) -> throw error( disconnect a red or green slave first )

    Connect BitLogic:
    try{ connect as blue slave }
    -> special case(blue already set) -> throw error( can only have one blue slave (0..1 logic gates) )



    Could also solve the faction-permission issue with passwords.



    To avoid lag, I imagine something like : each String logic block on your ship produces 1 logic-power per 0.5 seconds and adds 2 logic-power capacity. Each action requires 1 logic power. If you run out of power, delay processing by 0.5 seconds and you have enough power to continue.
    Maybe with diminishing returns per individual blocks connected to each other...​
     
    • Like
    Reactions: Ithirahad
    Joined
    Mar 28, 2014
    Messages
    76
    Reaction score
    9
    Display blocks could simply be made something that had an activation state, and then in the text you would simply check the activation state of the display block itself.
    That wouldn't allow for a single display block looking at multiple logic blocks though, but it is simpler.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I would like to have a field which can be set or loaded by the marker beam (as long as the format is valid)