Welcome to the Builder Academy

Question Questionnaire idea

More
04 May 2013 20:45 #2106 by Papaya Pete
Anyone here remember playing Arena, Daggerfall, etc. in which they used a questionnaire to determine what class you played? I have an idea of doing something similar, but instead using it to modify your character's stats, skills, etc.

Is this something anyone else would be interested in? If so I can upload it once it's complete.

This is also going to be my first attempt at not asking for help on something, as I'd like to build on my coding skills. Anyways, sharing is caring, so let me know if this is something anyone else wants. If I do post, I'll try to make it so it will work on stock tbaMUD.

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

More
04 May 2013 23:30 #2107 by Kewlb
Replied by Kewlb on topic Questionnaire idea
I gave the ability for the player to set stats based on a pool of available points. I will post it up here and maybe it will help you get your code together.

You could edit this slightly and save a bit array of flags for answers to questions and assign stats at the end based on all the flags they have set.


added the following to interpreter.c in their appropriate places. I also added tmpint and selection (both integers) to the descriptor struct in structs.h. I removed classes in my mud so this is right after choosing sex.. for you it could be after choosing class or race depending on if you put races in. You also have to add this CON to structs.h.
Code:
/* CLASS WAS ASSIGNED HERE */ if (d->olc) { free(d->olc); d->olc = NULL; } if (GET_PFILEPOS(d->character) < 0) GET_PFILEPOS(d->character) = create_entry(GET_PC_NAME(d->character)); /* Now GET_NAME() will work properly. */ init_char(d->character); d->tmpint = 15; vitals_menu(d); STATE(d) = CON_VITALSMENU; break; case CON_VITALSMENU: switch (*arg) { case 'v': case 'V': d->selection = 0; write_to_output(d, "What do you want your vision to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 'i': case 'I': d->selection = 1; write_to_output(d, "What do you want your invincibility to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 't': case 'T': d->selection = 2; write_to_output(d, "What do you want your technology to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 'a': case 'A': d->selection = 3; write_to_output(d, "What do you want your agility to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 'l': case 'L': d->selection = 4; write_to_output(d, "What do you want your luck to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 's': case 'S': d->selection = 5; write_to_output(d, "What do you want your strength to be? (5-20) : "); STATE(d) = CON_EDITVITALS; break; case 'q': case 'Q': if (d->tmpint == 0) { d->tmpint = 0; d->selection = 0; save_char(d->character); save_player_index(); write_to_output(d, "%s\r\n*** PRESS RETURN TO ENTER BODY: ", motd); STATE(d) = CON_RMOTD; /* make sure the last log is updated correctly. */ GET_PREF(d->character)= rand_number(1, 128000); GET_HOST(d->character)= strdup(d->host); mudlog(NRM, LVL_GOD, TRUE, "%s [%s] new player.", GET_NAME(d->character), d->host); /* Add to the list of 'recent' players (since last reboot) */ if (AddRecentPlayer(GET_NAME(d->character), d->host, TRUE, FALSE) == FALSE) { mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE)."); } break; } else { vitals_menu(d); write_to_output(d, "You can't quit until you assign all points\r\n"); write_to_output(d, "What stat do you wish to edit? : "); return; } break; default: write_to_output(d, "Invalid Choice...\r\n" "What stat do you wish to edit? : "); return; } return; case CON_EDITVITALS: if (isdigit(*arg)){ num = atoi(arg); if (d->selection == 0) { stat_was = d->character->real_abils.vis; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.vis = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } else if (d->selection == 1) { stat_was = d->character->real_abils.inv; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.inv = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } else if (d->selection == 2) { stat_was = d->character->real_abils.tec; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.tec = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } else if (d->selection == 3) { stat_was = d->character->real_abils.agi; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.agi = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } else if (d->selection == 4) { stat_was = d->character->real_abils.luc; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.luc = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } else if (d->selection == 5) { stat_was = d->character->real_abils.str; stat = LIMIT(num, 5, 20); if (stat > stat_was) { i = d->tmpint - (stat - stat_was); if (i < 0) stat = stat + i; } d->character->real_abils.str = stat; if (stat > stat_was) d->tmpint = d->tmpint - (stat - stat_was); else d->tmpint = d->tmpint + (stat_was - stat); } } else { vitals_menu(d); write_to_output(d, "You entered an invalid argument.\r\n"); write_to_output(d, "What stat do you wish to edit? : "); STATE(d) = CON_VITALSMENU; break; } vitals_menu(d); STATE(d) = CON_VITALSMENU; break; added this to class.c and included the prototype in class.h void vitals_menu(struct descriptor_data *d) { write_to_output(d, "\r\n\r\n|=============================================================================|\r\n" "| \tRCognizance Recycler\tn |\r\n" "| Module ID: VITALS (Very Intelligent Teratogen Allocation Lligase System) |\r\n" "|=============================================================================|\r\n" "| [V : %2d] - Vision: How well you perceive the environment and other people |\r\n" "| EXAMPLES: GUNS BOWS SNEAKING INFRAVISION TRACKING ETC... |\r\n" "| [I : %2d] - Invincibility: How much damage you can take |\r\n" "| EXAMPLES: HEALTH GAINS/HEALING/REGEN, DAMAGE MITIGATION, ETC... |\r\n" "| [T : %2d] - Technology: Proficiency with using technology |\r\n" "| EXAMPLES: FIREBALLS, CLOAKING, TELEPORTING, CRAFTING, ETC... |\r\n" "| [A : %2d] - Agility: How quickly you can react, how long before winded |\r\n" "| EXAMPLES: BLOCKING, SNEAKING, BACKSTAB, ACTION REGEN, ETC... |\r\n" "| [L : %2d] - Luck: How favorable chance based rolls are |\r\n" "| EXAMPLES: BONUS TO CRITIAL HITS, ACCURACY, CRAFTING, ETC... |\r\n" "| [S : %2d] - Strength: Raw physical damage |\r\n" "| EXAMPLES: UNARMED COMBAT, MELEE, CARRY WEIGHT, ETC... |\r\n" "| Q) Accept current values, create body, and transfer Cognizance |\r\n" "|=============================================================================|\r\n" "| You have %2d more points to distribute. |\r\n" "| You may set a stat to be anywhere in the 5-20 range. |\r\n" "| Statistics in the game range from 3-50 for all players and NPC(s) |\r\n" "| Your currently allowed in-game stat range is 3-25. |\r\n" "|=============================================================================|\r\n", d->character->real_abils.vis, d->character->real_abils.inv, d->character->real_abils.tec, d->character->real_abils.agi, d->character->real_abils.luc, d->character->real_abils.str, d->tmpint); write_to_output(d, "\r\nWhat stat do you wish to edit? : "); }

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

