Hello everyone, am trying to create custom battle event node, so i unzipped and imported ork gameplay_source_code, but am getting these ork related errors. Not really good in coding. The errors are stated below.

Assets/ORK Framework/gameplay_source_code/gameplay_source_code/ORK Framework Gameplay/Framework/AssemblyInfo.cs(11,12): error CS0579: The attribute `System.Reflection.AssemblyCompanyAttribute' cannot be applied multiple times
  • Well, easy solution here - don't import the source code into your project.
    It's a code project for compiling the ORK DLLs.

    If you really want them in your Unity project, remove the AssemblyInfo.cs file (not needed for ORK).
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yeah, best to keep it as its own Visual Studio project outside of your Unity project. That way you can use it as a reference for how to build your own nodes. You can add your custom nodes as individual script files to your Unity project.

    What sort of custom battle event are you wanting to build?
  • edited December 2017
    @Keldryn and @gamingislove thanks. I will do that when i return. Does the GamePlay_source_code contain script for Spawn combatant node ? I also saw the CombatantSpawner script, but it seems your using a method from a parent class, because i can't find where you used instantiate and destroy.

    Then the prefabNode script seems to be in charge of spawning and destroying prefabs. Just like the combatant spawner script, it seems you are calling a parent class method. Am just seeing spawn prefab and destroy prefab. Am using pool boss by https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:2178 from the asset store . With pool boss, all i need to do is replace instantiate with PoolBoss.Spawn and destroy with PoolBoss.Despawn.
    Please bear with me, am not a programmer
    Post edited by henkesky1 on
  • @henkesky1 - Yes, the code for the SpawnCombatantStep is included. The event steps in the source code aren't one class per file, but are grouped. So this one is in CombatantSteps.cs.

    The instantiation actually happens in the Combatant.Spawn() method. It uses some private fields to get the referenced prefab to spawn, so you might have to put your modifications in this method.

    I generally try to avoid modifying the ORK gameplay code and just write my own classes to extend it, but in this case you might have to modify Combatant.cs and recompile the ORK code.

    Note that Combatant.cs is a data object and not the component that is actually placed on the character in the scene; that one is CombatantComponent.cs.

  • edited December 2017
    Hmmm, @Keldryn . There is no CombatantSteps.cs. script in the GamePlay_source_code.

    The instantiation actually happens in the Combatant.Spawn() method. In which script can i find this method? In the combatantspawner script i can find some methods like SpawnSingle, SpawnAll. I can't find where the gameobjects of the combatant where instantiated within the methods
    Post edited by henkesky1 on
  • edited December 2017
    I'd not recommend pooling combatant game objects - at least not without removing the Combatant Component attached to it (or the combatant set up in it).

    Might also give you trouble with equipment viewers on the combatant, which also need to reset which combatant they're part of - and which equip change events they listen to ...
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove thank you. But still can't find a way to add my pool. I have't seen the instantiate gameobject, which is responsible for spawning gameobject. Which file can i find this.
  • Spawning the combatant happens in the Combatant class, Spawn function.

    If you want to replace all object spawning with pooling, I'd recommend opening the source code in Mono Develop or Visual Studio and just search for all occurences of the Instantiate function (usually GameObject.Instantiate). The provided source is a Mono Develop project, you just need to add the Unity and ORK DLL references as explained here.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @Keldryn . Please pardon me. Sorry i was mistakenly looking at combatantNode.cs script instead of the combatant.cs, which has the combatant class and spawn() method.
    @gamingislove thank you. Contacted the owner of the asset(pool boss from the asset store), for possible integration with ork.
Sign In or Register to comment.