Custom dynamic metada Binded to actors (variables)

Have an idea how we can improve the engine or this forum? Share it here!
Post Reply

Do you think it's a nice features to add?

yes

0
No votes

no

0
No votes

yes but not important

0
No votes
 
Total votes: 0

nio kasgami
Posts: 4
Joined: 15 May 2020 04:17

Custom dynamic metada Binded to actors (variables)

Post by nio kasgami »

It was suggested before in the discord, but not pushed further?

but I think an extension that allows 'stats' or variable binded to actors and saved by savefile would be extremely useful.

Example :
RPG stats like HP etc or a Love stats who is binded to the activated actor.

implementation
It would be either a dictionary or an array of variables BINDED into the character section that can hold Classic integer, float or string values. (to keep simple )
They have a range specified into the value and is clamped to the max value set)
It would allow to fetch the data and use in IF method (example use: game over if the fear meter is full)

You can access those data by :

Code: Select all

@getData ActorName StatesNameOrId  

It can also be set

Code: Select all

@setData ActorName StateNameOrId Additive? value

Additive : wether or not the value is set or Add to the existing value (could be shorten by += for additive or + for set)
i.e : @setData ActorName StateName += 10
also adding ++ could do incremental increase by 1)

Why these features?
Having custom Metadata for actor is something that Would help greatly to implement custom variable specific to the actors without cluttering the files or global space. VN maker have this features and it is VERY useful for make multiple type of game.

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Custom dynamic metada Binded to actors (variables)

Post by Elringus »

I think that's already possible with expression functions. Check the guide for more info and examples.

nio kasgami
Posts: 4
Joined: 15 May 2020 04:17

Re: Custom dynamic metada Binded to actors (variables)

Post by nio kasgami »

I think this npot help to keep the tracking and variable in track? what I meant is that actor can have bonded variables. I generally meant this options as a way to not get lost with multiple stats.

but if you have proper example then I am all in to see

I also checked script expression and...I don't see how we can do that using that?

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Custom dynamic metada Binded to actors (variables)

Post by Elringus »

Not sure what you mean by keeping variables in track. For an example, you can make an expression function like GetStat(StatName, CharId), which will return the desired stat for the specified char. To set the stat, add a custom command, like @setStat StatName.StatValue char:CharId.

nio kasgami
Posts: 4
Joined: 15 May 2020 04:17

Re: Custom dynamic metada Binded to actors (variables)

Post by nio kasgami »

Oh I see!

so I could do an Custom Variable manager and then I create an script function who fetch the data and save it into the nani novel?

I may overthink the idea tho

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Custom dynamic metada Binded to actors (variables)

Post by Elringus »

If you mean overriding ICustomVariableManager, you won't need that. Just an expression function and a command, as I've mentioned before. You can store the variable values with the built-in variable manager or add a custom state, if you wish (see the state management guide for more info on that).

Post Reply