Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Geos, Zones, Areas, and what the heck
Geos, Zones, Areas, and what the heck
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Mon 09 Jan 2006 11:45 AM (UTC) |
Message
| This sounds simple enough, just don't know exactly how to do it:
I would like to link all the areas into Geos, Zones, and then the area itself and maybe subareas, so that A) Areas themselves could be smaller, B) If you give someone an area name, you're not giving them a generality of 100-200 rooms C) You CAN give a new guy an area name and not have to give him directions to exactly where to go.
What I would like to see in where is something like:
Northern Forest, Along the River Contiso, At the mouth of the River
Or something like that (bad example, but I think you can get the idea). A few pointers, added places in the area files, and I know nothing of getting something to save in the system, and then calling it back. Unless I'm wrong, thats all that this will take up prety much, right? I don't want to extend where to cover a zone (at least not right now), so I won't have to mess with that. Could someone point me to some func and give me a short guide to saving (or point me to a walkthrough/faq for it?) | Top |
|
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Reply #1 on Thu 12 Jan 2006 04:25 AM (UTC) |
Message
| You could add in 2 new fields to the area files, Region and Sub-Region, look at the saving and loading of areas on how to do it.
You would also have to modify the area command to sort and display the data in a suitable way.
You would also need to change the aset commnand to be able to set the 2 new fields and add to the area structure in mud.h.
Basicly then all areas then belong to a region or be a sub-region of a particular zone.
Places of Interest in Dodgey World.
Region of Cows.
Cow City
The Barn
The Hay Shed
Horseville
The Race Track
Region of the Devil
Hell
The Pits of Hell
Its probably not the best or easiest way to do things, but i guess it would work. |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #2 on Thu 12 Jan 2006 12:56 PM (UTC) |
Message
| Ok, thanks. Anyone with any more coments, do please post. I'll see what I can do to get this to work. | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #3 on Fri 13 Jan 2006 04:54 AM (UTC) Amended on Fri 13 Jan 2006 04:55 AM (UTC) by Gohan_TheDragonball
|
Message
| struct zone_data {
ZONE_DATA *next;
ZONE_DATA *prev;
char *name;
AREA_DATA *first_area;
AREA_DATA *last_area;
ZONE_DATA *first_subzone;
ZONE_DATA *last_subzone;
ZONE_DATA *next_subzone;
ZONE_DATA *prev_subzone;
}
in struct area_data {
AREA_DATA *next_area;
AREA_DATA *prev_area;
}
there is no really perfect way to do this, one way i might suggest is as follows.
in your system folder you create a list zone.lst, in it you save it like follows:
#ZONE
AreaName Region of Cows
Area cowcity.are
SubArea cowcity_barn.are
SubArea cowcity_hayshed.are
Area horseville.are
SubArea horseville_racetrack.are
End
AreaName Region of The Devil
Area hell.are
SubArea hell_pits.are
End
#END
Now you fine tune your loading of zone.lst to read/save it like that, read new zones and add them to the list like follows:
LINK( new_zone, first_zone, last_zone, next, prev );
Link in the areas like follows:
LINK( area, new_zone->first_area, new_zone->last_area, next_area, prev_area );
Link in the zones like follows:
LINK( new_sub_zone, new_zone->first_subzone, new_zone->last_subzone, next_subzone, prev_subzone );
any questions ask away, one thing i might mention is that you need to load the zone list after areas have been loaded.
The reason i suggested this, is because if you mess with the area structure only, then you would need to save/load the zones stuff inside the area files, and i don't know about you but i hate messing with the area loading/saving stuff, plus if you want to fine tune your zone code you would need to redo area files over and over until you got it right. Also this way you don't have to add mutliple sub-area variables into the area_data, and this would allow for as many or as little sub_areas as you would like. | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #4 on Sat 14 Jan 2006 07:09 PM (UTC) |
Message
| Ok, great. Thanks. Only problem is, what the heck? I han't done anything that needed to be saves before (snippets have been what I've done so far, but in the grand scheme of things that does little to help with what half you just said), so I have no experience in this. Files would be a nice thing to know what I need to go through (I'm looking through save.c atm), since alot of this is organized in a way it makes little sense to me. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #5 on Sat 14 Jan 2006 07:14 PM (UTC) |
Message
| As far as the structs he posted go, they can be found in mud.h |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #6 on Sat 14 Jan 2006 07:30 PM (UTC) |
Message
| /*
* Area definition.
*/
struct area_data
{
AREA_DATA *next;
AREA_DATA *prev;
AREA_DATA *next_sort;
AREA_DATA *prev_sort;
AREA_DATA *next_sort_name; /* Used for alphanum. sort */
AREA_DATA *prev_sort_name; /* Ditto, Fireblade */
ROOM_INDEX_DATA *first_room;
ROOM_INDEX_DATA *last_room;
char *name;
char *filename;
int flags;
short status; /* h, 8/11 */
short age;
short nplayer;
short reset_frequency;
int low_r_vnum;
int hi_r_vnum;
int low_o_vnum;
int hi_o_vnum;
int low_m_vnum;
int hi_m_vnum;
int low_soft_range;
int hi_soft_range;
int low_hard_range;
int hi_hard_range;
int spelllimit;
int curr_spell_count;
char *author; /* Scryn */
char *resetmsg; /* Rennard */
short max_players;
int mkills;
int mdeaths;
int pkills;
int pdeaths;
int gold_looted;
int illegal_pk;
int high_economy;
int low_economy;
WEATHER_DATA *weather; /* FB */
};
That the struct he ment? I've seen a few that look almost the same to me, and plus I'm not sure exactly what he means to do. Need to add in ZONE_DATA somewhere, grep AREA_DATA, and then try to figure out where everything goes?
| Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #7 on Sat 14 Jan 2006 11:58 PM (UTC) Amended on Sun 15 Jan 2006 12:04 AM (UTC) by Gohan_TheDragonball
|
Message
| my bad, didn't realize a generalization of what you would need to do would suffice. let me put together a snippet for you, you will need to modify it of course.
and yes that is what i was talking about. that is the area_data structure, as to the other structures just cut and paste them into mud.h
also while i get the functions together, do the following. in mud.h search for area_data, you should see something like:
typedef struct area_data AREA_DATA;
insert this after that:
typedef struct zone_data ZONE_DATA;
also search for first_area until you find:
extern AREA_DATA *first_area;
extern AREA_DATA *last_area;
and insert:
extern ZONE_DATA *first_zone;
extern ZONE_DATA *last_zone;
also in db.c search for first_area and you find:
AREA_DATA *first_area;
AREA_DATA *last_area;
and insert:
ZONE_DATA *first_zone;
ZONE_DATA *last_zone;
| Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #8 on Sun 15 Jan 2006 04:05 PM (UTC) Amended on Sun 15 Jan 2006 04:47 PM (UTC) by Dralnu
|
Message
| Yeah. Consider me a complete n00b for awhile. I'm starting to get the hang of the code, but still don't understand how alot of it works. I've got alot of plans, and little know how (redoing the resist system, armor system, probably most of the fight system), so until I get to where I'm posting just general issues with compile, I need the For Dummies ver.
An explination would be nice as to what is going on would be nice as well, just so I can get an idea on what is going on, but I know that may be a bit time-intensive, so only if you have the time and want to, that would be great
EDIT #1:
Looking through your post Gohan about the way it saves, would putting this in the area folder cause any problems? Keeping area-related things in the area folder would be nice... | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #9 on Mon 16 Jan 2006 04:12 AM (UTC) |
Message
| Well since I am gonna write an entire snippet, I was just gonna post the snippet on mudmagic.com, in the snippet I will be putting the file in the system directory, when i post here telling you where to get it, i will post exactly which part to change in order to have it go to the area directory instead. | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #10 on Mon 16 Jan 2006 04:16 AM (UTC) |
Message
| I appreciate it alot. Hate for you to go through all the trouble (in the end, probably about the same amount, but oh well), but thanks anyways. | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #11 on Tue 17 Jan 2006 04:01 AM (UTC) |
Message
| Actually its not really time out of my schedule, I was planning on doing something like this anyways. I have the auto-quest snippet installed and I hate giving it such general area names. One thing though, which version do you want. The one I am going to post will be slightly different than what I originally posted. I am going to have it so I can create a zone and assign a vnum range for a zone name. Like so:
Zone: Earth
Area Name: Southern Desert ( vnums 40000 - 40150 )
Sub-Areas:
Northern Dunes ( vnums 40000 - 40029 )
Southern Dunes ( vnums 40030 - 40059 )
Eastern Ridge ( vnums 40060 - 40089 )
Nomad Village ( vnums 40090 - 40119 )
Red Mountain ( vnum 40120 - 40145 )
Basically instead of just having to create multiple area files, I can specify a range within the area file as a sub-area and give it its own unique name. If you want it to just point to an area file tell me and i will just email you a seperate copy instead of pointing you to the snippet site.
| Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #12 on Tue 17 Jan 2006 03:43 PM (UTC) |
Message
| Well, both would be kind of nice, lol. I was originally thinking of using area files, since it may be a bit of an odd job to get something all built and keep the vnum range, like someone builds an area, lets say a town, and they add in a mayor's office, then decide to finish the town, then put in a barn, then you run into a slight problem of 'Ok, I have 100 - 200 for this, then 201-209 for this, then 210-230 for the first place again, then 231-240
See what I'm saying? That is a concern, at least to me. I don't so much mind having to make hundreds of area files as trying to sort out what goes where. | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #14 on Thu 19 Jan 2006 01:25 AM (UTC) |
Message
| Personally, I'd say go ahead and post it and let's see what it turns out looking like... it's starting to sound pretty interesting and I've also got the autoquester snippet installed in my smaugfuss too.. ;) |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
50,496 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top