October 06, 2024, 02:17:29 pm
Username:

Password:

Topic: Books counters  (Read 5979 times)

jankes

  • Posts: 34
    • View Profile
Books counters
« on: January 25, 2018, 06:43:59 pm »
We need books counters which player read. Books counter can be placed in character window in perks section. Each counter for each type of books; small guns, first aid, outdoor...

Why?

Because you no need to remember or write somewhere else how many books you read during gameplay.

So you gonna add it; very helpful (for me will be!).

Thx.

Henry

  • Wiki Administrator
  • Global Moderator
  • Posts: 869
  • Gravity is just a theory. Try Density.
    • View Profile
Re: Books counters
« Reply #1 on: January 25, 2018, 10:33:42 pm »
Good one. I agree. Also, when we read books on a character that already has the maximum skill, the book should not work, and thus not disappear from inventory, regardless of how many we have read. For example, if i never read any Scout books, but got my OD to 175 (max) without ever reading them, it is a waste of Scout books to read them at that point since they don't do anything. As things are now though, the Scout book(s) disappear though they yield no benefit.

Power

  • Posts: 0
    • View Profile
Re: Books counters
« Reply #2 on: April 07, 2018, 01:19:27 pm »
Good one. I agree. Also, when we read books on a character that already has the maximum skill, the book should not work, and thus not disappear from inventory, regardless of how many we have read. For example, if i never read any Scout books, but got my OD to 175 (max) without ever reading them, it is a waste of Scout books to read them at that point since they don't do anything. As things are now though, the Scout book(s) disappear though they yield no benefit.

Second part of your message relates to bug and not suggestion.

As I am new here and not much experience with C++, but just looking over the code, I made few small changes. Should fix problem having max skill and being able to consume the book.

Hopefully Kilgore can drop this in into next patch if its not fixed already.

Code: [Select]
// Author: cvet
// Edited by: Kilgore
#include "_macros.fos"
#include "msgstr.h"
#include "_vars.fos"

bool IsReadableBook(uint16 pid) // Export
{
switch (pid)
{
case PID_BIG_BOOK_OF_SCIENCE: // Science
case PID_DEANS_ELECTRONICS: // Repair
case PID_FIRST_AID_BOOK: // First Aid
case PID_SCOUT_HANDBOOK: // Outdoorsman
case PID_BARTER_BOOK: // Barter
case PID_GUNS_AND_BULLETS: // Small Guns
// case PID_CATS_PAW_ISSUE_5: // Energy Weapons
// case PID_CHEMISTRY_MANUAL:
// case PID_TECHNICAL_MANUAL:
// case PID_ACCOUNT_BOOK:
// case PID_BECKY_BOOK:
return true;
default: break;
}
return false; // Not a book
}

