I'm looking to implement some ship-to-ship combat that relies on a few factors outside of the normal game mechanics to determine damage - specifically ship "size" (implemented by relabeling attributes and assigning ships to be "Frigate", "Destroyer", "Cruiser" etc) and ship speed.
The ship speed part should reflect the current movement speed only however - a ship that is stationary at any point is simply a sitting duck. As many of the ships have fixed forward fire arcs and fire on the move, this makes good control more important.
The problem I'm having however is dynamically linking the behaviour that applies the armour buff to the current speed of the unit. In its simplest form, I'm aiming for;
Unit is attacked
Unit updates its armour value bonus to equal its current speed (not max speed)
Damage is calculated and applied
Ideally the bonus granted by speed would be visible, but I suspect that's going to be an unnecessarily intensive process for a "nice touch".
honestly .... structural integrity really doesnt improve with speed. The faster an object is moving in space the more likey a "smaller" particle is likely to tear through your hull........
create upgrade for the units called "ArmorFromSpeed" and set it so that the effect of the upgrade is improved armor
anyways depending on how many ships you plan to use I would start out by using a triggered system... that periodically checks say every 2 seconds... on how fast each players ship is moving, then do a calculation for how fast the ship is moving, after the calculation you can do a "set catalog field value" to adjust the armor increase from your custom upgrade. The "set catalog field value" requires you to specific which player it is for. So each players value you can different then the next
This might not work so well, if the player is intended to have a bunch of ships that get this movement speed to amor buff
Im sure you can do it in data but it may be extremely complicated.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
honestly .... structural integrity really doesnt improve with speed. The faster an object is moving in space the more likey a "smaller" particle is likely to tear through your hull........
It's not so much the structural integrity that's improving, but the armour value is being used to provide a mechanism to mitigate damage due to the difficulties of targeting a high speed opponent. Basically you hit them, but it's hard to land an optimal hit as you can't target specific areas of the vessel (shooting the hull instead of the engine or cockpit etc). The modeling isn't that detailed, but it does provide motivation to keep mobile at all times (the real aim). I may well rename "Armour" as "Defensive Value" at some point in the future to make that clearer though.
Quote:
[...] on how fast each players ship is moving, then do a calculation for how fast the ship is moving, after the calculation you can do a "set catalog field value" to adjust the armor increase from your custom upgrade. [...]
Thanks - that sounds a workable route, though I'm not familiar with Catalog Field Value Set and the description in the editor isn't immediately revealing - can you give me a clue as to how to use it? (I've checked the Wiki entry, but understanding little at first glance - I may be lacking some knowledge to follow what it's getting at...)
Im just wondering, in the data editor would it be possible to do this by creating the behavior that increases armor, and set a validator on disable that checks if the movement speed is less than a certain value? then just put the behavior on the units?
and you can add a bunch of behaviors for the various intervalls of speed
Im just wondering, in the data editor would it be possible to do this by creating the behavior that increases armor, and set a validator on disable that checks if the movement speed is less than a certain value? then just put the behavior on the units? and you can add a bunch of behaviors for the various intervalls of speed
That also might work very nicely... Will have a look at this too - thanks.
EDIT:
Just had a play with it - I now have a Viking (5 Max speed, 0.1 Acceleration for testing) that starts with 0 armour, then progresses to 5 as it passes each integer of movement speed (+1 armour every 10 seconds as it accelerates to full speed), then drops again as it stops. Pretty much exactly what I was after.
There is a ton of info on the site already about get/set catalog field values.
They can take a bit of work to get used to but they are a very powerfull way to implement stuff prior to working out a data method.
I would suggest searching for "set catalog" on sc2mapster. It gives you a ton of a results and it will take you some reading.
For a simple test I suggest you
create a new map
Pre place a marine on your map
Pre place enemy structure on map
Create a trigger that responds to user chat message "-armor #" where it uses the second word in the message as a value to insert into your marine's weapons's damage.
That might be beyond your knowledge but its a good debug trick to learn (the chat command thing)
Im sure you can figure it out by reading through alot of the info already on the site if you search for it
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
Make a set of +armor behaviors with a "validator - disable" of the appropriate validator, where the validators are of type Unit Compare Speed and have Unit: Source, Compare: Greater Than.
Give your units all of these behaviors.
Make a set of +armor behaviors with a "validator - disable" of the appropriate validator, where the validators are of type Unit Compare Speed and have Unit: Source, Compare: Greater Than. Give your units all of these behaviors.
Thanks - that's pretty much exactly what I ended up with after Cbasz95's response. Good to know I did it right though :)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm looking to implement some ship-to-ship combat that relies on a few factors outside of the normal game mechanics to determine damage - specifically ship "size" (implemented by relabeling attributes and assigning ships to be "Frigate", "Destroyer", "Cruiser" etc) and ship speed.
The ship speed part should reflect the current movement speed only however - a ship that is stationary at any point is simply a sitting duck. As many of the ships have fixed forward fire arcs and fire on the move, this makes good control more important.
The problem I'm having however is dynamically linking the behaviour that applies the armour buff to the current speed of the unit. In its simplest form, I'm aiming for;
Ideally the bonus granted by speed would be visible, but I suspect that's going to be an unnecessarily intensive process for a "nice touch".
Any suggestions of a tidy way to do it?
You could use a stacking behavior to modify your movement speed and armor bonus at once. Then you realize any movespeed modification with this buff.
honestly .... structural integrity really doesnt improve with speed. The faster an object is moving in space the more likey a "smaller" particle is likely to tear through your hull........
create upgrade for the units called "ArmorFromSpeed" and set it so that the effect of the upgrade is improved armor anyways depending on how many ships you plan to use I would start out by using a triggered system... that periodically checks say every 2 seconds... on how fast each players ship is moving, then do a calculation for how fast the ship is moving, after the calculation you can do a "set catalog field value" to adjust the armor increase from your custom upgrade. The "set catalog field value" requires you to specific which player it is for. So each players value you can different then the next
This might not work so well, if the player is intended to have a bunch of ships that get this movement speed to amor buff
Im sure you can do it in data but it may be extremely complicated.
It's not so much the structural integrity that's improving, but the armour value is being used to provide a mechanism to mitigate damage due to the difficulties of targeting a high speed opponent. Basically you hit them, but it's hard to land an optimal hit as you can't target specific areas of the vessel (shooting the hull instead of the engine or cockpit etc). The modeling isn't that detailed, but it does provide motivation to keep mobile at all times (the real aim). I may well rename "Armour" as "Defensive Value" at some point in the future to make that clearer though.
Thanks - that sounds a workable route, though I'm not familiar with Catalog Field Value Set and the description in the editor isn't immediately revealing - can you give me a clue as to how to use it? (I've checked the Wiki entry, but understanding little at first glance - I may be lacking some knowledge to follow what it's getting at...)
Im just wondering, in the data editor would it be possible to do this by creating the behavior that increases armor, and set a validator on disable that checks if the movement speed is less than a certain value? then just put the behavior on the units? and you can add a bunch of behaviors for the various intervalls of speed
That also might work very nicely... Will have a look at this too - thanks.
EDIT:
Just had a play with it - I now have a Viking (5 Max speed, 0.1 Acceleration for testing) that starts with 0 armour, then progresses to 5 as it passes each integer of movement speed (+1 armour every 10 seconds as it accelerates to full speed), then drops again as it stops. Pretty much exactly what I was after.
Thanks a lot.
There is a ton of info on the site already about get/set catalog field values.
They can take a bit of work to get used to but they are a very powerfull way to implement stuff prior to working out a data method.
I would suggest searching for "set catalog" on sc2mapster. It gives you a ton of a results and it will take you some reading.
For a simple test I suggest you
Im sure you can figure it out by reading through alot of the info already on the site if you search for it
Thanks - I'd checked out the wiki prior to posting, but using the search term you suggested proved somewhat more enlightening.
What CBasz95 suggested led to a data solution for this issue, but I'll take a good look at the Catalog-values for future reference.
@Vehem: Go
Make a set of +armor behaviors with a "validator - disable" of the appropriate validator, where the validators are of type Unit Compare Speed and have Unit: Source, Compare: Greater Than. Give your units all of these behaviors.
Example Behavior (Buff):
Example Validator (Unit Compare Speed):
Thanks - that's pretty much exactly what I ended up with after Cbasz95's response. Good to know I did it right though :)