Hello there.
I have been spend nearly 1-2 weeks about deciding of inventories…
why? even though it is simple 2D turn based (like Final Fantasy ish) game… I really need to be careful with how I design inventory and each character’s available action list…
1.there would be 3 types of item types -> Melee Weapons, Ammo, Goods
Melee weapons are weapons can used by characters, but has durability (have not thought about repair).
Ammo is can be used by Ranged weapon (Pipegun and bow…)
Goods is just consumable such as healing item.
Simply I planned 3 types of inventories as these types.
M.Weapon-> TArray, because there can be two or more items with same name, yet different id number and durability.
Ammo -> TMap <FString, class Item>, because i can access it easily by name (FString).
Goods -> TMap <FStrinig, class Item>, because… just like AMMO.
is it sounds good? I been wondering for long time though.
2.Here comes with most difficult design for myself.
there are 3 characters.
Everyone has same command as Fight (or Attack)… each character can use selective items…
For example,
images are temp, don’t tease it plz
in character A’s Fight, he (or Player) can select from personal unarmed combo to every melee weapon…
in character B’s Fight, he (or Player) can select from personal unarmed combo to just Ranged weapon (Ammo).
Sounds easy at first, but later I wondered that I need to make another TArray for their available weaponry…
One of reason is… do i really have to transfer again every available weapons or ammo to new TArray?
i think because of their unarmed attack… i could make separate command… but it does not look good…
To Conclude should i make another TArray for selecting actions (unarmed, Melee, e.t.c) in each character?
3.is it possible to make dummy data by easy way such as BP? in BP, i can approach easily putting data, the problem is…
if i put those dummy data (BP) towards inventories which i made as TArray or TMap in c++…
it gets tricky for me.
I am not in the mood for typing every dummy data inside Rama’s Custom Game Instance though by c++ (or coding) though.
Maybe i am feeling sly…
anyway, i may need you guys advice again