Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Has anyone ever written a type hierarchy for GoS EXT?


Best Answer evitaerCi , 24 April 2017 - 12:18

Lets asume that Unit is Obj_AI_Base, so:
 
GameObject
  .isMe
  .isAlly
  .isEnemy
  .pos2D
  .posMM
  
  .networkID
  .handle -- use for missile owner/target check
  .team
  .type
  .name
  .health
  .maxHealth
  .dead
  .visible
  .pos
  .distance
 
MissileClient : GameObject
  .missileData
 
Obj_AI_Base : GameObject
  .charName
  .isImmortal -- dunno what you meant
  .isTargetable
  .baseDamage
  .bonusDamage
  .totalDamage
  .attackSpeed
  .armor
  .bonusArmor
  .magicResist
  .bonusMagicResist
  .hpRegen
  .mpRegen
  .range
  .boundingRadius
  .mana
  .maxMana
  .shieldAD
  .shieldAP
  .cdr
  .armorPen
  .armorPenPercent
  .bonusArmorPenPercent
  .magicPen
  .magicPenPercent
  .ms
  .ap
  .valid -- returns valid units, there can be invalid units that might crash the game.
  .activeSpellSlot
  .isChanneling
  .posTo
  .dir -- yes, face direction
 
  .attackData
  .activeSpell
 
Obj_AI_Minion : Obj_AI_Base
  .bonusDamagePercent
  .flatDamageReduction
  .isCampUp
 
Obj_AI_Hero : Obj_AI_Base
  .lifeSteal
  .spellVamp
  .critChance
  .gold
  .totalGold
  .levelData.owner
  .hudAmmo
  .hudMaxAmmo
 
Obj_AI_Turret : Obj_AI_Base
 
 
properties i don't know:
  .owner
  .chnd --use for camp handle
Go to the full post »


  • Please log in to reply
2 replies to this topic

#1
MonkeyKid

MonkeyKid

    Advanced Member

  • Members
  • 112 posts
  • LocationBrazil

I'm starting with the main type hierarchy: GameObject. I wanted to know, assuming inheritance as a valid form of polymorphism, what is the type hierarchy of GameObject, and to which types each field belong? I have an approximation here, but I'd like to know if anyone has narrowed it down to perfection:
 

---------------------------------------
-- Fields I don't know where to fit: --
---------------------------------------
    .owner
    .hudAmmo
    .hudMaxAmmo --used for Jhin/Graves bullets or Annie stun or even Kled mount health; use with caution on other champs because it's not always 0 by default
    .isTargetableToTeam --works for turrets
    .posTo
    .dir --I would assume it's the unit's facing vector - the way it's turned to?
    .distance --is this a field at all?
    .isCampUp --no idea where Jungle Camps fit in the hierarchy! To think of it, if the Obj_* constants are all the possible
        --values of GameObject.type, and considering each of those should or at least could have their own separate C++ type,
        --then I have much more to understand about the GameObject type hierarchy than I thought, mainly that most of the fields
        --that I wrote under the root class do not belong to it.
    .activeSpellSlot
    .isChanneling
    .missileData

----------------------------------------
-- Data types related by composition: --
----------------------------------------
    AttackState (enum class)
    { STATE_UNKNOWN, STATE_ATTACK, STATE_WINDUP, STATE_WINDDOWN }

    struct Vector
        .x
        .y
        .z

    struct AttackData
        .state (AttackState, view enum class type above)
        .windUpTime
        .windDownTime
        .animationTime
        .endTime
        .castFrame
        .projectileSpeed
        .target //NOT SURE WHO HAS THIS FIELD.

    struct LevelData
        .exp
        .lvl
        .lvlPts

    struct ActiveSpell
        .valid --always use this to check if it's casting
        .name
        .startPos
        .placementPos
        .target
        .windup
        .animation

    struct MissileData
        .name -- string
        .owner -- GameObject handle
        .target -- GameObject handle
        .startPos -- Vector
        .endPos -- Vector
        .placementPos -- Vector
        .range
        .delay
        .speed
        .width
        .manaCost

    struct SpellData
        .name
        .level
        .castTime
        .cd
        .currentCd
        .ammo
        .ammoTime
        .ammoCd
        .ammoCurrentCd
        .toggleState
        .range
        .mana
        .width
        .speed
        .targetingType
        .coneAngle
        .coneDistance
        .acceleration
        .castFrame
        .maxSpeed
        .minSpeed

    struct ItemData
        .itemID
        .stacks
        .ammo

    struct Buff
        .type
        .name
        .startTime
        .expireTime
        .duration
        .stacks
        .count
        .sourcenID
        .sourceName

