Memoria icon indicating copy to clipboard operation
Memoria copied to clipboard

Changing items given for player at the beginning of new game #203

Open FlameHorizon opened this issue 1 year ago • 2 comments

I would like to introduce an option to change starting items at the beginning of new game. Currently, players are given following items:

https://github.com/Albeoris/Memoria/blob/825b6acf7214fdecae0470a76e1e79ad056ec3ab/Assembly-CSharp/Memoria/Data/ff9item.2.cs#L126-L137

Comment says that these values can be modified by Prima Vista's script but I would like to allow that also in Memoria via external file. Maybe csv.

FlameHorizon avatar Aug 02 '22 17:08 FlameHorizon

  • Why do you add new classes when there is already everything that you need? You should simply move all your methods from FF9ITEMDto and FF9ITEMDtoExtensions into the FF9_ITEM class (found here).

I've added new classes only to separate different responsibilities of the task, which is - load appropriate starting items into memory. Since IO operations, converting CSV into objects and loading data to array are on different abstraction levels, I've decided to separate them to make code read easier and to adhere to Single Responsibility principle.

FlameHorizon avatar Aug 04 '22 11:08 FlameHorizon

Well, I am by far not the most trustworthy when it comes to code design. This "principle" looks rather abstruse and I don't understand it (nor why it would apply in this situation). On top of that, I don't understand your naming choice: what is Dto supposed to mean?

I'm afraid you'll have a hard time trying to convince me that the code you had to add in FF9ITEMDtoExtensions increases the quality of the code by any mean. If you convince someone else, that'll be good enough for me though.

Tirlititi avatar Aug 04 '22 19:08 Tirlititi

The feature got implemented in f2827bb.

Tirlititi avatar Oct 20 '22 17:10 Tirlititi