Welcome to the Builder Academy

Question relative north movement

More
23 Oct 2012 01:46 - 23 Oct 2012 01:47 #933 by wifidi
Replied by wifidi on topic Re: relative north movement
I added (!IS_NPC(ch)) to the PRF_ locations and the SYSERRs are gone.
act.movement.c 164:
Code:
bool should_show_char_move_and_spin(struct char_data *ch) { return ((!IS_NPC(ch)) && PRF_FLAGGED(ch, PRF_AUTOEXIT) // piggybacked PRF to show spinning && PRF_FLAGGED(ch, PRF_AUTODOOR) // piggybacked PRF to show move & spin && (DIR_SCMD == EAST || DIR_SCMD == SOUTH || DIR_SCMD == WEST)); // spinning }
act.movement.c 456 & 467:
Code:
ACMD(do_move) { DIR_SCMD = subcmd; if ((!IS_NPC(ch)) && PRF_FLAGGED(ch, PRF_AUTODOOR)) { if (subcmd == NORTH) perform_move(ch, FACING, 0); else if ((subcmd > 0) && (subcmd < 4)) { spin_char(ch, subcmd); perform_move(ch, FACING, 0); } else perform_move(ch, subcmd, 0); } else if ((!IS_NPC(ch)) && PRF_FLAGGED(ch, PRF_AUTOSPLIT)) { if (subcmd == NORTH) perform_move(ch, FACING, 0); else if ((subcmd > 0) && (subcmd < 4)) { spin_char(ch, subcmd); if PRF_FLAGGED(ch, PRF_AUTOEXIT) show_char_spin(ch); } else perform_move(ch, subcmd, 0); } else /* These subcmd defines are mapped precisely to the direction defines. */ perform_move(ch, subcmd, 0); }
I'll try creating PRF_RELTURN, PRF_RELWALK and PRF_RELSEE, and connecting them to the do_gen_tog function.
Last edit: 23 Oct 2012 01:47 by wifidi. Reason: typo

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 01:50 #934 by Liko
Replied by Liko on topic Re: relative north movement

wifidi wrote: I'll try creating PRF_RELTURN, PRF_RELWALK and PRF_RELSEE, and connecting them to the do_gen_tog function.


If you get any errors when you try to add them, just post the errors and I'll try to help you if needed.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 02:22 - 23 Oct 2012 02:24 #935 by wifidi
Replied by wifidi on topic Re: relative north movement
Adding this core dumps the program:
structs.h 259:
Code:
#define PRF_RELTURN 34 /**< Turn then walk */ #define PRF_RELWALK 35 /**< Walk and turn */ #define PRF_RELSEE 36 /**< See relative north movements */ /** Total number of available PRF flags */ #define NUM_PRF_FLAGS 37

constants.c 235:
Code:
"RELTURN", "RELWALK", "RELSEE",

interpreter.c 260:
Code:
{ "relturn" , "relt" , POS_DEAD , do_gen_tog , 0, SCMD_RELTURN }, { "relwalk" , "relw" , POS_DEAD , do_gen_tog , 0, SCMD_RELWALK }, { "relsee" , "rels" , POS_DEAD , do_gen_tog , 0, SCMD_RELSEE },

act.h 230:
Code:
#define SCMD_RELTURN 33 #define SCMD_RELWALK 34 #define SCMD_RELSEE 35

act.other.c 750:
Code:
{"Relturn disabled.\r\n", "Relturn enabled.\r\n"}, {"Relwalk disabled.\r\n", "Relwalk enabled.\r\n"}, {"Relsee disabled.\r\n", "Relsee enabled.\r\n"}

act.other.c 857:
Code:
case SCMD_RELTURN: result = PRF_TOG_CHK(ch, PRF_RELTURN); break; case SCMD_RELWALK: result = PRF_TOG_CHK(ch, PRF_RELWALK); break; case SCMD_RELSEE: result = PRF_TOG_CHK(ch, PRF_RELSEE); break;[code]
[/code]

It works temporarily piggybacking on AUTOSPLIT, AUTODOOR and AUTOEXIT. I'll try tracking down the areas where autoexit is defined. Simply copying it and naming it RELTURN, or some other toggle, should work.
Last edit: 23 Oct 2012 02:24 by wifidi. Reason: omission

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 10:30 - 23 Oct 2012 10:52 #936 by wifidi
Replied by wifidi on topic Re: relative north movement
Attached is a final form of the two modes and a toggle whether to see turn reports.

An explanation of my earlier problem is sometimes tbaMUD links words and numbers, so in those cases proper matching rather than "out of thin air" reference matters.

The initial result is what I think of as "fake 3D". The user has to imagine they're facing walls despite the same room information. There might be ingenius ways to take advantage of this, for example seven room descriptions: basic and the facing directions. My creativity must be suffering because to me that leads to examining things from different angles instead of what I know and love about text MUDing.
Attachments:
Last edit: 23 Oct 2012 10:52 by wifidi. Reason: typo in code

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 02:54 - 08 Nov 2012 03:00 #1009 by wifidi
Replied by wifidi on topic Re: relative north movement
Liko wrote:

I would suggest using a flag that can be used on both a player and NPC.


Yeah, including AFF_REL_NORTH means it can be a spell as well as a toggle. Imagine messing up players' speedwalk directions before speedwalking your character, then being able to claim it is a non-violent spell because you didn't deprive anyone of a consistent movement method. Etc. I endeavor to have enough time to get deeper than an inch into enough interesting developments. When it comes to credit, the developer who is an inch deep and a square mile "wide" is more like a blogger than a programmer.
Last edit: 08 Nov 2012 03:00 by wifidi. Reason: initially used reply instead of quote, changed 'using' to 'including'

Please Log in or Create an account to join the conversation.

Time to create page: 0.187 seconds