1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

How do you know what command scripts are available?

Discussion in 'UO Enhanced Client Discussion' started by Sweeney, Aug 16, 2009.

  1. Sweeney

    Sweeney Guest

    Very curious.. do you just search the .xml files for commands?
     
  2. Sweeney

    Sweeney Guest

    A few people have read this.. what is your secret? I hate being ignorant.
     
  3. Frarc

    Frarc Stratics Legend
    Stratics Veteran Alumni Stratics Legend

    Joined:
    Mar 18, 2003
    Messages:
    7,770
    Likes Received:
    1,132
  4. Sweeney

    Sweeney Guest

  5. mdscan

    mdscan Guest

    I have asked for this info too, but no reply. I guess that anyone who does know has not read the thread. I can't see any reason why they would not share the info so more people can try to come up with new scripts.
    I hope someone replies soon.
     
  6. Sweeney

    Sweeney Guest

    Evidently noone wants to share. So much for the UO community.

    *wonders how many wannabe-modders have died in the wake*
     
  7. Gildar

    Gildar Babbling Loonie
    Stratics Veteran

    Joined:
    Apr 22, 2004
    Messages:
    2,354
    Likes Received:
    4
    Sorry - when this thread first showed up, this was already answered in two other threads, so I just skipped over it figuring people would start noticing those threads.
    Since then, forum activity has exploded, and I didn't see any of the bumps (I've only read probably 1/4 of the threads in this forum since I don't have time to read them all).


    In the UserInterface folder, there is a file named "default.zip". Within that, there are a number of files that have a ".lua" extension.
    Anything that can be done in one line in those files can be done with a script command.
    For example, if you look in "Source/Debug.lua", you'll see a function called "Debug.Print". You can call this with a script command by...
    Code:
    /script Debug.Print( "Some message" )
    This will then show in your Debug Console (which you can turn on with "/debugwindow on").

    If you look in "Source/SettingsWindow.lua", you'll see a large function called "SettingsWindow.OnApplyButton". In this function, you can see how the settings are changed.
    If you wanted to change the foliage setting, for example, you'd look at this line:
    Code:
    SystemData.Settings.Resolution.displayFoliage = ButtonGetPressedFlag( "SettingsGraphicsShowFoliageButton" )
    So, to change the foliage setting to false, you could use the following script command:
    Code:
    /script SystemData.Settings.Resolution.displayFoliage = false
    But you'd notice that this doesn't actually change your foliage. So, you should look back to the OnApplyButton function and see what else it does. If you look down at the bottom, you'll see this line:
    Code:
    UserSettingsChanged()
    
    This is what actually applies your settings, and causes them to take effect. So to change the foliage setting, you'll need two script commands.
    Code:
    /script SystemData.Settings.Resolution.displayFoliage = false
    /script UserSettingsChanged()
     
  8. kelmo

    kelmo Old and in the way
    Professional Stratics Veteran Alumni Dread Lord

    Joined:
    May 12, 2008
    Messages:
    17,382
    Likes Received:
    4,706
    Just spend 4 hours on it...
     
  9. mdscan

    mdscan Guest

    Thank you for the help. That is exactly what I was looking for. I missed the other threads that you mentioned.
    I don't mind spending time to figure stuff out, but it helps to know where to start.
    Thanks again.
    This info might be useful in the sticky thread for Command Scripts.
     
  10. kelmo

    kelmo Old and in the way
    Professional Stratics Veteran Alumni Dread Lord

    Joined:
    May 12, 2008
    Messages:
    17,382
    Likes Received:
    4,706
    Hey md... My remark was aimed at another poster. I am glad you found your answers. *tips hat*