Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a keen DOTA 2 player. It's a 5-a-side team video game where you play one from a pool of about 100 heroes with different abilities and strengths and weaknesses.

I often play team captain and it's important to pick heroes that complement each other and expose vulnerabilities in the other captain's picks.

I want to set up a personal friends and foes database, possibly in Excel or Access, but there may be other solutions.

How can I make it so if I mark two heroes as counters e.g. Venge > Enigma, how can I just do it once, so if I see Venge I see Enigma and if I see Enigma I see Venge.

e.g.

  • Venge counters Enigma
  • Enigma countered by Venge

or

  • Wisp combines with CK
  • CK combines with Wisp

I only want to input the data for each counter/combination once.

To put it another way, I'd like something like http://www.mobacounter.com/dota/heroes, but my own list on my own PC.

I suspect this is easy, but it's really hard to Google for the answer when you do not know how to phrase the question.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I have no clue about those microsoft programs; but I can give you some feedback about the design.

You basically need one table for all the heroes and their attributes and another table which defines who defeats whom.

This is how to do it in postgresql. It's probably not exactly what you want but perhaps you can extract some helpful information from it:

create table hero (name varchar primary key, description varchar, size numeric);
create table defeats (stronger varchar references hero(name), weaker varchar references hero(name), reason varchar, constraint winlose_pk primary key (stronger,weaker));

Now it's time to populate the tables:

insert into hero values ('rock', 'big and shiny', 5);
insert into hero values ('scissors', 'sharp and shiny', 4);
insert into hero values ('paper', 'white but dirty', 8);
insert into hero values ('noob', 'defeated by everything', 2);

And now the relationship table:

insert into defeats values ('rock', 'scissors', 'crushing defeat');
insert into defeats values ('paper', 'rock', 'enveloped');
insert into defeats values ('scissors', 'paper', 'cut');
insert into defeats values ('rock', 'noob', 'stone to the head');
insert into defeats values ('paper', 'noob', 'finger got cut');
insert into defeats values ('scissors', 'noob', 'would not stop runnning');
insert into defeats values ('noob', 'noob', 'self explanatory');

Now you have your two tables:

   name   |      description       | size 
----------+------------------------+------
 rock     | big and shiny          |    5
 scissors | sharp and shiny        |    4
 paper    | white but dirty        |    8
 noob     | defeated by everything |    2



 stronger |  weaker  |         reason          
----------+----------+-------------------------
 rock     | scissors | crushing defeat
 paper    | rock     | enveloped
 scissors | paper    | cut
 rock     | noob     | stone to the head
 paper    | noob     | finger got cut
 scissors | noob     | would not stop runnning
 noob     | noob     | self explanatory

Now you could for instance check who is strong rock against by using this query:

select * from defeats where stronger='rock';

 stronger |  weaker  |      reason       
----------+----------+-------------------
 rock     | scissors | crushing defeat
 rock     | noob     | stone to the head
share|improve this answer
    
Thanks! It looks like I'll have to do this in Access. I'll need three tables: Heroes, Counters and Synergies. The Synergies table will be different as I'm just saying that two heroes work together. Maybe just two columns (hero 1 and hero 2) and I can query if a hero appears in either column? –  Iain Dec 28 '13 at 8:31
1  
Exactly! I'm glad you got the idea. But I'm afraid there's some little trouble with the Synergies table. You could add A works well with B and then B works well with A... I have to think this through. –  brunch875 Dec 29 '13 at 0:48
1  
Unfortunately there isn't any design alternative to this. You'll just have to be careful not to insert "reverse duplicates". Check this one: stackoverflow.com/questions/4219979/… Which points to this interesting article: explainextended.com/2009/03/07/selecting-friends –  brunch875 Dec 29 '13 at 1:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.