Jump to content

[Fixed bug] SkillBooks - Multiplier doesn't increase..


ToshioSM

Recommended Posts

Hi all, icon_clyde.gif

I was surprised when after read skillbook Carpentry - basic, i didn't give multiplier exp for Carpentry. 

So, i checked where is problem icon_tophat.gif 

And... found!
Normal code without my corrects. icon_rolleyes.gif 

if trainedStuff then      -- every 10% we add 10% of the max multiplier      local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill      self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/10) * (trainedStuff.maxMultiplier/10)));   end

 

 

So, i corrected it. Now it looks like:

 

-- if we've 0 lvl skill      if self.character:getPerkLevel(SkillBook[self.item:getSkillTrained()].perk) == 0 then      local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill            if readPercent > 10.5 then -- max multiplier = 6 while learn to 1 lvl skill            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(10.5/3.5) * (trainedStuff.maxMultiplier/10)));            end            if readPercent <= 10.5 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/3.5) * (trainedStuff.maxMultiplier/10)));            end      end            -- if we've 1st lvl skill      if self.character:getPerkLevel(SkillBook[self.item:getSkillTrained()].perk) == 1 then      local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill            if readPercent > 14 then -- max multiplier = 8 while learn to 2 lvl skill            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(14/3.5) * (trainedStuff.maxMultiplier/10)));            end            if readPercent <= 14 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/3.5) * (trainedStuff.maxMultiplier/10)));            end      end            -- if we've 2nd lvl skill      if self.character:getPerkLevel(SkillBook[self.item:getSkillTrained()].perk) == 2 then      local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill            if readPercent > 17.5 then -- max multiplier = 10 while learn to 3 lvl skill            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(17.5/3.5) * (trainedStuff.maxMultiplier/10)));            end            if readPercent <= 17.5 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/3.5) * (trainedStuff.maxMultiplier/10)));            end       end      -- if we've 3rd lvl skill      if self.character:getPerkLevel(SkillBook[self.item:getSkillTrained()].perk) == 3 then       local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill            if readPercent > 13 then -- max multiplier = 30 while learn to 4 lvl skill            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(12/1.6) * (trainedStuff.maxMultiplier/5)));            end            if readPercent <= 13 and readPercent > 3 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/1.6) * (trainedStuff.maxMultiplier/5)));            end             if readPercent <= 3 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor((readPercent+2)/1.6) * (trainedStuff.maxMultiplier/5)));            end       end            -- if we've 4th lvl skill      if self.character:getPerkLevel(SkillBook[self.item:getSkillTrained()].perk) == 4 then       local readPercent = (self.item:getAlreadyReadPages() / self.item:getNumberOfPages()) * 100;      -- apply the multiplier to the skill            if readPercent > 13 then -- max multiplier = 30 while learn to 4 lvl skill            readPercent = (readPercent*0)+13;            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/1.6) * (trainedStuff.maxMultiplier/5)));            end            if readPercent <= 13 and readPercent > 3 then            self.character:getXp():addXpMultiplier(trainedStuff.perk, (math.floor(readPercent/1.6) * (trainedStuff.maxMultiplier/5)));            end       end



Now we can learn skills from SkillBooks! icon_e_surprised.gif

 

Screenshot:
86yc3x.jpg

Mnoznik (polish) = Multiplier (english) because i lead project polish translation PZ, so i have polish words in-game.

 

Besides my corrects i added:
Skillbooks:
- Carpentry - basic
- Carpentry - intermediate
- Carpentry - advanced
- Carpentry - master
- Carpentry - grand master

- Cooking - basic
- Cooking - intermediate
- Cooking - advanced
- Cooking - master
- Cooking - grand master

- Farming - basic
- Farming - intermediate
- Farming - advanced
- Farming - master
- Farming - grand master

Now we can learn Cooking and Farming from SkillBooks! icon_e_surprised.gif

In addition:
- Table loot for SkillBooks - TSSkillBooks_dist.lua
- Edited main table loot [removed just SkillBooks cause are already in TSSKillBooks_dist]. 
- Edited file items.txt [removed just SkillBooks cause are already in skillbooks.txt(bigger tidiness)].
- skillbooks.txt - Here are now added all SkillBooks. 

- In - XPSystem_Skillbook.lua 
Added:

SkillBook["Cooking"] = {};SkillBook["Cooking"].perk = Perks.Cooking;SkillBook["Cooking"].maxMultiplier = 20;SkillBook["Farming"] = {};SkillBook["Farming"].perk = Perks.Farming;SkillBook["Farming"].maxMultiplier = 20; 



In addition added loot for zombies:
- Hammer - 6% chances for loot
- Nails - 12% chances for loot

Important note!

I set for security, boundaries exp multipliers to earning levels didn't happen worthless additive.

As we earn 1 lvl skill, that max multiplier is 6.
As we earn 2 lvl skill, that max multiplier is 8.
As we earn 3 lvl skill, that max multiplier is 10.
As we earn 4 lvl skill, that max multiplier is 30.
As we earn 5 lvl skill, that max multiplier is 30.

