Automate the UOAM map file for UOR houses

Discussion in 'Renaissance Discussion' started by Quick, Apr 2, 2018.

  1. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    I saw this thread and wanted to simplify the process so I didn't A) have to do anything manually and B) have to use a spreadsheet. No one has time for all that. Instead, I just created a simple Powershell script that will automate this whole process. What does it do?

    Download: https://github.com/markdwags/uorhousepositions

    The README includes instructions for how to run it manually and how to setup it up to automatically run every day do you don't have to do a single thing.

    If you have any issues or questions, feel free to post something here or send me a message on IRC.
    medas, Keza, Buga and 12 others like this.
  2. Twister

    Twister Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 26, 2017
    Messages:
    528
    Likes Received:
    302
    Wow nice! Is this house.txt file updated automatically on the server? Do you know how frequently?
  3. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    The file is updated once a day, depending when the server was rebooted.
    Last edited: Apr 2, 2018
    Twister likes this.
  4. Ahirman

    Ahirman Well-Known Member
    UO:R Subscriber

    Joined:
    Mar 20, 2015
    Messages:
    1,160
    Likes Received:
    1,031
    Finally got it working and loaded in my task scheduler, Thanks!! :D
    Quick likes this.
  5. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Cool, let me know if you had any issues that I could either fix in the script or update the README to help the next person.
  6. Erlkonig

    Erlkonig Well-Known Member

    Joined:
    Jun 14, 2015
    Messages:
    1,131
    Likes Received:
    1,165
    First time running PS and it asked about execution polcies, I just said "no." Ended up having to change to unrestricted to get this to work.

    Set-ExecutionPolicy -ExecutionPolicy unrestricted
    Set-ExecutionPolicy unrestricted -Scope CurrentUser

    Also threw up a bunch of errors on compile but the result looks good.

    upload_2018-4-2_18-8-20.png

    I had the idea to do this when I created the original spreadsheet but never wanted to learn how. Looks simple enough.

    && For anyone wondering, script looks legit, nothing to worry about.
  7. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    @Erlkonig looks like when you copy/pasted the script (assuming you did..?), you may have missed the top <# at the top -- all those errors look like it was trying to execute the text header which of course won't run.
  8. Erlkonig

    Erlkonig Well-Known Member

    Joined:
    Jun 14, 2015
    Messages:
    1,131
    Likes Received:
    1,165
    fixed, not sure how I deleted that bit, I downloaded it as package from the GitHub.... tyty
    Quick likes this.
  9. Ahirman

    Ahirman Well-Known Member
    UO:R Subscriber

    Joined:
    Mar 20, 2015
    Messages:
    1,160
    Likes Received:
    1,031
    I had to unblock it using Unblock-File cmdlet instead of changing my execution policy. After I did that everything worked great.
  10. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    Is there a way to make this work with windows xp?
  11. Erlkonig

    Erlkonig Well-Known Member

    Joined:
    Jun 14, 2015
    Messages:
    1,131
    Likes Received:
    1,165
  12. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    @RIN -- I would be surprised if this worked on Windows XP, since XP doesn't support the later versions of Powershell which this uses.

    I'll come up with an alternative solution (probably use AWS Lambda with S3 to host it) and let you know here.
  13. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    Thanks Erl. Looked through that link and it seems this PowerShell 1.0 was designed for XP. The link from that page was dead but a quick search found this:

    https://support.microsoft.com/en-us...glish-language-installation-packages-for-wind

    When I get home from work I will look into it. It might actually work. I sure hope it does as I really would like to have all the houses in my UOAM.

    I appreciate the effort @Quick ! I will see if I can get the above 1.0 to work tonight and let you know what happens. Running XP in a virtual machine on my Windows 10 computer has made UO much more stable, but as we can see there are some drawbacks :)
  14. Ahirman

    Ahirman Well-Known Member
    UO:R Subscriber

    Joined:
    Mar 20, 2015
    Messages:
    1,160
    Likes Received:
    1,031
    Wow, I can't understand how that's possible. :confused:
  15. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    You'd be surprised how easy this is to do. If you have Windows 10 Pro, you can use the built-in virtualization. If you're on something else, you can download something like VirtualBox to do the same thing.

    Personally, I have no issues running UO on Windows 10.
    Ahirman likes this.
  16. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    I use Oracle Virtualbox and it works quite well.

    I initially had UO running just fine on Windows 10 but was getting constant drops from the server. So I thought it was Windows 10. It ended up being my router and how it has both a 2.4G and 5G wifi. The 2.4G I was using ended up being kinda wonky and I think the combo modem/router from my ISP is slightly broken. But since switching to 5G and doing periodic restarts, I've eliminated my drops.
    Ahirman likes this.
  17. Ahirman

    Ahirman Well-Known Member
    UO:R Subscriber

    Joined:
    Mar 20, 2015
    Messages:
    1,160
    Likes Received:
    1,031
    I run mine on win 10 in compatibility mode winxp sp3 and I've never had any issues. Just seems like a VM is a lot more work. :D
    RIN likes this.
  18. Althorn

    Althorn Well-Known Member
    UO:R Donor

    Joined:
    Mar 5, 2017
    Messages:
    1,121
    Likes Received:
    1,001
  19. Smash

    Smash Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,271
    Likes Received:
    852
    thanks home slice
  20. Ahirman

    Ahirman Well-Known Member
    UO:R Subscriber

    Joined:
    Mar 20, 2015
    Messages:
    1,160
    Likes Received:
    1,031
    I'm confused.

    I have the auto update working fine, but my fortresses are all messed up.



    fortress ico.JPG with fortress.JPG

    If I open the map file and change all the fortresses to castles it works fine.

    castles.JPG

Share This Page