• 0.953814218993254

    posted a message on Unit ability to temporarily copy ability of another unit
     

    Nice! Glad to hear that system is working for you.

     

    I just messed around with the dynamic ability actions. It looks like with some tinkering we should be able to get our cloning to work perfectly :D

     

    • Go to Data and add the buttons of all the possible abilities that can be cloned, to one slot in the cloner unit's command card.
      • Make sure to set their command type to 'Ability Command' in the drop-down for the button.
    • Then, go to XML view (still in the Data module), and add the bit: 'AbilCmd="[XML_NAME_OF_ABILITY_HERE],Execute"' to each listed '<LayoutButtons>' row under '<CardLayouts index="0">'.
      • Note the ',Execute' that comes after the XML ID of the ability
      • Make sure to put that bit right before the row/column information for that LayoutButtons entry (so that it is the 2nd to last item listed)
    • Now go to Triggers and setup a switch that will handle the unit casting the clone ability (event - unit uses ability etc).
      • Make the cases of the switch be based off of the unit type of targeted unit.
      • Depending on the type of targeted unit, use the new PTR action 'Add Ability' or its raw-data name 'UnitAbilityAdd' to add whichever ability needs to be cloned to your cloner unit (e.g. if the cloner is targeting a zealot, add the Zealot - Charge ability, since it just stole the zealot's Charge).
    • Note: Use the new PTR action 'Remove Ability' or in raw-data 'UnitAbilityRemove' to remove the last cloned ability before adding the new one.
      • You can do this right before you add the new one, in the above mentioned switch statement cases. You can reference the last cloned ability by using the 'convert string to game link' function and for the string pass in a global variable that has been set to the XML name (ID) of the cloned ability (set in the above switch cases).

    I've tested this out and it works great. The only problem I could foresee is possibly, since you're adding the 'AbilCmd' of each button manually in XML, that may count as actually adding the ability to the unit, which would then be capped at 31 (our original problem). But I don't think this is the case, since none of the abilities actually show up in the GUI list of the unit's abilities nor in the XML list '<AbilArray>' for the unit. They only show up as linked icons on the left underneath the unit's name  under 'Abilities' in the context menu column to the left. So hopefully you can add as many buttons and AbilCmd ref's as you want.

     

    What's cool is that it won't show any of the ability buttons when the cloner unit is selected, until you've added the ability using that PTR action.

    Overall this means you can add any type of ability you want, at any time, in-game, to any unit.

     

    I've attached a test map that uses key words entered by the player to "clone" abilities :)

    Please see attached.

     

     
    Posted in: Data
  • 0

    posted a message on Unit ability to temporarily copy ability of another unit
     

    This is an update, in response to the new major editor patch that is currently in beta testing:

    "Dynamic Ability Support

    • Modders can now use triggers to add or remove abilities from units."

    As well as:

     

    "Ability Swap

    • New function: UnitAbilityChangeLink()
      • This function allows users to swap an existing ability on a unit to another unit while keeping its old charges, cooldown, and level states.
      • Different from Catalog Replacement in that it is per-ability instance based.
      • We've also added a new Ability Replace field in the Power User Type Behavior that provides a data version of this feature.
      • Can only swap to abilities with the same CAbil class of the old ability. For example, a target ability can only be swapped to a target ability.
      • The data version of Ability Swap will also affect the learnable abilities of Heroes."


        Reference this for more information (cntrl + f for 'Dynamic Ability Support'):
        https://news.blizzard.com/en-us/starcraft2/23471116/starcraft-ii-4-13-0-ptr-patch-notes

     

     
    Posted in: Data
  • 0

    posted a message on How to make a Unit into a Doodad?
     

    You can set the 'Art: Scale' field in the unit's actor (the actor 'Spine Crawler'). Not sure if this affects Melee eligibility but that's an easy solution, and it only affects appearances, no gameplay at all.

     
    Posted in: Data
  • 1.63661487020337

    posted a message on Unit ability to temporarily copy ability of another unit
     

    But what you could do, (just thought of it) for needing more than 32 abilities max to clone, is to have a trigger replace the cloner unit with the same exact looking unit but just a replica unit type, that had the next set of 32 abilities.

     

    So like the cloner unit tries to clone another unit's ability, and you run that other unit through a switch. If it ends up belonging to some pre-defined list of group B units (those with abilities 33-64), kill and replace the cloner unit with the exact same unit type except for a new XML ID and its abilities (which would be the ones 33-64) (just restore its xp, hp, and energy values etc. to what they were before it used the clone ability).

     

    That way you could have an infinite amount of abilities to clone because you can just keep making new unit types that are duplicates of your original cloner unit, each with their own unique set of 32 different abilities in data.

     

    Let me know if that made any sense, sorry couldn't think of a better way to write it out, and can't upload any more images ;/ 

     
     
    Posted in: Data
  • 0

    posted a message on Unit ability to temporarily copy ability of another unit
     

    I have something similar to this in my game, and I'm just giving the unit all of the abilities and showing/hiding the ability that is imprinted on, and then disabling the imprint ability until they've used their new 'stolen' ability. So data for adding all the abilities, and triggers for handling the showing/hiding and disabling/re-enabling.

     

    For your scenario, you can just set a timer that on expire, hides the cloned ability and re-enables the clone ability itself.

    Like MaskedImposter said, I just recently saw there's a limit on ability count for a unit, so you could only use this method if your amount of abilities you want to imprint is less than the max, like 32.

    Maybe consider only allowing the unit to clone a type of ability (a special vs. a basic) from the other units or like for more rare units, this one could only clone one ability out of three from the rare unit, to cut down on the total possible cloned abilities count. 

     
    Posted in: Data
  • 1.92776810419391

    posted a message on Please help me import this SC2 asset to any 3D modeling software, Reward Follows.
     

    Here's an example of importing the Ultralisk model from SC2 to Blender.

     

    • Open up Blender and go to Edit -> Preferences -> Add-ons
      • Make sure 'Community' is selected (for the filter) and search 'm3'
      • Tick the checkbox for the only listed hit 'Import-Export: m3addon for M3 form ...'
    • Open up the StarCraft 2 editor to the project that has the asset you'd like to import to Blender
      • Hit Alt + `     to bring up the Console (or go to Window -> Console) and type the word 'browse' and hit Enter to bring up the Archive Browser
      • Search for 'Ultralisk' and right click -> Export File on the entry 'Ultralisk.m3'
    • Back in Blender, click File -> Import -> StarCraft 2 Model / Animation (.m3/.m3a) ...
      • Import the .m3 file you just exported from the SC2 editor
    • For the textures you will also want to export the following files from the Archive Browser:
      • ultralisk_diffuse.dds
      • ultralisk_emissive.dds
      • ultralisk_normal.dds
      • ultralisk_specular.dds
    • Back in Blender, go to the Shading tab and select the ultra body itself (not the two blades it has on its sidearms)
      • ^ Make sure you have the Mesh selected, not the geometric cages (armature object) surrounding it. Just left click again until you have the ultra's body mesh selected.
      • A texture map should come up below the preview window with all the different textures linked together.
        • You want to set the 4 boxes that have an orange header to the file paths of the exported assets above (ultralisk_diffuse, ultralisk_emissive, etc.)
          • You'll be clicking on the file explorer icon to the right of the name of the image for that texture
        • Then the ultra should turn from pink (no textures assigned) to its normal in-game colors and textures (The blades on the sides of the ultra will still be pink. You can either delete them or click on them in the shading tab preview to find the name of the image file needed to be exported from the SC2 archive browser for their proper texture/color.)
     
    Posted in: General Chat
  • 0.952297130786833

    posted a message on Refinery making noise ingame [SOLVED]
     

    Go to the unit 'Vespene Geyser' in Data and remove the top actor event in its list of actor events: 'UnitBirth.VespeneGeyser-Create SoundEmitter VespeneGeyser_Ambience'.

     
    Posted in: Data
  • 0.952666902154716

    posted a message on Infested Colonist / Infested Marine causing noise in editor [SOLVED]
     

    Go to the Data module and then open up Actors tab by hitting the small green plus sign and going to 'Edit Actor Data > Actors'.

    Search for 'infested civilian'.

    Select the actor 'Infested Civilian'.

    On the right, double click the field for the section '(Basic) Event: Events - Send'. (The part on the right side of the division under 'Infested Civilian').

    Scroll to near the bottom of the list that pops up and right click the flag that's labeled 'Actor Creation - Create InfestedCivilian_Moan' and select 'Remove Selection' (Note: Must right click the flag part, not the action part).

    Hit 'OK'.

     

     
    Posted in: Data
  • 0.951721689740859

    posted a message on Veterancy Behavior not gaining xp
     


    This video is useful for setting up veterancy behaviors. It also includes extra information like scaling damage and health from leveling up. 

    *Data editing starts at t = 2:22

     
     
    Posted in: Data
  • 0

    posted a message on Remove colision from structures?
     

    Not entirely sure what you're looking for, but if you find the unit in data, you can remove its footprint, which should remove any collisions with it.

     
    Posted in: General Chat
  • 0

    posted a message on Infested Colonist / Infested Marine causing noise in editor [SOLVED]
     

    You can go to the unit in the Data module and click on its associated sounds, and then open up the 'Sound Assets - File' for the sound by double clicking that field, and then remove the listed sound files by right clicking on them and 'Remove Sound'. I think that should remove the sound preview that is constantly played in the (terrain?) editor.

     

    **Note: This will also remove the sounds from those units in-game.

     
    Posted in: Data
  • 0

    posted a message on How Do I Create My Signature
     

    How do I set my signature for my forum posts? Can't find it anywhere in my profile settings.

     
    Posted in: General Chat
  • 0

    posted a message on Is this a good way to detect activation of multiple beacons?
     

    You can still use  only 1 trigger, because you can use 4 events (1 for each beacon) and it'll trigger whichever beacon is approached/exited. Then just make everything else in the trigger reference the region approached/exited to pick the correct beacon.

     

    I would edit my previous answer to instead use pre-set circle regions on the terrain editor: One with a radius of 3 for the capturing unit  and one with a radius of 10 for checking if an enemy is near the beacon (both regions centered on the beacon).

     

    You can also make a custom action for killing the beacons, since that's repeated, as shown in the attached snapshots.

     

    In regards to your 2nd question, I'm pretty sure it just queries the particular region, then checks only those units contained in that region to see if they match the conditions. So it shouldn't be too much of a hit on performance, especially since you wouldn't be using a periodic event anymore, so it'd only query the region whenever a unit entered.

     
    Posted in: Triggers
  • 0

    posted a message on (Solved) Need help with the inventory system.
     

    It is possible to do all those things, I suggest you get into layouts for setting up custom UI. I've posted links to helpful UI tutorials in your other thread question on 'Hookup Standard Dialog Item' in UI Development. Basically you can change the anchors of those buttons and slots to make them look how you want and you can force visibility with a stategroup.

     

    Here's some links for animations and stategroups that will be helpful for starting work in layouts:

     

     
    Posted in: Data
  • 0

    posted a message on Hookup Standard dialog item does not work outside Liberty dependencies?
     

    I'm pretty sure it does. I suggest looking through these tutorials for help with UI hookups and layouts:

     

    Attached is an example of me hooking up an edit box I've setup in layouts.

     
    Posted in: UI Development
  • To post a comment, please or register a new account.