ID:157268
 
So heres the deal I'm fairly new to coding in DM but I manage to make due and I've written a text based system much like a mud to handle different kinds of RPGs IE: DnD, VtM, Champions and so on.

Currently it is operable and works, but there are a few things I need to fix/figure out how to do to make it perfect in my opinion and allow me to advance the code so here they are. Thanks in advance for any help!

1. I need to be able to allow multiple characters to be logged in from one key(Currently have no idea how to do this)

2. I need to be able to edit rooms while in game and have them save for the next time I boot the game.. Heres what I got for area codewise super basic
area
var
north
south
east
west
up
down
enter
leave
rname = " "


Courtyard
rname = "The Courtyard"
desc = "A courtyard "
east = "Lounge"
Currently I can edit them just fine, but the changes wont save.

3. I need to be able to set up entirely different stat panels depending on what race someone chooses, I'm sure this is easily done and I looked over the reference but still couldn't figure it out exactly.

4. My final problem is I need to reload the player into their last known location, now for movement I use loc not x y z since there is no map, so I tried
    Logout() // Upon logging out..
src.old_loc = src.loc
pl_savecharacter(src) // Call the save character proc
and then in login having it pull from old_loc but it doesn't work

If I can get those things fixed I'll be nearly complete with the project and can go into refining and building the appearance of the thing... Anyway thanks again
I think you should learn a little more about the DM language before you try and make a game. Start by making small demo's for yourself. Then go back and look at them when you're in need of some help.
K then, i am also new, but i think i may be able to help ya out a bit (go to the guide not the reference btw...) and then look how save files are handled, the locate way of going about it isn't good, but storing x,y,z would be better, although, in text-based it wouldn't really be helpful, go to the savefiles explanation in the DM Guide, it explains how they are handled, so you can debug yourself, also, you may want to look into saving an instance of the player, not using read() write(), but << and >> instead (which makes it an instance, not a property, savefile)
Nhan wrote:
So heres the deal I'm fairly new to coding in DM but I manage to make due and I've written a text based system much like a mud to handle different kinds of RPGs IE: DnD, VtM, Champions and so on.

Congratulations for trying so hard! But I still recommend reading The DM Guide so you can get a good grasp of the language.

1. I need to be able to allow multiple characters to be logged in from one key(Currently have no idea how to do this)

I just answered a similar question where I explained how you can make a character handling system. You'll need to know how savefiles work and how to move players across different mobs.

Since your game is a MUD, you can make the character handling system verb-based instead of browser- or map-based. Just add the appropriate verbs and walk the player through the creation, loading or deletion of a character.

2. I need to be able to edit rooms while in game and have them save for the next time I boot the game.. Heres what I got for area codewise super basic

Again, you need knowledge of savefiles. The only thing you need to do is use the area.Write() proc on the area(s) you want to save. You can loop through the areas with a for loop and then write each of them in a savefile one by one with the savefile << area instruction. And again, the DM Guide explains this better.

3. I need to be able to set up entirely different stat panels depending on what race someone chooses, I'm sure this is easily done and I looked over the reference but still couldn't figure it out exactly.

You can modify mob.Stat() on a per-type basis. For every class, you can have a different type of mob. The parent type should inherit all the variables (just as /area/Courtyard inherits the variables you gave to /area).

4. My final problem is I need to reload the player into their last known location, now for movement I use loc not x y z since there is no map, so I tried

Override the Read() and Write() procs for mobs and make it so that before you perform the default value on Write() you set a variable to the type of area they're in. Then on Read() do the default actions first then set loc to locate(mob.last_loc). May seem confusing, but read the DM Guide and reference!

If I can get those things fixed I'll be nearly complete with the project and can go into refining and building the appearance of the thing... Anyway thanks again

I'm afraid it probably wouldn't be near completion. Projects take a long time to run their course, and just because you have a few essentials doesn't mean you have a fully fledged game on your hands. Since you don't even have classes implemented properly yet you likely don't have a way of leveling up, attacking others, NPC's which attack the player, etc.

Good luck with your project!
In response to Android Data
Thanks Data once again Star Fleet comes through again :P

I'm trying to read up through the Guide and Reference and educate myself more on savefiles, I just wish they included more whole examples, easier for me to learn that way. Anyway I think I've got the statpanel thing worked out and I'm getting close to getting the users location to save. I created a old_loc variable just having issues getting it to load properly.... Thanks again everyone


The mud is more RPI so I won't actually be needing to put in a automated combat system, or many classes depending on what type of game source someone wants to use with it.. I only need two races to run the campaign I'm running.