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


Author Topic: Help me please  (Read 3554 times)

0 Members and 1 Guest are viewing this topic.

Offline Traitor Tester

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Help me please
« on: September 07, 2014, 06:18:54 PM »
I'm very inexperienced in lua and modding and i really want to learn is there a thread or something on this website that show show to code for beginners?

Thank you that's all :)

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Help me please
« Reply #1 on: September 07, 2014, 08:45:48 PM »
No, lose all hope and give up faggot

I'll help ya get started... I won't waste anyone's time so let's just dive straight into it:

Bully Scripts are located in <bully root>/Scripts/Scripts.img. Opening this archive is discussed below.

Bully uses LUA 4.0 for it's scripts. LUA is a scripting language, here is the official LUA 4.0 manual but note that not everything will work with Bully. Most things should though.

Here is a Bully LUA tutorial made by me.

Here is c00l's LUA tutorial. it is not as informative as mine and does not cover as many things but it is probably quicker and easier to get started. Maybe read his first to get started then mine to get all the advanced things.

Here is SWEGTA's video tutorials. Probably easiest as they are in video form however he does not cover very much and really only gets you started on a few basic things.

Also, for writing your LUA code you can use notepad++ or optionally SWEGTA's LUA Developer which helps create LUA scripts without knowing LUA all too well but it is still probably better to use notepad++ if you are able to. There is also Ultimate Pasta by SWEGTA as well which I think is like LUA Developer but older.

2 essential tools for making LUA scripts is the LUA Compiler by Fred Tetra and MadmaN and also some IMG Tool to extract and replace scripts in the Scripts.img. There are 3 choices:
1) IMG Tool 2.0: This is a stupid choice because it is for GTA games and was used before there was an official Bully IMG tool but for some reason people still use it... maybe because they are unaware of the other tools.
2) Bully IMG File Editor: By MadmaN and is a pretty good choice. Has a GUI. It lacks a search function but you can press a key on the keyboard to go to a letter. (For example, pressing G will go to the first script starting with the letter G)
3) Bully IMG Toolkit V1: By MadmaN and is a great choice if you are alright with using the command prompt/command line. This may not be as easy as a GUI at first but it's biggest advantage is the fact that you can use it in commandline. If you use this, I suggest also getting his IMG File Editor so that you have a GUI IMG editor as well.

Also a good trick that is often times overlooked is to create a batch file for compiling. It is a simple thing to do but most people don't do it... to do this:
1) Create a next blank file and rename it to "compile.bat" or anything ending with .bat or any other acceptable batch file extension.
2) Inside put LuaC and the arguments you need for it. (EX: LuaC -o ArcRace1.lur MyMod.lua) and then go to a new line. Make sure that LuaC is either in the same directory as this batch file, or in the path variable so your batch file can find it. Or you could use the CD command to set the current directory or specify where LuaC.exe is (EX: C:/LUA/LuaC instead of just LuaC)
3) Use the Bully IMG Tookit V1, which I'm pretty sure is called BULLYImgConsole and use -script "img.txt". It can be any file, not just img.txt but that is the title I use and is pretty self explanatory. This will run the script contained in img.txt. It is simple to write a script.
4) Inside "img.txt" or whatever you decided to name it, put the commands that you could normally use in BULLYImgConsole that you want to run when the batch file runs. (Launch BULLYImgConsole.exe and type -help to get a list of commands) You will need to use -open "Scripts.img", -delete "OldFile.lur", -add "NewFile.lur", optionally -rebuild, and -close. Make sure you specify the directory that the Scripts.img is in or the new script you are adding is in if the batch file is not in it. For example: "C:/Games/Bully/Scripts/Scripts.img". For -delete it deletes a file that is in Scripts.img so you won't have to specify any path/directory.
5) Optionally put "pause" at the end of the batch. This will help so that you can see if any errors occurred during compilation or when putting the script in Scripts.img.

Example of compile.bat and img.txt:
compile.bat
LuaC -o ArcRace1.lur WeaponSelector.lua
BULLYImgConsole -script "img.txt"
pause

img.txt
-open "C:/Games/Bully/Scripts/Scripts.img"
-delete "ArcRace1.lur"
-add "WeaponSelector.lua"
-rebuild
-close


Also add modders on xfire, skype, or steam so that we can help you mod 1 on 1. I'm DaBOSS54320 on there, PM a member here to ask someone for their username.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Help me please
« Reply #2 on: September 08, 2014, 01:28:57 AM »
Dayum DaBoss :P
Anyway my tutorial has both general LUA info and bully LUA.
It is mostly based on the bully lua side, to make sure it is easy and friendly to beginners.
Add me on xfire, I could help :D

Xfire : c00ld0c26

Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,423
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: Help me please
« Reply #3 on: September 08, 2014, 05:03:35 AM »
If you're more into the visual demonstration type of guides, then I recommend that you check out my older Lua Tutorials.
They're a bit lousy, but they go through the basics from point A to point B.

FaZe

  • Guest
Re: Help me please
« Reply #4 on: September 08, 2014, 08:18:43 AM »
DaBOSS' tutorial was the best and easiest to understand. While SWEGTA, stood on the ground of making it easier to compile, at least that's what I found.

Go through the board and see if you can find them.

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: Help me please
« Reply #5 on: September 25, 2014, 12:30:04 PM »
If you just want to start off with the basics, you should check out c00ld0c26's Lua Tutorial.

Or, if you want to start making advanced mods and menu's(eg. tables etc) use DaBOSS's Lua Tutorial here.