Jump to content


Photo

The Markus-is-Modding Thread


133 replies to this topic

#1 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 17 March 2010 - 05:40 AM

I don't know how this is even possible.

I added a new ability to one of the infantry units. After I made a note of it in the tactics for infantry, the AI started using it. However, the ability is supposed to be available only after a certain research is made in the Sacred Artefact. This requirement is set up correctly, it works if I'm playing the race myself, I can't use the ability until it's researched. Yet the computer is able to use it immediately.

Can someone please explain to me how it is possible that the AI can use an ability it should not yet have access to? And which files govern this sort of behaviour, and need to be modified to stop it?

Edited by Markus Ramikin, 08 January 2012 - 04:47 PM.


#2 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 18 March 2010 - 04:22 AM

If the AI can use the ability that is supposed to be locked by prereqs then your AE code is flawed. The AI should not be able to use an ability if the prereqs in the AE code are set correctly. It cannot use something a normal player should not have access to. Maybe post your prereq code for both the research which unlocks the ability and the abilities' own prereq code. The DoW1 AI can easily take advantage of code loopholes especially if the UI is blocked to the human player -- it won't be to the AI as AIs are not hindered by a disabled taskbar or icons. :wub:
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#3 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 18 March 2010 - 05:08 AM

Woohoo, a reply. :wub:

Hm, I don't use AE, I use Corsix's studio. If by "code" you mean "the stuff you get if you dump it to Lua", then here it is:

ability:

