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


Author Topic: An Interesting Idea  (Read 3163 times)

0 Members and 3 Guests are viewing this topic.

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
An Interesting Idea
« on: February 16, 2022, 02:25:12 PM »
I was just thinking... Lua has interactive mode, which is like a command line mode you can type stuff in. I think it's hard codded in the lua binary, so there is a good chance this thing exists in bully.exe

Would it be possible enter this mode in any way?

I believe this could really make modding this game move forward...
Think about it like the console on goldsrc/source based games :)

Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: An Interesting Idea
« Reply #1 on: February 16, 2022, 09:42:53 PM »
You mean Console Commands?

If that's what you mean, i already made it before (at least i tried to).
https://pastebin.com/8V240pBS

It's the most difficult script i ever made (seriously), it's working, but it also sucks cause i don't know any better.
Bully does not provide access to console anyway, so we have to make it ourself.

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #2 on: February 17, 2022, 07:16:10 PM »
Wow that's a long ass script  :blink:

I meant like a way to run lua functions on the go (exactly like a console command!!!). But you would actually type rather than scroll through the entire alphabet letter by letter...

Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: An Interesting Idea
« Reply #3 on: February 18, 2022, 01:21:24 AM »
Wow that's a long ass script  :blink:
I have to outsmart the string.gsub and loadstring functions lol.

It's quite challenging to convert string into readable Lua format without them.
Especially calling a variable from table and executing function with multiple arguments.

(e.g.: Table[Option].Name)
(e.g.: PedSetFlag(gPlayer, 2, true))

I meant like a way to run lua functions on the go (exactly like a console command!!!). But you would actually type rather than scroll through the entire alphabet letter by letter...
Typing feature is beyond our Lua capabilities, so it's the least i could do.
I'm sure that we need a ScriptHook to map all the keys.
« Last Edit: February 18, 2022, 02:02:27 AM by Altamurenza »

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #4 on: February 18, 2022, 04:54:27 PM »
Typing feature is beyond our Lua capabilities, so it's the least i could do.
I'm sure that we need a ScriptHook to map all the keys.
Unfortunately... That's why this idea came to mind in the first place.
I'm sure, though, bully can read from the entire keyboard (at least one key at a time). You can customize the the controls in scholarship edition so...

*Unrelated*
By the way what does this function do? (out of curiosity) :D

Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: An Interesting Idea
« Reply #5 on: February 18, 2022, 10:26:06 PM »
*Unrelated*
By the way what does this function do? (out of curiosity) :D
What's "this"?

I assume you already knew string.gsub based on a thread before.
If you're talking about loadstring, it loads a chunk or function from a string.

loadstring("option = option + 1")() --> option + 1
loadstring("TextPrintString('Hello Bullworth!', 4, 1)")() --> print 'Hello Bullworth!'

Somehow, it didn't work as i expected in Bully.
Well, it's so much easier to run code from a string with loadstring.

« Last Edit: February 18, 2022, 10:44:33 PM by Altamurenza »

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #6 on: February 19, 2022, 10:36:05 AM »
What's "this"?

Hmm... I could swear I had quoted one more time, strange  :hmm: 

I meant this function:
Code: [Select]
PedSetFlag(gPlayer, 2, true)
I have seen this function multiple times on decompiled scripts but never figured out what it does

Offline RBS ID

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
  • I don't know.
    • View Profile
    • This is website title.
Re: An Interesting Idea
« Reply #7 on: February 19, 2022, 10:48:37 AM »
It's to set the ped to crouch (true) or not (false).

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #8 on: February 19, 2022, 11:26:41 AM »
So that means PedFlag 2 is crouch state?

There are at least more than 100 of those...

Offline RBS ID

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
  • I don't know.
    • View Profile
    • This is website title.
Re: An Interesting Idea
« Reply #9 on: February 19, 2022, 11:13:22 PM »
Flags (PedSetFlag(pedname,flags,true/false)) by TDID/deadpool:
2) Crouch
3) Low crouch camera
8 ) Buged running
9) Invisibility
10) Go through peds
11) Strafe
17) Disable controls
18) Always display ped health (only peds)
19) Peds don't fight back (only peds)
20) Invincibility (only peds)
21) Can't attack, change weapon or shoot
23) Peds ignore conversations
24) Infinite ammo
27) Peds never block (only peds)
30) Infinite health (if set to ped then invincibility)
31) Random animation (only peds) (run and stop, look around, shoulder barge)
33) Ped starts fight with nearest ped (only peds) (complete mayhem?)
36) Stand parallel to ground
38) Russell headbutt doesn't crash against wall (only peds)
39) Jump camera
40) Same as 10?
43) Go through walls
46) Running camera
50) Item interactions disabled (lockers, doors, etc)
51) Same as 46?
58) Can't get busted
60) Point finger animation and insult (only peds)
61) Auto locked target
62) Disable clock
64) Wheel steering controls
65) Interact with last thing you interacted (ped animation if too far)
69) Enable payment to hireable peds/give flowers (only peds) (after payment they don't follow you)
70) Jump disabled
75) Social actions disabled
77) Peds run to you when fighting rather than strafe (only peds)
82) Ped run to nearest ped (peds only) (sometimes bully or insult that ped)
84) Enable kissing (only peds)
87) Disable locking target
88) Buged running (similar to 8 but not the same)
91) Same as 64?
94) Game crashes
100) Hide healthbar (only peds)
108) Peds don't fight back (any ped to jimmy)
110) Prefects don't chase you and enable errand icon in social menu (only peds) (true)
113) Disable jimmy's voice
117) Prefects don't chase you (false)
129) Disable ped's voice (only peds)
132) Disable positive social interaction (only peds)

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #10 on: February 20, 2022, 08:02:16 AM »
How do you know all these?

Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: An Interesting Idea
« Reply #11 on: February 21, 2022, 11:00:22 AM »
DeadpoolXYZ (previously known as The Dream Is Dead / TDID) has documented it in 2015.
It can be found here.

Although it wasn't complete yet, but it was the most comprehensive findings we ever have (in context of ped flags).
« Last Edit: February 21, 2022, 11:45:40 AM by Altamurenza »

Offline Razc01na

  • Lord Slayer
  • Full Member
  • ***
  • Posts: 156
  • Gender: Male
  • Doom is life
    • View Profile
Re: An Interesting Idea
« Reply #12 on: February 21, 2022, 02:16:31 PM »
I see...

Thanks  :)