Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 14

Author Topic: DF MUD Development Thread  (Read 31775 times)

JoshuaFH

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #15 on: March 08, 2009, 04:34:40 am »

I thought currency was something that had no inherent value except for the value that the state guarantees you it has.
Logged

The Moonlit Knight

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #16 on: March 08, 2009, 04:59:27 am »

I thought currency was something that had no inherent value except for the value that the state guarantees you it has.
More or less.

The gold standard only has any value because of the mostly arbitrary value we assign to gold, whereas printed currency is supposedly worth as much as its investors put into it, though yet again that requires a preexisting assumption of money and investments having any worth whatsoever.

But anyway, I'd say go with a pure item transfer system (avoiding the assumption that one item has to be exchanged for another; don't people give gifts anymore?), though I'd agree with Poltifar that, much as I loathe the idea of creating an exchange economy of any kind, the capability for players to create their own currency-based economies would be sort of interesting.
Logged
A man once said to me, "If you want superpowers, all you have to do is take acid and you'll have any superpower you want." He then asked if I had just, at that moment, shaved half my face; I revealed that as being my superpower. Being suddenly and inexplicably half-shaven.

Tahin

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #17 on: March 08, 2009, 05:14:46 am »

I thought currency was something that had no inherent value except for the value that the state guarantees you it has.
...Which means it's useless to a bunch of dwarves with no coherent system of government.

Anyway, a few thoughts before I fall into my nightly eight hours of unconsciousness that I should have begun two three hours ago:

First off, we have been trying to determine a good name for the MUD, and thus far have been unable to come up with anything decent. I like Kar Unol, personally, but I can see where it might be a bit unmemorable. Thoughts?

Next, there's the issue of ramps. I've been considering having exits in the form of "north-up" and "southeast-down" on top of the standard 10 exits. This would result in a grand total of 26 possible direction exits, but would be much more flexible and would primarily allow for much more interesting outdoor areas. Is anyone vehemently opposed to typing "nu" or "sed," and can you suggest anything better?

And... That's about it, for now. If anyone has any input, go ahead and say it.

About coins: I'd really rather see a system where goods and services are exchanged for goods and services. If one dwarf is good at digging and needs a new pick, and another is good at forging tools and needs a room dug, they can work something out. Of course, it wouldn't always line up as perfectly as that example, so then you'd get into the area of characters owing each other favors and whatnot, which I think would be really interesting. Money makes things a bit too bland for my taste.

Very minor update: I've been slowly writing code for timed digging. I'm currently basing it off of the stock fishing code, which is pretty decently written despite a few minor issues that I intend to fix. It's slow because the fishing stuff is a huge file with a lot of older code that seems archaic and generally weird by my refined modern standards, and a lot of it I'm not understanding. Speaking of which, if any of my fellow creators would be so kind as to tell me how the hell send_messages() works, I'd be very grateful.
« Last Edit: March 08, 2009, 05:20:33 am by Tahin »
Logged

Katsuun

  • Bay Watcher
  • [Loli_Weaboo]
    • View Profile
Re: DF MUD Development Thread
« Reply #18 on: March 08, 2009, 11:18:24 am »

I'm still having trouble working the coding, so it may be best if I just step aside, as you said, 3 is pushing it.

I'll leave that up to you guys...
Logged
Quote
how would a Fortress based curse work?

Quote
Rocks fall, everyone dies.

Sans context.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: DF MUD Development Thread
« Reply #19 on: March 08, 2009, 01:08:11 pm »

Where is send_message()?

If you don't know, I could try to find it, if you don't understand I could try to.

I have experience with messy code(though most of it is self made :) )
Logged
Eh?
Eh!

eerr

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #20 on: March 08, 2009, 02:21:34 pm »

I'm certain the players can work on their own system, it is part roleplaying after all.

Worst comes to worst, one player could haul stones for another player.

On the topic of the fishing file, i've only just ascertained that fishing.c extends a room, not an activity.

\lib\lib\secure\sefun\messaging.c

Windows has a remarkably fast text searching utility built in, which i then narrowed down to " send_message" at 20 results, then I picked the most generic.
« Last Edit: March 08, 2009, 03:15:02 pm by eerr »
Logged

Tahin

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #21 on: March 08, 2009, 03:27:39 pm »

I know where send_messages() is. "findfun" works nicely for that kind of thing. This issue is that its function is incredibly confusing to me. As I understand it it actually conjugates a sentence for first, second, and third person and sends the appropriate version to the appropriate players in a room, but I'm still not entirely sure what it's doing or what all the arguments do.

/lib/fishing.c does extend the room, but it is the room that handles fishing, not the player. That's how verbs work, they call code on other objects, in this case the room.

Pretty much what fishing.c is doing is creating a list of fishers in the room and what they're fishing with, and each heatbeat going through that list and determining if they catch anything, are now in combat, have left the room, etc. It's a simple enough system to use for my digging code, just a little slow. I'll probably end up using the same basic system for crafting, fishing, farming, etc.

I'm still having trouble working the coding, so it may be best if I just step aside, as you said, 3 is pushing it.

I'll leave that up to you guys...

