Welcome to the Builder Academy

Question How do I get the Saving throw values to display in do_show or do_stat?

More
08 Apr 2018 23:59 #7899 by Nibiru
I'm trying to redo do_show to display saving throws for PC. If it's easier to redo do_stat I'm open to that as well.

Do_stat has spaces for the values, however when I stat a PC it always returns a value of 0 but stating an NPC returns the value of the saving throw set in medit.


In do_show I've added the following lines:

send_to_char(ch, "Para: %d\r\n", saving_throws(GET_CLASS(ch), 0, GET_LEVEL(ch)));
send_to_char(ch, "Rod: %d\r\n", GET_SAVE(ch, SAVING_ROD));

I tried the variant for Para in an attempt to get the actual value to display when using the show player command.
In both cases the value shows as 0, although the table in class.c indicates that there should be a value.

When I type show player I have the spaces for the saving throw but not the value:
show player testmage
Player: Testmage (female) [15 Ma El]
Au: 514 Bal: 500 Exp: 1875000 Align: 89 Lessons: 96
Started: Sat Mar 10 13:41:54 2018 Last: Sun Apr 08 19:19:35 2018
Played: 4h 18m
Para: 0
Rod: 0
Petri: 0
Breath: 0
Spell: 0



What do I need to modify in order to display the actual value of a saving throw for a PC when I use that stat command or the show player command?

Nibiru

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

More
09 Apr 2018 05:22 - 09 Apr 2018 05:37 #7900 by JTP
When i stat myself, Then it already shows them, and also changes values when i wear eq, i didnt touch the code, so always worked here.

AC: [93-6/10], Hitroll: [ 2], Damroll: [ 0], Saving throws: [-1/0/0/0/0]
Last edit: 09 Apr 2018 05:37 by JTP.
The following user(s) said Thank You: Nibiru

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

More
09 Apr 2018 13:42 #7903 by lacrc
Wild guess here, but shouldn't you be using victim instead of ch?
Code:
GET_SAVE(victim, SAVING_ROD)
(better check if it's vict or victim or something else before tho hehe)
The following user(s) said Thank You: Nibiru

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

More
09 Apr 2018 16:51 #7904 by Nibiru
Thank you,

I'll do some further testing with equipment that modifies saving throws and see if I can get a value to display, since based on what JTP said above it should.
If that fails I'll change one line and see if your suggestion works.


Biru

Nibiru

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

Time to create page: 0.206 seconds