ID:154465
 
i wonder if this is already posibble

i believe that if the byond language was really flexible, they should have a way to define your own types of things.
suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for. this would make the language more flexible, and posabably help many games be produced faster, or better. having this function would help me out a bit, i know that.
Nebathemonk wrote:
i wonder if this is already posibble

i believe that if the byond language was really flexible, they should have a way to define your own types of things.
suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for. this would make the language more flexible, and posabably help many games be produced faster, or better. having this function would help me out a bit, i know that.

I'm having a little trouble understanding what you're talking about, since first sentence of second paragraph is all but unreadable. But it sounds like you're describing BYOND as it currently exists.

Are you having trouble defining your own types of "things?" Or making objects whose attributes change?

/mob/skysaw
Nebathemonk wrote:
i wonder if this is already posibble

i believe that if the byond language was really flexible, they should have a way to define your own types of things.
suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for. this would make the language more flexible, and posabably help many games be produced faster, or better. having this function would help me out a bit, i know that.

obj
Potatoe
var/HP = 50
icon = 'Potatoes.dmi'
LittlePotato
icon_state = "LittleOne"
MediumPotato
icon_state = "MediumOne"

etc etc. Now, anything thats under obj/Potatoe inherets its vars, etc. Want to change it?

LittlePotatoe
HP = 20

Now u changed LittlePotatoes HP var, anything else under Potatoe still has 50, unless its defined otherwise like there. If you ant to change the 50 hp, just change it under Potatoe. Not quite sure if im getting what you mean or you just didnt know this

In response to Skysaw
Skysaw wrote:
Nebathemonk wrote:
i wonder if this is already posibble

i believe that if the byond language was really flexible, they should have a way to define your own types of things.
suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for. this would make the language more flexible, and posabably help many games be produced faster, or better. having this function would help me out a bit, i know that.

I'm having a little trouble understanding what you're talking about, since first sentence of second paragraph is all but unreadable. But it sounds like you're describing BYOND as it currently exists.

Are you having trouble defining your own types of "things?" Or making objects whose attributes change?

/mob/skysaw
what's so hard to read? I can read it just fine, although the 2nd post of this thread answered it :)
In response to JonSnow13
Nah, I would like to be able to do this:

mob
player
enemy
enemy1
turf
grass
obj
watermellon
In response to Lord of Water
Lord of Water wrote:
Nah, I would like to be able to do this:

mob
player
enemy
enemy1
turf
grass
obj
watermellon

Actually you can....
But what you probably want is:
mob
player
enemy
enemy1
turf
grass
etc....
But you can always define new datums. Say you wanted a futz for example. No problem. Just do it like any other section:
futz
var
var1,etc.....
blue_futz //a specific futz
Additionally it will share all properties inherent to all datum objects.

See DATUM, ATOM in the docs for better explanations.

-James
In response to JonSnow13
JonSnow13 wrote:

what's so hard to read? I can read it just fine, although the 2nd post of this thread answered it :)

This is hard to read:
i believe that if the byond language was really flexible, they should have a way to define your own types of things. suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for.

I mean, is this in English?
In response to Skysaw
Skysaw wrote:
JonSnow13 wrote:

what's so hard to read? I can read it just fine, although the 2nd post of this thread answered it :)

This is hard to read:
i believe that if the byond language was really flexible, they should have a way to define your own types of things. suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for.

I mean, is this in English?

It's extremely easy to read. In fact, just glancing at it, I can see three or four ways it could be read. A so-called "well constructed" sentence or paragraph, on the other hand, would only have one way obvious interpretation, and thus would require more conscious effort to make sense of.

Of course, in the latter case, three different people reading the same sentence would be more likely to agree on what they had just read, and their conclusion would be more likely to agree with the writer's intent... but really, what's a little thing like clarity compared to ease of reading?
In response to LexyBitch
LexyBitch wrote:
Skysaw wrote:
JonSnow13 wrote:

what's so hard to read? I can read it just fine, although the 2nd post of this thread answered it :)

This is hard to read:
i believe that if the byond language was really flexible, they should have a way to define your own types of things. suchs as having an obj, but also having another type of thing in the world, that all things created like /potatoe, would have the same astrobutes, but could be changes when it is calld for.

I mean, is this in English?

It's extremely easy to read. In fact, just glancing at it, I can see three or four ways it could be read. A so-called "well constructed" sentence or paragraph, on the other hand, would only have one way obvious interpretation, and thus would require more conscious effort to make sense of.

Of course, in the latter case, three different people reading the same sentence would be more likely to agree on what they had just read, and their conclusion would be more likely to agree with the writer's intent... but really, what's a little thing like clarity compared to ease of reading?

ya well, I think Lexy's are harder to read :D j/k... anyways it's computer talking, people online (like me) probably talk just as fast as they do in RL, so people just type what they think up real fast, and you get to put it together... but after awhile you learn to :D
In response to JonSnow13
Still, though, it's nice to be able to do some things right. For example, I generally capitalize the right letters in a sentance.

Note that I said "generally", because we all make mistakes. Still, it's nice to try not to.
Quick question that I'm too lazy to go check:
Can datums exist on the map? If they have icons will they show in a statpanel?
ie. Can they be used to mimic ATOMs?
What about atom/foo? Can I throw some foo on the map?

Note: I can't see a reason to need this, really. Technically, obj and mob are redundant, but I could see it leading to more clean code.

-AbyssDragon
In response to AbyssDragon
Can datums exist on the map? If they have icons will they show in a statpanel?

I'm pretty sure they can't exist on the map, because they don't have a loc var (and I doubt simply adding a loc var would make them show up). Don't know about the statpanel part, but I'd guess not.
In response to Gughunter
Just seems incomplete that we can't mimic the function of pre-built atoms.

Granted, I can't think of a reason I'd want to, but still...

-AbyssDragon
In response to AbyssDragon
Just seems incomplete that we can't mimic the function of pre-built atoms.

Granted, I can't think of a reason I'd want to, but still...

Offhand, I can't think of a reason you'd want to either. :) Fortunately, the way BYOND handles it is probably the ideal solution.

In a language like Java, you'd most likely end up implementing BYOND-style mapping by having your atomic objects implement a "mappable" interface. [1] In DM, however, this "mappable" interface is implicitly built into the /atom hierarchy. This is a good thing, not only for all those people who encounter BYOND as their first programming experience, but also for all those people who like having one less hassle to deal with!


[1] (Though this wouldn't be the only way to do it--you could, for instance, give every object a var that could point to a second object that would keep track of mapping-related stuff... that might get kind of clunky for large worlds.)