----------------------------------------
-- Data types related by inheritance: --
----------------------------------------
GameObject --(root type)
    functional properties:
        .buffCount
        .isMe
        .isAlly
        .isEnemy
        .pos2D
        .posMM
    fields:
        .networkID
        .handle -- use for missile owner/target check
        .chnd --use for camp handle
        .team
        .type
        .name
        .charName
        .health
        .maxHealth
        .baseDamage
        .bonusDamage
        .totalDamage
        .attackSpeed
        .armor
        .bonusArmor
        .magicResist
        .bonusMagicResist
        .hpRegen
        .mpRegen
        .range
        .boundingRadius
        .dead
        .visible
        .isImmortal -- NOT SURE IF THIS IS A FIELD OR FUNCTIONAL PROPERTY, BUT I WOULD GUESS FUNCTIONAL PROPERTY
        .isTargetable
        .pos
        .attackData (AttackData, view struct type above)
        .activeSpell (ActiveSpell, view struct type above)

Unit : GameObject
    fields:
        .mana
        .maxMana
        .shieldAD
        .shieldAP
        .cdr
        .armorPen
        .armorPenPercent
        .bonusArmorPenPercent
        .magicPen
        .magicPenPercent
        .ms
        .ap
        .valid --IS THIS A FUNCTIONAL PROPERTY? HOW DOES IT WORK?

    methods:
        :GetSpellData(iSlot) --(SpellData, view struct type above)
        :GetItemData(index) --(ItemData, view struct type above)
        :GetBuff(index) --(Buff, view struct type above)
        :GetPrediction(speed,delay) --(Vector, view struct type above)
        :GetCollision(width,speed,delay) --(int, DON'T KNOW WHAT THIS RETURNS)
        :IsValidTarget(range,team check,source or pos)


Minion : Unit --(According to the documentation, only these 2 fields.)
    .bonusDamagePercent
    .flatDamageReduction
    

Hero : Unit
    fields:
        .lifeSteal
        .spellVamp
        .critChance
        .gold
        .totalGold
        .levelData


Turret : GameObject
    fields:
        .targetID

  • 0

#2
evitaerCi

evitaerCi

    Advanced Member

  • Scripts Developer
  • 176 posts
✓  Best Answer
Lets asume that Unit is Obj_AI_Base, so:
 
GameObject
  .isMe
  .isAlly
  .isEnemy
  .pos2D
  .posMM
  
  .networkID
  .handle -- use for missile owner/target check
  .team
  .type
  .name
  .health
  .maxHealth
  .dead
  .visible
  .pos
  .distance
 
MissileClient : GameObject
  .missileData
 
Obj_AI_Base : GameObject
  .charName
  .isImmortal -- dunno what you meant
  .isTargetable
  .baseDamage
  .bonusDamage
  .totalDamage
  .attackSpeed
  .armor
  .bonusArmor
  .magicResist
  .bonusMagicResist
  .hpRegen
  .mpRegen
  .range
  .boundingRadius
  .mana
  .maxMana
  .shieldAD
  .shieldAP
  .cdr
  .armorPen
  .armorPenPercent
  .bonusArmorPenPercent
  .magicPen
  .magicPenPercent
  .ms
  .ap
  .valid -- returns valid units, there can be invalid units that might crash the game.
  .activeSpellSlot
  .isChanneling
  .posTo
  .dir -- yes, face direction
 
  .attackData
  .activeSpell
 
Obj_AI_Minion : Obj_AI_Base
  .bonusDamagePercent
  .flatDamageReduction
  .isCampUp
 
Obj_AI_Hero : Obj_AI_Base
  .lifeSteal
  .spellVamp
  .critChance
  .gold
  .totalGold
  .levelData.owner
  .hudAmmo
  .hudMaxAmmo
 
Obj_AI_Turret : Obj_AI_Base
 
 
properties i don't know:
  .owner
  .chnd --use for camp handle

  • 1

#3
MonkeyKid

MonkeyKid

    Advanced Member

  • Members
  • 112 posts
  • LocationBrazil

Thanks a lot!


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users