How to make Skill Book sellable with vendors?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

How to make Skill Book sellable with vendors?

Post by Vexy » Fri Dec 08, 2023 10:27 am

I tried to make Skill book's stats same as amulet in misc.txt but it does nothing, I also tried to add that in gamble but also no succed. Please hint...

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: How to make Skill Book sellable with vendors?

Post by Cypress » Fri Dec 08, 2023 11:17 am

Hi Vexy, what is the Skill Book supposed to do? Is it like a charm? Is it worn as an amulet?

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Fri Dec 08, 2023 11:37 am

Hi Cypress, Skill Book is an item which Radament drops in act2. If rightclicked - it gives +1 skillpoint

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: How to make Skill Book sellable with vendors?

Post by Cypress » Fri Dec 08, 2023 12:00 pm

You'll want to add the item to gamble.txt based on its code. So in misc.txt, Book of Skill has code=ass. So you'll want to add a row to gamble.txt with code=ass. But what do you mean by it does nothing? Is it supposed to give unlimited skill points? Or is it supposed to behave like the regular Radament's Book of Skill that can only be used once after killing him?

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Fri Dec 08, 2023 1:03 pm

Character says "I can't" and skill is not given, book won't dissapear. Yeah I added in gamble
Book of Skill ass
line, but it won't appear at gamble

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: How to make Skill Book sellable with vendors?

Post by Cypress » Fri Dec 08, 2023 10:56 pm

The Book of Skill requires you to kill Radament before you can use it. Not sure why it won't appear in gambling, can you post the entire line for Book of Skill in misc.txt?

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Sat Dec 09, 2023 6:34 pm

Well Actually after all it appears in shop and I can buy it, but I still get "I can't" when trying use it.
Book of Skill1 1 0 0 0 0 1 1 0 1 2 2 ass tbk ass 16 2 2 1 1 1 flpbbk invsbk 0 xxx 1 spot item_book 12 item_book 0 0 5 0 0 0 0 0 0 0 0 -1 10 0 0 0 non 0 255 255 2 4 255 255 3 5 3 5 255 255 255 3 5 255 255 255 255 2 3 255 255 2 3 255 255 255 2 3 255 0 0 0 xxx xxx 1 1

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Sat Dec 09, 2023 6:39 pm

the key columns are pspell, typem spawnable and questdiffcheck. (to make item appear) But sadly appeared item does nothing. I guess same goes with potion of live too. I want to make a way to convert player's gold to stats.

OrderOfTheScribble
Posts: 34
Joined: Wed Apr 05, 2023 7:35 pm
United States of America

Re: How to make Skill Book sellable with vendors?

Post by OrderOfTheScribble » Sat Dec 09, 2023 7:58 pm

You can make your own items give things like skill points and max HP in Misc.txt using pSpell 3 and the correct stat. For example, if you want to make a softcoded version of the Book of Skill and have it look just like the one Radament drops, the way to do that is to clone the Book of Skill and then modify the clone as follows:
  • Delete the entries for quest and questdiffcheck, and set the item type to something other than ques. misc should be a fine item type for this.
  • Change the code to one that doesn't exist anywhere else in Misc.txt, Weapons.txt, or Armor.txt.
  • Set spawnable to 1 and cost to the amount of gold you want vendors to charge for a skill point.
  • Set pspell to 3, stat1 to newskills, and calc1 to 1. This means that when the item is right clicked, the player gains a skill point.
  • For each vendor you want to be able to sell this item, set the min and max for that vendor to 1. If you want the player to be able to buy multiples of the item, set PermStoreItem to 1.
The key is pspell 3, which allows an item to give a permanent stat when used. pspell 3 can also be used to give things like stat points (statpts), XP (experience), max HP (maxhp; not sure if this is given in points or 1/256), or even attributes (e.g. stat=strength and calc=5 would give a permanent +5 to Strength).
Last edited by OrderOfTheScribble on Mon Dec 11, 2023 12:10 am, edited 1 time in total.

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Sat Dec 09, 2023 11:18 pm