Exp to earn to level up:
1 lvl - 100 points.
2 lvl - 300 points.
3 lvl - 1500 points.
4 lvl - 7300 points.
5 lvl - 10900 points.

Where add files with archive?

Folder media add to main folder with Project Zomboid.

Works with Project Zomboid 2.9.9.10 version.

MejTLMa.png

 

TSSKillBooksEN.zip (14 KB)

 

https://mega.co.nz/#!9RlghJhC!b4Cs1C70kk6XCdE884CErTGmJm4VqE6Xz7vYJtxxOoo

 

Time to skill exp! icon_cool.gif icon_clyde.gif

Link to comment
Share on other sites

Where add files with archive?

Folder media add to main folder with Project Zomboid.

Works with Project Zomboid 2.9.9.10 version.

MejTLMa.png

 

TSSKillBooksEN.zip (14 KB)

 

https://mega.co.nz/#!9RlghJhC!b4Cs1C70kk6XCdE884CErTGmJm4VqE6Xz7vYJtxxOoo

 

Time to skill exp! icon_cool.gif icon_clyde.gif

Hmm Thanks to the all powefull firefox It tells me its over 50mb you say 15kb the website says 15kb so this concerns me.

 

Edit: after downloading this seemed to be just a bug.

Link to comment
Share on other sites

Erm, don't remember saw your answer, but..

 

I just tested and, it work perfect here..

 

Dunno why you fix it...

 

Anyway, thanks for the other books, need to finish them too :D

I did play without my fix and never i got multiplier exp. With my fix i got multiplier exp + set borders for reasonable amount multiplier.

Link to comment
Share on other sites

Well, after a few pages read (need 10% minimum, so 20 pages), I did add a multiplier... :(

Gonna re test that again, but I even saw it once in a Stream...

You're right but i had 23,26, 24,31,35,47 pages and i didn't get multiplier. I don't know why so was. Of course 2.9.8b and 2.9.9.10 version Project Zomboid.

And there is else one problem. When u read book then u run forward and you stop reading. Counter will be stopped on last amount read pages. So i can bug them to 220/220.

Link to comment
Share on other sites

Its normal that the counter stop, so you're not need to read the full book, you start to read, get a small multiplier and close the book to re read it later.

Anyway, I re tested several times and works perfectly here, I added the other books tho :)

Ah, so i can to stop reading book and back to reading book later (btw increasing multiplier exp)?

Link to comment
Share on other sites

Ah, so i can to stop reading book and back to reading book later (btw increasing multiplier exp)?

 

That's it, every times you read 10% of the book, you'll have 10% of the max multiplier (it's 20 for now), so, for the first book : 220 pages, if you read 20 page, you'll have a 2% multiplier.

Then you could stop read, re start reading page 20 to 40 the day after and so you'll have a lovely 4% bonus xp.

Link to comment
Share on other sites

You would be surprised how many people misuse books. almost 90% of the LP videos on youtube start to read the book fast forward and only get a 2 or 4 multiplier. I have reached a 20 multiplier once normally its 18. so if you get it on a page bases how would fast forwarding effect the multipliers so much?

 

Here is one example of it. its at 3min 39 sec in he reads it and 6min 07 sec he looks at multiplier.

Link to comment
Share on other sites

  • 2 weeks later...

 

Hmm Thanks to the all powefull firefox It tells me its over 50mb you say 15kb the website says 15kb so this concerns me.

 

Edit: after downloading this seemed to be just a bug.

 

It's not so much a bug as it is a rude design for a downloading site.  The message which confused you was related to the javascript downloader demanding more permissions than it needs.  I have an intense distrust of download sites which force you to use their downloader and won't allow a simple http transfer.  I keep Javascript turned off unless a site has a good reason to require it.

ToshioSM, could we please get this mod hosted on an alternate download site?  I really appreciate your modding efforts, but I don't much like this "Mega" at all.

Link to comment
Share on other sites

 

 

Hmm Thanks to the all powefull firefox It tells me its over 50mb you say 15kb the website says 15kb so this concerns me.

 

Edit: after downloading this seemed to be just a bug.

 

It's not so much a bug as it is a rude design for a downloading site.  The message which confused you was related to the javascript downloader demanding more permissions than it needs.  I have an intense distrust of download sites which force you to use their downloader and won't allow a simple http transfer.  I keep Javascript turned off unless a site has a good reason to require it.

ToshioSM, could we please get this mod hosted on an alternate download site?  I really appreciate your modding efforts, but I don't much like this "Mega" at all.

 

 

I agree i Will now download from that site. I do not trust it.

Link to comment
Share on other sites

  • 3 months later...

I don't get it - first I tried without this mod, will try with the mod once someone tells me if I am doing it right:

I read the first 10% of the book (22 pages out of 220) and stopped (walked a little) but it did not add a multiplier. Read to 50 pages, did not add a multiplier. And so on, in the end I had a 2% multiplier ...

Compared to what I did before (with the same character but another trait) - which was read the book through in one go - 3% multiplier.

 

So can someone please explain exactly how to read these books in order to get the best multiplier?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...