Staredit Network > Forums > Modding Discussion > Topic: Smartcasting
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?



None.

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?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:32 pm]
O)FaRTy1billion[MM] -- iirc the last byte in the TRIG is for more flags or something
[09:15 pm]
Wormer -- also, when I wear cartoon it turns off the dynamic lighting and doesn't turn it on when I switch back, maybe that kind of incompatibilities were the problem
[09:02 pm]
Suicidal Insanity -- Wormer
Wormer shouted: Pr0nogo THAT why it's impossible to switch that skin on the fly
My guess is GPU memory constraints
[09:02 pm]
Suicidal Insanity -- I think its 27 and padding
[09:01 pm]
Wormer -- Wormer
Wormer shouted: or the guide (http://www.starcraftai.com/wiki/CHK_Format#.22UNIT.22_-_Placed_Units) is wrong there and it should be u8[27] ?
the right link http://www.starcraftai.com/wiki/CHK_Format#.22TRIG.22_-_Triggers
[09:01 pm]
Wormer -- or the guide (http://www.starcraftai.com/wiki/CHK_Format#.22UNIT.22_-_Placed_Units) is wrong there and it should be u8[27] ?
[08:59 pm]
Wormer -- anybody knows why chk format has a list of 27 player group IDs (http://www.starcraftai.com/wiki/CHK_Format#List_of_Players.2FGroup_IDs), but TRIG section uses an array of 28 elements => suppose the last byte is padding as well?
[08:57 pm]
Wormer -- but it's actually possible to switch between cartoon and classic skin which is cool
[08:52 pm]
Wormer -- Pr0nogo
Pr0nogo shouted: they coded a new system in for it
THAT why it's impossible to switch that skin on the fly
[08:51 pm]
Pr0nogo -- i don't remember if it was because the old system was limited to only 2, or they didn't know how to increase it, or what
Please log in to shout.


Members Online: Pandut, Roy, DarkenedFantasies