About transformations adding new ones

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

About transformations adding new ones

Post by babyjason »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:4395
L2JDP Revision Number:7666

Hello,
I would like to add new transformations, my question is, can i simply make a XXXX.java in the db/scripts/transformations , inside instead of super(125, 12, 27.50); i write instead of 125 another custom number i chose (no client modding discussion here i got it so i wont go further , no need), then add it at scripts.cfg at #transformations.

IS it enough , or i have to modify /add things in gameserver core also?

Code: Select all

package transformations; import com.l2jserver.gameserver.datatables.SkillTable;import com.l2jserver.gameserver.instancemanager.TransformationManager;import com.l2jserver.gameserver.model.L2Transformation; public class AquaElf extends L2Transformation{    private static final int[] SKILLS = new int[]{619};        public AquaElf()    {        // id, colRadius, colHeight        super(125, 12, 27.50);    }        @Override    public void onTransform()    {        if (getPlayer().getTransformationId() != 125 || getPlayer().isCursedWeaponEquipped())            return;                transformedSkills();    }        public void transformedSkills()    {        // Transform Dispel        getPlayer().addSkill(SkillTable.getInstance().getInfo(619, 1), false);                getPlayer().setTransformAllowedSkills(SKILLS);    }        @Override    public void onUntransform()    {        removeSkills();    }        public void removeSkills()    {        // Transform Dispel        getPlayer().removeSkill(SkillTable.getInstance().getInfo(619, 1), false);                getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);    }        public static void main(String[] args)    {        TransformationManager.getInstance().registerTransformation(new AquaElf());    }} 
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: About transformations adding new ones

Post by jurchiks »

how about "try and see"?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: About transformations adding new ones

Post by babyjason »

sadly i cant, because i only have 1 server and no other pc in my house :( no resources
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: About transformations adding new ones

Post by MELERIX »

transformations id are client side.
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: About transformations adding new ones

Post by babyjason »

MELERIX wrote:transformations id are client side.

ty, so theoretically no core is involved in this i can add as many as there are in client, ty again
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: About transformations adding new ones

Post by jurchiks »

That's just the ID; I thought you meant to ask if there is anything more to change server-side...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: About transformations adding new ones

Post by babyjason »

public class LightPurpleManedHorse extends L2Transformation

what should i put there? npc s class?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: About transformations adding new ones

Post by jurchiks »

You mean the class name? Obviously you make it up; it's just a name, the ID is the only significant thing here.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: About transformations adding new ones

Post by babyjason »

no, for ex there is this, the id of transformation is 109 , if i put other transformation (readen from client) like 145 for ex, do i have to add somewhere in core also?

Code: Select all

package transformations; import com.l2jserver.gameserver.datatables.SkillTable;import com.l2jserver.gameserver.instancemanager.TransformationManager;import com.l2jserver.gameserver.model.L2Transformation; public class TawnyManedLion extends L2Transformation{    private static final int[] SKILLS = {5491,574,839};    public TawnyManedLion()    {        // id, colRadius, colHeight        super(109, 25, 22.5);    }        @Override    public void onTransform()    {        if (getPlayer().getTransformationId() != 109 || getPlayer().isCursedWeaponEquipped())            return;                transformedSkills();    }        public void transformedSkills()    {        // Decrease Bow/Crossbow Attack Speed        getPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);        // Bomb Installation (up to 4 levels)        getPlayer().addSkill(SkillTable.getInstance().getInfo(574, 4), false);        // Dismount        getPlayer().addSkill(SkillTable.getInstance().getInfo(839, 1), false);                getPlayer().setTransformAllowedSkills(SKILLS);    }        @Override    public void onUntransform()    {        removeSkills();    }        public void removeSkills()    {        // Decrease Bow/Crossbow Attack Speed        getPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);        // Bomb Installation (up to 4 levels)        getPlayer().removeSkill(SkillTable.getInstance().getInfo(574, 4), false);        // Dismount        getPlayer().removeSkill(SkillTable.getInstance().getInfo(839, 1), false);                getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);    }        public static void main(String[] args)    {        TransformationManager.getInstance().registerTransformation(new TawnyManedLion());    }}
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: About transformations adding new ones

Post by Zoey76 »

I think they have been unhardcoded from core, meaning you can implement them DP-side only.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: About transformations adding new ones

Post by UnAfraid »

In Ride packet?
Image
Post Reply