Memoria icon indicating copy to clipboard operation
Memoria copied to clipboard

Changing items given for player at the beginning of new game

Open FlameHorizon opened this issue 2 years ago • 6 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.

Looking for your thoughts about this idea.

FlameHorizon avatar Jul 06 '22 10:07 FlameHorizon

I think all of such things must be moved to external .csv files like character skills, item properties, etc.

Albeoris avatar Jul 10 '22 10:07 Albeoris

This feature has been implemented on my fork here https://github.com/FlameHorizon/Memoria/commit/42bd286d96f4fbaec44b5b10fb9c7916de3998be. Presentation is here: https://youtu.be/a2aLCvEiuAM

FlameHorizon avatar Jul 12 '22 06:07 FlameHorizon

Feel free to send a pull request.

Albeoris avatar Jul 16 '22 20:07 Albeoris

quick question how would this work should multiple mods try to affect the starting items?

barkermn01 avatar Aug 16 '22 19:08 barkermn01

@barkermn01 in current implementation, only one mod which modifies starting items will be loaded. Definition in here:

https://github.com/Albeoris/Memoria/blob/1c9ff0c844396771dcf17455489545960478912d/Assembly-CSharp/Memoria/Data/ff9item.2.cs#L165-L171

FlameHorizon avatar Aug 17 '22 07:08 FlameHorizon

That is what I had seen and why I wanted to double check because I can see this creating problems for people in the future I.E conflicts Might need a system to warn or handle this, E.G just a warning prompt in the launcher, multiple mods trying to affect starting items using starting items from mod '{mod_name}', or we provide a drop-down selector to specify the mod to use for starting items if there are multiple?

barkermn01 avatar Aug 17 '22 11:08 barkermn01

This feature has been implemented in f2827bb: the initial item set is now defined in StreamingAssets/Data/Items/InitialItems.csv In case multiple mods include a custom file for this, the file used will be the one from the mod that has priority (placed before in Memoria.ini's [Mod] FolderNames list or, equivalently, placed higher in the list of activated mods in the Mod Manager).

Tirlititi avatar Oct 20 '22 17:10 Tirlititi