GameData = Inherit([[]])
GameData["ability_cursor_event"] = [[]]
GameData["ability_motion_name"] = [[special_ability_6]]
GameData["ability_ordered_event_mp"] = [[]]
GameData["ability_ordered_event_name"] = [[]]
GameData["ability_visible_in_mp"] = Reference([[type_ability_event_visible\tp_av_all.lua]])
GameData["activation"] = Reference([[type_abilityactivation\tp_ability_activation_targeted.lua]])
GameData["anticipation_event_name"] = [[]]
GameData["anticipation_lead_time"] = 0
GameData["area_effect"] = Reference([[tables\area_effect_table.lua]])
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["dirtsand"] = [[space_marines\abilities\psychic_inquisition_start]]
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["grass"] = [[space_marines\abilities\psychic_inquisition_start]]
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["rock"] = [[space_marines\abilities\psychic_inquisition_start]]
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["water"] = [[space_marines\abilities\psychic_inquisition_start]]
GameData["area_effect"]["area_effect_information"]["area_type"] = Reference([[type_areaeffect\tp_area_effect_circle.lua]])
GameData["area_effect"]["area_effect_information"]["filter_type"] = Reference([[type_areafilter\tp_area_filter_enemy.lua]])
GameData["area_effect"]["area_effect_information"]["radius"] = 16
GameData["area_effect"]["area_effect_information"]["remove_modifiers_with_source_entity"] = true 
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_01"] = Reference([[type_armour\tp_infantry_low.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_02"] = Reference([[type_armour\tp_infantry_med.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_03"] = Reference([[type_armour\tp_infantry_high.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_04"] = Reference([[type_armour\tp_infantry_heavy_med.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_05"] = Reference([[type_armour\tp_infantry_heavy_high.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_06"] = Reference([[type_armour\tp_commander.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_07"] = Reference([[type_armour\tp_monster_med.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_08"] = Reference([[type_armour\tp_monster_high.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_09"] = Reference([[type_armour\tp_builder.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_10"] = Reference([[type_armour\tp_vehicle_low.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_11"] = Reference([[type_armour\tp_vehicle_med.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_12"] = Reference([[type_armour\tp_vehicle_high.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_13"] = Reference([[type_armour\tp_building_high.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_13"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_14"] = Reference([[type_armour\tp_building_low.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_14"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_15"] = Reference([[type_armour\tp_building_med.lua]])
GameData["area_effect"]["area_effect_information"]["target_filter"]["entry_15"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_type"] = Reference([[type_armour\tp_infantry_low.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_02"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_02"]["armour_type"] = Reference([[type_armour\tp_infantry_med.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_03"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_03"]["armour_type"] = Reference([[type_armour\tp_infantry_high.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_04"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_04"]["armour_type"] = Reference([[type_armour\tp_infantry_heavy_med.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_05"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_05"]["armour_type"] = Reference([[type_armour\tp_infantry_heavy_high.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_06"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_06"]["armour_type"] = Reference([[type_armour\tp_monster_med.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_07"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_07"]["armour_type"] = Reference([[type_armour\tp_monster_high.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_08"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_08"]["armour_type"] = Reference([[type_armour\tp_commander.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_09"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_09"]["armour_type"] = Reference([[type_armour\tp_vehicle_low.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_10"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_10"]["armour_type"] = Reference([[type_armour\tp_vehicle_med.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_11"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_11"]["armour_type"] = Reference([[type_armour\tp_vehicle_high.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_type"] = Reference([[type_armour\tp_building_low.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_type"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_type"] = Reference([[type_armour\tp_building_high.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_type"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_14"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_14"]["armour_type"] = Reference([[type_armour\tp_building_med.lua]])
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_14"]["armour_type"]["screen_name_id"] = [[$90100]] -- Armour
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_15"]["armour_piercing_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["max_damage"] = 150
GameData["area_effect"]["weapon_damage"]["armour_damage"]["min_damage"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["min_damage_value"] = 100
GameData["area_effect"]["weapon_damage"]["armour_damage"]["morale_damage"] = 100
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry01"]["event"] = [[space_marines\hitfx\psychic_inquisition_flesh]]
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry02"]["event"] = [[space_marines\hitfx\psychic_inquisition_flesh]]
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry03"]["event"] = [[space_marines\hitfx\psychic_inquisition_flesh]]
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry04"]["event"] = [[space_marines\hitfx\psychic_inquisition_flesh]]
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry05"] = Reference([[tables\hit_event_entry.lua]])
GameData["area_effect"]["weapon_damage"]["hit_events"]["entry05"]["surface"] = Reference([[type_surface\tp_monolith.lua]])
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"] = Reference([[modifiers\speed_maximum_modifier.lua]])
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"]["value"] = 0.200000003
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_08"] = Reference([[tables\time_modify_entry.lua]])
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_09"] = Reference([[tables\time_modify_entry.lua]])
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_10"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_action_name"] = [[]]
GameData["backfire_area_effect"] = Reference([[tables\area_effect_table.lua]])
GameData["backfire_area_effect"]["area_effect_information"]["remove_modifiers_with_source_entity"] = true 
GameData["backfire_area_effect"]["weapon_damage"]["hit_events"]["entry05"] = Reference([[tables\hit_event_entry.lua]])
GameData["backfire_area_effect"]["weapon_damage"]["hit_events"]["entry05"]["surface"] = Reference([[type_surface\tp_monolith.lua]])
GameData["backfire_area_effect"]["weapon_damage"]["modifiers"]["modifier_08"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_area_effect"]["weapon_damage"]["modifiers"]["modifier_09"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_area_effect"]["weapon_damage"]["modifiers"]["modifier_10"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_caster_damage"] = Reference([[tables\weapon_damage_table.lua]])
GameData["backfire_caster_damage"]["hit_events"]["entry05"] = Reference([[tables\hit_event_entry.lua]])
GameData["backfire_caster_damage"]["hit_events"]["entry05"]["surface"] = Reference([[type_surface\tp_monolith.lua]])
GameData["backfire_caster_damage"]["modifiers"]["modifier_08"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_caster_damage"]["modifiers"]["modifier_09"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_caster_damage"]["modifiers"]["modifier_10"] = Reference([[tables\time_modify_entry.lua]])
GameData["backfire_delay"] = 0
GameData["backfire_percent"] = 0
GameData["caster_damage"] = Reference([[tables\weapon_damage_table.lua]])
GameData["caster_damage"]["hit_events"]["entry05"] = Reference([[tables\hit_event_entry.lua]])
GameData["caster_damage"]["hit_events"]["entry05"]["surface"] = Reference([[type_surface\tp_monolith.lua]])
GameData["caster_damage"]["modifiers"]["modifier_08"] = Reference([[tables\time_modify_entry.lua]])
GameData["caster_damage"]["modifiers"]["modifier_09"] = Reference([[tables\time_modify_entry.lua]])
GameData["caster_damage"]["modifiers"]["modifier_10"] = Reference([[tables\time_modify_entry.lua]])
GameData["center_target_on_owner"] = false
GameData["child_ability_name"] = [[marines_inquisition_child01]]
GameData["child_activation_percent"] = 1
GameData["child_jump_event"] = [[]]
GameData["child_range"] = 0
GameData["direction"] = 0
GameData["direction_arc_left"] = 180
GameData["direction_arc_right"] = 180
GameData["duration_time"] = 8
GameData["enemy_opacity_while_active"] = 1
GameData["entity_busy_time"] = 3
GameData["execute_table"] = Reference([[tables\execute_table.lua]])
GameData["execute_table"]["weapon_damage_table"]["hit_events"]["entry05"] = Reference([[tables\hit_event_entry.lua]])
GameData["execute_table"]["weapon_damage_table"]["hit_events"]["entry05"]["surface"] = Reference([[type_surface\tp_monolith.lua]])
GameData["execute_table"]["weapon_damage_table"]["modifiers"]["modifier_08"] = Reference([[tables\time_modify_entry.lua]])
GameData["execute_table"]["weapon_damage_table"]["modifiers"]["modifier_09"] = Reference([[tables\time_modify_entry.lua]])
GameData["execute_table"]["weapon_damage_table"]["modifiers"]["modifier_10"] = Reference([[tables\time_modify_entry.lua]])
GameData["fire_cost"] = Reference([[tables\cost_table.lua]])
GameData["friendly_opacity_while_active"] = 1
GameData["initial_delay_time"] = 1.5
GameData["looping_event_name"] = [[]]
GameData["persist_across_squad_leader_death"] = false
GameData["projectile_name"] = [[]]
GameData["projectile_spawn_pos"] = Reference([[tables\position.lua]])
GameData["projectile_spawn_pos"]["y"] = 1
GameData["random_offset"] = 0
GameData["range"] = 40
GameData["recharge_time"] = 250
GameData["recharge_timer_global"] = true 
GameData["refresh_time"] = 1
GameData["requirements"] = Reference([[tables\requirements.lua]])
GameData["requirements"]["required_1"] = Reference([[requirements\required_research]])
GameData["requirements"]["required_1"]["is_display_requirement"] = true 
GameData["requirements"]["required_1"]["research_name"] = [[research\marine_holocaust_research.rgd]]
GameData["spawned_entity_name"] = [[]]
GameData["speech_directory"] = [[ability/psychic_storm]]
GameData["target_ground"] = false
GameData["target_leader_in_squad"] = false
GameData["target_self"] = false
GameData["ui_hotkey_name"] = [[marine_inquisition2]]
GameData["ui_index_hint"] = 1
GameData["ui_info"] = Reference([[tables\ui_info_table.lua]])
GameData["ui_info"]["help_text_id"] = [[$92431]] -- 
GameData["ui_info"]["help_text_list"]["text_01"] = [[$17000001]] -- - The Grey Knights channel their collective hatred into a devastating psychic attack.
GameData["ui_info"]["help_text_list"]["text_02"] = [[$17000002]] -- - Far more intense than the Psychic Inquisition, it obliterates warpspawn, xeno and machine alike.
GameData["ui_info"]["help_text_list"]["text_03"] = [[$17000055]] -- NOTE:
GameData["ui_info"]["help_text_list"]["text_04"] = [[$17000003]] -- - With more Grey Knights deployed, it takes less time to refocus the ability.
GameData["ui_info"]["icon_name"] = [[eldar_icons/psychicstorm_icon]]
GameData["ui_info"]["screen_name_id"] = [[$17000000]] -- Holocaust
GameData["ui_instructional_msg"] = [[$0]]
GameData["ui_invalid_target_msg"] = [[$0]]

research:

GameData = Inherit([[]])
GameData["modifiers"] = Reference([[tables\modifier_table.lua]])
GameData["modifiers"]["modifier_01"] = Reference([[modifiers\keen_sight_radius_modifier]])
GameData["modifiers"]["modifier_01"]["application_type"] = Reference([[type_modifierapplicationtype\tp_mod_apply_to_entity_type.lua]])
GameData["modifiers"]["modifier_01"]["exclusive"] = true 
GameData["modifiers"]["modifier_01"]["target_type_name"] = [[grey_knights]]
GameData["modifiers"]["modifier_01"]["value"] = 1.5
GameData["requirements"] = Reference([[tables\requirements.lua]])
GameData["requirements"]["required_1"] = Reference([[requirements\required_structure.lua]])
GameData["requirements"]["required_1"]["is_display_requirement"] = true 
GameData["requirements"]["required_1"]["structure_name"] = [[Data\attrib\ebps\races\space_marines\structures\space_marine_ability_building.rgd]]
GameData["requirements"]["required_2"] = Reference([[requirements\required_squad]])
GameData["requirements"]["required_2"]["squad_name"] = [[Data\attrib\sbps\races\space_marines\space_marine_squad_grey_knights.rgd]]
GameData["requirements"]["required_10"] = Reference([[requirements\global_required_addon.lua]])
GameData["requirements"]["required_10"]["global_addon_name"] = [[addons\space_marine_hq_addon_1.lua]]
GameData["time_cost"] = Reference([[tables\time_cost_table.lua]])
GameData["time_cost"]["cost"]["power"] = 250
GameData["time_cost"]["cost"]["requisition"] = 125
GameData["time_cost"]["time_seconds"] = 70
GameData["ui_hotkey_name"] = [[marine_catechisms_of_detestation]]
GameData["ui_index_hint"] = 4
GameData["ui_info"] = Reference([[tables\ui_info_table.lua]])
GameData["ui_info"]["help_text_list"]["text_01"] = [[$17000062]] -- The Grey Knights recite litanies of hatred.
GameData["ui_info"]["help_text_list"]["text_02"] = [[$17000063]] -- In this holy state of mind, their full psychic potential is unleashed. 
GameData["ui_info"]["help_text_list"]["text_03"] = [[$17000064]] -- - Enables the Holocaust.
GameData["ui_info"]["help_text_list"]["text_04"] = [[$17000065]] -- - Enhances the Grey Knights sensitivity to hidden enemies.
GameData["ui_info"]["icon_name"] = [[eldar_icons\psychicstorm_icon.tga]]
GameData["ui_info"]["screen_name_id"] = [[$17000061]] -- Catechisms of Detestation

Edited by Markus Ramikin, 18 March 2010 - 05:18 AM.


#4 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 18 March 2010 - 10:27 PM

Hm I think I figured it out. When you add a requirement as "is display requirement", it is ONLY a display requirement, i.e. i only governs whether the ability will show up on UI or not, right? So if I wanted the ability to actually be unavailable rather than just invisible, I should set the is display field to false and instead use hide_button_when_failed.

Yeah I did just that and now it seems to be working like it should.


In other news, since I don't want to spam this forum with my n00b questions, I'll just tack them on here:

2. I have Inquisitor Toth as part of the Marine army... I gave him Orbital Bombardment and WotE, what should I do to make AI use them?

3. Is there a way/command with which I can specifically order the AI to reinforce a given unit, perhaps as part of the initial build order? If not, how do I make it a greater priority for the AI? It insists on reinforcing some shitty marine squad before it starts on the GKs...

Edited by Markus Ramikin, 18 March 2010 - 10:50 PM.


#5 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 March 2010 - 01:13 AM

Hm I think I figured it out.

Yeah I noticed your requirements in the AE code look.. odd.. :| Missing a few universal AE standards but glad you figured it out.

2. I have Inquisitor Toth as part of the Marine army... I gave him Orbital Bombardment and WotE, what should I do to make AI use them?

For Toth's Orbital Bombardment use the same code used by the SM Force Commander as he also has an Orbital Bombardment.

3. Is there a way/command with which I can specifically order the AI to reinforce a given unit, perhaps as part of the initial build order? If not, how do I make it a greater priority for the AI? It insists on reinforcing some shitty marine squad before it starts on the GKs...

Yep.. you can create a tactic for the GreyKnights and use the Reinforce() function call and set it to true. You'll notice the Chaos Cultist have such a script but its meant to drastically restrict them so the AI doesn't reinforce them too much. :wub:
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#6 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 19 March 2010 - 10:29 AM

Hm I think I figured it out.

Yeah I noticed your requirements in the AE code look.. odd.. :| Missing a few universal AE standards but glad you figured it out.

Oh, now you got me curious, what was/is missing? All that really changed is, from
GameData["requirements"]["required_1"]["is_display_requirement"] = true
to
GameData["requirements"]["required_1"]["hide_the_button_when_failed"] = true
so I presume that whatever was missing, still is. Even though the ability and requirement now work exactly like I want them to so I guess it wasn't something essential? :)
(And, of course, I wasn't working with the code, I'm just pressing buttons and copypasting things in Corsix' mod studio ^_^)

2. I have Inquisitor Toth as part of the Marine army... I gave him Orbital Bombardment and WotE, what should I do to make AI use them?

For Toth's Orbital Bombardment use the same code used by the SM Force Commander as he also has an Orbital Bombardment.

Yeah I realize he does, I just couldn't set up a personal tactics file for Toth because I just didn't know how that works, couldn't get it to load properly. I just figured it out now, though, and it works. :)

I'm just very newbie to this and I am just learning how it works by reading the code itself... so it takes a while. None of the online resources I've been able to find are very, hm, comprehensive.

3. Is there a way/command with which I can specifically order the AI to reinforce a given unit, perhaps as part of the initial build order? If not, how do I make it a greater priority for the AI? It insists on reinforcing some shitty marine squad before it starts on the GKs...

Yep.. you can create a tactic for the GreyKnights and use the Reinforce() function call and set it to true. You'll notice the Chaos Cultist have such a script but its meant to drastically restrict them so the AI doesn't reinforce them too much. ;)

Yup, that worked! Thanks. Once I learned to set up unit-specific tactics files, that was easy.

Hm. I'm reading your Dawn of War AI wiki information
http://dow.finaldeat.....AI&v=19p.html
Apparently in unitstats.ai you say there should be something called "attack_role". But when I look into the actual files, neither in unitstats.ai nor in (race)unitstats.ai do I see a field such as "attack_role". Example entry:
name = "Khorne Berzerkers",
 sbp_name = "chaos_squad_khorne_berserker",
 ebp_name = "chaos_khorne_berserker",
 class = UnitStatsAI.UC_HeavyInfantryMed,
 rating = 4.0,
 potential = {
 {
name = "chaos_bolt_pistol_khorne_berserker",
effectiveness = GenerateUnitEffectiveness(3.3,3.3,3.3,3.3,2.9,0.8,0.0,0.0,2.9,1.8,2.5,3.1,1.5,0.0),
range = UnitStatsAI.RT_Ranged,
},
{
name = "chaos_khornate_chainaxe",
effectiveness = GenerateUnitEffectiveness(6.0,6.3,6.3,6.3,6.3,4.6,4.2,3.5,5.4,3.5,5.3,3.1,2.5,0.0),
range = UnitStatsAI.RT_Melee,
},
}
},
No attack_role. What am I doing wrong?

This is a shame, because I would love to set GKs to multirole, and have them fire storm bolters at light infantry but go in with their halberds at such targets as commanders or daemons. I don't know how to make it happen though... advice would be good.

Also, what's the difference between those two files? I see unitstats.ai duplicates the information that is also in all the (specificrace)stats.ai files, can you tell me why?

Last but not least: thank you, I appreciate the help.

Edited by Markus Ramikin, 19 March 2010 - 12:21 PM.


#7 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 March 2010 - 01:26 PM

so I presume that whatever was missing, still is. Even though the ability and requirement now work exactly like I want them to so I guess it wasn't something essential?

Always look at the vanilla code as your example.. thats how I learned and experimented. You simply had something turned off in the UI but the AI used it anyway. Happens..

No attack_role. What am I doing wrong?

Ahh.. you mean force or selective-firing by the AI. ie. Eldar Fire Dragons only go after enemy vehicles or buildings because they are only go against those whole leaving all other alone. Yeah the AI cannot do that -- it wasn't coded by Relic. We asked for it back in '05 but to this day not implemented. Not really a major ball breaker.

Also, what's the difference between those two files? I see unitstats.ai duplicates the information that is also in all the (specificrace)stats.ai files, can you tell me why?

Hmm not sure what "(specificrace)stats.ai" is unless you mean <race_name>unitstats.ai ? ie. eldarunitstats.ai?

Yeah unitstats.ai is real cool.. know it too well and what its powers do. Lots to say about that.. well.. all of the DoW1 AI.. been coding it for 20+ mods and 6+ balance mods (each having 7+ factions..) since Sept'04 so yeah pretty much seen it all. ^_^
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#8 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 19 March 2010 - 01:58 PM

Yeah that's what I meant. For instance, any given Eldar unit will be described in eldarunitstats.ai and again in unitstats.ai. So I don't get it. Why is this information duplicated, does the AI use both files in some way, or is one of them just not used, etc.

#9 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 March 2010 - 02:03 PM

Yeah that's what I meant. For instance, any given Eldar unit will be described in eldarunitstats.ai and again in unitstats.ai. So I don't get it. Why is this information duplicated, does the AI use both files in some way, or is one of them just not used, etc.

Err.. there is no unitstats.ai with our adv. AI, bro. Its just a distinguished <race_name>unitstats.ai file in the info folder. Maybe yer talking the generic vanilla AI from the game... we only work with our adv. AI.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#10 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 19 March 2010 - 02:23 PM

Hm. Well yes, I'm talking about the unitstats.ai that is located in the main AI folder. And yeah it seems it's from dxp2. I guess I can safely ignore it and just mess with the specific race files then...

Edited by Markus Ramikin, 19 March 2010 - 02:23 PM.


#11 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 March 2010 - 02:29 PM

Hm. Well yes, I'm talking about the unitstats.ai that is located in the main AI folder. And yeah it seems it's from dxp2. I guess I can safely ignore it and just mess with the specific race files then...

Ahhh yeah.. when coding DoW1 AI since, oh, 2005.. all mod teams *MUST* use our Adv. AI project to build AI. Never EVER in 10,000years even consider firing off a brain synapse of a thought to use the vanilla DoW1 AI EVAR!! Its so barbarically outdated, efficient, lacking hundreds of tweaks, etc etc etc.. Use ONLY our latest Adv. AI.. PERIOD! It has everything you'll ever want and so much more you would never have thought about.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#12 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 19 March 2010 - 08:31 PM

Yes, Mr. Salesman. ^_^

So when are you updating DC AI! I refuse to launch SS except to play dowpro. :)

Edited by Markus Ramikin, 19 March 2010 - 08:33 PM.


#13 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 March 2010 - 08:35 PM

Its pretty much updated but needs testing. I just haven't had the flipp'n time.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#14 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 20 March 2010 - 01:03 AM

Hm. Does caster_damage in an ability do anything? I mean I can make it do physical damage to a unit, but I can't seem to get anything out of the modifiers.

I'm trying to set up an ability that does damage to enemies for 8 seconds and at the same time keeps the unit alive during that time. I tried to add an enable_death modifier (like the one in WotE) to caster_damage but that didn't do anything...

I'm thinking maybe I should just do it through normal area of effect modifiers and set one aspect of the ability as a child ability of the other...

#15 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 20 March 2010 - 03:18 AM

Hm. Does caster_damage in an ability do anything? I mean I can make it do physical damage to a unit, but I can't seem to get anything out of the modifiers.

I'm trying to set up an ability that does damage to enemies for 8 seconds and at the same time keeps the unit alive during that time. I tried to add an enable_death modifier (like the one in WotE) to caster_damage but that didn't do anything...

I'm thinking maybe I should just do it through normal area of effect modifiers and set one aspect of the ability as a child ability of the other...

I thought there was a vanilla ability that does what you want. Trying to remember which vanilla unit does that. Hmmm..
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#16 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 20 March 2010 - 05:33 AM

None that I could find. I checked a few instances of an entity giving itself a modifier that came to mind, but they just used area_effect and targetted themselves, rather than caster_damage. Which is something I can't do with a single ability that's also supposed to target enemies and hurt them...


Another thing, where is DoReinforce defined? I wanted to take a look at it and find out what the two arguments you pass to it stand for, but I can't find it anywhere in the core files...

Edited by Markus Ramikin, 20 March 2010 - 05:36 AM.


#17 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 20 March 2010 - 05:34 AM

Check the core Ai logic files like tactic.ai. If you had a file searching app like Total Commander it will become your friend for years. Hell.. Total Commander is so helpful with RGDs and searching the AE code for strings/words that would normally be hard to find.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#18 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 20 March 2010 - 10:13 AM

Like I said, I did look into the core files. I used copy-pased and notepad search, which is perhaps less sophisticated than TC (btw why the hell won't windows search find something in an .ai file?!) but it does the job... No luck.

Well here's what might be an easier one: suppose I have a squad that can capture points, but I don't want AI to use it for that purpose. Or at least I don't want it to use it for capturing relics. Would that be at all doable? (I tried some things already but they, er, didn't work ^_^ ).

#19 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 20 March 2010 - 12:45 PM

Like I said, I did look into the core files. I used copy-pased and notepad search, which is perhaps less sophisticated than TC (btw why the hell won't windows search find something in an .ai file?!) but it does the job... No luck.

Windows Search has text search which scan the internal structure of files. Quite useful but I prefer TC far more. Been sooo useful since '05. ^_^ Oh and Reinforce() is in there bro. Check the infantrytactic.ai file.

Well here's what might be an easier one: suppose I have a squad that can capture points, but I don't want AI to use it for that purpose. Or at least I don't want it to use it for capturing relics. Would that be at all doable?

Well its either capture or not? Better for em never to cap or yes to. Yes there is a function call for that.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#20 Markus Ramikin

Markus Ramikin
  • Members
  • 86 posts

Posted 20 March 2010 - 07:26 PM

Oh and Reinforce() is in there bro. Check the infantrytactic.ai file.

Yes I did find Reinforce(). But even that calls DoReinforce() inside itself. So unless I just don't get how this works, DoReinforce must be a separate thing that's defined somewhere else. Especially since DoReinforce seems to take two arguments (a bool and what looks like a number) which are not defined there, and that's what I'm really trying to find out, what those arguments are and what they do.

Well its either capture or not? Better for em never to cap or yes to.

I'm sorry, but I am really not sure what you just said.

Edited by Markus Ramikin, 20 March 2010 - 07:28 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users