- Joined: Mon Apr 21, 2014 7:44 am
- Byond Username: Psyentific
- Location: Vancouver, Canada
How would I go about creating a new item?
How would I edit the map, to put this new item in? Would that be what I would do, or would I be pestering Metacide/Whomever to put it in?
How would I create a new job, with its own equipment, office, and spawn location?
How can I go from nothing to coding?
- Rarely plays
- Joined: Thu Apr 17, 2014 5:06 pm
- Byond Username: Neerti
Say if I wanted to add a variable called 'foo' to an object. Doesn't matter which object, completely arbitrary. I'd write something like this.
Code: Select all
/obj/item/weapon/bar name = "Foobar" desc = "I am an example!" var/foo = 0
Now, name and desc lack var/ because they're already defined in /obj/. Bar will also inherent variables defined in /obj/, and any variables you make will be inherited down the tree.
If I made a /obj/item/weapon/bar/test , then put 'Name = "Testing!", it would have the name Testing!. If I don't add a desc, however, it would have "I am an example!" because it inherited from it's parent.
You can define variables in procs (also called functions outside of byond) that only matter to the proc.
Most variables are not globals if defined in an object down a tree. If I made /obj/item/weapon/foo , and added foo = 1, the compiler would whine at me due to there being no var named foo defined there.
For IDEs, most people just use DM, since it gets the job done. I know a few people managed to make notepad++ work with code magic, compiling with a batch script.
There's no official reference for SS13 development, but BYOND has a reference available by pressing F1 in DM, which will be very useful. The closest thing to a manual for SS13 coding is coderbus/nanobus on IRC.
The wiki has a few guides for coding as well.
- Game Admin -
Feel free to PM me on the forums or IRC with questions, concerns, feedback, or just talk about stuff.
Have I not met my hitler quota this month?
- Remie Richards
- Joined: Thu Apr 17, 2014 7:11 pm
- Byond Username: CrimsonVision
- Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
https://github.com/NTStation/NTstation1 ... -Standards
If you're ever stuck, go to #coderbus, or #nanobus, Generally were friendly enough to assist!
- Joined: Fri Apr 18, 2014 9:02 am
- Byond Username: Miggles
dezzmont wrote:I am one of sawrge's alt accounts
dezzmont wrote:sawrge has it right.
Connor wrote:miggles is correct though
- Rarely plays
- Joined: Fri Apr 18, 2014 10:20 pm
- Byond Username: Paprka
- Location: in down bad
1) Mirror the code on your desktop
2) Navigate to NTstation13\code\modules\projectiles\projectile\bullets.dm
3) Make all damage values 9999
4) Ask Miggles to merge it
Oldman Robustin wrote:It's an established meme that coders don't play this game.
- Joined: Sat Apr 19, 2014 2:45 pm
- Byond Username: Perakp
Byond coding in principle is fairly easy, comparable or a bit easier than java or C, maybe even a good starting language. Like with any project in any language, the hard part is not coming up with new code, but understanding the old code. It depends a lot on what part of the codebase you are looking to work on.Psyentific wrote:How easy is it
After you got the code downloaded, ready in dreammaker and you've test compiled it, and you don't know much byond coding yet to build anything from scratch, you can do small edits on existing stuff or copypaste something and work from there. My first thing was creating new sec uniforms from some sprites that were laying around the forums. Most likely you'll want to spend a good while just browsing through the files, see what catches your interest.what's something I can do out the gate
Oh and remember to give yourself admin status for testing your work.
You can test your code by compiling and running it in dreammaker. To test interactions between characters you can use dreamseeker. Select the compiled .dme file and press 'go'. You can join with your byond account, log out and join again as a guest.how can I set up a local server to test my code?
Honestly I'm surprised we have as little lag as we have. Byond is magic.how does BYOND work?
I heard someone used notepad++, someone edited stuff straight from github some way. But dreammaker is the only place to compile and run as far as I know, so you can write anywhere but need to use dreammaker for that. Might aswell do it all in dreammaker.Is there a third-party IDE, or does everyone use dreamseeker?
http://www.byond.com/docs/ref/Are there any resources I should be looking at/for, in terms of BYOND in general but also SS13 specifically?
Our codebases aren't much documented, so you'll be searching through github a lot. It is educational to look through the revision history and old pull requests to see how things are done.
Define the /obj/item/yourItem and it's variables. If there are special interactions you use attack_hand(), attackby() etc. Obviously adding the icons is important unless you want your item to be invisible. Looking at /code/game/objects/items.dm is a good place to start.How would I go about creating a new item?
Open the map file in dreammaker, the tools for adding stuff should appear, and your item should be there somewhere. Then you need to learn how to use the map merger tool before making a pull request.How would I edit the map, to put this new item in? Would that be what I would do, or would I be pestering Metacide/Whomever to put it in?
Jobs are at /code/game/jobs/, so you'd start from there.How would I create a new job, with its own equipment, office, and spawn location?
We have some pretty good mapping guides for all the things you need to remember to add, pipes, alarms, APC, etc. A spawn location is just another object you'd need to add to the map, modify the variables so that it's a spawn location for the new job. You'd need to add the job to the job selection interface, make sure the ID computer works for the new access levels, stuff like that.
Have fun and don't look back.How can I go from nothing to coding?
Users browsing this forum: No registered users