Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Oop sorry I should've explained how the personality thing was meant to work.

The idea was to make a template using this plugin which had all of the stat adjustments I wanted and then give that template to a character. Basically, the template was the personality, with all of the stat information inside it.

So if the personality was "Brave", it would have something like this in the HP and MP field:

return this.rawParamBase("mhp") * .1 (to add 10% of base max hp to the total)
return this.rawParamBase("mmp") * -.1 (to remove 10% from the base max mp)

Etc etc, doing something like this for each stat with slightly different amounts.

And then try to give a character that Brave template. The experiment I tried was to edit an actors notes during the game by determining their personality with some variables and then doing something like:
actor(actorId).notes += "<DynParam: Brave>"

 (sorry if thats wrong I'm trying to explain the code from memory right now)
which did kind of work, their notes were changed, but it didn't actually change the stats.

So tldr, I was trying to see if I could give a character a template from this plugin mid-game, because I thought it would save me some work. And then make a ton of templates which were each different personalities.


Thank you for this answer though :0 This works too, and I had actually thought of something similar to this right after I made my post XD Typical coding stuff right?

If you do think of a way you can give a character a template from this plugin during a game though, I'd love to hear it. Now I'm just kinda curious to know if it can be done. And hopefully it all made sense XD I can be a bit clearer or share some screenshots if need be once I have the project in front of me.

(1 edit)

Understood!

Well, currently there is no way to do that the way you want. By changing templates mid-game, because they are added by note tags and that note tag is read on a specific place on the code.

For now, I believe the way I shown to you is the way to go. Honestly, I think it is more clean too and easy to maintain. With multiple templates, when you want to change something you would need to open each one, do a lot of clicks until you get what you want to change them.

With what I have shown to you, you can change "templates" mid game using a variable as personality. Or even better, creating a custom property on your actors:

$gameActors.actor(id).personality = "Brave"

That way instead of using this :

const personality = $gameVariables.value(ID) 

you can use this :

this.personality

Gotcha! I was thinking it was something like that. And I agree, thinking about it now, even if it did work, the method you showed me is actually a lot cleaner and simpler to do XD

Thanks for the advice! It was really really helpful :D I'll definitely be using this method instead