[Request] Updated YANModPack H5 installation Guide

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
kutt
Posts: 49
Joined: Sat Mar 08, 2014 1:47 am
Location: USA

[Request] Updated YANModPack H5 installation Guide

Post by kutt »

Hi everyone. I've been searching the forums and have read the initial guides regarding the YANModPack and have found that it is out of date, or I'm just not understanding it clearly.

I'm running a High Five server that is functional (everything to my knowledge), but I'm having troubles with custom npcs because every guide and thread I'm finding are referencing outdated table structures and files.

If anyone could provide me with a more current guide on how to install YAN npcs (or different buffers/gatekeepers/gm shops) or how to build one from scratch, I'd greatly appreciate it.

I'd like to be a solid part of this community and once I learn how to do some of these nuances then I can get into using my programming knowledge to help create new assets/work on existing ones for fellow server builders.

Thank you,

Kutt
canislupus
Posts: 66
Joined: Tue Dec 24, 2013 1:30 am

Re: [Request] Updated YANModPack H5 installation Guide

Post by canislupus »

Hello,

Ill try to shed some light in the matter even tho i havent created custom npcs in a while.

First you need to define an NPC, i believe you can create an NPC in an xml file and define its info there, such as how tall or how far from the ground it should be, its aggro range etc. As well as what type of NPC you want, it can be a merchant or a monster.

For buffers and merchants, you know .... NPCS with dialogues, you must define the dialogue. You can do this by creating an html file with the npc id as the file name in the corresponding folder. The layout of the dialog is an html table, which is super easy and you can read more about it here; http://www.w3schools.com/html/html_tables.asp

After defining the dialog you'll want to add a button or some event, since i dont remember what was the event trigger, i suggest you check out other NPCs dialog files.

The event triggered by the button could be a scripted event.
In the case of a merchant it would be: display the merchant's multisell data (which is inside the respective's npc multisell xml file)
In the case of a buffer it would be: execute the custom npc's script.
To know what the buffer does exactly, check out the source files.

I also believe yan mod buffer has some stuff that is stored in the database. (sorry i cant recall)

Lastly, yan buffer has a way to configure the buffer,
Something like predefined buff schemas, you should check out these schemas and personalize them to your liking.

Check out the source files and try to understand how it works. You don't need to know exactly what each piece of code does, but having a general overview will help you greatly in case of a bug and trust me there will be bugs.

I'll give you a hint on a nasty bug that you should look out. ( this bug maybe got fixed, but since git is offline, i cant verify )
Configure the server to handle the adventurer starter pack that contains buff cocktails.

Use the fighter's cocktail. Then take note of your player's stats.
Buff your player with equivalent buffs, while still having the cocktail buffs on. Take note of your player's stats.

Have fun
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721
User avatar
maneco2
Initiates
Initiates
Posts: 664
Joined: Sat Aug 24, 2013 7:10 am

Re: [Request] Updated YANModPack H5 installation Guide

Post by maneco2 »

Quick Start Guide. Simple steps HighFive.
:+1:

Step 1: Adding YANModPack on your server you need adding the script folder:

Code: Select all

L2JServer\game\data\scripts\YANModPack
[/u]
Step 2: Adding script YANModPack on scripts.cfg:

Code: Select all

# Custom
scripts\YANModPack\YANBuffer\src\YANBuffer.java
scripts\YANModPack\YANTeleporter\src\YANTeleporter.java
Step 3: Execute SQL file on you database:

Code: Select all

scripts\YANModPack\YANBuffer\data\YANBuffer.sql
[/u]
Step 4: For manage npc buffer and teleport, you need check this on location folder XML's here:
YAN Buffer manager

Code: Select all

scripts\YANModPack\YANBuffer\data\xml
[/u]
YAN Teleport manager

Code: Select all

scripts\YANModPack\YANTeleporter\data\xml
[/u]
Step 5: Adding custom NPC on XML:
Check npc_id, or change for your value:

Code: Select all

scripts\YANModPack\YANTeleporter\data\xml\teleporters.xml
scripts\YANModPack\YANBuffer\data\xml\buffers.xml
[/u]
Adding NPC in xml:
Folder: \game\data\stats\npcs\custom\custom.xml
SPOILER:

