EC: artifact notification / luck stat

In EC, there's an old post here that illustrates how to get the artifact splash notification when you get a drop (like the event drops).

If you modify textparsing.lua TextParsing.CenterScreenText() as below, you'll also get a logged message about what your luck was at the time of the drop (enable timestamps in the EC log if you want to have the time logged too).

In case you need to provide that info in reply to broadsword inquiries, etc :)


	if ( textID == 1152340 ) then -- a reward item has been placed in your backpack.  (catches feudal drops).
CenterScreenText.SendCenterScreenTexture("artifact")
Debug.PrintToChat(L"Luck at time of artifact drop: ".. towstring(WindowData.PlayerStatus["Luck"]))
return
end


Comments

  • TimStTimSt Posts: 1,867
    edited October 2023
    Adding to this.  If you want to get a notification when you receive a special item when you are trick-or-treating add the following code

    	if ( SystemData.TextID == 1076776) then -- Want something really special? Of course you do!
    CenterScreenText.SendCenterScreenTexture("artifact")
    end
  • ForeverFunForeverFun Posts: 900
    edited October 2023
    Here's a little data.   Same elapsed time.  No luck statues, no potion.

    455 luck 4 drops
    515 luck 6 drops

    1450 luck 22 drops (not obvious why more drops than below, more research needed)
    2360 luck 15 drops (magery w/slayers big difference vs. weapons at 1.25 swing speed)
    2375 luck 19 drops
    2450 luck 18 drops

    The influence of whether players are partied or not isn't yet known.  There are odd interactions with how fame is split up while partied;  hopefully being in a party isn't a negative.
  • poppspopps Posts: 4,024
    Here's a little data.   Same elapsed time.  No luck statues, no potion.

    455 luck 4 drops
    515 luck 6 drops

    1450 luck 22 drops (not obvious why more drops than below, more research needed)
    2360 luck 15 drops (magery w/slayers big difference vs. weapons at 1.25 swing speed)
    2375 luck 19 drops
    2450 luck 18 drops

    The influence of whether players are partied or not isn't yet known.  There are odd interactions with how fame is split up while partied;  hopefully being in a party isn't a negative.
    That is great and very helpful testing ? Thank you.

    One curiosity, why such a gap in between 515 and 1450 Luck ?

    On what template was this test done ? Dexer or Spellcasting/Tamer ?
  • NecronomNecronom Posts: 79
    edited October 2023
    How exactly do you get this to work? Not entirely sure if there is a post out there showing the steps, but what I did...
    1) Extracted the TextParsing.lua file... 
    2) Edited it to include said If statement..
    3) Added the file back into the archive default.zip ... 

    And I am running UOSA.exe directly, but doesn't seem to be working?

    Thanks in advance...
    @ForeverFun Btw, isn't that supposed to be
    SystemData.TextID
    And not just
    textID
    Edit: Maybe the ID# is wrong? I dunno...
  • GrimbeardGrimbeard Posts: 2,286
    This is why the Dev team should include these fixes in official patches 
  • Arroth_ThaielArroth_Thaiel Posts: 1,060
    edited October 2023
    @Necronom and anyone else who wants to make this mod...


    1. Go into the UserInterface folder in your UOEC install directory. It will probably be something like the following:

    C:\...\Program Files (x86)\Electronic Arts\Ultima Online Enhanced Client > UserInterface


    2. Create a new folder here for your custom UI. Call it something cool, like Necronomnom's UI. Within the Necronomnom's UI folder, create a subfolder called Source. The directory structure should now be something like:
    C:\...\Ultima Online Enhanced Client > UserInterface > Necronomnom's UI > Source


    3. In C:\...\Ultima Online Enhanced Client > UserInterface
    Unzip Default.zip to some location


    4. Go to where you unzipped Default.zip and into the Source folder.
    C:\...\Default > Source

    Copy textparsing.lua from C:\...\Default > Source
    into
    C:\...\Ultima Online Enhanced Client > UserInterface > Necronomnom's UI > Source


    5. Make the changes described above to your copy of textparsing.lua (in Necronomnom's UI > Source)  and SAVE the file.

    (Don't alter the files in the unzipped Default > Source. This will just cause you headaches down the road. Keep those Default files as originals. Make your copies first, then work in the copies. I personally would never have been a big enough idiot to not document changes I made to Default files, have no backups, and have to redownload the EC to get working files again........)

     :# 


    6. Load UO and at the login screen select Necronomnom's UI from the custom UI drop down menu.

    -Arroth
  • NecronomNecronom Posts: 79
    edited October 2023

    @Arroth_Thaiel ; Ah, thanks muchly Arroth.. I'll try that out in a bit.

    Edit: Oh right, about editing the unzipped Default.zip file.. I was running the uopatch.exe instead of UOSA.exe and it would always redownload just that part of the patch, so again thanks for the information.
  • MariahMariah Posts: 3,250Moderator
    Guys, modding the UI is something I'm not competent to write about, but if you'd like to get together and create a basic guide to modding with some of the examples you've provided over the years, I'd be happy to create a new section under 'Technical' in the wiki for it.
    Send it to me by email to: mariah4broadsword@gmail.com
  • ForeverFunForeverFun Posts: 900
    edited October 2023
    Necronom said:
    @ ForeverFun Btw, isn't that supposed to be
    SystemData.TextID
    And not just
    textID
    Edit: Maybe the ID# is wrong? I dunno...

    Looks like @Arroth_Thaiel got you setup on your own UI folder with changes.

    You're right about your observation above.  I forgot about another change made long ago to 

    TextParsing.lua, top of CenterScreenText()

        local textID = SystemData.TextID

    All the references to SystemData.TextID were changed to use textID instead (rather than accessing a global).

    Another change is to use

    return

    after each satisfied if check -- like in my first post.    No reason to continue checking a textID that will never match subsequent checks.

    I may post other data later on luck ~4000 and luck ~800.

Sign In or Register to comment.