News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Changing a boss' stat?  (Read 4177 times)

0 Members and 1 Guest are viewing this topic.

Offline DezmondVulpin

  • Newbie
  • *
  • Posts: 0
    • View Profile
Changing a boss' stat?
« on: April 27, 2016, 11:43:40 AM »
Hello everyone! I’m not really a modder, but I have dabbled in editing the files of the game to make Bully a little more populated/lively and difficult. There’s a nagging problem that I’ve had after my latest test play through though.

-After lurking the forums for a bit (quite a bit honestly :P ), I’ve found out that some missions use lua scripting that overrides the values in the pedstats and ide files. Especially a clique leader's boss fight. So here’s a question. If I wanted to change Gary or Johnny’s stats in their respective boss fights? How would I go about doing that? For example, giving Gary the dropout’s fighting style and beefing up his health and attack frequency a bit during Final Showdown.

I know that would involve lua scripting, but if someone can give me a basic run through of how to do this particular thing, it’d help me a lot. I'm pretty new to it. Thank you. Annd apologies if this is in the wrong section.

Offline GaryHarrington

  • A Guy Who Likes Open World and FPS Games
  • Sr. Member
  • ***
  • Posts: 515
  • Gender: Male
  • Just Love Bully and GTA ...Nothing Interested
    • View Profile
Re: Changing a boss' stat?
« Reply #1 on: May 01, 2016, 11:59:53 PM »
if you want to just use the old-fashioned way to change the fighting style just hex edit it. (need HxD Hex Editor application)
but for changing his health and attack frequency you can change it from pedstat.dat (in config>dat folder),find the stat that gary default used and change the attack frequency and health numbers on each column .. (just use NotePad)

I use these way because i am not smart enough to use lua ways
« Last Edit: May 02, 2016, 12:01:33 AM by GaryHarrington »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Changing a boss' stat?
« Reply #2 on: May 02, 2016, 12:51:32 AM »
Well the boss mission scripts override those things by changing their action tree and stats in the script, so that's not going to be good enough.

What you could do is either get a decompiled version of the boss scripts and edit those, or in some script that you always have running (like STimeCycle.lur) check when the boss mission is running, and loop through all the peds (use PedFindInAreaXYZ to get all the peds) and find which one is whoever's model. Then do what ya need.

For example...
Code: [Select]
function main()
  while true do
    -- Wait for the mission to start:
    while not MissionActiveSpecific("2_B") do
      Wait(0)
    end
   
    -- Find Darby:
    local darby = -1
    repeat
      for i,ped in {PedFindInAreaXYZ(0,0,0,999999)} do
        if i > 1 and PedIsValid(ped) and PedIsModel(ped,37) then
          darby = ped
          break
        end
      end
      Wait(0)
    until not MissionActiveSpecific("2_B")
   
    -- Main loop for the rest of the mission:
    repeat
      -- If Darby is playing his boss style (what the script gives him), change it to something else:
      if PedIsPlaying(darby,"/Global/BOSS_Darby/Default_KEY",true) then
        -- Load animations for the style:
        for i,agr in {"F_Nerds","N_Striker","N_Ranged","Straf_Nerd"} do
          if not HasAnimGroupLoaded(agr) then
            LoadAnimationGroup(agr)
          end
        end
       
        -- Set the style:
        PedSetActionTree(darby,"/Global/N_Ranged_A","Act/Anim/N_Ranged_A.act")
      end
      Wait(0)
    until not PedIsValid(darby) or not MissionActiveSpecific("2_B")
  end
end