- Joined
- Mar 28, 2016
- Messages
- 1,623
- Reaction score
- 1,439
- First Language
- French
- Primarily Uses
- RMMV
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
*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 [
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
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: { } // ....
};
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....
}
};
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
Last edited by a moderator:



