Jump to content
  • 0

Paradigm Shift Item, FF Changing skill sets?


Question

Posted

Well the idea is like this from FF13, when you Paradigm Shift you will either have offensive, defensive, or magic related skills.

Maybe as a bonus, stats will change accordingly?

So just wondering if someone could make a script for an item/equip whatever easier to incorporate this idea into RO

There would be an item/equip for specific jobs only, so just do it for one job for now since it would be the same for the rest i believe.

I'm not sure on what would be the efficient way to do this, arrays? or maybe something else?

thanks for your time.

6 answers to this question

Recommended Posts

Posted

This is very similar to something i worked on a while back where one char could hav 3 class changes i will see what i can do with this as well

Posted

equipment { <on equip section> // store info from current skills; // give new skills } { <on unequip section> revert to original skills }

npc { // what goddameit posted }

item { (probably best to call npc function) }

my npc setup would be though...

the problem I forsee with this... is... if you shift someone, and set their current skill set... what happens when they log off / crash?

how do they get their skill set back again? where would you store the skill sets?

.vars (would die on server... crash) -> cause player to lose skills

$vars (not a good idea...)

@vars (are destroyed)

vars[] (don't work)

Posted

Written from scratch, more an idea, so please dont bother me..

// Variable syntax
// $PARADIGM_<CharID>_<ParadigmType>_COUNT
// $PARADIGM_<CharID>_<ParadigmType>_ID[<index>]
// $PARADIGM_<CharID>_<ParadigmType>_LV[<index>]

// CharID to store vars
set .@cID, getCharID(0);

// Paradigm menu
mes("Paradigm management");
next;
set .@paradigmType, select("Offensive", "Defensive", "Magic");

// Display skills of the paradigm
mes("^FF0000Current skills^000000");
set .@count, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT");
for (set .@i, 0; .@i < .@count; set .@i, .@i + 1) {
set .@skillID, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_ID[" + .@i + "]");
set .@skillName$, skillID2Name(.@skillID);
mes(" - " + .@skillName$);
}

// Enable to manage
set .@manage, select("+ Add skills", "- Delete skills", "= Apply paradigm");

if (.@manage == 1) {
//-------------------------------------------
// Add skills to paradigm
//-------------------------------------------
mes("Please choose the skill to be add to the paradigm");

// At this step we had to reset the existing paradigm tree and grant all standard skills the character had before
// because we need to fetch all skills the character currently have to allow them to be added to the paradigm
// TODO: reset skilltree function

// After reset, fetch all skills and build a menu
getSkillList();
set .@menu$, "";
for (set .@i, 0; .@i < @skilllist_count; set .@i, .@i + 1) {
	// TODO: Search all existing skills in the paradigm and dont display them to prevent the same skills more than once
	set .@skillID, @skilllist_id[.@i];
	set .@skillName$, skillID2Name(.@skillID);
	set .@menu$, (.@menu$ == "" ? "" : .@menu$ + ":") + "+ " + .@skillName$;
}

// Display menu & get selected skillID
set .@choice, select(.@menu$) - 1;
set .@choosenSkillID, @skilllist_id[.@choice];
set .@choosenSkillLv, getSkillLv(.@choosenSkillID);
// Get new index fror the skillID
set .@skillCount, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT");
// Append to paradigm and raise skill count
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_ID[" + .@skillCount + "]", .@choosenSkillID);
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_LV[" + .@skillCount + "]", .@choosenSkillLv);
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT", .@skillCount + 1);

// TODO: Back to management menu..

} else if (.@manage == 2) {
//-------------------------------------------
// Remove skills from paradigm
//-------------------------------------------
mes("Please choose the skill to be removed from the paradigm");

// Build menu based on all skills in the paradigm
set .@menu$, "";
set .@skillCount, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT");
for (set .@i, 0; .@i < .@skillCount; set .@i, .@i + 1) {
	// TODO: Search all existing skills in the paradigm and dont display them to prevent the same skills more than once
	set .@skillID, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_ID[" + .@i + "]");
	set .@skillName$, skillID2Name(.@skillID);
	set .@menu$, (.@menu$ == "" ? "" : .@menu$ + ":") + "- " + .@skillName$;
}

// Display menu and get choosen skill index
set .@choice, select(.@menu$) - 1;
// Delete skill index
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_ID[" + .@choice + "]", 0);
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_LV[" + .@choice + "]", 0);
// TODO: reorder array to fill the wasted space
// Redurce skill count in the paradigm
setD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT", .@skillCount - 1);

// TODO: Back to management menu..

} else if (.@manage == 3) {
//-------------------------------------------
// Apply paradigm
//-------------------------------------------

// Reset the skills
resetSkill();
// Remove skill points
set SkillPoint, 0;
// Grand all skills form the paradigm
set .@skillCount, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_COUNT");
for (set .@i, 0; .@i < .@skillCount; set .@i, .@i + 1) {
	set .@skillID, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_ID[" + .@i + "]");
	set .@skillLv, getD("$PARADIGM_" + .@cID + "_" + .@paradigmType + "_Lv[" + .@i + "]");
	// Grant the skill
	skill(.@skillID, .@skillLv, 0);
}
}

Of course global vars arent that good, but without a source mod i cant see any other ways for storing them.

Before granting the first paradigm or maby on the first npc visit you have to save the current skill tree to reset them later on.

€dit: I forgot the skillID2Name script command..

BUILDIN_FUNC(skillid2name)
{
   int skillID = script_getnum(st, 2);

   script_pushstrcopy(st, skill_get_name(skillID));

   return 0;
}

Posted

great, i'm looking forward to it. If I need to compensate you with anything let me know. This was something I was hoping that I could get working.

bump

bump

bump

bump

bump

bump

bump

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...