• 0

    posted a message on Help with two abilities please

    I dunno what phase shift is, so I can't help you there.

    But hopefully for the tank ability I have a starting point for you. My ability is a point target ability, that upon cast, morphs the Siege Tank and attacks the location X times, and returns it back to normal afterwards.

    There are lots of solutions to this, but since the Siege Tank uses a turret and I'm not real good with them - I'm not going to use pure data for this. I'm going to stick to the default morph ability, add some of my own data tweaks, then finally put it together via scripts.

    EDIT: I hate morphs... they can be very clunky if you're trying to benchmark rapid transitions back and forth, but since we don't have to do that for this kind of ability I think I will stick to it this time. Also morphs have problems with units that use plane pathing, and you try to use them on units created dynamically.

    How I did this,

    1. I hid the default siege and unsiege abilities on the command card of Siege Tank units. They still need the ability for morphing.
    2. Made a dummy unit, with invisible model, high regeneration, life, and behavior that modifies incoming damage to 0. Changed some unit flags so it can't be commanded, selected, is invul,.. etc (It can be target'd however, it is necessary for our ability). Change plane to ground, or whatever our Siege Tank weapon can target.
    3. Made it so the Crucio Shock Cannon (Siege Tank weapon)'s effect - Crucio Shock Cannon Set, can only target the dummy unit - via unit type validator (set to our dummy unit). Changed weapon filter to target invul units (so it can affect our dummy unit).
    4. Created a target ability, with a dummy set effect (location set to point). Give it good range, and change arc to 360; otherwise you'll get clunky animations that cause the siege tank to turn multiple times. Weapon range should be same as ability range (maybe more to be safe).
    5. Created a behavior, that makes unit uncommandable during the 'ability phase', with max stack count changed to number of desired hits.
    6. Created an effect, that removes one stack of our behavior from caster. Added it to the Crucio Shock Cannon Set.
    7. Tweaked some numbers, on weapon attack speed, damage areas to make it more interesting. Added ability to our Siege Tank - Tank Mode.
    8. The rest are done on triggers.
    // Add this somewhere in a custom script somewhere.
    //  If you're using a libNtve func via GUI func, you won't need this.
    include "TriggerLibs/NativeLib"
    
    bool SiegeStrike_OnCast(bool cond, bool actions){
        // For 'strikes', you will need to change the max stack count of the behavior added
        //  if the 'strikes' value exceeds the max stack count. For obvious reasons
        //  that wouldn't work...
        unit caster = EventPlayerEffectUsedUnit(c_effectUnitCaster);
        unit dummyTarget;
        point tPoint = EventPlayerEffectUsedPoint(c_effectLocationTargetPoint);
        int owner = UnitGetOwner(caster);   
        int strikes = 10;
        string key = IntToString(UnitGetTag(caster));
        // Order the caster to SiegeMode, so the caster must have the ability - even if it's hidden
        UnitIssueOrder(caster, Order(AbilityCommand("SiegeMode", 0)), c_orderQueueReplace);
        // Add the right number of SiegeStrike behavior..
        UnitBehaviorAdd(caster, "SiegeStrike", caster, strikes);
        // Create our target unit, so we can mimic a target point attack
        UnitCreate(1, "SiegeStrikeTarget", 0, 0, tPoint, 0);
        dummyTarget = UnitLastCreated();
        // This wait is for the animation transition, you can obviously change the value
        //  if you change the duration via an actor message
        Wait(3.667, c_timeGame);
        // Issue our unit to attack to dummy
        UnitIssueOrder(caster, OrderTargetingUnit(AbilityCommand("attack", 0), dummyTarget), c_orderQueueReplace);
        // Save our dummy unit with a key using caster's index tag
        DataTableSetUnit(true, key+"siegeStrikeTarget", dummyTarget);
        return true;
    }
    bool SiegeStrike_OnLastStrike(bool cond, bool actions){
        // 'unsiegeDelay' is the time delay after the unit is order to initially stop,
        //  that the unit is ordered to Unsiege, this is necessary to make the animation
        //  flow a little more smoothly 
        // 'delay' is the time delay that we remove the dummy unit, removing too early will
        //  kill any orphaned explosion effects. Of course if you make your own custom attack effects
        //  you can make it so they don't destroy upon being orphan'd.
        unit caster = EventUnit();
        unit dummyTarget;
        fixed unsiegeDelay = .5;
        fixed delay = 6.5;
        string key = IntToString(UnitGetTag(caster));
        bool isAlive = UnitIsAlive(caster);
        // Only if the caster is alive, give it orders
        if (isAlive){
            UnitIssueOrder(caster, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
            Wait(unsiegeDelay, c_timeGame);
            UnitIssueOrder(caster, Order(AbilityCommand("Unsiege", 0)), c_orderQueueReplace);
        }
        // After waiting the delay, remove the dummy target unit and remove key from data table
        Wait(delay, c_timeGame);
        dummyTarget = DataTableGetUnit(true, key+"siegeStrikeTarget");
        UnitRemove(dummyTarget);
        DataTableValueRemove(true, key+"siegeStrikeTarget");
        return true;
    }
    void SiegeStrike_Init(){
        TriggerAddEventPlayerEffectUsed(TriggerCreate("SiegeStrike_OnCast"), c_playerAny, "SiegeStrike");
        TriggerAddEventUnitBehaviorChange(TriggerCreate("SiegeStrike_OnLastStrike"), null, "SiegeStrike", c_unitBehaviorChangeDestroy);
    }
    

    Basically, the script puts everything together. The first func is fired when the dummy set effect is used; You get x number of strike stacks and create a dummy unit at a target location. After the animation transition, we order our morphed unit to attack the dummy. Every time our weapon is fired, the tank loses one strike stack. Our second func is fired when a unit loses all strike stacks, it orders our Siege Tank to unsiege and removes the dummy target unit.

    Some notes you should understand, if you want to export this ability.

    1. The Siege Tank - Sieged units are modified to the extent where they can't target regular units - but if you want to still use them in another map, I suggest you copy them, and set the morph to the copied unit. Obviously this means, you're going to have copy a few data like the Crucio Shock Cannon weapon and effects used. Or idk, use a switch effect - figure it out.
    2. I removed the requirement on the Siege Tank - Siege morph ability, if you're using the default settings - the requirement will be there and will cause this ability to do nothing. So.. remove this requirement,- alternatively give the requirement to our custom ability. That way things will line up cleanly.
    3. Your siege tanks, must have the Siege/Unsiege abilities. Even though I hid them on the command card, they are still required for this ability to work properly.
    Posted in: Data
  • 0

    posted a message on (Solved) Move Chat Box to the Left of the Screen

    This is very close, but when you use triggers, you don't need to use GameUI as part of the path for UI frames.

    So you should be hooking up to the path
    "UIContainer/FullscreenUpperContainer/ChatBar"

    But If I can, I usually like to stick to handling UI stuff in the UI Editor, it's so much easier to read and organize in XML in my opinion. Of course If you plan on modifying info displayed you should definitely hook it up and change it accordingly.

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <Desc>
        <Frame type="ChatBar" name="GameUI/UIContainer/FullscreenUpperContainer/ChatBar" file="GameUI">
            <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
            <Anchor side="Bottom" relative="$parent" pos="Min" offset="0"/>
        </Frame>
    </Desc>
    
    Posted in: UI Development
  • 0

    posted a message on Azir Character

    I was playing league of legends the other day, and took a really strong fascination into the Azir character. I thought I would recreate it in the sc2 editor to kill some free time. Link to Azir Webpage.

    There are some subtle mechanics that I forgot to include like the shield upon hitting heroic targets, ultimate blocking pathing for enemy units and the ability to raise dead towers. But other than that, I think I got most of it down.

    I hope someone finds it amusing or can learn something from it. :>

    EDIT: Added some UI stuff to make it a little more interesting.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Viewing Models Crashes Editor

    Like the title states, any time I try to view models in the editor - after a few seconds it crashes. Persists for the past week or so, but I just shrugged it off because I didn't get to touch the editor much. Has nothing to do with custom models, I open blank maps and error still happens. Import Editor, Data Editor,.. is this happening to anyone?

    Cutscenes, + browse works okay though..

    Thanks in Advance

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    One of the things I've realized for the orb tentacles, if you aren't moving while the missiles try to return - they tentacles return quickly. But if you move before the tentacles try to return, they'll take some time to fully return.

    Posted in: Miscellaneous Development
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    I finally understand how it works, I got stuck at figuring out how the Attack Actor detects where to fire from. I realized that the process is automatic, and not done manually - given that on fire, it removes the alias needed to be a valid launch point and re-adds it when it returns. Can you show me a bit about texturing replacing? I don't really get how to do it on effects, since they aren't like regular models.

    edit: NM, After some re-reading of the Texture Select I get it. But man part of it is like a dice roll until u hit something nice rofl.

    Posted in: Miscellaneous Development
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    @abvdzh: Go

    Yeah especially when it gets complicated and there are signals to each other it's like a giant spider web. The data navigation doesn't even show nodes pointing at each other with the kind of actors you have. A visual representation might make things slightly more clear, but since that can't be done I have to do all the direction work myself which is kinda hard lol.

    I will be reading that ring of frost tut, but I'm currently trying to solve this one out right now. It's got me a bit confuzzled.

    http://i.giphy.com/l0NwuWi1TaVk53tvi.gif

    A similar protoss version exists in the 'bosses-with-0-triggering-fun-or-shit' map.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Publish window has no list of regions anymore

    @Renee2islga: Go

    Thanks Renee!

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on SC2 UnicodeTranslate

    Thank you this is very good, I will be using this for making foreign commands.

    Posted in: Third Party Tools
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    Sorry but here's a question:

    What does setting the Host to ::Creator do?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Things that cause long exit times

    That actually makes a lot of sense, although I don't get the algorithms part since I don't know anything about them - the rest of your post does.

    I will write something on their forums soon.

    Posted in: Galaxy Scripting
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    Thank you, appreciate it - will be looking into it today.

    Man... the spells in the map are awesome - but the Spike Bomb ability is truly epic. I have hard time wrapping my head around it atm - the data editor is much more powerful and useful than I how use it seems...

    Edit: I see what spike bomb is doing now, it's really good use of actors that I would've never even cared to think about.

    The Rain of Fire, causes the initial delay between spike bombs rising, and uses 3 persistents to checkpoint the wandering effect. Never though of doing delays via the data like that, real interesting.

    The Site (Mover) actors are created from the Spike Bomb Center, which is created from the Pivot after the MoverUp and each mover designates a impact location via one of the 6 rotations + 5 Z offset from the center.

    I have never known about Model Material, Site, Site (Mover) actors and their usefulness until today. >:} Thanks for that.

    One of the early misconceptions I had was that, the Spike Missiles for the bomb had 3d-collision for their damage searches. But it's just one search effect that deals damage to all nearby units.

    Posted in: Miscellaneous Development
  • 0

    posted a message on boss encounter little showcase (100mb gif XD)

    Very cool, are you ever going to be putting up a demo map for this?

    I'm very curious as to how you did it.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Things that cause long exit times

    Sorry Doc, but I think your info - although maybe correct, is not relevant to my issue. I have done lot's of data related tests and have failed to reproduce similar results from my game. For the past few months, I've been testing lots of different things to see what could be happening. I don't have any serious data leaks after some numerous checks, but if I did have any it would be marginal.

    The real issue I have is using CatalogReferenceSet or CatalogFieldValueSet. I have an extremely dynamic game where tooltips and numbers are based around field values of Damage Effects like AttributeBonus, AttributeFactor. They are updated very often, like every time a hero gets a status update or behavior update. I am starting to realize this issue will worsen, as the map gets even more sophistication.

    After about a few million uses of CatalogReferenceSet or CatalogFieldValueSet, I get this long game exit hang. I've done a small test to prove this case (I've attached a map below). So how is it possible to get a few million uses of the function? Each player has a hero, gets about a status update every second (Theoretically). In each status update, there is about 150 (100 - 200) Catalog changes. With an expected game time of 20 - 60 minutes or 180,000 - 540,000+ Catalog changes per person, per game. My map supports up to a max of 12 players. But keep in mind, when certain effects and condition are passed - there are more than 1 status update per second - so it can easily do more than the amounts I just listed. The numbers might be wrong, but the point is that catalog setting has some kind of limit unknown to me and perhaps to most of the community as well. Anyways the cap is easily broken, especially as new items and spells get featured into the game and thus adding even more injury.

    Of course, knowing this now - I guess I can work around it and use behaviors to modify certain things like armor, movespeed, attack speed. And write more efficiently - checking if catalog setting is necessary before doing so. But who knew something like catalog setting would have such a hidden tax?

    The map below has a custom script that has the following written in it. Just be sure to have window mode on, so you can end task without issues. It writes 384,000 catalog reference every second. Your comp will probably lag, but I recommend just letting the map run for about 20 - 40 seconds and then leaving the game afterwards. Your game will be frame stuck for a really long time, if not forever.

    unit[2] zergling;
    int effectCount;
    bool Asd_FuncFieldValue(bool cond, bool actions){
        int i;
        while (true){
            for (i=0;i<1000;i+=1){
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 1, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 2, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 3, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 4, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 5, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 6, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 7, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 8, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 9, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 10, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 11, FixedToString(RandomFixed(1,5),0));
                CatalogFieldValueSet(c_gameCatalogEffect, "Test", "Amount", 12, FixedToString(RandomFixed(1,5),0));
                effectCount += 1;
            }
            Wait(0, c_timeGame);
        }
        return true;
    }
    bool Asd_FuncReference(bool cond, bool actions){
        int i;
        while (true){
            for (i=0;i<1000;i+=1){
                CatalogReferenceSet("Effect,Test,Amount", 1, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 2, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 3, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 4, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 5, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 6, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 7, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 8, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 9, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 10, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 11, FixedToString(RandomFixed(1, 5), 0));
                CatalogReferenceSet("Effect,Test,Amount", 12, FixedToString(RandomFixed(1, 5), 0));
                effectCount += 1;
            }
            Wait(0, c_timeGame);
        }
        return true;
    }
    bool Asd_Display(bool cond, bool actions){
        UIDisplayMessage(PlayerGroupAll(), 1, IntToText(effectCount));
        return true;
    }
    void Asd_Init(){
        revealer rev = VisRevealerCreate(1, RegionEntireMap());
        VisRevealerEnable(rev, true);
        zergling[0] = UnitFromId(2);
        zergling[1] = UnitFromId(1);
        TriggerAddEventKeyPressed(TriggerCreate("Asd_Display"), c_playerAny, c_keyF, true, 0, 0, 0);
        TriggerAddEventTimeElapsed(TriggerCreate("Asd_FuncFieldValue"), 0, c_timeGame);
        TriggerAddEventTimeElapsed(TriggerCreate("Asd_FuncFieldValue"), 0, c_timeGame);
    }
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on Things that cause long exit times

    Although it's a little hard to understand, I really appreciate the response. How can I check the virtual address size? Is that how much memory it's taking up in the task manager?

    I will check for any lingering actors.

    Is there any thing else that is likely to leak besides actors, such as data effects for example?

    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.