Results 1 to 4 of 4
  1. #1
    y0slaap's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    My Mood
    Bored

    Any way to modify luck directly?

    I've been trying to find a way to modify the Luck factor in Terraria directly by maxing the Minimum Luck Cap so that I'm always extremely "lucky" in game. Can I do that with cheat engine or do I need to modify the file directly? How can I do this?
    Last edited by y0slaap; 01-01-2021 at 04:46 PM.

  2. #2
    HiImKyle's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    England
    Posts
    233
    Reputation
    10
    Thanks
    206
    Could probably use Cheat Engine for it, I'm not sure if that would reflect in-game considering its set every update, then again I'm useless with CE... If you know what you're doing when it comes to editing it directly within the game's code it's at Terraria.Player.luck - there is also a NormalizedLuck property within the Player object that you might want to look at too, that's clamped to -1/1 so it never exceeds those. The game sets a players luck at Terraria.Player.RecalculateLuck(), you'd want to edit this method most likely, which is called by the player update method.

    Even if you did change it, servers might not** keep the change. Just depends on if the server is checking for abnormal luck.
    Last edited by HiImKyle; 01-01-2021 at 05:16 PM. Reason: Mistake

  3. The Following User Says Thank You to HiImKyle For This Useful Post:

    y0slaap (01-01-2021)

  4. #3
    y0slaap's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    Quote Originally Posted by HiImKyle View Post
    Could probably use Cheat Engine for it, I'm not sure if that would reflect in-game considering its set every update, then again I'm useless with CE... If you know what you're doing when it comes to editing it directly within the game's code it's at Terraria.Player.luck - there is also a NormalizedLuck property within the Player object that you might want to look at too, that's clamped to -1/1 so it never exceeds those. The game sets a players luck at Terraria.Player.RecalculateLuck(), you'd want to edit this method most likely, which is called by the player update method.

    Even if you did change it, servers might not** keep the change. Just depends on if the server is checking for abnormal luck.
    Couldn't I just set the LuckMinimumCap to a value of, example, 1f?
    And that'd just make my luck at minimum a value of 1?

    Either way I looked around in the code and messed around with the NormalizedLuck values and the RecalculateLuck values.
    I set the value of the LuckPotion at 1f so if I used a luck potion that'd increase my luck by a value of +1, right?
    I'm not an expert at this, lol

    I set those values and compiled the executable right now, gonna test it out in singleplayer.

  5. #4
    HiImKyle's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    England
    Posts
    233
    Reputation
    10
    Thanks
    206
    Quote Originally Posted by y0slaap View Post
    Couldn't I just set the LuckMinimumCap to a value of, example, 1f?
    And that'd just make my luck at minimum a value of 1?
    Yeah, probably not now I look at it a bit more, just looking at where NormalizedLuck is used is not that promising. NormalizedLuck only looks like it gets used in dialogue for the wizard more than actually modifying roll chances.

    The luck float itself is used much more in promising methods like Update, RollLuck and other various stuff. Maybe focus on that instead.

    I'm a bit rusty on how Terraria handles things, been off the programming and playing side of things recently due to PC slowly dying, she'll get me through a month or two tho.

  6. The Following User Says Thank You to HiImKyle For This Useful Post:

    y0slaap (01-02-2021)

Similar Threads

  1. Is there any way to modify your iridescent shards using cheat engine?
    By TheMasterriFT in forum Dead by Daylight Discussion & Help
    Replies: 1
    Last Post: 07-09-2019, 03:16 AM
  2. [Help] any way to extract and modify meshes?
    By abb2083 in forum Call of Duty Modern Warfare 2 Texture Modding
    Replies: 0
    Last Post: 10-08-2014, 02:33 PM
  3. Need someone that did not modify there CA in any way
    By CoderNever in forum Combat Arms Discussions
    Replies: 10
    Last Post: 06-08-2010, 04:51 PM
  4. Any way to make my computer go fast and fater
    By Gourav2122 in forum Hardware & Software Support
    Replies: 18
    Last Post: 12-19-2006, 09:27 PM
  5. any way to use wpe for damage editing?
    By zelda803 in forum WarRock - International Hacks
    Replies: 10
    Last Post: 02-09-2006, 02:33 AM