More
05 May 2013 00:37 #2109 by Fizban
Replied by Fizban on topic Questionnaire idea
A lot of more recent games do this as well still. I know both Fallout 3 and New Vegas both had similar setups, though they let you override the class-setup that the players answers initially chose.

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

More
05 May 2013 03:30 #2112 by rudeboyrave
Replied by rudeboyrave on topic Questionnaire idea
Questionnaire idea sounds awesome Pete, i think the original idea for this came from the Ultima games maybe? Any snippets we can get contributed to the site will help this community grow. Awesome skill snippet kewlb, which mud is that from, it looks like its going to be fun.

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
05 May 2013 04:05 #2114 by Kewlb
Replied by Kewlb on topic Questionnaire idea

rudeboyrave wrote: Questionnaire idea sounds awesome Pete, i think the original idea for this came from the Ultima games maybe? Any snippets we can get contributed to the site will help this community grow. Awesome skill snippet kewlb, which mud is that from, it looks like its going to be fun.


I am calling it Dead Survival. I am taking all of the best things from all the various MUDS I have programmed over the years and really trying to come up with something half way fresh. There is nothing I am doing that probably has not been done before in other muds, but I am not sure if they have all been in the same one.

The premise of the MUD is it is a post-apocalyptic world with remnants of old working technology.. one piece called the Cognizance Recycler allows people's consciousnesses to live on in another body after death.. as long as their DNA sequence remains strong [perm char death is possible]. What caused the near annihilation of the human race was DNA modifications that got out of hand. There will be many mutated NPC(s) and the main thing, of course, that wiped out humanity were zombies [yes not original.. but I have a mechanic for them that will work very well].

The game itself is a completely classless and raceless [at least for players] MUD. The skill system is handled via skill chips [think FF7 Materia] that can level up and are placed in equipment. The skill chips are tied to a players VITALS [stats system] for pre-requisites. I plan for the leveling process to be fairly fast. Initially players can have stats from 3-25.. but gain a +5 to max after each "remort" up to 5 total remorts whereby the character will be maxed. Each skill has a cooldown timer, range it can be used from, and damage type.

I am replacing the current movement system of the mud and implementing a definable grid for each room. When players move "n/s/e/w/ne/nw/se/sw" they will actually be moving on the grid inside of the room. Once they moved far enough to hit the edge they will move towards the next room. This, obviously, opens up a whole world of possibilities. I will be implementing objects people can take cover behind or climb to gain a height advantage over their foes. They will be able to move around and preposition during combat, etc..

As far as combat I am replacing the 2 second round based system with a complete events driven system. This will allow me to have quite a lot of skills/activated abilities [were spells] require some type of execution time so that they can be avoided and or countered. Rest assured you are not just going to type kill blah and watch the screen scroll for 4 minutes while you quaff a heal potion to stay alive..

I made use of the old assemblies snippet and re-wrote quite a bit of it for my Fallout mud. I will be re-using a lot of that. it is one of the more robust crafting systems I have seen in a mud. Combine that with various places to mine, fish, harvest, skin fallen non-humanoid NPC corpses, and break down old equipment into components and you will have a robust system where almost nothing goes to waste or is junked.

I am still pretty early in the develop stages for all of this. A lot of it I have working in other mud and must re-write to adapt to this one.. quite a lot of it is also brand new to me, like the grid system. I am currently working on this grid system and hope to be completed in the next week or two with it. I probably only have about 2 or so hours to program per night.

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

More
05 May 2013 05:30 #2119 by Papaya Pete
Replied by Papaya Pete on topic Questionnaire idea
That looks pretty nice, man. Well, my idea actually was to ask questions like...

"You're walking down the street when you hear a man scream for help in an alleyway. You take a peek and see two men wrestling another man to the ground. What do you do?

A.) Run in and try and fight the men off.
B.) Shout for help.
C.) Just keep walking."

Depending on what you respond has an effect on your character. For instance, running in and fighting them might give an improvement to unarmed skill to start with, while shouting for help can give an additional point to WIS. Just walking by would lower your alignment. This would give players a chance to mod their stats and starting skills. I don't really mind character stats being determined the stock way.

My approach was to actually take a look at the basic races snippet and go from there. Seeing as I'm busy for the rest of the weekend, I'm going to start on Monday.

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

Time to create page: 0.197 seconds