RivvaDead Posted February 17, 2016 Share Posted February 17, 2016 (edited) Edit: SOLVED!Thanks to 'hairlessorphan' suggestion here's the code: local UIHackingScreen HackingScreen; local float HackChance; HackingScreen = UIHackingScreen(`SCREENSTACK.GetScreen(class'UIHackingScreen')); HackChance = HackingScreen.GetHackChance(HackingScreen.SelectedHackRewardOption); Hi, I'm making a mod that develops soldier skills on the battlefield during combat a la Jagged Alliance style (and probably many other games like that).I'm gonna publish the mod tommorow, however I've decided to expand its functionality.Give a bonus for challenging feats like hiting an enemy with a small chance and so on. Unfortunately for that I need to access the hack percentage chance.I have the percentage for attacks but when I check the same variables within hacking ability i get 0 in all integers. Does anyone know where is the hack chance located? Any help appreciated,Thanks! Edited February 18, 2016 by RivvqPL Link to comment Share on other sites More sharing options...
Nolanoth Posted February 18, 2016 Share Posted February 18, 2016 Please... please... PLEASE! I beg you... add +5 points to the hack skill on all successful hacks performed by all soldiers, including console ones. The current state of hacking is a disaster and while it would be nice to gain a small bonus for low hit % shots but aren't there some mechanics similar to that already in place? Invisible %? Link to comment Share on other sites More sharing options...
hairlessorphan Posted February 18, 2016 Share Posted February 18, 2016 (edited) There are two classes I can point you to. The first is where the hacking roll is initiated. That's UIHackingScreen.uc. There's a call stack that eventually leads to where the roll is actually made. That's X2AbilityToHitCalc_Hacking.uc. This class also has the static functions to calculate relevant bonuses. Depending on how you want to implement your bonus, it'll be somewhere between these two classes. Edited February 18, 2016 by hairlessorphan Link to comment Share on other sites More sharing options...
Nolanoth Posted February 18, 2016 Share Posted February 18, 2016 If I could have done it I would have a lot time ago but I can assure you I can't do that. Link to comment Share on other sites More sharing options...
hairlessorphan Posted February 18, 2016 Share Posted February 18, 2016 If I could have done it I would have a lot time ago but I can assure you I can't do that. What? That wasn't for you, that was for the OP. Because, you know, this is his thread. Not yours. Link to comment Share on other sites More sharing options...
RivvaDead Posted February 18, 2016 Author Share Posted February 18, 2016 There are two classes I can point you to. The first is where the hacking roll is initiated. That's UIHackingScreen.uc. There's a call stack that eventually leads to where the roll is actually made. That's X2AbilityToHitCalc_Hacking.uc. This class also has the static functions to calculate relevant bonuses. Depending on how you want to implement your bonus, it'll be somewhere between these two classes. I've seen those classes previously but thought that there was a way to get hack chance more easily. Turns out it's actually very simple with UIHackingScreen.uc! Thanks to your encouragement I've played around with it and got it, so THANKS :D!I've also updated the first post with the code for anyone else. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts