Ability Script that is used against certain armour classes
#1
Posted 05 May 2006 - 04:55 AM
1) To create a script so that a special ability ONLY targets a specific armour class like vehicle_high or monster_high. In other words, a vehicle ability that is used to target enemy uber units rather than any other lower vehicle class. The rationale: to have the AI target ubers rather than waste the shot on lower classed units.
2) Like above, to create a script so that a special ability ONLY toggles itself ON when a certain specific enemy armour class is being engaged or simply around (ie. enemy commander is present or being attacked). This does come back to the Night_Shift SearchLight toggle so its probably not too difficult to solve.
Thanks everyone!
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#2
Posted 05 May 2006 - 06:19 AM
1) name the mod it should be used for and
2) learn some more lua.
"Da Scripta! Der Scripternator! Du Scriptolicious!" should be able to solve basic problems for himself.
I feel like doing the grunt work while our bonified cheerleader is taking the fame. No problem if it happens once in a while but it seems that you start this on a more regular basis. If you want to be the modders best AI friend, fine. But you should get your stuff together and just come up with real "advanced script" questions.
Sorry if I sound harsh but I feel a bit 'used' as a tool.
Just like a poor hacker in the dungeons of Microsoft while Bill 'Thudo' Gates sells the results
Thanks Thudo!
Edited by LarkinVB, 05 May 2006 - 08:00 AM.
#3
Posted 05 May 2006 - 01:07 PM
This isn't for any specific mod but just thinking forward on "what is coming". #1 will deal with class calls to "vehicle_high" and/or "monster_high" for use in ability.ai - still working up the details. #2 will be in the same .ai file I gather but it has to have self.CloseCommanderEnemy call to enable the toggled ability in the presence of a commander, for example.
The one thing I do at every corner is to ensure you guys are ALWAYS mentioned and credited for your work. Absolutely do I not ever say this is mine in any way. This baby is yours and the team. When something specific is coded/scripter then that person is ALWAYS "propped up" and given accolades for their work. For a quick example, with Night_Shift I insisted that those who were the main spearheads of the new code: yourself and FD were doely mentioned. I do not profess to be liek yourself or Arkhan but I completely respect you guys and the brilliance you achieve.
Sorry if it looks like I'm asking for scripts here and there - I do this to have the team think "outside the box" a little once and a while because what we're doing here will impact the larger community in a massive way. These are, really, AI community scripts that extend what we've built for these years (gawd.. time flies) to new avenues of functionality.
Thanks for all your support guys.. this project would be ziltch without such dedication.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#4
Posted 06 May 2006 - 09:16 AM
For a quick example, with Night_Shift I insisted that those who were the main spearheads of the new code: yourself and FD were doely mentioned.
I do not care if I'm mentioned with Night Shift mod. Really lame is that they don't credit our team at all in the 0.9.9 readme though several others are listed under "community cooperation".
EDIT: I pm'ed Palii and he said he just requested names from thudo to give credit. Better late than never.
Edited by LarkinVB, 06 May 2006 - 02:30 PM.
#5
Posted 06 May 2006 - 02:41 PM
The rationale for #1: a mod is coming that will have an uber unit with a MEGA CANNON that will only allow its special ability to target ONLY "vehicle_high" and "monster_high" classes. I'm just exploring the possibilities of being able to achieve this easily. Thanks guys!
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#6
Posted 06 May 2006 - 03:48 PM
Sorry if it looks like I'm asking for scripts here and there - I do this to have the team think "outside the box" ....
Well, your latest script question are 100% "inside the box".
#1 :
Use CpuManager:FindClosestEnemy( pos, range, functor )
pos is squad_ai:GetPosition(), range is squad_ai:GetAbilityRange(id) and functor is a filter by armor class, like this
local monster_high = function( squad_ai ) return squad_ai:GetStats():GetClass() == UnitStatsAI.UC_MonsterHigh end
Guess this will get you started doing #2 on your own.
Edited by LarkinVB, 06 May 2006 - 03:50 PM.
#7
Posted 02 October 2006 - 03:15 PM
Place in ability.ai
CloseMonsterEnemy = function( position, tolerance, count) functor = function( squad, count ) if (count == nil) then return false end return ((squad:GetStats():GetClass() == UnitStatsAI.UC_MonsterHigh or squad:GetStats():GetClass() == UnitStatsAI.UC_MonsterMed) and squad:GetNumTroopers() >= count) end local squad_ai = cpu_manager:GetClosestSquad( position, tolerance, functor ) return squad_ai end,
For use in the tactic file of the unit using the above:
Ability.DoAbility( self.squad_ai, <ability_id>, Ability.Filters.CloseMonsterEnemy, 1 )
Now we can have special abilities be targetted based on specific classes.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users