First time post, apoligies if this is the wrong subforum. I'm attempting to create a system that allows the player to choose two actors and fuse them together to create a new stronger actor. Actors that ain't the MC level up slower; so the idea is the player would need to do this to not risk party members falling behind in levels and stats. Similar to the SMT series. Found this video by DriftWood and it's more or less what I was looking for but needed to make some changes to make it fit what I'm looking for:
So I basically took the script in his video, put it into a js. file to use as a funtion call (mainly because I use MV not MZ, which has a line limit). Got rid of the conditional branches Drift used in favour of using SumRandomDudes Actor Select plugin (http://sumrndm.site/actor-select/) to allow the player to select which ever combination of actors they wish to fuse together.
And here's where I'm stuck: SRD's plugin allows player to select actors and the actor ID get's asigned to a variable of the users choosing. How do I go about incorporating that into this script?:
I'm no scripter but this should seem pretty simple to do, no? It would make Driftwoods system way more flexable than having to rely on having conditional branches for every possible party combination. Hope I explained this well, if anymore clarification is needed feel free to ask.
So I basically took the script in his video, put it into a js. file to use as a funtion call (mainly because I use MV not MZ, which has a line limit). Got rid of the conditional branches Drift used in favour of using SumRandomDudes Actor Select plugin (http://sumrndm.site/actor-select/) to allow the player to select which ever combination of actors they wish to fuse together.
And here's where I'm stuck: SRD's plugin allows player to select actors and the actor ID get's asigned to a variable of the users choosing. How do I go about incorporating that into this script?:
Code:
PerformFusion = function() {
//Take stats of the fodder character and get percentage
var fuseChar = $gameActors.actor(2); //I want fuseChar change depending on the variable assigned via SRDs Plugin
var fusePercent = 0.20; //20%
var fuseMHP = fuseChar.mhp * fusePercent;
var fuseMMP = fuseChar.mmp * fusePercent;
var fuseATK = fuseChar.atk * fusePercent;
var fuseDEF = fuseChar.def * fusePercent;
var fuseMAT = fuseChar.mat * fusePercent;
var fuseMDF = fuseChar.mdf * fusePercent;
var fuseAGI = fuseChar.agi * fusePercent;
var fuseLUK = fuseChar.luk * fusePercent;
//Add those states into the Vassel character
var newChar = $gameActors.actor(1); //Same as above only with Actor 1
newChar.addParam(0,fuseMHP);
newChar.addParam(1,fuseMMP);
newChar.addParam(2,fuseATK);
newChar.addParam(3,fuseDEF);
newChar.addParam(4,fuseMAT);
newChar.addParam(5,fuseMDF);
newChar.addParam(6,fuseAGI);
newChar.addParam(7,fuseLUK);
//Remove fodder character from the party
$gameParty.removeActor(2); //Same as the above instance of Actor2. To remove them from the party after this funtion is called
}
I'm no scripter but this should seem pretty simple to do, no? It would make Driftwoods system way more flexable than having to rely on having conditional branches for every possible party combination. Hope I explained this well, if anymore clarification is needed feel free to ask.