RPG Maker Forums

Hi


I am building my quest system.
I use for Quests the Rmmv Armors Items, $dataArmors[], because I do not use this DB in my project.
At the beginning of the game, I inject all in $dataArmors [?].meta my individually properties for Quest.
I write them in a .js file, because the comment window in the software is too difficult to manage.


My question is about my access to my SubQuests.
To access it, I currently use this, 'is work good but i dont like the way to acces'


$dataArmors[1].meta.Quest['SubQ'+0].title  // return the title from meta.Quest.SubQ0
$dataArmors[1].meta.Quest['SubQ'+0].Desc[0]  // return the Desc LV1 from meta.Quest.SubQ0


Here a example of the builder when the project boot,
You can see the SubQ0: { , he define all what are the SubQ0

$dataArmors[1].meta.Quest = {
SubType:['recipe', ' Item', 'switch'],// type et total number of subquest in Quest1
Status:false,
IsFinish: function check() {},//need to make a function to check all SubQ // .meta.Quest['SubQ'+id]
//SubQuest Custom edit for $dataArmors[1]
SubQ0: {
isfinish: CheckRecipe(154);
title:'title',
Desc:['description lv1 int ',
'more description lv2 int ',
'more more more description lv3 int '],
}
SubQ1: { } // ....
SubQ3: { } // ....

};



*But I would like to know if it would be possible to access , like this way.
I find this way a cleaner way to manage.



$dataArmors[1].meta.Quest.SubQ[0].title   // return the title from meta.Quest.SubQ[0]
$dataArmors[1].meta.Quest.SubQ[0].Desc[0]  // return the Desc LV1 from meta.Quest.SubQ0


So i build my attribut like thas , but i get  Uncaught SyntaxError: Unexpected token [

$dataArmors[1].meta.Quest = {
SubType:['recipe', ' Item', 'switch'],// type et total number of subquest in Quest1
Status:false,
IsFinish: function check() {},//need to make a function to check all SubQ // .meta.Quest['SubQ'+id]
//SubQuest Custom edit for $dataArmors[1]
SubQ: {
[//SubQ0
isfinish: CheckRecipe(154);
title:'title',
Desc:['description lv1 int ',
'more description lv2 int ',
'more more more description lv3 int ']
]
[],//SubQ1
[]//SubQ2....

}

};



Is that I put it wrong syntax, or simply not possible to build this way.
I'm not an expert in javascript but I'm wondering about this.
Have you some suggestion , am do a mistake ??


Tell me if I am not clear in my explanation, I did my best.
Thank you

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top