Hello everyone, Zack here, after a long recess of starcraft 2 editing I decided to come back with the recent patch to joining custom games. It's a hell of alot easier to host and find games so I feel it's about time for me to return to focus on my map.
At any rate in the brink of all the inspiration I've had from all the idea's I've seen I feel that the alot of the idea's I have are over my head for figuring out on my own. So I have decided to cast aside my pride request some assistance here.
Now for the concept, on my Civilization (stylish) map I decided I want military units that the players control to be in a more controlled unit, I don't want players having billions of units scattered around the entire map, at least not in the way Starcraft handles it by default.
The concept I want is for the military units to have to stay joined together in a single army, and they all have to follow the army in a cohesive squad. For references think about the squads in company of heroes, dawn of war 2, or even the army stacks in civilization. The way I have it impictured is, players will create an army (which acts as a flag holder, or leader) and then they train the troops that compose of that army. If the troops are trained without their leader they stay uncommandable near their barracks until enlisted by a leader. Obviously the amount of leaders a player can control is limited depending on their research so this is where it comes into purpose.
When the troops join the army, I want them to follow them around, I have a general follow effect in testing now from the tutorials I've seen here but I'm still getting it to work the way I want. I want the troops the sort of follow the leader from behind or just hug them if fully necessary. Basically the Army is the only thing the player has control over at the moment, all the troops are uncommandable and simply follow the leader.
Then when the army encounters an enemy army or something of similar, both army becomes unmoveable (but still commandable for abilities) and it's army becomes commandable and fighting then occurs between the two armies. The troops in both armies cannot stray too far away from the battlefield, which is determined by a area created around both of the army leaders (I have not decided the shape yet so it might just be circular, nor have I created the code that keeps them from straying)
While the armies are in turn fighting like this the leaders or basically flag holders have abilities that can change the fight, they can either engage another enemy army that might be within engagement range, or they can call to retreat, which is an attempt to break away from the fight and flee (at a cost)
The reason I want to have this over the top setup is to keep combat in a more controlled and dramatic setup. I have plans to code in flanking, where an army is engaged from 2 separate sides, such as from east and west, or from north and south. I also have plans to create ambush's, where the flag holder can literally turn themselves and their army invisible in preparation for an enemy advance, ambush the enemy army causing them to temporarily lose vision and control due to being surprised.
So, the resources I have for making this are completely open, I am willing to use data, trigger, and a combination of both in making this concept. My map is designed with an indexing system, so I can store variables on individual units if I really need too, however I'm hoping someone has a simple way of doing this, or at least can help me get all of the easy parts out of the way so I can focus on the parts that truly need the attention. (I want to avoid making a trigger for something that could be made extremely easy in the data editor.)
And once again, thank you everyone at SC2Mapster for your help, you've been great at helping me before and I'm glad to be part of this community.
I've actually completed a Dawn of War style squad system for a map I'm working on, so I have a piece of the puzzle. I think your map concept sounds pretty cool, there aren't very many original PvP strategy game concepts on bnet right now, or it doesn't feel that way to me.
I don't think you'd find a data-only solution that would be complete and good. I've looked at some ways to accomplish this sort of thing with data and it seems to me that organizing groups of units like this just seems saner when done with triggers. Everything you've mentioned sounds really straightforward to do with triggers. You could use data if you just want your units to travel in a group, I imagine there'd be a way to have the units issue an order at their commander to follow him, but you can run into some outside cases where units get stuck on one another and things like that that would probably be easier to handle with triggers, possibly a combination.
The way I'd do it with a trigger-based core, based on my experiences creating a squad-command system: you want to create a very large unit group array. Have a trigger give every commander-type unit a Custom Value, which for internal purposes will be the commander's unit group's ID number. When a unit falls under the leadership of a commander, get the commander's custom value, and place it in the appropriate address in the unit group array, and also give those units the custom value as well just so you have an easy way to figure that out.
Once you have the units in groups, you need a way to make them cohere as a unit. The major issue I can think of off the top of my head is - how large are these units? Having the units maintain a visually pleasing coherency is a different task depending on if they're units of 4-6 or 40-60. The most straightforward way is to just have the units follow the commander - literally issue a follow order. Give them a behavior to make them uncommandable and all that. This could be a real clusterf@#$ though with lots of units that travel at different speeds, or with too many units. The way I do my squads is when a unit receives orders, I use a slightly weird process to copy-paste the command units orders to the followers; you could do something similar with move orders. It's the sort of thing you just have to mess with until you get good results.
Everything else is just a matter of applying and removing behaviors.
I think generally its a good idea even if you use data in this way to keep the units in unit groups and keep track of them that way as a back up system. You could do something, for example, like put a "Rally Unit" button, and then when that ability is activated, call a trigger that rubber bands all the units to their commander. Another good thing to do would be to have a trigger that, when a battle starts, makes sure all the appropriate units are present and accounted for.
I think your biggest challenge is going to be aesthetic, and making these theoretical ideas actually play well in practice, the mechanics are pretty straightforward, however you do it.
I've actually completed a Dawn of War style squad system for a map I'm working on, so I have a piece of the puzzle. I think your map concept sounds pretty cool, there aren't very many original PvP strategy game concepts on bnet right now, or it doesn't feel that way to me.
I don't think you'd find a data-only solution that would be complete and good. I've looked at some ways to accomplish this sort of thing with data and it seems to me that organizing groups of units like this just seems saner when done with triggers. Everything you've mentioned sounds really straightforward to do with triggers. You could use data if you just want your units to travel in a group, I imagine there'd be a way to have the units issue an order at their commander to follow him, but you can run into some outside cases where units get stuck on one another and things like that that would probably be easier to handle with triggers, possibly a combination.
I agree, even though I posted this in the data forum I felt it might have actually fit better in the trigger forum, but the only reason I went through with posting is because the data editor is more foreign to me so I felt the Data forum would offer me some more research on the parts of the tool. Though I agree even while I was typing up this post I realized inevitably the complexity of my army design would be much easier to manage if it was trigger driven.
The way I'd do it with a trigger-based core, based on my experiences creating a squad-command system: you want to create a very large unit group array. Have a trigger give every commander-type unit a Custom Value, which for internal purposes will be the commander's unit group's ID number. When a unit falls under the leadership of a commander, get the commander's custom value, and place it in the appropriate address in the unit group array, and also give those units the custom value as well just so you have an easy way to figure that out.
Allow me to enlighten you on a technique I use that is actually alot easier to work with, currently my map has an indexing system that allows me to essentially set local variables on to anything, more importantly units. Basically every single unit in the game has a serial number, and that serial number can be referenced in triggers to get specific values related to that exact unit. Each data table entry basically needs a name, the way index each value is to have the name be the unit's unique ID, then after the unique ID I put whatever string I want to act as a name for the variable, essentially creating a local variable on that unit!
This is the current idea that I have in theory, I am intending to have the commander units have a certain way to add and remove units from their army. When a unit is added to the commanders army, I have the trigger first create a Unit Group if the commander hasn't one already, and store it in a data table. Then whenever the commander needs to add a unit to it's army, the commander would just use it's recruit skill on a unit, and the trigger would find the commanders unit group in the data table, and simply add the unit to that unit group.
Example: Army 1 has the unique ID of 106. When it's created it is given it's own unit group, this unit group is stored in the global data table, under the name of "106army" using the function "UnitGetPropertyInt(u, 9000, c_unitPropCurrent);" Or I simplified into it's own little custom function
The army then desides to add units to it's army, each time it does the "106army" is loaded from the data table, units are added, then it gets saved in the data table again.
Here's a rough draft of how I would have my army recruitment skill work on the most basic of level.
@Zackreaver: Go
Once you have the units in groups, you need a way to make them cohere as a unit. The major issue I can think of off the top of my head is - how large are these units? Having the units maintain a visually pleasing coherency is a different task depending on if they're units of 4-6 or 40-60. The most straightforward way is to just have the units follow the commander - literally issue a follow order. Give them a behavior to make them uncommandable and all that. This could be a real clusterf@#$ though with lots of units that travel at different speeds, or with too many units. The way I do my squads is when a unit receives orders, I use a slightly weird process to copy-paste the command units orders to the followers; you could do something similar with move orders. It's the sort of thing you just have to mess with until you get good results.
Everything else is just a matter of applying and removing behaviors.
I think generally its a good idea even if you use data in this way to keep the units in unit groups and keep track of them that way as a back up system. You could do something, for example, like put a "Rally Unit" button, and then when that ability is activated, call a trigger that rubber bands all the units to their commander. Another good thing to do would be to have a trigger that, when a battle starts, makes sure all the appropriate units are present and accounted for.
I think your biggest challenge is going to be aesthetic, and making these theoretical ideas actually play well in practice, the mechanics are pretty straightforward, however you do it.
The pathing at which the units follow the commander is one of the major things I'm here on the forum for, I'm hoping to find some way to make it not a clusterfk, though again I don't even know the scale of how big the armies are going to be, they might not even be that much larger than 20 units per army. As for the speeds, I'm going to have the units all share the same exact speed while following the commander, only changing speeds when they engage in combat, essentially just because an army has motorcycles and jeeps that move several times faster than the tanks, everyones going to stay together until they get deployed.
But generally, the units following behind are merely there for the purpose of cosmetics, essentially I was going to have them all stored in the army like a transport, but then I realized there are plenty of tools available to make the armies more visually realistic. But on the basic sense, the units location while following makes no different, everything will be dependant on the location of the armies leader. When the army actually engages in combat, all of the units essentially get moved instantly near the commander where the player then can assume control of them. The purpose of the army trailing behind the army to begin with, is to give other players a visual understanding of what they are about to face. Also I think it would be cool to watch a massive army slowly traverse across the map towards their destination, with the enemy discovering it and cowering in fear at the sight, panicking to prepare for it, or setup an ambush for it.
But your right, the hardest part will be the aesthetics, making these complex systems all becomes pointless if the execution doesn't bring about the entertaining result. The whole concept is to basically grant players a strategic level of army customization and placement. Also when the battles occur I want the end result to be controlled more by the players tactics rather than their reflexes. The battles will involve some moments of heavy micromanagement, but won't require massive amounts of hotkey mashing.
Simply put, I'm trying to make the game sort of play like an RTS version of civilization with battles that play like in Company of Heroes or Dawn of War 2.
Also on a quick note, my primary goal is to avoid creating systems that effect system performance. In other words, if my idea with indexing Unit Groups causes lag, I would like to know which methods would be more cost effective with resources.
Basically it's a question of what lags more, 50 unit groups with 10 units in each? 1 unit group with 500 units? Or an does an array of units cause more or less lag than a unit group? These are things I won't know until it's already in my map, regardless I want to try and use the most efficient method if I can.
Hello everyone, Zack here, after a long recess of starcraft 2 editing I decided to come back with the recent patch to joining custom games. It's a hell of alot easier to host and find games so I feel it's about time for me to return to focus on my map.
At any rate in the brink of all the inspiration I've had from all the idea's I've seen I feel that the alot of the idea's I have are over my head for figuring out on my own. So I have decided to cast aside my pride request some assistance here.
Now for the concept, on my Civilization (stylish) map I decided I want military units that the players control to be in a more controlled unit, I don't want players having billions of units scattered around the entire map, at least not in the way Starcraft handles it by default.
The concept I want is for the military units to have to stay joined together in a single army, and they all have to follow the army in a cohesive squad. For references think about the squads in company of heroes, dawn of war 2, or even the army stacks in civilization. The way I have it impictured is, players will create an army (which acts as a flag holder, or leader) and then they train the troops that compose of that army. If the troops are trained without their leader they stay uncommandable near their barracks until enlisted by a leader. Obviously the amount of leaders a player can control is limited depending on their research so this is where it comes into purpose.
When the troops join the army, I want them to follow them around, I have a general follow effect in testing now from the tutorials I've seen here but I'm still getting it to work the way I want. I want the troops the sort of follow the leader from behind or just hug them if fully necessary. Basically the Army is the only thing the player has control over at the moment, all the troops are uncommandable and simply follow the leader.
Then when the army encounters an enemy army or something of similar, both army becomes unmoveable (but still commandable for abilities) and it's army becomes commandable and fighting then occurs between the two armies. The troops in both armies cannot stray too far away from the battlefield, which is determined by a area created around both of the army leaders (I have not decided the shape yet so it might just be circular, nor have I created the code that keeps them from straying)
While the armies are in turn fighting like this the leaders or basically flag holders have abilities that can change the fight, they can either engage another enemy army that might be within engagement range, or they can call to retreat, which is an attempt to break away from the fight and flee (at a cost)
The reason I want to have this over the top setup is to keep combat in a more controlled and dramatic setup. I have plans to code in flanking, where an army is engaged from 2 separate sides, such as from east and west, or from north and south. I also have plans to create ambush's, where the flag holder can literally turn themselves and their army invisible in preparation for an enemy advance, ambush the enemy army causing them to temporarily lose vision and control due to being surprised.
So, the resources I have for making this are completely open, I am willing to use data, trigger, and a combination of both in making this concept. My map is designed with an indexing system, so I can store variables on individual units if I really need too, however I'm hoping someone has a simple way of doing this, or at least can help me get all of the easy parts out of the way so I can focus on the parts that truly need the attention. (I want to avoid making a trigger for something that could be made extremely easy in the data editor.)
And once again, thank you everyone at SC2Mapster for your help, you've been great at helping me before and I'm glad to be part of this community.
@Zackreaver: Go
I've actually completed a Dawn of War style squad system for a map I'm working on, so I have a piece of the puzzle. I think your map concept sounds pretty cool, there aren't very many original PvP strategy game concepts on bnet right now, or it doesn't feel that way to me.
I don't think you'd find a data-only solution that would be complete and good. I've looked at some ways to accomplish this sort of thing with data and it seems to me that organizing groups of units like this just seems saner when done with triggers. Everything you've mentioned sounds really straightforward to do with triggers. You could use data if you just want your units to travel in a group, I imagine there'd be a way to have the units issue an order at their commander to follow him, but you can run into some outside cases where units get stuck on one another and things like that that would probably be easier to handle with triggers, possibly a combination.
The way I'd do it with a trigger-based core, based on my experiences creating a squad-command system: you want to create a very large unit group array. Have a trigger give every commander-type unit a Custom Value, which for internal purposes will be the commander's unit group's ID number. When a unit falls under the leadership of a commander, get the commander's custom value, and place it in the appropriate address in the unit group array, and also give those units the custom value as well just so you have an easy way to figure that out.
Once you have the units in groups, you need a way to make them cohere as a unit. The major issue I can think of off the top of my head is - how large are these units? Having the units maintain a visually pleasing coherency is a different task depending on if they're units of 4-6 or 40-60. The most straightforward way is to just have the units follow the commander - literally issue a follow order. Give them a behavior to make them uncommandable and all that. This could be a real clusterf@#$ though with lots of units that travel at different speeds, or with too many units. The way I do my squads is when a unit receives orders, I use a slightly weird process to copy-paste the command units orders to the followers; you could do something similar with move orders. It's the sort of thing you just have to mess with until you get good results.
Everything else is just a matter of applying and removing behaviors.
I think generally its a good idea even if you use data in this way to keep the units in unit groups and keep track of them that way as a back up system. You could do something, for example, like put a "Rally Unit" button, and then when that ability is activated, call a trigger that rubber bands all the units to their commander. Another good thing to do would be to have a trigger that, when a battle starts, makes sure all the appropriate units are present and accounted for.
I think your biggest challenge is going to be aesthetic, and making these theoretical ideas actually play well in practice, the mechanics are pretty straightforward, however you do it.
I agree, even though I posted this in the data forum I felt it might have actually fit better in the trigger forum, but the only reason I went through with posting is because the data editor is more foreign to me so I felt the Data forum would offer me some more research on the parts of the tool. Though I agree even while I was typing up this post I realized inevitably the complexity of my army design would be much easier to manage if it was trigger driven.
Allow me to enlighten you on a technique I use that is actually alot easier to work with, currently my map has an indexing system that allows me to essentially set local variables on to anything, more importantly units. Basically every single unit in the game has a serial number, and that serial number can be referenced in triggers to get specific values related to that exact unit. Each data table entry basically needs a name, the way index each value is to have the name be the unit's unique ID, then after the unique ID I put whatever string I want to act as a name for the variable, essentially creating a local variable on that unit!
This is the current idea that I have in theory, I am intending to have the commander units have a certain way to add and remove units from their army. When a unit is added to the commanders army, I have the trigger first create a Unit Group if the commander hasn't one already, and store it in a data table. Then whenever the commander needs to add a unit to it's army, the commander would just use it's recruit skill on a unit, and the trigger would find the commanders unit group in the data table, and simply add the unit to that unit group.
Example: Army 1 has the unique ID of 106. When it's created it is given it's own unit group, this unit group is stored in the global data table, under the name of "106army" using the function "UnitGetPropertyInt(u, 9000, c_unitPropCurrent);" Or I simplified into it's own little custom function
The army then desides to add units to it's army, each time it does the "106army" is loaded from the data table, units are added, then it gets saved in the data table again.
Here's a rough draft of how I would have my army recruitment skill work on the most basic of level.
The pathing at which the units follow the commander is one of the major things I'm here on the forum for, I'm hoping to find some way to make it not a clusterfk, though again I don't even know the scale of how big the armies are going to be, they might not even be that much larger than 20 units per army. As for the speeds, I'm going to have the units all share the same exact speed while following the commander, only changing speeds when they engage in combat, essentially just because an army has motorcycles and jeeps that move several times faster than the tanks, everyones going to stay together until they get deployed.
But generally, the units following behind are merely there for the purpose of cosmetics, essentially I was going to have them all stored in the army like a transport, but then I realized there are plenty of tools available to make the armies more visually realistic. But on the basic sense, the units location while following makes no different, everything will be dependant on the location of the armies leader. When the army actually engages in combat, all of the units essentially get moved instantly near the commander where the player then can assume control of them. The purpose of the army trailing behind the army to begin with, is to give other players a visual understanding of what they are about to face. Also I think it would be cool to watch a massive army slowly traverse across the map towards their destination, with the enemy discovering it and cowering in fear at the sight, panicking to prepare for it, or setup an ambush for it.
But your right, the hardest part will be the aesthetics, making these complex systems all becomes pointless if the execution doesn't bring about the entertaining result. The whole concept is to basically grant players a strategic level of army customization and placement. Also when the battles occur I want the end result to be controlled more by the players tactics rather than their reflexes. The battles will involve some moments of heavy micromanagement, but won't require massive amounts of hotkey mashing.
Simply put, I'm trying to make the game sort of play like an RTS version of civilization with battles that play like in Company of Heroes or Dawn of War 2.
Also on a quick note, my primary goal is to avoid creating systems that effect system performance. In other words, if my idea with indexing Unit Groups causes lag, I would like to know which methods would be more cost effective with resources.
Basically it's a question of what lags more, 50 unit groups with 10 units in each? 1 unit group with 500 units? Or an does an array of units cause more or less lag than a unit group? These are things I won't know until it's already in my map, regardless I want to try and use the most efficient method if I can.