void TryReadBook(Critter& cr, Item& book) // Export
{
int skillNum;
uint strNum;
uint readAlready;
int skillMax;

switch (book.GetProtoId())
{
case PID_BIG_BOOK_OF_SCIENCE: // Science
skillNum = SK_SCIENCE;
strNum = STR_BOOK_READ_SCIENCE;
readAlready = LVAR_Book_Science;
skillMax = 125;
break;
case PID_DEANS_ELECTRONICS: // Repair
skillNum = SK_REPAIR;
strNum = STR_BOOK_READ_REPAIR;
readAlready = LVAR_Book_Repair;
skillMax = 125;
break;
case PID_FIRST_AID_BOOK: // First Aid
skillNum = SK_FIRST_AID;
strNum = STR_BOOK_READ_FISRT_AID;
readAlready = LVAR_Book_FirstAid;
skillMax = 200;
break;
case PID_SCOUT_HANDBOOK: // Outdoorsman
skillNum = SK_OUTDOORSMAN;
strNum = STR_BOOK_READ_OUTDOORSMAN;
readAlready = LVAR_Book_Outdoorsman;
skillMax = 175;
break;
case PID_BARTER_BOOK: // Barter
skillNum = SK_BARTER;
strNum = 10458;
readAlready = LVAR_Book_Barter;
skillMax = 150;
break;
case PID_GUNS_AND_BULLETS: // Small Guns
skillNum = SK_SMALL_GUNS;
strNum = STR_BOOK_READ_SMALL_GUNS;
readAlready = LVAR_Book_SmallGuns;
skillMax = 300;
break;
//case PID_CATS_PAW_ISSUE_5: skillNum=SK_ENERGY_WEAPONS; strNum=STR_BOOK_READ_ENERGY_WEAPONS; readAlready=LVAR_FO2077_Book_EnergyWeapons; break; // Energy Weapons
//case PID_CHEMISTRY_MANUAL: cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_BOOK_READ_FAIL);return;
//case PID_TECHNICAL_MANUAL: cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_BOOK_READ_FAIL);return;
//case PID_ACCOUNT_BOOK: cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_BOOK_READ_FAIL);return;
//case PID_BECKY_BOOK: cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_BOOK_READ_FAIL);return;
default: return;
}

GameVar@ readAlreadyVar = GetLocalVar(readAlready, cr.Id);
if (valid(readAlreadyVar) && readAlreadyVar.GetValue() < 10 && cr.Skill[skillNum] < skillMax)
{

//int sp=6;

//if(cr.Stat[ST_INTELLECT]<=4) sp=8;
//else if(cr.Stat[ST_INTELLECT]==5 || cr.Stat[ST_INTELLECT]==6) sp=Random(9,10);
//else if(cr.Stat[ST_INTELLECT]==7 || cr.Stat[ST_INTELLECT]==8) sp=Random(10,11);
//else if(cr.Stat[ST_INTELLECT]==9 || cr.Stat[ST_INTELLECT]==10) sp=Random(11,12);

for (int sp = 6; sp > 0;)
{
if (cr.Skill[skillNum] > 150 && sp > 3)
if (_CritIsTagSkill(cr, skillNum)) { cr.SkillBase[skillNum] += 2; sp = 0; }
else { cr.SkillBase[skillNum] += 1; sp = 0; }
else if (cr.Skill[skillNum] > 125 && sp > 2)
if (_CritIsTagSkill(cr, skillNum)) { cr.SkillBase[skillNum] += 2; sp -= 3; }
else { cr.SkillBase[skillNum] += 1; sp -= 3; }
else if (cr.Skill[skillNum] > 100 && sp > 1)
if (_CritIsTagSkill(cr, skillNum)) { cr.SkillBase[skillNum] += 2; sp -= 2; }
else { cr.SkillBase[skillNum] += 1; sp -= 2; }
else if (cr.Skill[skillNum] <= 100 && sp > 0)
if (_CritIsTagSkill(cr, skillNum)) { cr.SkillBase[skillNum] += 2; sp -= 1; }
else { cr.SkillBase[skillNum] += 1; sp -= 1; }
else sp = 0;
}

cr.SayMsg(SAY_NETMSG, TEXTMSG_GAME, strNum);
readAlreadyVar += 1;
_SubItem(book, 1);

// validate skill
if (cr.Skill[skillNum] > skillMax)
{
cr.SkillBase[skillNum] = skillMax;
}
}
else cr.SayMsg(SAY_NETMSG, TEXTMSG_GAME, STR_BOOK_READ_FAIL);
}

Slowhand

  • Posts: 282
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Books counters
« Reply #3 on: April 09, 2018, 08:01:50 pm »
to Corosive, take this further and add libraries to events that you can read to increase the last few points, instead of normal book.

c_hieter

  • Supporter
  • Posts: 235
    • View Profile
Re: Books counters
« Reply #4 on: April 30, 2018, 02:19:53 pm »
i havent been around that much lately, but my experience during this session is that books only go away if you get a benefit. if books no longer can up your stats up you get the messiage that "that does nothing". am i wrong?

Seki

  • Posts: 223
    • View Profile
Re: Books counters
« Reply #5 on: April 30, 2018, 07:47:28 pm »
books only go away if you get a benefit. if books no longer can up your stats up you get the messiage that "that does nothing"
this is right

jankes

  • Posts: 34
    • View Profile
