ID:2372523
 
Hello everyone! I was just posting this here - a little nervous to do so - trying to see if I could get a few things answered for a minor project I am working on!

You see, I'm desperately trying to make a heavy text based roleplaying game, and there are a few things I really want to figure out how to do to start myself off. I'm searching tutorials, and am finding some answers, but other, more specific ones, I am not.

I have two questions that I would be SUPER appreciative of getting answered.

1. How can I make a basic verb that allows someone to type an action? Lets say the command is '/me'. So if I used it, and typed in chat -
/me picks up a stone and throws it.
It would show in the text window
Saint Charmer picks up the stone and throws it.

2. I'd really like to know how to make a character menu, as well. This is the most important thing of the entire project, characters. Duh... It doesn't have to be anything major, it's not an RPG with stats. I just to make something that would allow a person to have a menu that they can create a character name, and set a description for said character that can be read by another user.

Like if someone were to use a verb 'examine', and click on another player, it would bring up their description.

Thank you to whoever reads this - I truly appreciate it.
I~... figured out question #1 myself. I realized I'm stupid, and it was just a matter of making a basic text verb...
Your best bet isn't really to start out trying to learn by thinking of things and trying to make them.

Your best bet is to learn general programming concepts:


Operators and precedence.

Handling data and common types.

Logic and code flow (block level statements).

Object-oriented programming and polymorphism.


Essentially, the very first thing you should do is read up on the very basics. This is gonna take you a few weeks, but it'll put you better than a couple years ahead of anyone who doesn't.

After you've done that, you can learn DM's basic syntax and structure from the guide.

If you already know the basics, reading through the guide will set you down a path where you can start to digest the whole language and environment very quickly. If you don't already know the basics, you are going to struggle to even get your feet wet even with the guide.
Ter is right: you need some foundations.

A character menu has a lot of moving parts to it, so it's the kind of thing that can't be answered simply. Questions that come up when you think about it are:

Will this have a UI, and if so what will the UI look like? Is it a box on the screen (a HUD object), or maybe a part of the game skin?
What sorts of things should the character menu do?
Is it about viewing a character or making changes?

You also mentioned a verb followed by a click. To handle the interface that way, you would need a concept of "mode". That is, using the verb would set a var somewhere that says what your next click will do, and then your Click() proc would have to handle that properly. This is typically not the way such things are handled, although you can do it. There are better options.

One option is to simply define an examine verb, but have it take a mob or obj or perhaps any atom in view as an argument. Then not only can you type it in the command bar, but you could simply right-click on the object and choose the verb from a menu. That's the easiest, most traditional way to handle such things in BYOND.

Another option: Have an icon in a HUD that's a magnifying glass or whatever, set it up to use drag and drop, and then drop it onto whatever you want to examine. The MouseDrop() proc can take it from there.

It also helps to look at other code. You should be wary about using someone else's code as a model for how to write your own, and especially of cribbing any of it for your own, because there are some people out there (and by some I mean most) following very bad practices, with games chock full of bugs, and you don't want their bad habits to become yours. But I do find that being able to look at a language's code helps a lot when it comes to understanding how it's put together. The examples in the guide are going to be the best starting place, though.
Yeah, years ago I tried to read through the guide and I struggled with it so much. Things just didn't make sense. But after having two computer science courses in university, the guide seemed obvious. You have to know the basics.