Bah. Don't worry about that. As I said, I'm sure I'll figure it out, and I'm sure you'll figure out the code. Of course if any of you prove to be truly useless, well, I can't really have a bunch of idle staff hanging around, but it's not something worth fretting about.
« Last Edit: March 08, 2009, 03:30:23 pm by Tahin »
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: DF MUD Development Thread
« Reply #22 on: March 08, 2009, 04:18:47 pm »

Okay, I only chcked the first POV case, but it looks like it splits it into an array by spaces and then for each word, it:
a) skips it if it is a single \, or starts with a \$, otherwise it will strip the first \ and go to the next word(repeating this step as many times as needed).
b) strips and records any final punctuation(non alphabetic)
c) preforms any special formatting(POV changes)
d) puts the punctuation back on
finally, it runs the whole thing through a function that capitalizes where appropriate and returns it.

I assume that <1 means one(or 0?) characters before the end of the array(counting from the last element instead of the first) for the punctuation function. Also that 1.. means from 1 to the end, and 1..5 would mean from 1 to 5.


All of that in create_message(), used multiple times by send_message() to send it to everyone in the room.


Either the $somethings for determining POV are tests to see if the word is in an array or a symbol that is used as a placeholder.


Edit: I did a full check and compared it against the example in fishing.c

First it is given the verb(s), then a message, and the people who get the message(observers is/can be given a room, and sends it to everyone not already sent a message)

It transfers the command and message(and some other data) on to create_message for the subject, the targets, and the observers, then outputs them.

create_message replaces placeholders (such as $agent_name, the name of the person doing the action or "you" or equivalent, or $agent_verb, thata just replaces it with the Nth verb(N starts at 0 and is incremented each time))

« Last Edit: March 08, 2009, 04:27:21 pm by qwertyuiopas »
Logged
Eh?
Eh!

Tahin

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #23 on: March 08, 2009, 04:54:45 pm »

So it is as overly complicated as I thought.
...I think I'll just ignore that part and use something else a little less clunky.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: DF MUD Development Thread
« Reply #24 on: March 08, 2009, 05:24:51 pm »

Actually, you will probably find it a time saving device, espacially on actions that affect multiple targets.

Well, all you really need to know is the POV symbols, that you should probably pass that whatever-it-is that is probably the room(this_object()) as the observer, and the player as the subject.

send_message("verbs","message, with one $agent_verb for each verb",thePlayer,theTarget(s)IfAny,theObserver);

Keep this list handy.
You will probably only need a few.
If you want to include one literally, simply prefix it with a single \

$agent_verb
$agent_name
$agent_nominative
$agent_objective
$agent_possessive_noun
$agent_possessive
$agent_reflexive

$target_verb
$target_name
$target_nominative
$target_objective
$target_possessive_noun
$target_possessive
$target_reflexive



Actually, it only does the thing with the punctuation if the word starts with $.


For example, if you wanted playerA to kick and punch plsyerB and playerC, you would probably use:

send_message({"kick","punch"},"$agent_name $agent_verb $target_name and then $agent_verb $target_objective",playerA,{playerB,playerC},this_object());


Although I probably did the arrays wrong, or used them where something else is needed. Check the multi-target attacks, if any for proper use.
Logged
Eh?
Eh!

Tahin

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #25 on: March 08, 2009, 06:58:12 pm »

Huh, that's useful. Thanks, Qwertyuiopas. Good to have a real programmer around.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: DF MUD Development Thread
« Reply #26 on: March 08, 2009, 08:12:37 pm »

I'm not a real programmer, I only have a few years of google education(the one you get from www.google.com).

Actually, due to that I am quite used to seeing horrid old code from a year or two earlier.
Logged
Eh?
Eh!

eerr

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #27 on: March 09, 2009, 11:46:19 am »


the entire first
IF(target[]!=0){lots of code and if statements}
merely determines name and gender of the first target, if any.

in the rest of the code,
All creatures in the room get a message about the origin and target.
the origin and targets who happen to be players players get slightly modified messages instead.



The function should work perfectly for describing battles, where a goblin could "target" a dwarf, and other dwarves could observe.
or dwarf on dwarf battles, with dwarves looking on.

As far as I can tell, it doesn't require the origin to be a person, nor the target to be any  people.
Logged

Tahin

  • Bay Watcher
    • View Profile
Re: DF MUD Development Thread
« Reply #28 on: March 10, 2009, 10:45:19 pm »

Hm.. Digging is starting to work. Kind of.

I'd like to get all the creators together at some point, perhaps next weekend. If we could all figure out an hour or two to meet either in the MUD or on IRC or something, it would be nice to figure out what everyone's going to do, and decide on a few key issues. That means you, Zyll, Eerr, and Katsuun.
Logged

Katsuun

  • Bay Watcher
  • [Loli_Weaboo]
    • View Profile
Re: DF MUD Development Thread
« Reply #29 on: March 11, 2009, 06:07:03 am »

I can be on around those times.
Logged
Quote
how would a Fortress based curse work?

Quote
Rocks fall, everyone dies.

Sans context.
Pages: 1 [2] 3 4 ... 14