Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] CPU Owned Infested Kerrigan & Spell Casting
[SOLVED] CPU Owned Infested Kerrigan & Spell Casting
This topic is locked. You can no longer write replies here.
Nov 2 2011, 10:04 pm
By: RuiN  

Nov 2 2011, 10:04 pm RuiN Post #1



I have attempted to use Infested Kerrigan's spells through a Computer player with no success. I have read that Heroes won't always cast spells properly and I'm also aware that they react differently to threats than normal enemy units do.

Any information toward enabling Computer usage of Infested Kerrigan's spells would be greatly appreciated, especially if it entails that of Psionic Storm or Ensnare. Thanks in advance.



None.

Nov 2 2011, 10:16 pm Dem0n Post #2

ᕕ( ᐛ )ᕗ

Don't hero units not have an AI or something, so they won't use spells?




Nov 2 2011, 10:18 pm Lanthanide Post #3



Hero units never cast spells, except Cloak which isn't treated as a spell by the computer, but rather a special type of attack that they automatically use defensively after they have been attacked.



None.

Nov 2 2011, 10:40 pm RuiN Post #4



Lanthanide, thank you for your response. However, is there anywhere with explanation or further intel as to this?
Quote
"Hero units never cast spells"
It is oddly unnecessary and contradictory to think that Blizzard should program a unit to have such spells and at the same time deem these actions as unavailable... it seems, in my mind, there must be some quirk or control behind it, such as the HP requirements of a Computer Casting of Blind or Ensnare (HP required for CPU Blind: 81, HP required for CPU Ensnare: 250).
Additional: I do realize that this example is specific to non-hero units and that Computer-owned hero units are the distinction here.

If anyone else has further information, feel free to Private Message me in the event that this topic is closed. Admin/GM, I hope that you'll treat this topic as unsolved. Unfortunately, the question remains...



None.

Nov 2 2011, 11:01 pm Lanthanide Post #5



Hero units have separate AI compared to all other regular units.

For example, once a hero unit has decided to attack a specific enemy unit, it will continue chasing that unit until it is dead. This is the basis for such maps as "protect bob" where infested kerrigans chase a civilian unit forever and never stop.

Heroes also have special consideration in other areas too - CPU controlled Dark Archons will never cast Mind Control on them, Queens will never cast Broodling on them etc. This makes sense from a single-player perspective where heroes are used - having a Queen broodling your Raynor marine is kinda crappy, for example. The fact that hero units are only used in single player controlled by humans, or in cinematic cutscenes, is probably another reason why the hero units don't have any spell-casting AI.

Here's a thread by Heinerman where he dug into the starcraft code to find out how different abilities are triggered: http://www.staredit.net/topic/13823/ You'll note at the start he says "Heroes cannot use abilities except for cloak".

Quote
It is oddly unnecessary and contradictory to think that Blizzard should
If you think that's the oddest and contradictory thing about Starcraft map-making, then you clearly don't have much experience in it.

IMO this thread should be locked. CPU hero units can't cast spells and that's all there is to it. I wish there was a way to make them use spells but there simply isn't.



None.

Nov 3 2011, 12:05 am Heinermann Post #6

SDE, BWAPI owner, hacker.

There isn't any switch that you can turn on and off either. They are just not programmed to use abilities. Cloak and burrow are treated as GLOBAL abilities and are not part of this system.




Nov 4 2011, 5:18 am RuiN Post #7



Quote
If you think that's the oddest and contradictory thing about Starcraft map-making,

I never said this. However, I will remind you that I was referring to this topic, which is dedicated solely to this issue; hence, that it is odd and contradictory for the units to have been given the spells and not be allowed to use them. Your speculation behind the Single Player was clever and I might agree that, especially had you not spoken so condescingly and troll-like; however, the map in implication is not a single player map, so for my purposes it remains a waste to have abilities and not have any control over them. Your initial response was meager and even with this conclusively interesting idea of Single Player, I still don't discard the possibility that some potential control switch exists, given the expansive amount of quirks that Broodwar Mapmaking has.

