Author Topic: How would I make a basic weapon  (Read 3153 times)

/title
I really want to get into this

Go to your local arms dealer for more info.


Go to your local arms dealer for more info.

Please don't post here if you don't know what you're talking about.



Go into your add-ons folder and look at a weapon add-on. You can then open the server.cs file or another .cs file if provided and edit values inside of there to change the way the weapon works.

Are you familiar with how add-ons work? Do you have any experience in making your own add-on? Do you have any programming experience?

Please don't post here if you don't know what you're talking about.



Go into your add-ons folder and look at a weapon add-on. You can then open the server.cs file or another .cs file if provided and edit values inside of there to change the way the weapon works.

Are you familiar with how add-ons work? Do you have any experience in making your own add-on? Do you have any programming experience?
Yes no and no
I want to make a gun edit to get myself started

Well, you can start with this: http://tsforblockland.weebly.com/set-up.html (use next button on the bottom of each page)

The packaging files page has a lot of examples on how to package your own add-on - from server add-ons, client add-ons, to events and vehicles (and weapons). You should copy the gun file from the gun add-on, and put it in your own new add-on. Just make sure to change all instances of gun to something else (whatever you want to name it).

On the website, it also teaches you the basics of scripting/programming.

Take a sample addon and build over it

Take a sample addon and build over it
Please don't post here if you don't know what you're talking about.
especially since you were banned for doing so once. no point repeating same mistakes.

Yes no and no
I want to make a gun edit to get myself started
elm's site is something ive never seen before, but if you have some programming knowledge you can probably start by figuring out what each part in the default gun does

Yes no and no
I want to make a gun edit to get myself started
elm's site is something ive never seen before, but if you have some programming knowledge you can probably start by figuring out what each part in the default gun does
This.  I was super bored over winter break so I decided to finally look into making addons.  For weapons I would say start messing around with values with the default gun values and such.
Here are some great resources to look at.  In particular, this has helped me a lot, although there are also a ton of other methods and such that aren't in there (although not sure how helpful this is for weapons).

Also get eval if you're planning on making addons as you can use it to test values, and run scripts?, without restarting the game (I have zero eval experience as I discovered it at the end of break but there are people around here who do).

Edit: Oh and I suppose this is helpful :P

Also get eval if you're planning on making addons as you can use it to test values, and run scripts?, without restarting the game (I have zero eval experience as I discovered it at the end of break but there are people around here who do).

You really don't need eval if you're testing on your own server. You'd simply press ` to open up the console and run/test values there.

Edit: Oh and I suppose this is helpful :P
jesus christ ive needed this for a year. i was wondering why projectiles would never do more than 100 damage to vehicles jfc

Is there a way to increase spread & Whats eval

especially since you were banned for doing so once. no point repeating same mistakes.

That is what i'd do.

Really, can you just stop.  

Think twice before posting
« Last Edit: January 24, 2017, 10:55:21 AM by FelipeO_O_ »

Is there a way to increase spread & Whats eval
eval is simply a way to execute code, and is how code is essentially executed in bl

when you start a server it just calls exec("add on file/server.cs") on every enabled addon (plus generates some datablocks behind the scenes, like for music and prints). eval is what exec uses to read the code and figure out what to do.

this description is not technically accurate but it should make it more clear how eval is useful. it allows modders to change things ingame and bugfix code without restarting the server.
you automatically get eval access if you host the server/have access to the console of the server. just type what you want to evaluate into the console (without "eval();") and it will work. for example, type in talk("Hello World!"); into console

It is also used as a kind of "preprocessor"
« Last Edit: January 24, 2017, 01:33:12 PM by FelipeO_O_ »