How can I visualize the logic in a map?

Discussion in 'Mapping Questions & Discussion' started by WelpThatWorked, Oct 27, 2018.

  1. WelpThatWorked

    WelpThatWorked L1: Registered

    Messages:
    6
    Positive Ratings:
    1
    I am editing tr_training, and trying to redo it. I am first trying to see how the current version works first. This would be easier if I could see the logic flows as an actual flow instead of floating around 3d space trying to read someone elses code. Is there any way to do this, or at least pull the logic out into a 2d plane?
     
  2. Narpas

    aa Narpas Takes way to long to make and update maps

    Messages:
    428
    Positive Ratings:
    409
    You can view and edit the output with the "Outputs" tab of an entity, and an entity's inputs can be viewed in the "Inputs" tab (but cannot be edited). Sadly, this is the only in-editor way to view the I/O system. If you're having trouble conceptualizing the I/O, you can move entities near each other and draw lines using skip brushes. Keep in mind that some entities, such as brush entities and light entities, will change the compiled map if moved, so you shouldn't move them. You can also use logic_relays to trigger another entity when they are triggered. I'd recommend reading up on the I/O system on the VDC and learning what entities you can use and how you can use them
     
  3. DrSquishy

    aa DrSquishy ???

    Messages:
    1,227
    Positive Ratings:
    802
    There is an I/O flowchart viewing system within hammer and it uses one of the viewports, however you can only access it using VIDE as it doesn't appear in the list of viewing modes by default.
     
    • Thanks Thanks x 1
  4. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,335
    Positive Ratings:
    898
    Could you elaborate? That actually sounds super useful.
     
  5. DrSquishy

    aa DrSquishy ???

    Messages:
    1,227
    Positive Ratings:
    802
    If you open VIDE, go into the Splitter Editor - it is the button that looks like this: upload_2018-10-28_14-20-4.png
    Once you click on it, set one of the viewports to Logical (Entity Flowchart) as so. upload_2018-10-28_14-20-38.png
    Whatever is set here in VIDE will be what is set up when hammer is launched, so you will see this I/O flowchart view, with all entities, connected up with lines to entities that they are targeting through outputs and showing what those outputs are. For example, here is a very simple setup I've created, the right side being where outputs are leading out and the left side is where inputs are leading to.
    upload_2018-10-28_14-27-40.png
    All entities can have their full range of settings modified in this view
     
    • Thanks Thanks x 5
  6. Micnax

    aa Micnax Back from the dead (again)

    Messages:
    2,108
    Positive Ratings:
    1,565
    I think it'd be neat to have an open-source visualiser of that VIDE feature that reads the text from the VMF document for entities linked together. Maybe add more relevant icons and expand on details. Just my two cents though.
     
    • Agree Agree x 1
  7. WelpThatWorked

    WelpThatWorked L1: Registered

    Messages:
    6
    Positive Ratings:
    1
    This looks exactly like what I wanted, but the changes I make in the menu do not seem to save, am I missing a step? otherwise, thank you very much!
     
  8. DrSquishy

    aa DrSquishy ???

    Messages:
    1,227
    Positive Ratings:
    802
    You might need to find where the created entities are in the world. AFAIK they are all created in the same exact location, I'm not sure where though
     
  9. WelpThatWorked

    WelpThatWorked L1: Registered

    Messages:
    6
    Positive Ratings:
    1
    What I meant is that the viewport was not taking effect, it appears there was a hidden save method, but only available via keybind. also this is a loooot of logic. any way to tidy it up?
     

    Attached Files:

  10. B!scuit

    B!scuit L4: Comfortable Member

    Messages:
    151
    Positive Ratings:
    193
    You may find using ent_messages_draw 1 in console when running tr_training in-game useful
     
  11. WelpThatWorked

    WelpThatWorked L1: Registered

    Messages:
    6
    Positive Ratings:
    1
    Is there any way to at all organise the window, so it is not just a giant lump of ents? or to draw the connecting lines ingame at all times, not just when triggered? or show connections between nodes in the other windows of hammer editor? Sorry if this is asking too much.