- Joined
- May 10, 2020
- Messages
- 15
- Reaction score
- 6
- First Language
- French
- Primarily Uses
- RMMV
Hi there !
I just wrote my first (newbie) script to calculate the price of an inn depending on the number of members in a party, and wanted to share it, to read from you about improvements that could be made.
Basically, I created an event somewhere in the map, in Parallel mode, with the following script in the 28th variable (the base Inn price is at the 30th) :
Then I tested all the variables in the innkeeper conversation, and it works like a charm, as you can see below.
My goal is to use the same script all game long, with a factor >1 to increase the price in the inns of the game.
My question is : is there a way to optimize it, or improve it (no plugin necessary I guess in this case) ?
Could I have done better, in your opinion ? Any suggestion highly appreciated !
I just wrote my first (newbie) script to calculate the price of an inn depending on the number of members in a party, and wanted to share it, to read from you about improvements that could be made.
Basically, I created an event somewhere in the map, in Parallel mode, with the following script in the 28th variable (the base Inn price is at the 30th) :
JavaScript:
$gameParty.members().length*$gameVariables.value(30)
My goal is to use the same script all game long, with a factor >1 to increase the price in the inns of the game.
My question is : is there a way to optimize it, or improve it (no plugin necessary I guess in this case) ?
Could I have done better, in your opinion ? Any suggestion highly appreciated !
Attachments
-
499.3 KB Views: 28
-
380.6 KB Views: 36
-
1.3 MB Views: 34



