Bully-Board

Bully Modding Section => Script Modding => Topic started by: boyser on January 13, 2015, 12:58:22 PM

Title: Lua Help
Post by: boyser on January 13, 2015, 12:58:22 PM
How do i make fighting styles to play with
Title: Re: Lua Help
Post by: DaBOSS54320 on January 13, 2015, 04:49:26 PM
FIrst learn how to script mod Bully using LUA. Then, learn how PedSetActionTree, PedSetActionNode, and ExecuteActionNode works. There is no real tutorials I know of atm, maybe if you wait a while one will show up.
Title: Re: Lua Help
Post by: Mick3Mouse on January 13, 2015, 05:59:09 PM
First you watch SWEGTA's lua tutorials:

Bully Lua Tutorial - Basic Setup (http://www.youtube.com/watch?v=DhMM7r1FPmM&list=PLoRn2wy62AS0BYxLLS_rO2KmClB4BQPbW#)

Then when you made your script working, then you can put codes that you want. 

For example:


This code will make the player have Gary's full style ---- PedSetActionTree(gplayer, "/Global/Nemesis", "Act/Anim/Nemesis.act")

Player will have Russel boss style ---    PedSetActionTree(gplayer, "/Global/BOSS_Russell", "Act/Anim/Boss_Russell.act")

Greaser/Jock/Preppy/Nerd's A striker style --     PedSetActionTree(Nerd1, "/Global/X_Striker_A", "Act/Anim/X_Striker_A.act")
Replace "X" with the style you want.

If you do "G_Striker_A" you will get Greasers A strike.



This was just some basic things if you want to learn how to switch style.
Ask me or anyone if you have any questions  :jajaja:

 




Title: Re: Lua Help
Post by: DaBOSS54320 on January 13, 2015, 06:49:45 PM
Very hopeful post Mick. I'll add onto it with a list of the styles you can put on. These style names go after the "/Global/" and in between "Act/Anim/" and ".act". All the styles are like this, EXCEPT the "Player" style. "Player" is just "Act/Player.act" instead of "Act/Anim/Player.act".

This isn't ALL the styles but it's a majority of them.

Player
AN_DOG
Authority
B_Striker_A
BOSS_Darby
BOSS_Russell
Crazy_Basic
CV_Drunk
CV_Female_A
CV_Male_A
CV_OLD
DO_Edgar
DO_Grappler_A
DO_Melee_A
DO_Striker_A
G_Grappler_A
G_Johnny
G_Melee_A
G_Ranged_A
G_Striker_A
GS_Fat_A
GS_Female_A
GS_Male_A
Hobo_Blocker
J_Damon
J_Grappler_A
J_Mascot
J_Melee_A
J_Striker_A
J_Ted
LE_Orderly_A
N_Earnest
N_Ranged_A
N_Striker_A
N_Striker_B
Nemesis
P_Bif
P_Grappler_A
P_Striker_A
P_Striker_B
PunchBagBS
Russell_102
TE_Female_A
TE_Secretary
TO_Siamese
WrestlingACT
Title: Re: Lua Help
Post by: boyser on January 14, 2015, 07:06:05 AM
how do i find action nodes and use them
Title: Re: Lua Help
Post by: Mick3Mouse on January 14, 2015, 07:45:05 AM
Yeah, you're welcome.
Title: Re: Lua Help
Post by: boyser on January 14, 2015, 11:09:25 AM
thank you but how do i make the G_Johnny contallable he keeps hitting randomly
and do you guys have xfire
Title: Re: Lua Help
Post by: AlphaTech on January 14, 2015, 02:52:50 PM
Add me on xfire and I can give you some of the action nodes to use for johnny's boss style. My xifre is LostInSpace977, since releasing action nodes online will result in b*tching of some members.
Title: Re: Lua Help
Post by: boyser on January 14, 2015, 03:07:02 PM
ok thanks i sent you a request
Title: Re: Lua Help
Post by: boyser on January 15, 2015, 12:35:32 PM
Mick3Mouse do you have xfire or steam
Title: Re: Lua Help
Post by: DaBOSS54320 on January 15, 2015, 01:51:26 PM
Add me on xfire and I can give you some of the action nodes to use for johnny's boss style. My xifre is LostInSpace977, since releasing action nodes online will result in b*tching of some members.

It's a free internet, post them right here if you found them. (and want to)
Title: Re: Lua Help
Post by: boyser on January 15, 2015, 04:20:27 PM
Daboss what is your xfire name
Title: Re: Lua Help
Post by: DaBOSS54320 on January 15, 2015, 04:41:14 PM
DaBOSS54320
Title: Re: Lua Help
Post by: boyser on January 15, 2015, 04:50:36 PM
Ok i will add you now i'm georgeleon96199
Title: Re: Lua Help
Post by: SWEGTA on January 16, 2015, 08:10:07 AM
BOSS is one cool motherfucker.
He'll help you out m8.  8)
Title: Re: Lua Help
Post by: boyser on January 16, 2015, 12:24:18 PM
How do i change the respect
Title: Re: Lua Help
Post by: Mick3Mouse on January 16, 2015, 06:04:34 PM
Try use the search feature in the right top corner of the page!

Just search for "lua respect" then results will show up on how the respect works, and how you edit it. 

This one have i looked in when i learnt - http://www.bully-board.com/index.php?topic=18347 (http://www.bully-board.com/index.php?topic=18347)
Title: Re: Lua Help
Post by: boyser on January 17, 2015, 03:31:59 PM
How do i make like a menu that has fighting styles
Title: Re: Lua Help
Post by: AfterLife on January 17, 2015, 07:15:37 PM
How do i make like a menu that has fighting styles
I can help  :) Get on Xfire
Title: Re: Lua Help
Post by: boyser on January 21, 2015, 03:45:20 AM
How do i add text when the mod starts
Title: Re: Lua Help
Post by: Mick3Mouse on January 21, 2015, 07:25:04 AM
I'm not going to tell you. 


You need to search for it yourself, if you keep asking all the time people will ignore you.  Have you even looked for tutorials? 

Here is a very detailed and good tutorial for you:
http://www.bully-board.com/index.php?topic=18725.0 (http://www.bully-board.com/index.php?topic=18725.0)


But please, try to say "thanks" you don't appreciate that we are helping you.
And try to search for yourself.  :)
Title: Re: Lua Help
Post by: boyser on January 21, 2015, 02:03:42 PM
sorry i didn't say thanks when you helped me and i will search for the text thing
Title: Re: Lua Help
Post by: AfterLife on January 23, 2015, 06:25:05 AM
TextPrintString is the code
Title: Re: Lua Help
Post by: DaBOSS54320 on January 25, 2015, 12:45:22 AM
and the arguments are "text",time,position.

Position is 1 for top of screen, 2 for bottom.

Example:
TextPrintString("Mod by DaBOSS\nThis message will display for 5 seconds",5,1)

the '\n' in there represents a line break.
Title: Re: Lua Help
Post by: boyser on January 25, 2015, 12:59:47 PM
How Can i make a script mod?Not ArcRace1.lur
and thanks
Title: Re: Lua Help
Post by: DaBOSS54320 on January 25, 2015, 01:37:20 PM
ArcRace is a script, and changing it, is a mod. Thus, it's a script mod.

If you don't like using the arcade machine, you can edit other scripts if you want.

Here's the source to STimeCycle.lur if you wanna mod it, just compile to STimeCycle.lur and replace STimeCycle.lur instead of ArcRace1.lur. You need to use the source that I gave below so that the regular stuff in the script isn't removed because that may mess the game up. Just add onto it.

Code: [Select]
function main()
  repeat
    Wait(0)
  until not Alive
end

F_AttendedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(false)
  PlayerSetPunishmentPoints(0)
end
 
F_MissedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(true)
  StatAddToInt(166)
end
 
F_AttendedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrintString("You got home in time for curfew", 4)
  end
end
 
F_MissedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrint("TM_TIRED5", 4, 2)
  end
end
 
F_StartClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
  local l_6_0 = PlayerGetPunishmentPoints() + GetSkippingPunishment()
end
 
F_EndClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
end
 
F_StartMorning = function()
  F_UpdateTimeCycle()
end
 
F_EndMorning = function()
  F_UpdateTimeCycle()
end
 
F_StartLunch = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    F_UpdateTimeCycle()
    return
  end
  F_UpdateTimeCycle()
end
 
F_EndLunch = function()
  F_UpdateTimeCycle()
end
 
F_StartAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_EndAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_StartEvening = function()
  F_UpdateTimeCycle()
end
 
F_EndEvening = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_SlightlyTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_Tired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_MoreTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndTired = function()
  F_UpdateTimeCycle()
end
 
F_Nothing = function()
end
 
F_ClassWarning = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  local l_23_0 = math.random(1, 2)
end
 
F_UpdateTimeCycle = function()
  if not IsMissionCompleated("1_B") then
    local l_24_0 = GetCurrentDay(false)
    if l_24_0 < 0 or l_24_0 > 2 then
      SetCurrentDay(0)
    end
  end
  F_UpdateCurfew()
end
 
F_UpdateCurfew = function()
  local l_25_0 = shared.gCurfewRules
  if not l_25_0 then
    l_25_0 = F_CurfewDefaultRules
  end
  l_25_0()
end
 
F_CurfewDefaultRules = function()
  local l_26_0 = ClockGet()
  if l_26_0 >= 23 or l_26_0 < 7 then
    shared.gCurfew = true
  else
    shared.gCurfew = false
  end
end


In case you didn't know...
Instead of: "LuaC -o ArcRace1.lur Script.lua"
You'll do: "LuaC -o STimeCycle.lur Script.lua"
Title: Re: Lua Help
Post by: boyser on January 25, 2015, 01:43:07 PM
Thanks So i put this at the begging
Title: Re: Lua Help
Post by: Unknownsoldier on January 29, 2015, 12:43:33 PM
How do i add text when the mod starts
Well m8 it seems like you haven't even bothered to look at a tutorial. That is one of the things in basically every one. I will just say it:

TextPrintString(">mod name<\nCreated by: boyser",3,1)

Change the ">mod name<" to whatever the name of your mod is.