@Heinermann: You speak as though you're certain, and the only helpful information I've ascertained from Lanthanide's brash post seems to be based upon your research.
Q) When you say the heroes aren't "programmed" to cast, that would mean that non-hero units are programmed to cast. What would need to be changed to make heroes reflect the properties of non-heroes spell casting abilities? & is there anywhere else you could point me beyond your Definitions thread to further explain why this is an impossibility?



None.

Nov 4 2011, 5:52 am Roy Post #8

An artist's depiction of an Extended Unit Death

Quote from RuiN
I never said this. However, I will remind you that I was referring to this topic, which is dedicated solely to this issue; hence, that it is odd and contradictory for the units to have been given the spells and not be allowed to use them. Your speculation behind the Single Player was clever and I might agree that, especially had you not spoken so condescendingly and troll-like; however, the map in implication is not a single player map, so for my purposes it remains a waste to have abilities and not have any control over them. Your initial response was meager and even with this conclusively interesting idea of Single Player, I still don't discard the possibility that some potential control switch exists, given the expansive amount of quirks that Broodwar Mapmaking has.
There was no need for Blizzard to design any AI spells for these hero units, as when heroes were used they were almost always only human controlled (and in the instances they were not, they certainly weren't doing anything fancy). Hero units are recognized as entirely separate units than their regular unit counterparts, and just because the normal unit has implementation does not grant any correlation for the hero version to have similar implementation.

You seem to be optimistically assuming that because the heroes were given these abilities, Blizzard designed or at the very least duplicated the AI behaviors from the original units.

Quote from RuiN
What would need to be changed to make heroes reflect the properties of non-heroes spell casting abilities?
You'd need to create a mod for SC, since as it currently is, heroes will not cast abilities when there is no existing implementation to do so. Furthermore, there is apparently no way to add this implementation through the features of a map editor. You can read up some threads in the modding section if the option of modding is desirable to you.




Nov 4 2011, 12:44 pm rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

I wonder if you could give her the queen and high temlpar AIs by simply flipping a switch somewhere in memory...



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Nov 4 2011, 1:21 pm TiKels Post #10



Do you think it'd be possible with EUD actions to change the sprites, audio, and other things from, say, a regular ghost to a kerrigan ghost, thereby simulating a different unit?

It'd still require 3rd party programs.



"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

-NudeRaider

Nov 4 2011, 2:21 pm Heinermann Post #11

SDE, BWAPI owner, hacker.

Quote from RuiN
@Heinermann: You speak as though you're certain, and the only helpful information I've ascertained from Lanthanide's brash post seems to be based upon your research.
Q) When you say the heroes aren't "programmed" to cast, that would mean that non-hero units are programmed to cast. What would need to be changed to make heroes reflect the properties of non-heroes spell casting abilities? & is there anywhere else you could point me beyond your Definitions thread to further explain why this is an impossibility?
I am certain. They're not programmed to cast because the casting function is like so:

Code
switch ( pUnit->getType() )
{
case UNI_T_GHOST:
 /* Perform spellcasting conditions/actions */
 break;
case UNIT_T_SCIENCEVESSEL:
 /* Perform spellcasting conditions/actions */
 break;
/* etc */
}

They are simply hardcoded to standard unit types and not heroes.
Actual raw decompilation:


You would have to modify ("hack") the assembly that Starcraft is compiled to.

In Starcraft 1.16.1 assembly, this function is found at 0x004A13C0,
Code
0x004A13C0 bool __userpurge AI_CastSpellBehaviour<eax>(CUNIT *pUnit<eax>, bool isAggressive)


I will not help you step-by-step with the hacking process.




Nov 4 2011, 2:39 pm FoxWolf1 Post #12



Quote from TiKels
Do you think it'd be possible with EUD actions to change the sprites, audio, and other things from, say, a regular ghost to a kerrigan ghost, thereby simulating a different unit?

It'd still require 3rd party programs.

Yes, this is possible. As an example, I've attached a Korean EUD action map that does a lot of that sort of unit simulation.

Attachments:
EUD Chaos Ver 2.7.scx
Hits: 1 Size: 429.67kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Zycorax, Roy