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


Show Posts

Messages | * Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - RBS ID

Pages: [1] 2
1
Modding Questions/Help / Crashed when trying to load a savegame
« on: May 13, 2022, 08:26:22 AM »
Hello, can someone help me?

I'm making a mod for Bully AE, everything is fine in gameplay, but when trying to load a savegame, the game crashed. How to prevent that? Is it because of my mod is too big? Creating too many threads? Or what?

2
Bully Modding / Sorting table (array)
« on: May 01, 2022, 06:28:56 AM »
Sorting 1D array:
Code: [Select]
a={'i', 'o', 'a', 'e', 'u'}
table.sort(a)
for _, v in ipairs(a) do
  print(v)
end

Sorting 2D array:
Code: [Select]
G = {}
for k, v in pairs(_G) do
  G[#G+1] = {tostring(k), tostring(v)}    -- #G  is basically just a new syntax of table.getn(G), this # operator doesn't available in Bully's Lua v5.0.2
end
table.sort(G, function(a, b)
  return a[1] < b[1]
end)
for _, v in ipairs(G) do
  print("Key: " .. v[1] .. "\nValue: " .. v[2] .. "\n")
end

Try the code in this site: lua.org/demo.html

4
Bully Modding / Linear interpolation
« on: March 18, 2022, 12:25:40 AM »
Playing around with linear interpolation, another that similar to this is called easing or tweening.

Linear interpolation is used to move an object slowly. It can move slowly when it starts to move (acceleration), or when approaching the end point, or both.

Code: [Select]

--[[
  a = start point
  b = end point
  t = progress (the value is between 0 and 1)
]]
_G.math.lerp = function(a, b, t)
  return a + (b - a) * t
end

function main()
  Wait(1000)
  local x, y, z = PlayerGetPosXYZ ()
  local eff = EffectCreate ("GymFire", x, y, z)
  repeat
    Wait(0)
    local X, Y, Z = PlayerGetPosXYZ ()
    x, y, z = math.lerp(x, X,  0.05),  math.lerp(y, Y, 0.05), math.lerp(z, Z, 0.05)
    EffectSetPosition (eff, x, y, z)
  until IsButtonBeingPressed (6, 0)
  EffectKill (eff)
  x, y, z, eff = nil, nil, nil, nil
  while true do
    Wait(0)
  end
end


5
Script Modding / Linear interpolation
« on: March 17, 2022, 10:20:53 AM »
Playing around with linear interpolation, another that similar to this is easing or tweening.

Linear interpolation is used to move an object slowly. It can move slowly when it starts to move (acceleration), or when approaching the end point, or both.


Code: [Select]

--[[
  a = start point
  b = end point
  t = progress (the value is between 0 and 1)
]]
_G.math.lerp = function(a, b, t)
  return a + (b - a) * t
end

function main()
  Wait(1000)
  local x, y, z = PlayerGetPosXYZ ()
  local eff = EffectCreate ("GymFire", x, y, z)
  repeat
    Wait(0)
    local X, Y, Z = PlayerGetPosXYZ ()
    x, y, z = math.lerp(x, X,  0.05),  math.lerp(y, Y, 0.05), math.lerp(z, Z, 0.05)
  until IsButtonBeingPressed (6, 0)
  EffectKill (eff)
  x, y, z, eff = nil, nil, nil, nil
  while true do
    Wait(0)
  end
end


Sorry, I posted in wrong section

6
Modding Questions/Help / Stimulus ids
« on: March 17, 2022, 09:52:41 AM »
What are these functions & how to use it?
Does someone know the stimulus ids?

Code: [Select]

Found these in decompiled R* Bully .lur scripts.


PedAddBroadcastStimulus(number) -- Can be 2 argument, PedAddBroadcastStimulus(number, number)
- PedAddBroadcastStimulus(16)
- PedAddBroadcastStimulus(59, shared.gSchoolFAlarmTime/1000)

PedCreateStimulus(ped1, ped2, number)
- PedCreateStimulus(gPlayer, l_27_0, 65)  -- l_27_0 = ped

PedHasGeneratedStimulusOfType(ped, number)
- local tempStimTarget, tempStimBool = PedHasGeneratedStimulusOfType(gPlayer, 49)

PedOverrideSocialResponseToStimulus(ped, number, number)
- PedOverrideSocialResponseToStimulus(pedRussell.id, 0, 10)

PedRemoveBroadcastStimulus(number)
- PedRemoveBroadcastStimulus(16)

PedRemoveStimulus(ped, number)
- PedRemoveStimulus(gPlayer, 27)


7
Bully Modding / Global variable
« on: February 22, 2022, 07:20:48 AM »
This code is to show all global variables that existed.

Code: [Select]
function main()
    while not SystemIsReady() do
        Wait(0)
    end
    local function FasterScroll(b)
        if IsButtonPressed(7, 0) and IsButtonPressed(b, 0) then
            return true
        end
        return false
    end
    local st = false
    local gv, s = {}, 1
    for k, v in pairs(_G) do
        table.insert(gv, {tostring(k), tostring(v)})
    end
    while true do
        Wait(0)
        if IsButtonBeingPressed(14, 0) then
            st = not st
        end
        if st then
            if IsButtonBeingPressed(0, 0) or FasterScroll(0) then
                s = s - 1
                if s < 1 then
                    s = table.getn(gv)
                end
            elseif IsButtonBeingPressed(1, 0) or FasterScroll(1) then
                s = s + 1
                if s > table.getn(gv) then
                    s = 1
                end
            end
            TextPrintString("Key: " .. gv[s][1] .. "\n\nValue: " .. gv[s][2] .. "\n\n(" .. s .. ")", 1, 1)
        end
    end
end

8
Modding Questions/Help / Load test area & Island 3
« on: February 12, 2022, 06:49:12 AM »
How to load test area & Island 3? Because when I tried to teleport to it's coordinate, it just endless black screen.

9
Modding Questions/Help / Lua load files
« on: February 01, 2022, 05:00:32 AM »
How to load a file that has some user's configuration of the mod, and then use the data(variables, tables) in the mod's script. Anyone know?

And 1 again, is it possible to load a user's configuration setting file that isn't a compiled file, like  .txt, or .ini?

Sorry for bad English.

10
Modding Questions/Help / Lua rich text formatting
« on: January 26, 2022, 07:45:23 AM »
How to make italic, bold, or underlined text in Lua like Altamurenza did in this video?
https://youtu.be/eF9Yv_-zz6o

11
Modding Questions/Help / Canis Canem Edit - PS2 | script modding
« on: January 26, 2022, 04:38:26 AM »
I tried to put the mod to CCE on pcsx2 with ultraiso, but the game crashed after a few seconds. Even though the mod I use is only a small mod(random style, kiss all womans, humiliation). Anyone know the cause? Or I just choose the Bully PS2 over CCE?

12
Modding Questions/Help / What is _G ?
« on: January 25, 2022, 12:33:33 AM »
What is  _G  ?

13
Modding Questions/Help / What is Coroutine?
« on: January 20, 2022, 07:23:36 PM »
Does anyone know, what is Coroutine?

14
Modding Questions/Help / Get ped name without "N_" (substring)
« on: January 15, 2022, 01:24:09 AM »
Does anyone know how to get the name of the ped without   N_   ?
Example:  N_Jimmy  =>  Jimmy

I've tried like this, but the script just immediately stopped running.
Code: [Select]
local pedName = PedGetName(ped)
string.sub(pedName, 3, string.len(pedName)) -- 1.
string.sub(pedName, 3) -- 2.

15
Mod Releases / Selector Mod - AE (Update 1)
« on: January 03, 2022, 02:17:17 AM »
Selector Mod - AE (Update 1)

Added some more features.

https://youtu.be/DSv141uP4pE

Pages: [1] 2