Join the forums now, and start posting to receive access to our Scripts Vault!
TroopsID | Location | Unit 1->xTroop_MovementID | From | To | Unit 1->x | Action | Duration
TroopsID | Location | Unit 1->x | Action | Duration
TroopsID | Location | Unit_ID | Action | Duration
players_troops(id int unsigned not null,troop_type tinyint unsigned not null,use_after int unsigned not null,owner_id int unsigned not null,area smallint unsigned not null,primary key(id),index(owner_id));
troops_action(id int unsigned not null,troop_id int unsigned not null,action_type smallint unsigned not null,action_time int unsigned not null,primary key(id),index(troop_id));
I don't know if chris will come in and say that it's too much space, but basically if you're doing it all as one.
Well yes, I think it is doable as long as I delete all the empty records...Any other opinions?
SELECT * FROM troops WHERE in_army=players_armies_ids;
troops_armies(army_id int unsigned not null,owner_id int unsigned not null,primary key(army_id),index(owner_id));
Automated (manual could be better if you had some game design idea how to use these properly, but since you don't have it then the choice is obvious).Also I think you are agonizing over it a bit too much. It is something that can be changed easily later if needed. Sure, inventing a proper database schema is important, but not wasting too much time on thinking is important too