• 0

    posted a message on Osama Bin Laden

    Glorious news indeed. Now let's get the rest of the bastards.

    Posted in: Off-Topic
  • 0

    posted a message on [Data] Hit Variance System

    Bumping because I'm curious if anyone has had any use for this.

    Posted in: Tutorials
  • 0

    posted a message on Mafia, now with Controversy

    I think that this happened:

    Blizz employee plays Mafia and gets the stripper role. He's pissed that he can't kill people like a mafioso, so he files a report to get them removed from the game.

    Posted in: General Chat
  • 0

    posted a message on Why no replies?
    Quote from Mozared: Go

    Aye, and it shows - and that's what bugs me a bit. Your project seems decent and if I were a coder, I'd be interested in jumping in. Maybe all coders/editors are simply busy with other projects because they're in such high demand?

    This. There are tons of good ideas but you need the people to implement them. Data editing is very finicky and it gets tedious so it takes a special type of person to do it. Unfortunately I'm working on other things myself.

    Posted in: General Chat
  • 0

    posted a message on [Data] Hit Variance System


    This tutorial will cover how to make a hit or miss system. It is of intermediate difficulty and from my testing, prone to some minor weirdness that I haven't completly worked out.I'm currently working on implementing this for the map "Dark Shooter RPG" being developed by Team Magic.

    The basic premise is that you can create weapons that have a chance to hit or miss. If it misses, you can have the projectile attack a point within a fixed radius of the intended target and apply damage if an enemy unit is at that point. This could also be used for many things like spells and abilities. In the future I will be exploring ways to have a unit be upgraded which will effect their damage and hit or miss chances.

    Here is the step by step instructions for implementing this as a companion to the video:

    Now the nitty gritty

    Go to Data Editor and bring up Effect tab 1. First, we want to set up our custom poison pistol damage effect. If our attack hits a unit, this will be applied.

    • Add Effect ->
      • Name: "Poison Pistol - Damage"
      • ID: Suggest
      • Effect Type: Damage
      • For now leave the actual values for the effect as the default. This can be tweaked later.

    2. Now we need to create a Search Effect. This will allow us to check a point near the target to see if it is a unit so we can apply damage as needed.

    • Add Effect ->
      • Name: "Poison Pistol - Search"
      • ID: Suggest
      • Effect Type: Search Area
    • Edit your new effect
    • Edit "Search - Areas +"
      • Add Value
      • Set Effect = "Poison Pistol - Damage"
      • Set Maximum Count = 1
      • Set Radius = 1 (This is the size of the point to search. A bullet is small so 1 is good.)
    • Set Target - Launch Location + = Target Unit/Point
    • Edit Target - Marker +
      • Set Mismatch flags -> Casting Unit and Casting Player = Enabled (We don't want the search to hit us.)

    3. Create a launch missile effect. We will tie our search area effect to trigger on impact.

    • Add Effect ->
      • Name: "Poison Pistol - Launch"
      • ID: Suggest
      • Effect Type: Launch Missile
      • Field Values: Copy From: Hydralisk - Needle Spine (Launch Missile)
    • Now edit you new effect
      • Set Effect - Impact Effect = "Poison Pistol - Search"
      • Set Target = Impact Location + = Target Unit/Point

    4. Now we want to create a Persistant Effect which will allow us to offset a missed shot by a random x,y value from the intended target.

    • Add Effect ->
      • Name: "Poison Pistol - Persistent"
      • ID: Suggest
      • Effect Type: Create Persistent
    • Now edit the persistent:
      • Effect - Flags = Random Offset (checked)
      • Effect - Height Map = Ground
      • Effect - Period Effects = Add Value -> Poison Pistol - Launch
      • Effect - Period Offsets = ((1.5,0,0)|(0,1.5,0)|(-1.5,0,0)|(0,-1.5,0)|(1.06,1.06,0)|(1.06,-1.06,0)|(-1.06,1.06,0)|(-1.06,-1.06,0)) X,Y coordinates for where you want your shots to land if they miss. In my case, I want shots that miss to go a certain radius from the intended target. Since we can't have a random value around a radius, we have to input the offsets manually which means it's time for some math. You can accept these values to do 8 points on a circle of radius 1.5 or read this spoiler for the explanation and how to do a custom radius.
      • Target - Location + (None):Target Unit/Point (We want the target location to be at our offset)
      • Target - Location Offset - End + (None):Target Unit/Point
      • Target - Location Offset - Start + (None):Target Unit/Point


    How to get the x,y coordinates for a given radius at a given angle: A detailed explanation is available at http://en.wikipedia.org/wiki/Circle#Cartesian_coordinates For our calculations, we will use some simple trigonometric functions - point x = radius * cos(angle) point y = radius * sin(angle)

    The angle always starts with a line from the center to the right side with an angle of 0 degrees and moves counter-clockwise.
    90 degrees is to the top, 180 degrees to the left side, and 270 degrees to the bottom. Any angle in-between those 90 degree increments can be interpolated.

    The radius is how far from the original target unit you want the projectile to deviate. In my example, I want a radius of 1.5, so let's calculate some points.
    x = 1.5 * cos(0) = 1.5
    y = 1.5 * sin(0) = 0
    So our first point will be (1.5, 0) which is the right side of the circle. To get the left side we just flip that and have (-1.5, 0).
    For the top and bottom point we get:
    x = 1.5 * cos(90) = 0
    y = 1.5 * sin(90) = 1.5
    Our next points will be (0,1.5) and (0,-1.5) for the top and bottom points.
    Let's also do the diagonals of the circle.
    x = 1.5 * cos(45) = 1.06
    y = 1.5 * sin(45) = 1.06
    So from this, the top right diagonal of the circle is (1.06,1.06). We can then assume that the left diagonal is (-1.06,1.06). Do you see the pattern yet?

    Once you have all of your desired strike points calculated ( you can go in as small increments as you want. For this we will only do increments of 45 degrees).


    5. Now we want to create a Set Effect that will allow us to randomly choose between a hit or miss.

    • Add Effect ->
      • Name: "Poison Pistol - Attack"
      • ID: Suggest
      • Effect Type: Set
    • Now edit the set:
      • Effect - Effects: Add both the "Poison Pistol - Damage" and "Poison Pistol - Persistent" (In my case, I want a 66% chance to miss and a 33% chance to hit, so I add 1 damage value and 2 miss values. This can be tweaked to your wanted hit/miss percentage.)
      • Effect - Maximum Count = 1
      • Effect - Minimum Count = 1 (We always want a single effect chosen.)
      • Effect - Random = Enabled (Choose one effect at random.)

    6. Now we want to add our new hit/miss to an actor to have the launch animations happen.

    • Go to Actor tab and select "Hydralisk Attack"
      • Set Token - Attack Effect = "Poison Pistol - Attack"
      • Set Token - Impact Effect = "Poison Pistol - Search"
      • Set Token - Launch Effect = "Poison Pistol - Launch"

    7. Now we want to edit our hydralisk weapon to use our attack set.

    • Go to Weapon tab and select "Hydralisk - Needle Spines"
      • Set Effect - Effect = "Poison Pistol - Attack"

    Test it

    At this point our system should be in place minus some minor tweaking with actors/animation. Go ahead and test it.

    If you have any problems, please post and I'll try to find help. I also welcome any feedback for how to make this better (tutorial or the system itself) so please leave a reply :)

    Demo video of the implemented system:

    Embed Removed: https://www.youtube.com/v/rIZEwD-lpRw?fs=1
    Posted in: Tutorials
  • 0

    posted a message on Attack animations for misses - Actor question

    @PsypherLocke: Go

    Never mind. I got it worked out :)

    Posted in: Data
  • 0

    posted a message on Attack animations for misses - Actor question

    I'm working on a hit/miss system where a hit damages the target and a miss searches a random area in a radius from the target for another target. I have that all working just fine and if the attack hits a new target, my launch/damage animations show up fine. The thing that I can't figure out is how to get a launch animation/damage animation to show up if my random miss location happens to not be a unit, like to have it hit the ground for instance.

    Anyone have thoughts for how to accomplish this in the data? Obviously since I'm using a search, it will only trigger a launch if it finds a unit so if I'm not finding a unit, the actor won't kick off.

    Attached is my test map for a simple hydralisk you can look at if you want a better idea what i'm talking about. I plan on making a tutorial for this system once I get it working properly, so if you can help, you'll get credit as well :)

    Posted in: Data
  • 0

    posted a message on [Data] Hit Crit Miss

    @FrozenFirebat: Go

    Interesting stuff. I tried out the steps above but wasn't able to get the persistant to work right. Even with a single damage effect, it never did damage.

    I'm working on a system to allow not only hits and misses, but when it misses to detect a unit, wall, etc. within a defined radius of the intended target and apply damage there. I believe this can be done with a trigger, but I haven't found anything in the data that would allow me to do that.

    My thought is: 1. Check for hit or miss using RNG 2. if hit, apply damage effect 3. if miss 3a. get radius of weapon (local variable) 3b. create a projectile that moves instantly in a random x,y from the intended target and attach a region to it. 3c. check if region collides at new location with a unit, if so apply damage if hostile 3d. display animation for where the hit happened.

    In my case there should only be about 5 players attacking at any given time so I don't believe this will lag things too much. If I can get it to work right I will post my results and how to do it.

    Anyone have any luck with anything like this or any thoughts to my methodology? I'm new to SC2 editing myself.

    Posted in: Tutorials
  • 0

    posted a message on Looking for Data Editors to join Magic.Inc!

    I might be able to help out with the data editing.

    I've never done SC2 editing before, but I'm a computer scientist (Write C code for 8 hours a day) and have done lots of work with Neverwinter Nights 1 & 2 custom item design and such. I'm interested in getting started with some SC2 modding. It mights take me a week or so to get up to speed, but once I do I can usually churn things out. I'm also willing to help with triggering and such. Let me know if you're interested.

    Posted in: Team Recruitment
  • To post a comment, please or register a new account.