Staredit Network > Forums > Modding Discussion > Topic: Smartcasting
Nov 23 2012, 7:53 am
By: Raygoza  

Nov 23 2012, 7:53 am Raygoza Post #1

As far as I remember I've always wanted to smartcast in SC as it has been a pain to only select one of the spell casters and make it cast it's spell.
I get the feeling that every targettable spell should be smartcast as I cannot find a reason why not to.

And then some extra things that would be useful, if you somehow manage to get several building selected and start producing units I'd like that only one building at the time responded to the command.

At least this is the case of the zerg larva, everyone takes the order but if you do not have enough resources for everyone the last ones in the selection wont be able to morph, I find this indicating soemthing, as SC doesn't randommize those you can afford in your info panel but actually goes from firt selected to last selected as far as resources or supply goes.

I find this meaning that some part of the smartcasting mechanics already exist, what has to be done is that every targettable spell only orders one spell caster at the time starting with the first one in the selection panel and if that unit cannot the game would move on to the next that is able, if none are able then you could get the message "Not enough energy".

What are your opinions about introducing smartcasting and how to make it possible?


Nov 23 2012, 9:32 am TF- Post #2


If you understand the game code then it's probably not too hard, something like:

1. make a new unit pool from the player's selection
2. remove units that don't have enough energy to cast from that pool
3. pick the closest unit to the targeted point from that pool (this might need some pathing cost calculation for accuracy)
4. give the cast order to that unit only


Nov 23 2012, 10:18 pm Raygoza Post #3

When you mean exclude units with not enough energy to cast the spell, it would also exclude units without energy which are in the same selection at that time?

By the way. an other thing that may be relevant.
Could you somehow increase the selection limit even if you wont get every unit displayed in the panel?
if so when Spell/Abilities are adressed will those units outside the info panel also receive those orders?
Will they be able to receive move, attack and move attack orders?
this is important as you sometimes need to move larger amount of units across the map.

Now something partially related
If smartcasting is included I'd like to put buildings in selection groups as well like comsat station's, this would require to be able to select multiple buildings, is this possible to do without removing the building definition in datedit?
If so you should not be able to select buildings and units together (this blocking function seems to already exist, though you cannot select a building and anything else at the same time anyway so it's not confirmed).

Also if this is possible how would you be able to introduce smartcasting to multiple buildings while having them selected, larvas included in this case, (this way you select one by one what it will do)
One larva at the time will get a mutate order or a production building at the time would get a production order.
Then there are things of the same nature which shouldn't be smartcast like building interceptors and scrabs, what solution do you suggest?


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:54 pm]
Suicidal Insanity -- congrats
[2020-7-08. : 5:07 pm]
jjf28 -- o nice
[2020-7-08. : 5:00 pm]
Oh_Man -- the korean translation is finally complete, bloody hell, what a mission
[2020-7-08. : 11:29 am]
Christien Chapman -- I wish I could help
[2020-7-08. : 11:29 am]
Christien Chapman -- Ok
[2020-7-08. : 11:28 am]
Christien Chapman -- O
[2020-7-07. : 8:03 pm]
No-Name-Needed-II -- If anyone who moderates this site is listening, I've been trying to recover my No-Name-Needed account but I've lost track of my email and pass word for it when my old computer crashed.
[2020-7-07. : 4:25 pm]
Apos -- green
[2020-7-07. : 3:03 pm]
lil-Inferno -- ya
[2020-7-07. : 1:15 am]
RdeRenato -- xd
Please log in to shout.

Members Online: Roy