• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to get AI to use spell to "Charm" Invulnerable?

Status
Not open for further replies.
Level 14
Joined
Dec 12, 2009
Messages
1,027
In my map, I need a melee-style AI to target an invulnerable structure to capture it. I already have a spell set-up and installed to do that (based on Charm). I also know that the ability works (I can use it).

My problem is that the AI won't use the spell on the only thing it can target. I would prefer to not use a trigger that forces casting if the unit gets within range of the target - I can if I must. I've run a dozen or so tests and the AI won't co-operate...

I'm hoping another user here knows if I can edit gameplay constants or ability settings such that the AI recognizes it can use the spell.

Thanks,
//\\oo//\\
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Does said building have an attack?

If not then that's the answer. The AI doesn't recognise it as a threat and thus doesn't bother with charming it. I'm guessing this was implemented so the melee AI doesn't charm workers and such.

I'll try it, although the ability was initially reserved for workers and the AI would use it - very rarely though (only if worker was building something that can shoot, if memory serves)

I'm not too keen on implementing a DDS, since everything in the map ends up taking a lot of damage and fast.

=====================
Edit: Giving the attack seems to have worked! In my case the attack isn't really a problem (it's fitting, thematically).

Thanks for the suggestions!
//\\^^//\\
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This is not possible in WC3 as the AI is hardcoded. In SC2 you could just write a new tactical AI function and link it to the unit/ability data.

Your only option in WC3 is some kind of trigger based system that issues the order to charm to the unit targeting the appropriate structure. To minimize the performance impact of such tactical decisions you may want to only perform them when near such a structure (unit is within a region around it?) or to stagger them efficiently if periodic.

It appears you have gone with just using the standard tactical AI for Charm. As mentioned above, the AI uses Charm in response to certain events (in this case it is either damage, attacked or is acquired). It works, however you have been forced to modify your map to suit the game.
 

Deleted member 219079

D

Deleted member 219079

^Hm, you always talk about sc2 as a superior towards wc3. MAYBE, if Blizzard would have kept their balls and applied the micro transactions to Arcade section of starcraft, I would have had some interest in sc2 editor and actually made some effort to learn it. The reality is, the editor is so complex wc3 just-for-fun-modder won't see any interest in it. But, if you could have been able to make your map to be at certain prize tag to get some money out of sc2, it would be whole another story. This wouldn't mean you'd have to have some bank account attached to you sc2 profile, but you'd have the option to commercialize your arcade products, to fine some time you've used on the editor.

There's still Legacy of the Void coming around next year, which could save the general for-everyone modding aspect of sc2. To achieve it, they need to make some simplifying changes to the editor. I bought HotS for 40€, and the vanilla for 20€, after LotV I will have spent 100€ on a game I don't even play each month (I don't usually play games either, not my cup of tea), I'd like to see myself enjoying the editor then.

Here's a good picture for you to learn something from, dsg http://www.sc2mapster.com/media/attachments/17/487/EditorMeme_Sucks.jpg


The ability usage is based on order strings. There's NO way you could make AI use charm's string on invulnerable target. I don't know if it's even possible on buildings.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The ability usage is based on order strings. There's NO way you could make AI use charm's string on invulnerable target. I don't know if it's even possible on buildings.
He said it already works (he can cast it manually). As such triggers will also be able to cast it. The AI will not cast it even if they can purely because they only cast in response to certain stimuli in certain conditions.

Here's a good picture for you to learn something from, dsg
The editor is not complex at all. If you think it is complex go learn how to write android apps and tell me that is simpler than SC2E.
 

Deleted member 219079

D

Deleted member 219079

If you think it is complex go learn how to write android apps and tell me that is simpler than SC2E.
I'll try it as I happen to have eclipse installed and free sunday ahead of me.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Guys,

I'd prefer that both of you kept your programming challenge to PMs, that way any other users that have this issue don't read through SC2 stuff (not applicable, since this is WC3:TFT problem)...

@jonDream:
The AI will cast charm on invulnerable targets - in the OE the buildings are targeted as invulnerable, structure and the ability was set to target invulnerable, structure. The only problem was that the AI ignored my buildings because they lacked an attack - I added a minor attack and now the system is working the way I want it to.

//\\oo//\\
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I'd prefer that both of you kept your programming challenge to PMs, that way any other users that have this issue don't read through SC2 stuff (not applicable, since this is WC3:TFT problem)...
I always explain how it is done in both (keeping SC2 explanation as small as possible). This is to try and promote people to move to SC2 as a lot of people think the editor is harder than it actually is because they read the posts of a few loud mouth people who had no idea what they were doing.

The only problem was that the AI ignored my buildings because they lacked an attack - I added a minor attack and now the system is working the way I want it to.
A lot of AI abilities are based on attacks. For example curse will only be cast when you attack. Some abilities require more than 1 target to be used or maybe they perform some kind of damage predication to determine when to cast. AoE moves are most noticeable where some will virtually never be cast against single targets under some conditions. As mentioned before, these behaviours are sadly hard coded, you will have to emulate them using triggers which must be done with care (especially generic events) to avoid poor performance.
 
Status
Not open for further replies.
Top