Search Unity

Event setup for equipment and skills the player use in the pvp battle

Discussion in 'Unity Analytics' started by MetaDOS, Sep 22, 2018.

  1. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    157
    I would like to track the equipment and skills the player use in the pvp battle.
    However, we have many equipment and abilities per player. So I guess the event will look like this:

    Event name: match_end
    Parameters: game_mode, ability1, ability2, ability3, ability4, equipment1, equipment2, equipment3, equipment4, equipment5, equipment6, match_result, match_duration, gold_earn, character_use, score_earn

    Is this a correct approach? Does Unity Analytics support array data type in parameters?
    If the player has many types of equipment (up to 10) and ability (up to 8 ), we may reach the limit of 10 parameters per event.

    Or should I use the follow approach:

    Event name: match_end
    Parameters: game_mode, match result, match_duration, score_earn, gold_earn

    Event name: ability_use_in_pvp_match
    Parameters: game_mode, ability1, ability2, ability 3, etc.

    Event name: equipment_use_in_pvp_match
    Parameters: game_mode, equipment1, equipment2, etc.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    To reduce the parameter count, you could always use a bitmask if the datatype fits. You could also put several variables into a JSON string, or simply separate values with commas, etc. Unless you are using Raw Data Export, you would not be able to link together the last 3 event types, so you are aware. The Dashboard only provides an aggregated view of the data. I'm not sure if we support a dictionary as a parameter type inside the parameter dictionary, but would be easy to test
     
    MetaDOS likes this.
  3. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    157
    Hi @JeffDUnity3D . Thank you for your support. I'm quite new to Unity Analytics and those methods. Do we have any document in Unity sites? How, I can do the test as you said?
    Besides, I'm not familiar with working with the queries from Raw Data Export yet. So it could be better for a "Dashboard" solution at the moment. Then I will study working with Raw Data Export later on.
     
    Last edited: Sep 24, 2018
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  5. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    157
    Thanks. I'm a pro subscriber. My last question: Could you please provide a simple example of using JSON string to keep some variables, especially in my case?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It's just a string in JSON format (Google JSON if you need the exact syntax). Although in your case just using a comma separated list would accomplish the same thing instead of JSON if you are not familiar with it.
     
  7. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    157
    Thank you. Then I will use queries to get whatever I want from the exported JSON data, not the dashboard?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446