Thank you for reply. So pspell is 3? Hmm. Now Char does not say "I can't" but still neither skill is given or book disappear. Do I need to change neighbor field state? Is it a digit or a text buff?
BTW: setting type to misc make it dissapear from shop. I used(with no point) spot(stamina potion)
Also if I set code to some unknown - it makes item's picture transparent.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: How to make Skill Book sellable with vendors?

Post by Cypress » Sun Dec 10, 2023 2:21 am

You'll need useable=1 as well to be able to consume it.

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Sun Dec 10, 2023 12:41 pm

yes ofc it is set to 1.

OrderOfTheScribble
Posts: 34
Joined: Wed Apr 05, 2023 7:35 pm
United States of America

Re: How to make Skill Book sellable with vendors?

Post by OrderOfTheScribble » Mon Dec 11, 2023 12:13 am

Could you post the row of the skill book clone in Misc.txt? I was able to clone the Book of Skill per what I said above, generate it with a test recipe, and use it.

Edit: I was able to successfully buy a Book of Skill clone from Akara with the type set to misc after editing ItemTypes.txt to set StorePage to misc in the row for the misc item type.

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Mon Dec 11, 2023 7:15 am

OrderOfTheScribble, can you copy your new lines then? Mine is
Book of Skill1 1 0 1 0 0 1 1 0 1 90 2 zvz tbk ass 16 2 2 1 0 0 flpbbk invsbk 0 xxx 1 elix item_book 12 item_book 0 0 5 0 0 0 0 0 0 0 0 -1 3 healthpot 1 UseBookOfSkill UseBookOfSkillController 4 0 0 0 non 0 1 1 255 255 2 4 255 255 3 5 3 5 255 255 255 3 5 255 255 255 255 2 3 255 255 2 3 255 255 255 2 3 255 0 0 0 xxx xxx

I do can buy it from Akara, But when I rightclick it in inventory - AISB it gives book sound and does nothing

OrderOfTheScribble
Posts: 34
Joined: Wed Apr 05, 2023 7:35 pm
United States of America

Re: How to make Skill Book sellable with vendors?

Post by OrderOfTheScribble » Mon Dec 11, 2023 8:44 am

When posting a row from a txt file, it's best to leave it tabbed (copying directly from the editor you're using to the text form should work), otherwise it won't paste properly into the editor. WIth that said, here's the row I used:

Code: Select all

Test Book	Book of Skill		1	0	0	0	999	1	0	1	50000			m07	tbk	ass	16	2	2	0	0	0	flpbbk	invsbk			0	xxx			1	0	misc		item_book	12	item_book	1	0	5	0	0	0	0	0	0	0			0	-1	3					newskills	1								0	0	0	non	0					255					255	1	1			255					255					255					255					255					255					255					255					255					255					255					255					255					255					255			0	0	0	xxx	xxx			1			0
Looking at your row and comparing it to mine, it looks like you're using healthpot as the stat when it should be newskills.

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Mon Dec 11, 2023 11:03 am

test book and next field book of skill? In which file I should write it? "Code" in itemtypes.txt or "compactsave" in misc.txt?
Can you just copy whole the line or attach txt file?

btw I'm using text editor for editing rows and notepad+ to copy line.

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Tue Dec 12, 2023 12:29 am

* aw and I use Ressurected game, if they differ in these files

Vexy
Posts: 11
Joined: Fri Dec 08, 2023 10:22 am

Re: How to make Skill Book sellable with vendors?

Post by Vexy » Sun Dec 17, 2023 4:44 pm

No one knows? I'm first who came with idea to buy skill books?(

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: How to make Skill Book sellable with vendors?

Post by Cypress » Tue Dec 19, 2023 11:42 pm

Post your row that isn't working, in code display: that is the button above your post that looks like </>. And also include your columns.

Also, you don't need to make multiple posts, editing your post bumps the thread.

Return to “General Mod Making”