How use new Dialogues UnlockTechTreeItem params?

Discussion in 'Questions, Discussions & Feedback' started by dionis, Jan 5, 2022.

  1. dionis

    dionis Ensign

    Joined:
    Apr 27, 2016
    Messages:
    22
    Likes Received:
    2
    Hi evrebody. There a new params at Dialogues. How use it? Can u put an example code. Becouse there no any exapmles enevery. It is real cool but i dont understand how use it((
    = Techtree
    bool UnlockTechTreeItem(string blockOrItemName): Unlocks the specified tech tree item or block. Returns true/false according to success. If you specify now -1 as UnlockCost, the item can only be unlocked with this function!
    bool IsTechTreeItemUnlocked(string blockOrItemName): Returns if the specified item/block is already unlocked
     
    #1
  2. Taelyn

    Taelyn Administrator Staff Member Community Manager

    • Developer
    • Administrator
    Joined:
    Oct 4, 2021
    Messages:
    871
    Likes Received:
    1,369
    It tells you exaclty how to use it.

    (BlockName or ItemName)

    so UnlockTechTreeItem(ShieldGeneratorBA)

    You can get those names from the ItemsConfig.ecf or BlocksConfig.ecf
     
    #2
  3. dionis

    dionis Ensign

    Joined:
    Apr 27, 2016
    Messages:
    22
    Likes Received:
    2
    print exaple please
    { +Dialogue Name: Soldat_donat
    NPCName: Vasy
    Output: "txt_Vasy"
    Option_1: "Salut_make"
    What i should put here to open some tech?
    }
     
    #3
  4. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    I strongly recommend using the eWCCT tool to create dialog as it often shows you examples and explanations:

    https://empyriononline.com/threads/tool-ewcct-empyrion-web-content-creator-tool.92853/
    But you would use the example Taelyn provided in your execute.
     
    #4
  5. dionis

    dionis Ensign

    Joined:
    Apr 27, 2016
    Messages:
    22
    Likes Received:
    2
    я dont want to use this plagin... I dont want. For me easer make it all at Notepad++ and need to understand what exacly code i should use. Please show me the code example!
     
    #5
  6. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    I assume like so:
    Execute_1: "UnlockTechTreeItem(ShieldGeneratorBA)"

    I have yet to test it myself however.

    So like this:

    { +Dialogue Name: Soldat_donat
    NPCName: Vasy
    Output: "txt_Vasy"
    Option_1: "Salut_make"
    Execute_1: "UnlockTechTreeItem(ShieldGeneratorBA)"
    }

    That would unlock that tech tree item when that dialog state is started.
     
    #6
  7. dionis

    dionis Ensign

    Joined:
    Apr 27, 2016
    Messages:
    22
    Likes Received:
    2
    it doesnt work Ive allready tried thats code and decided that there smth else, so asked here
    upload_2022-1-8_18-4-47.png
     
    #7
  8. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    859
    Likes Received:
    1,434
    My tool is not a plugin.
    IF you show us your whole Dialogues.ecf about "Soldat_donat_test", we can help you.
     
    #8
    Germanicus and Taelyn like this.
  9. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    It's:

    "UnlockTechTreeItem('Eden_BandagesT2')
     
    #9
  10. dionis

    dionis Ensign

    Joined:
    Apr 27, 2016
    Messages:
    22
    Likes Received:
    2
    Yep. It is work. Thank U very much!
     
    #10

Share This Page