1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] Hiding the "Get User" ability from Shops WHILE retaining it's functionality

Discussion in 'World Editor Help Zone' started by Uncle, May 20, 2019.

  1. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    764
    Resources:
    0
    Resources:
    0
    I know that you can toggle the Get User button on and off in the editor with Select Hero's "Show Select User Button" field, but that won't fix my problem.

    The problem is that the Get User button is taking up a slot on my commandcard and replacing Items inside the shop. I already have 2-3 required abilities inside of my Shop (Next Page, Prev Page, Main Menu), so i'm trying to avoid having another if possible.

    I'm wondering if I can mimic the Get User ability through triggers?
    I've already taken a swing at it with this:
    • Custom script: call IssueNeutralTargetOrderById( udg_tempPlayer, udg_tempUnit, 852566 , udg_CurrentShopUser)

    Unfortunately, this only works if "Show Select User Button" is set to True which defeats the whole purpose of using it.


    EDIT, SOLVED:
    You have to change this inside the neutralabilityfunc.txt file.
    // neutral interact
    [Anei]
    Art=ReplaceableTextures\CommandButtons\BTNSelectUnit.blp
    Buttonpos=0,-11

    Check my comment below to learn more.
     
    Last edited: May 21, 2019
  2. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    416
    Resources:
    2
    Models:
    2
    Resources:
    2
    Have you tried the classic trick of putting Select Hero in a spellbook, disabling the spellbook and giving it to your shop? No idea if that works with that kind of ability.
     
  3. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    764
    Resources:
    0
    Resources:
    0
    Just tried it, no luck. That damn Get User button refuses to budge, haha. Thanks for the suggestion though.
     
  4. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    416
    Resources:
    2
    Models:
    2
    Resources:
    2
    Dang. How about setting its coordinates to -11? (Can't remember if that's for X or Y though), it should be hidden from the command card, at least if you don't have other abilities at this location
     
  5. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    764
    Resources:
    0
    Resources:
    0
    No luck, you can't actually access the Get User button as far as I know, so hiding Select Hero doesn't really do anything and it's hidden already anyway.
     
  6. maddeem

    maddeem

    Joined:
    Jan 1, 2011
    Messages:
    1,284
    Resources:
    5
    Maps:
    2
    Spells:
    3
    Resources:
    5
  7. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    764
    Resources:
    0
    Resources:
    0
    That seems like my best and only option, but I don't understand. How do I hide Abilities besides the main Move, Attack. Stop, etc...

    Is there another CommandFunc file? The tutorials say you can hide any button, but i'm not sure where to find these other buttons. I guess they mean in the Object Editor by setting the button pos to 0, -11. Unfortunately, Get User is hidden from the Object Editor.

    Anyone know if there's a file that contains it?
     
  8. maddeem

    maddeem

    Joined:
    Jan 1, 2011
    Messages:
    1,284
    Resources:
    5
    Maps:
    2
    Spells:
    3
    Resources:
    5
    It may be in the CommandFunc.txt text file. I can't check right now, but I believe other hidden object editor data like build button positions are there too.
     
  9. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    764
    Resources:
    0
    Resources:
    0
    Found it! It was inside the neutralabilityfunc.txt file.

    For anyone that wants to hide the Get User button, set the button position in the neutralabilityfunc.txt file to 0,-11.
    It is listed as (I already changed the buttonpos to 0,-11):

    // neutral interact
    [Anei]
    Art=ReplaceableTextures\CommandButtons\BTNSelectUnit.blp
    Buttonpos=0,-11


    I attached the file below with these settings applied. Simply import it into your map and set it's import path to "Units\neutralabilityfunc.txt"
    and you're good to go.
     

    Attached Files:

  10. maddeem

    maddeem

    Joined:
    Jan 1, 2011
    Messages:
    1,284
    Resources:
    5
    Maps:
    2
    Spells:
    3
    Resources:
    5
    Good work! You solved your problem and discovered a solution for other modders
     
  11. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    416
    Resources:
    2
    Models:
    2
    Resources:
    2
    Well done, that might be pretty useful for that elusive 12th item slot indeed :>