Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Plugin Community

Discover and discuss the world of our RPG Maker plugins · By LTN Games

Stats & Skills Questions

A topic by anthony_xue created Apr 15, 2024 Views: 170 Replies: 4
Viewing posts 1 to 2

Hi. I'm trying to access the stat and skill levels as well. Judging from previous answers, the commands seem to be

$sl.getSkillLevel(1, "melee") >= 30

and

$sl.getStatLevel("str") >= 10.

This leaves me with these questions:

Is there a way to access the stat/skill levels of other actors besides the first? For instance, assume I have a "Pick Locks" skill, and I want to check the skill level of the actor that is meant to try to pick the lock. Or the party has to pass a narrow ledge, and every member has to make a check of their "Climbing" skill. How would I go about implementing such checks?

Besides that, I noticed there is a Notetag for equipment to increase custom stats. Is there also a way for equipment to increase custom skill levels?

Thanks.

(+1)
Is there a way to access the stat/skill levels of other actors besides the first?

Yes, in fact the correct way to get a skill would be to access the game actor first, omitting the actorId is just a shorter way to get the first actors stat or skill level. 

for example

// For stats
$sl.getStatLevel(actorId, 'statName');
// For skills
$sl.getSkillLevel(actorId, 'skillName');
and every member has to make a check of their "Climbing" skill. How would I go about implementing such checks?

You could do a for loop that  turns on or off a switch, something like this.

$gameParty.members().forEach(actor => {
    if ($sl.getStatLevel(actor.actorId(), 'climbing') < 10) {
        $gameSwitches.setValue(1, false);     return; 
    }  
    $gameSwitches.setValue(1, true);
});


Besides that, I noticed there is a Notetag for equipment to increase custom stats. Is there also a way for equipment to increase custom skill levels?

There is currently no way to manipulate skill levels with notetags, that may be something we look at for future updates.

Thanks for the explanation, very helpful!

Adding to this, I wanted my custom stats to define the main stats, e.g. make the actor's HP depend on their Constitution etc.

I assumed I could do this via VisuMZ's Core Engine and used this command:
<JS MaxHP Flat: ( $sl.getStatLevel(1,"brw") * 2 );>

However, this causes a ton of error messages in the dev console at startup about "maximum call stack size exceeded" (see the image). This happens even in an otherwise completely clean project. Do you have an idea what's going on and how I could deal with it? Or is there a better way to achieve this result? Thanks a lot!


It is because the maximum callback has been reached and that your current js function is stuck in an infinite loop. You might want to disable the plugin and see if it throw the error.

Yes, I know what's going on there and that the plugin is the cause. That's why I'm asking here for troubleshooting suggestions.


After two weeks, though, I'm not sure I will ever get an answer :-/