Code: Select all

	<npc id="12" displayId="13268" name="YAN Buffer" usingServerSideName="true" title="Scheme Buffer" usingServerSideTitle="true" type="L2Npc">
		<collision>
			<radius normal="12" />
			<height normal="27.5" />
		</collision>
	</npc>
	<npc id="1000007" displayId="13298" name="YAN Teleport" usingServerSideName="true" title="Gatekeeper" usingServerSideTitle="true" type="L2Teleporter">
		<collision>
			<radius normal="10" />
			<height normal="23" />
		</collision>
	</npc>
NOTE: Anable Custom Component on General.properties
SPOILER:

Code: Select all

# ---------------------------------------------------------------------------
# Custom Components
# ---------------------------------------------------------------------------

# Default: False
CustomSpawnlistTable = False

# Option to save GM spawn only in the custom table.
# Default: False
SaveGmSpawnOnCustom = False

# Default: False
CustomNpcData = False

# Default: False
CustomTeleportTable = False

# Default: False
CustomNpcBufferTables = False

# Default: False
CustomSkillsLoad = False

# Default: False
CustomItemsLoad = False

# Default: False
CustomMultisellLoad = False

# Default: False
CustomBuyListLoad = False
Using Buffer, Teleporter and Item
Npc: Talk to the npc
Voiced commands: .yanbuffer | .yanteleporter
By item:

Code: Select all

<set name="handler" val="YANBuffer" />
or

Code: Select all

<set name="handler" val="YANTeleporter" />
Example of item:
SPOILER:

Code: Select all

	<item id="5588" type="EtcItem" name="Tutorial Guide">
		<set name="icon" val="icon.etc_spellbook_gray_i00" />
		<set name="default_action" val="SHOW_HTML" />
		<set name="immediate_effect" val="true" />
		<set name="material" val="LIQUID" />
		<set name="weight" val="10" />
		<set name="price" val="1" />
		<set name="is_dropable" val="false" />
		<set name="handler" val="Book" />
	</item>
Using enchanted buffs
Folder: scripts\YANModPack\YANBuffer\data\xml\buffs.xml
Change skill_level, example buff +30
SPOILER:

Code: Select all

		<buff id="RESIST_1" skill_id="1032" skill_level="330" type="BUFF">
			<item_requirements>
				<reference>ADENA_100</reference>
			</item_requirements>
		</buff>
Last edited by maneco2 on Fri Jul 08, 2016 10:31 pm, edited 12 times in total.
kutt
Posts: 49
Joined: Sat Mar 08, 2014 1:47 am
Location: USA

Re: [Request] Updated YANModPack H5 installation Guide

Post by kutt »

Thank you both for the responses, I'll give them a shot this weekend and report back!
User avatar
maneco2
Initiates
Initiates
Posts: 664
Joined: Sat Aug 24, 2013 7:10 am

Re: [Request] Updated YANModPack H5 installation Guide

Post by maneco2 »

kutt wrote:If anyone could provide me with a more current guide on how to install YAN npcs (or different buffers/gatekeepers/gm shops) or how to build one from scratch, I'd greatly appreciate it.
NOTE: L2J have tutorial for create many things, but at this time repositores l2jserver is offline by DMCA request.

Your question, for you create a Buffer, Gatekeeper, GmShop and other types of npc's.
Adding NPC in xml:
Folder: \game\data\stats\npcs\custom\custom.xml
Add stats, drops and other things if you need on XML. :mrgreen:
Examples of 4 basics types: type="L2Monster" | type="L2Teleporter" | type="L2Merchant" | type="L2NpcBuffer"
maneco2 wrote:NOTE: Anable Custom Component on General.properties
SPOILER:

Code: Select all

# ---------------------------------------------------------------------------
# Custom Components
# ---------------------------------------------------------------------------

# Default: False
CustomSpawnlistTable = False

# Option to save GM spawn only in the custom table.
# Default: False
SaveGmSpawnOnCustom = False

# Default: False
CustomNpcData = False

# Default: False
CustomTeleportTable = False

# Default: False
CustomNpcBufferTables = False

# Default: False
CustomSkillsLoad = False

# Default: False
CustomItemsLoad = False

# Default: False
CustomMultisellLoad = False
# Default: False
CustomBuyListLoad = False
For Gatekeeper html:
Folder \game\data\html\teleporter
For GmShop html and Multisell:
Folder \game\data\html\merchant
Folder \game\data\multisell\custom

L2JServer already have simple buffer on datapack, if you need made changes:
Folder \dist\game\data\html\mods\NpcBuffer.htm
For changes and adding new buffs, check custom_npc_buffer table on your database
Post Reply