• 0

    posted a message on Raynor Railgun Snipe Actor not showing

    Hi,

    I tried to give the Raynor Railgun Snipe ability to another unit. For testing purposes, I didn't duplicate the ability and just gave it to the new unit.

    There is a red line (Actor - Raynor Snipe Beam) which shows you where the snipe is going. I changed the Host Impact and Host Launch from Raynor's actor to the actor of my unit, but it doesn't show up. The new unit can use the ability perfectly fine, the targeting actor is not displayed. What am I missing?

    Regards,

    Posted in: Data
  • 0

    posted a message on [Solved] Is this possible within a Button Tooltip?
    Quote from FunkyUserName: Go

    there is a function that converts a string path to the string value

    Thanks. I'll look into that for nicer code. My code is not perfectly generic right now, but it works already. Here is the result. Pretty sweet I'd say. Thanks again, greythepirate.

    Posted in: Data
  • 0

    posted a message on [Solved] Is this possible within a Button Tooltip?
    Quote from greythepirate: Go

    @BlacKcuD: Go

    You can use the Catalog Field Value Set to change the button's text for a player. Create a function to add text to the button for a player depending on upgrade status, and run the action any time an upgrade is researched.

    The UpdateAbilityText(string Ability, int Player) would look something like this in psuedocode:

    string OriginalAbilityText = CatalogFieldValueGet(Ability, ButtonText, 0); //make sure to get original text from player 0 so it remains unchanged, assuming you dont ever upgrade player 0)
    
    string UpdatedAbiltyText = OriginalAbilityText;
    
    for each PotentialUpgrade{
      if(PotentialUpgrade == Researched){
        UpdatedAbilityText += AbilityUpgradeTagLine;
      }
    }
    
    CatalogFieldValueSet(Ability, ButtonText, Player);
    

    I strongly suggest User Types as a method of organizing ability upgrade data (tagline string values, etc).

    That's a nice idea! I will immediately create me a UserType and start experimenting.

    update

    Seems to work besides one minor problem: I am unable to retrieve the original tooltip text. If I do something like this:

            Variable - Set tychus grenade base string = (Value of Buttons TossGrenadeTychus AlertTooltip for player 0)
    

    The string gets "base\abilts\tooltip\something", basically the path, but not the actual value at that position. Is this the wrong action?

    Posted in: Data
  • 0

    posted a message on [Solved] Is this possible within a Button Tooltip?

    Hi,

    I have a button with an ability, for example, Toss Grenade. There are also several upgrades which improve damage, range, etc of the Toss Grenade skill. These upgrades can be acquired in any order and combination. How can you show each upgrade's status in the tooltip of the Toss Grenade ability (similar to Heroes of the Storm)

    Something like this: Example is from Heroes of the Storm (Blizzard game) in which you see all your abilities' improvements in the tooltip.

    Is it possible to replicate this behaviour without creating a button for each and every combination of upgrades (which would be the brute force variant, but not feasable with everything more than 2 upgrades)? Are there some kind of conditions which one can use in the String Vals?

    Posted in: Data
  • 0

    posted a message on Performance efficient way to caputre damage dealt?
    Quote from Forge_User_04585675: Go

    Quote:

    I am using triggers to with "any damage taken" events to capture damage statistics in a map. However, if I do this for nukes, the performance suffers hickup. Probably because the trigger for damage taken is executed multiple times at once (since multiple enemies were hit by the same nuke typically).

    Try running your map without the trigger debugger active. Like all profilers/debuggers it adds overhead and slows execution down. You are meant to use it as an optimization aid and to help identify performance bottlenecks.

    Solved: this was it. Triggers involving Damage Taken events and short timers are actually performant enough to easily make this work in 4player battle.net The largest junk of the lag came from the profiler.

    If you need the code, just PM me. Nuke damage announces complete with a multiboard for each player's record are super fun.

    Posted in: Data
  • 0

    posted a message on Performance efficient way to caputre damage dealt?
    Quote from TyaArcade: Go

    There's "life damage dealt" and "shield damage dealt" score values. The game records all damage that each player does and records it in these score values. Just add those two scores together to get every single point of damage that the player has ever done during the match.

    Hm, that might work. Depending on how detailled those scores are, I could use them for my project. Thanks for the hint.

    Performance was actually astonishingly good in a 4 player battle.net game, but there is a lot going on already and I haven't added any major doodads to the map, yet, so every bit of performance is welcome.

    Posted in: Data
  • 0

    posted a message on Performance efficient way to caputre damage dealt?

    Hi,

    I am using triggers to with "any damage taken" events to capture damage statistics in a map. However, if I do this for nukes, the performance suffers hickup. Probably because the trigger for damage taken is executed multiple times at once (since multiple enemies were hit by the same nuke typically).

    Is there another way to capture this damage which is a bit more performant? Can you transport the damage from a behaviour/damage response to the trigger editor/global variables somehow? I think I remember playing an old version of Income Wars Official which had nuke damage calculation and it didn't cause any noticeable hickups.

    Any input on that matter from you Data pros?

    Posted in: Data
  • 0

    posted a message on Where is the error in this simple action?

    Update: Vision doesn't seem to be a factor. However, if the unit has currently orders running (aka is not idle) it seems to work less reliably. Freshly spawned units will gladly go suicide if you order the suicide _per unit_ and have them do nothing else.

    Posted in: Triggers
  • 0

    posted a message on Tutorial Request

    How to make a trigger which detects the damage you did with the last nuke and print that out on screen? Should work with multiple players and multiple nukes going down simultaneously (with a few seconds in between) by the same player.

    • UPDATE* If done it myself and after a couple iterations, it is quite fail-proof. If you need the code (only 2 Triggers รก 5 lines), send me a PM or something.
    Posted in: Tutorials
  • 0

    posted a message on How to: Order AI to setup and maintain a small base?
    Quote from BlacKcuD: Go

    @njordys: Go

    Didn't work.

    Can I somehow influence the order in which things are rebuilt? The AI does rebuild, but very slowly and often times in an order which doesn't make sense.

    Solved partially: the AI was macroing so hard, it ran out of resources. My bad.

    Still can't find a way to influence the order besides may be creating a ton of artifical requirement (trees).

    Posted in: AI Development
  • 0

    posted a message on Where is the error in this simple action?
    Quote from Forge_User_04585675: Go

    Quote:

    Where could be possible problems?

    The AI might not know where to suicide them to. Unless the AI also has scouts to find stuff the units might remain stationary until something enters vision.

    Try disabling the normal vision flag. Note that there is a high chance this cannot be done with GUI alone meaning you will need a little (1 line, maybe even just an argument) custom script to do this.

    // Flag deceleration. You could pass its name as custom script to the appropriate GUI action and it should work. Do not use value as that has been known to change with patches.
    const int c_diffNormalVision            = 5;  // Use normal vision rules (campaign  cheating melee AIs turn this off).
    // Native used to change it.
    native void AISetDifficulty (int player, int index, bool state);
    // Example of native being called.
    AISetDifficulty (lv_player, c_diffNormalVision, false);
    

    This should hopefully allow the AI to know exactly where everything is all the time. As such it should always be able to suicide units.

    If it still does not work it might be a good idea to post the map. That way I could debug the cause of the AI malfunction.

    AIs can be difficult at times. A lot of things you think might work end up not working and require work arounds.

    This is interesting. I don't want my AI to be cheating (because that would make the look up cliffs and stuff), so I could just make a couple of units visible and at least this problem would be done.

    On the other hand, I am pretty sure, that there are times when there is nothing to see and some units get a suicide order and they will seek out enemy units and start to fight.

    Anyhow, thanks for the tip, I will definitely look into that.

    Posted in: Triggers
  • 0

    posted a message on Campeign AI Trigger, Why doesnt this work?

    I know this is an old thread, but has anyone of you found a solution for this? This would be so sweet (and performant) if this works somehow.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Where is the error in this simple action?
    Quote from Forge_User_04585675: Go

    Yes one must avoid costly group search operations when possible.

    If you are using AI to control the units you can order the units to suicide for a similar result. This will make them automatically seek out the nearest enemies and kill them with no regard for their own life. It requires the player be owned by a computer (not empty or human or neutral) and that it has an active AI started. It might be more efficient in that case as the AI will manage target acquisition.

    I tried AI suicide, but some units just weren't suiciding. This is how I even got started with the whole pick all unstuck attack move business. There are now more units moving, but it is still far from perfect. Also performance has decreased. My unstuck-triggers can be optimized, but I would really like to use the AI suicide.

    I have tried lots of things with the suicide AI command. However, sometimes it just doesn't work. The units are standing there doing nothing. I will experiment further, but at the moment it has prooven to be somewhat unreliable. If anybody knows any details on when and how this suicide thing works, I would greatly appreciate it.

    Where could be possible problems?

    Is it a problem if a unit gets a suicide command twice?

    Why isn't global suicide always working?

    How can I order the AI to seek out structures more aggressively?

    What are the exact requirements for the AI (Controller, what AI started, units present, etc)?

    Example: As a brute force unstuck trigger on a map with lots of enemies and allies you could use something like: every 30 secs ingame: global suicide player (attackers). However, this doesn't work, despite the player running Campaign AI and the likes. I don't understand where the hidden problem is.

    Posted in: Triggers
  • 0

    posted a message on Where is the error in this simple action?
    Quote from Ahli634: Go

    "Picked Unit" refers to the loop-action starting with "Pick each unit". That loop iterates over all units.

    "Order all units" does not give you any reference to the unit, so you cannot fix your line by using something else as that parameter.

    Use a loop over the unit group that you want to order ("Pick each unit in unit group") and use the order action for a single unit ("Issue order to unit").

    Also, you wouldn't want to grab all units of player 6 for each unit you are going to order. You should grab them once before the loop and store them in a unit group variable.

    Thanks. Did exactly that while I was waiting for the response. It works now. I just tried to reduce the amount of lines of code. Nevermind. For reference, working code looks like this:

            Unit Group - Pick each unit in (Any units in (Playable map area) owned by player _evil attackers matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Order (Picked unit) to ( Attack targeting (Position of (Closest unit to (Position of (Picked unit)) in (Units in (Playable map area) having alliance Enemy with player (Owner of (Picked unit)) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)))) (Replace Existing Orders)
    
    Posted in: Triggers
  • 0

    posted a message on How to: Order AI to setup and maintain a small base?
    Quote from njordys: Go

    Glad it worked :)

    I'm a bit uncertain. Perhaps you can try to place the refinery, unselect the initially created and such so that it's purple, then place a geysir on top of it. You can place it above the refinery if you press shift. Have you tried that?

    Didn't work.

    Can I somehow influence the order in which things are rebuilt? The AI does rebuild, but very slowly and often times in an order which doesn't make sense.

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