Re: Books counters
« Reply #6 on: August 13, 2018, 10:06:30 am »
Bump suggestion because it is highly needed! :D

POWERPUFF

  • Supporter
  • Posts: 181
    • View Profile
Re: Books counters
« Reply #7 on: August 13, 2018, 12:45:28 pm »
Bump suggestion because it is highly needed! :D

No, it is not.
The Almighty Gaylords


Joe Lavender

  • Posts: 45
  • o/
    • View Profile
Re: Books counters
« Reply #8 on: August 14, 2018, 12:26:38 pm »
Bump suggestion because it is highly needed! :D

Like C_Heiter said, you can only use books until the message "This does nothing" appears. Its not needed.
Things just got worse.

Chosen One

  • Posts: 1051
  • Ya. Really Me. Want More Than That, PAY ASSHOLE!
    • View Profile
    • Ten Thousand Maniacs®
Re: Books counters
« Reply #9 on: August 14, 2018, 04:12:29 pm »
Not needed, not useful, and takes up developer's time trying.
Sorry, no support here.
Mika TAN, Nika NOIRE, Traci LORDS, KMart, Sand Nigger
Former Redding Miners Union member.


"Most women watch soaps- I play Fallout."

BACK TO THE FRONT! The Front Lines Are Everywhere...

Programmer

  • Guest
Re: Books counters
« Reply #10 on: August 14, 2018, 06:34:32 pm »
I think it is one of those small suggestions which basically is the most useful when it comes to user's experience. I can't see anything wrong that suggestion and it could help some people, especially those who play from time to time and can't remember everything. This isn't hard to implement because it works similar way as implants' counters.

+1 for that suggestion.

No, it is not.
Like C_Heiter said, you can only use books until the message "This does nothing" appears. Its not needed.
Not needed, not useful, and takes up developer's time trying.
Sorry, no support here.

What isn't useful in having books counters which show books which you have read? So, why do we have selected perks in character's screen? It seems to be useless too in your logic. Also developers don't do anything since few months because old bugs aren't still fixed when they could be fixed in one day. There're many bugs which can be fixed in few hours.

Parabellum

  • Supporter
  • Posts: 161
  • "Some Men Just Want to Watch the World Burn"
    • View Profile
Re: Books counters
« Reply #11 on: August 14, 2018, 11:25:09 pm »
Well you have a point Programmer.


Chosen One

  • Posts: 1051
  • Ya. Really Me. Want More Than That, PAY ASSHOLE!
    • View Profile
    • Ten Thousand Maniacs®
Re: Books counters
« Reply #12 on: August 14, 2018, 11:52:00 pm »
Well you have a point Programmer.
More importantly;
This isn't hard to implement because it works similar way as implants' counters.
Mika TAN, Nika NOIRE, Traci LORDS, KMart, Sand Nigger
Former Redding Miners Union member.


"Most women watch soaps- I play Fallout."

BACK TO THE FRONT! The Front Lines Are Everywhere...

Engardo

  • Posts: 10
    • View Profile
Re: Books counters
« Reply #13 on: December 20, 2018, 10:49:09 pm »
Good suggestion almost forgotten. I built it into my mod as a dialogue.

Code: [Select]
void r_QuestionsBooksRead(Critter& cr, Critter@ npc)
{
array<int> bookRead = {GetLocalVar(LVAR_Book_Science, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Repair, cr.Id).GetValue(),GetLocalVar(LVAR_Book_FirstAid, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Outdoorsman, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Barter, cr.Id).GetValue(),GetLocalVar(LVAR_Book_SmallGuns, cr.Id).GetValue()};
array<string> info = {"Science","Repair","FirstAid","Outdoorsman","Barter","SmallGuns"};
for(uint i=0;i<bookRead.length();i++)
{
if(bookRead[i] > 0)
{
cr.Say(SAY_NETMSG, info[i]+" : "+bookRead[i]);
}
}
}


When I was testing, I wondered why I didn't get a message. Then I remembered that I haven't read any books yet.  :facepalm
Maybe it would be better to show the unread ones as well. Or ~rb command. What would be better?