Need advice on restricting class choice based on race

  • Nibiru
  • Nibiru's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 1 week ago #7227 by Nibiru
Nibiru created the topic: Need advice on restricting class choice based on race
I'm running TBA 3.68 on windows 10.
I've added races using the snippet posted for an earlier version of TBA as a guide.
Now I want to restrict class choices based on race. What is the best way to accomplish this? I'm decent at hand patching but when it comes to creating something new I'm still very weak. If someone has done this this and can give me a brief outline of what you did I should be able to use it as a starting point. I've tried modifying class.c by setting up a case for each race but ran into issues getting the choices to display during character creation, this solution also did not prevent someone from choosing a class that is not permitted for the selected race.

Nibiru

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

  • WhiskyTest
  • WhiskyTest's Avatar
  • Away
  • Gold Boarder
  • Gold Boarder
More
1 month 1 week ago #7230 by WhiskyTest
WhiskyTest replied the topic: Need advice on restricting class choice based on race
I have a sneaky suspicion this was included in the D20 mud releases, but it seems the links are broken :(
If your google-fu is on point you might be able to track down source code for it.

Or someone else here might have a valid link?..

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

More
1 month 1 week ago #7233 by JTP
JTP replied the topic: Need advice on restricting class choice based on race
Im using:
int class_ok_race[NUM_RACES][NUM_CLASSES] = {
  /*            M, C, T, W */
  /* Human */ { Y, Y, Y, Y },
  /* Elf   */ { Y, Y, Y, N },
  /* Gnome */ { Y, Y, N, Y },
  /* Dwarf */ { N, Y, N, Y }
};

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

  • Nibiru
  • Nibiru's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 11 hours ago #7278 by Nibiru
Nibiru replied the topic: Need advice on restricting class choice based on race
Thank you for the suggestion to use a table and take a look at the D20 versions. I downloaded one of the D20 versions (Rasputin) and the class.c file seems to have the solution I'm looking for. Other than interpreter.c, are there any other files I should take a close look at prior to patching the relevant sections from the rasputin version of class.c into the tba3.68 version of class.c?

Nibiru

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

More
4 weeks 4 hours ago - 4 weeks 4 hours ago #7279 by thomas
thomas replied the topic: Need advice on restricting class choice based on race
It's mostly those two - class.c for the definitions, interpreter.c for the usage.

Edit: and of course, the relevant .h files.
Last Edit: 4 weeks 4 hours ago by thomas.

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

Time to create page: 1.038 seconds