Skill Scrolls

Skill Scrolls

Description: right-click scrolls that cast a skill

Categories: Tutorials (1.1x) - Item Mechanics


Ok, here I will explain you how to make a scroll that releases a skill, when right-clicked.
Note that the scroll, could be any item you like: a book, an orb, a potion? I will also explain you how to change it to your liking.

This tutorial also requires 0 code editing (CE)

[I]This tutorial is meant to work on Diablo II lord of destruction, version 1.10 or higher.[/I]

[B]Tools needed and files needed:[/B]

any text files editor (I use AFJ sheet editor)
any tbl files editor (I use AFJ tbl edit)
Misc.txt
Skills.txt
Missiles.txt

Before you make this tutorial, you should read the fileguides for the text files needed.
these fileguides are available in the knowledge base.

First, with your text files editor, open Misc.txt
Now go to [B]antidote[/B] line. Copy [B]antidote[/B] line and paste it at the bottom.
Now make the following changes:

[B]name:[/B] Skill Scroll
[B]*name: [/B]Skill Scroll
[B]version:[/B] 100
[B]level:[/B] [I]what you want here[/I]
[B]levelreq:[/B] [I]what you want here[/I]
[B]code:[/B] @ss
[B]alternategfx:[/B] @ss
[B]strname:[/B] @ss (this is a string key.)
[B]flippyfile:[/B] flprsc (read more later)
[B]invfile:[/B] invrsc (read more later)
[B]type:[/B] [I]you can keep the same or make your own[/I]
[B]dropsound:[/B] item_scroll
[B]usesound:[/B] item_scroll
[B]belt:[/B] 0
[B]pSpell:[/B] 10
[B]spelldesc:[/B] 1
[B]spelldescstr:[/B] [I]this is the description of your item. this is a string key[/I]
[b]akaramin:[/b] blank
[b]akaramax:[/b] blank
[b]lysandermin: [/b]blank
[b]lysandermax:[/b] blank
[b]lysandermagicmin:[/b] blank
[b]lysandermagicmax:[/b] blank
[b]alkormin:[/b] blank
[b]alkormax:[/b] blank
[b]cainmin:[/b] blank
[b]cainmax:[/b] blank
[b]malahmin:[/b] blank
[b]malahmax: [/b]blank
[b]jamellamin:[/b] blank
[b]jamellemax:[/b] blank
[b]PermStoreItem:[/b] blank
[b]MultiBuy:[/b] blank

Now your scroll is done. save [B]Misc.txt[/B] and open [B]skills.txt[/B]
Now the skill that your scroll release, is the [B]Fireball[/B] skill (sorceress fireball).
The [B]pSpell[/B] 10 is coded to cast this skill.
So, you just have to change this skill to your liking. (like missile, damage, synergy, etc etc...)

[B]flippyfile & invfile (Misc.txt)[/B]

[B]flippyfile[/B] is the animation of the item, when you drop it.
[B]invfile[/B] is the inventory graphic.

so you can change this to, a book, and orb, or your own inventory graphic.
Don't forget to change the sounds to fit with your new graphic.

[B]examples of what you can do:[/B]

with this scroll, I made, a red portal to an uberquest.
I spawned a monster.
I made some skills, like a nova and etc...

there's probably more possibilities.

[B]Now, there is only one bad thing:[/B]

You can have only one of this type of scrolls, because the [B]pSpell[/B] is [B]hardcoded[/B] to the [B]Fireball[/B] line and can't be modified without code editing.
But this is still pretty good, if you want an all softcoded mod.

Now that your scroll is all done, you can spawn it by a cube recipe, or you can enable it again, at the vendors.

--------------------

[SIZE=7][b]Update:[/b][/SIZE]

Ok, so here is a little update to my skill scrolls tutorial. In the main tutorial, I just explained how to make the scroll, and what skill you have to modify. But I think I didn't explained the coolest features of it, so here is a little update.

Now I will explain you how to: Spawn any monster from the scroll and spawn a red portal to a defined level.
Note that I will not explain how to make the scroll again. If you don't already have one done, you can find how to make it in previous tutorials of this guide.

[b]- Spawn any monster from the scroll:[/b]

First open [b]missiles.txt[/b], and copy [b]firebolt[/b] line. (and paste it at the bottom).
make these changes:
[b]Missile:[/b] monster_spawning
[b]Id:[/b] next in your missiles.txt
[b]pSrvHitFunc:[/b] 6
[b]{filtered}:[/b] 243 (this is a monstats.txt Id, Diablo here.)
[b]*server hit param1 desc:[/b] Monster Spawned Id
[b]{filtered}:[/b] 1
[b]*server hit param2 desc:[/b] Spawn Mode = NU
[b]Range:[/b] 5
[b]CelFile:[/b] null
[b]AnimLen:[/b] 1
[b]AlwaysExplode:[/b] 1
[b]Skill:[/b] [i]blank[/i]

now open [b]skills.txt[/b] and go to [b]Fireball[/b] line. Make these changes:
[b]srvmissile:[/b] monster_spawning
[b]cltmissile:[/b] monster_spawning
[b]reqskill1:[/b] [i]blank[/i]

Now it's done, your scroll should spawn Diablo when right-clicked.
You can change Diablo by any of your monsters, just modify the [b]{filtered}[/b] to your monster Id, this Id is the [b]monstats.txt[/b] Id.

[b]- Spawn a red Portal by the scroll:[/b]

Here I will explain how to spawn a red portal to the cow level by our scroll.
The portal can lead to any level, but here I will explain how to make it a portal to cow level.
I will also explain how to choose the level. The level chosen should always be a Act 1 level, I got some crashes and problems when trying to spawn portals to levels from other acts. The scroll also must be casted in the same Act as your destination level.

First open [b]missiles.txt[/b] and go to [b]cairnstones[/b] line.
copy [b]cairnstones[/b] line and paste it at the bottom.
make the following changes:
[b]Missile:[/b] new_portal
[b]Id:[/b] next in your missiles.txt
[b]Param4:[/b] 39 [i](level Id, 39 = cow level)[/i]
[b]range:[/b] 25
[b]SubMissile1:[/b] [i]blank[/i]
[b]CltSubMissile1:[/b] [i]blank[/i]
[b]CltSubMissile2:[/b] [i]blank[/i]

now open [b]skills.txt[/b] and go to [b]Fireball[/b] line.
Make these changes:
[b]srvmissile:[/b] new_portal
[b]cltmissile:[/b] new_portal
[b]reqskill1:[/b] [i]blank[/i]

Now you're done. Your scroll should spawn a red portal, leading to the secret Cow level.
But there is still a problem, when you will hover your mouse on the portal, it will display [b]'no level name'[/b]. There is only one way I know to fix this problem without code editing, you need to edit the default string key for softcoded portals. it's in [b]string.tbl[/b].
It's at the full bottom of [b]string.tbl[/b], the key is called [b]strLevelLoadFailed[/b]
just edit the string to: [b]to The Secret Cow Level[/b]

to change the destination level, you just change the [b]Param4[/b] column of your missile, to the Level Id you want. (levels.txt Id).

thank you

[B]whist[/B]

Link to this article: Select all

[url=https://d2mods.info/forum/kb/viewarticle?a=462&sid=54cf23aefabd6a51e8a8550f63349d53]Knowledge Base - Skill Scrolls[/url]