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
➜ ROM
➜ Compiling the server
➜ Adding Charisma to ROM/RogueMUD?
Adding Charisma to ROM/RogueMUD?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Wandering_Ponderer
(27 posts) Bio
|
Date
| Sun 20 Nov 2005 03:48 AM (UTC) |
Message
| Hey guys,
I've been trying to add charisma, morale, and luck to RogueMUD, which is essentially (from what I can tell at least) Rom 2.4b6 with administrative commands, OLC, and color, so hopefully someone will be able to help me. I'm looking for guidance as to which functions, arrays, etc... generally need to be updated in order to add these sorts of things? Thanks in advance! | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Sun 20 Nov 2005 02:14 PM (UTC) |
Message
| For the basics, should be nothing more than adding a field to pcdata or just char structs in general. Look for where strength is defined, and follow that example. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Wandering_Ponderer
(27 posts) Bio
|
Date
| Reply #2 on Sun 20 Nov 2005 04:21 PM (UTC) |
Message
| Which file would that most likely be located in?
Here's just a general file listing:
Makefile act_wiz.c~ drunk.c magic.h olc.h skills.c
Makefile.original act_wiz.o effects.c magic2.c olc_act.c special.c
Makefile.solaris alias.c fight.c mapper.c olc_act.c~ staffcmds.h
act_comm.c alias.o flags.c mapper.h olc_mpcode.c startup*
act_comm.o ban.c guild.c mem.c olc_save.c string.c
act_enter.c ban.o handler.c merc.h pueblo.c tables.c
act_enter.o bit.c healer.c merc.h~ pueblo.h tables.c~
act_info.c comm.c imotd mob_cmds.c pueblo.h~ tables.h
act_info.o comm.o interp.c mob_cmds.h recycle.c telnet.h
act_move.c const.c interp.h mob_prog.c recycle.h template
act_move.o const.c~ interp.h~ music.c rom* update.c
act_obj.c db.c lookup.c music.h save.c
act_obj.o db.h lookup.h note.c scan.c
act_wiz.c db2.c magic.c olc.c sedit.c
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Sun 20 Nov 2005 04:23 PM (UTC) |
Message
| One of the header files. There are a lot there, so I'm not sure. Try merc.h; I think the field should be called 'str'. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Wandering_Ponderer
(27 posts) Bio
|
Date
| Reply #4 on Sun 20 Nov 2005 06:12 PM (UTC) Amended on Sun 20 Nov 2005 06:17 PM (UTC) by Wandering_Ponderer
|
Message
| Alright, so here's what I have:
in merc.h
/*
* One character (PC or NPC).
*/
struct char_data
{
CHAR_DATA * next;
CHAR_DATA * next_in_room;
CHAR_DATA * master;
CHAR_DATA * leader;
CHAR_DATA * fighting;
CHAR_DATA * reply;
CHAR_DATA * pet;
CHAR_DATA * mprog_target;
MEM_DATA * memory;
SPEC_FUN * spec_fun;
MOB_INDEX_DATA * pIndexData;
DESCRIPTOR_DATA * desc;
AFFECT_DATA * affected;
NOTE_DATA * pnote;
OBJ_DATA * carrying;
OBJ_DATA * on;
ROOM_INDEX_DATA * in_room;
ROOM_INDEX_DATA * was_in_room;
AREA_DATA * zone;
PC_DATA * pcdata;
GEN_DATA * gen_data;
bool valid;
char * name;
long id;
sh_int version;
char * short_descr;
char * long_descr;
char * description;
char * prompt;
char * prefix;
sh_int group;
sh_int clan;
sh_int rank;
sh_int sex;
sh_int class;
sh_int race;
sh_int level;
sh_int hero_level;
sh_int trust;
int played;
int lines; /* for the pager */
time_t logon;
sh_int timer;
sh_int wait;
sh_int daze;
sh_int hit;
sh_int max_hit;
sh_int mana;
sh_int max_mana;
sh_int move;
sh_int max_move;
long gold;
long silver;
int exp;
long act;
long comm; /* RT added to pad the vector */
long staff;
long wiznet; /* wiz stuff */
long imm_flags;
long res_flags;
long vuln_flags;
sh_int invis_level;
sh_int incog_level;
long affected_by;
sh_int position;
sh_int practice;
sh_int train;
sh_int carry_weight;
sh_int carry_number;
sh_int saving_throw;
sh_int alignment;
sh_int hitroll;
sh_int damroll;
sh_int armor[4];
sh_int wimpy;
/* stats */
sh_int perm_stat[MAX_STATS];
sh_int mod_stat[MAX_STATS];
/* parts stuff */
long form;
long parts;
sh_int size;
char* material;
/* mobile stuff */
long off_flags;
sh_int damage[3];
sh_int dam_type;
sh_int start_pos;
sh_int default_pos;
sh_int mprog_delay;
};
/*
* Data which only PC's have.
*/
struct pc_data
{
PC_DATA * next;
BUFFER * buffer;
bool valid;
char * pwd;
char * bamfin;
char * bamfout;
char * r_msg;
char * title;
time_t last_note;
time_t last_idea;
time_t last_penalty;
time_t last_news;
time_t last_changes;
sh_int perm_hit;
sh_int perm_mana;
sh_int perm_move;
sh_int true_sex;
int last_level;
sh_int condition [4];
sh_int learned [MAX_SKILL];
bool group_known [MAX_GROUP];
sh_int points;
bool confirm_delete;
char * alias[MAX_ALIAS];
char * alias_sub[MAX_ALIAS];
int security; /* OLC */ /* Builder security */
sh_int volume; // Pueblo Volume
sh_int load_room;
};
Any ideas? Higher up, I have:
/*
* Per-class stuff.
*/
#define MAX_GUILD 1
#define MAX_STATS 5
#define STAT_STR 0
#define STAT_INT 1
#define STAT_WIS 2
#define STAT_DEX 3
#define STAT_CON 4
Figured I should add these
#define STAT_CHA 5
#define STAT_LCK 6
#define STAT_MORALE 7
and change MAX_STATS to 8 | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #5 on Sun 20 Nov 2005 06:14 PM (UTC) |
Message
| Hmm, interesting how they set this up.
sh_int perm_stat[MAX_STATS];
sh_int mod_stat[MAX_STATS];
So for each new stat you will add, you'll have to increase MAX_STATS by 1, and may have to change the read/write code. I'm not familar with Rom, so that's all I really know offhand. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Wandering_Ponderer
(27 posts) Bio
|
Date
| Reply #6 on Sun 20 Nov 2005 09:55 PM (UTC) |
Message
| Not sure if you saw or not, but I editted my earlier post. Read/Write code? | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #7 on Sun 20 Nov 2005 10:20 PM (UTC) |
Message
| Where the data is written to file/loaded from file. Normally in save.c, at least in Smaug. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Wandering_Ponderer
(27 posts) Bio
|
Date
| Reply #8 on Sun 20 Nov 2005 11:29 PM (UTC) |
Message
| Zeno, you're the best! I had to make some small modifications in the race table as well, but everything appears to be working now. Thanks!!! | 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.
21,067 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top