Author Topic: (no bug )Size 3+ Units are non aggressive  (Read 910 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
(no bug )Size 3+ Units are non aggressive
« on: 1 December 2013, 22:58:42 »
Something I've noticed for a while is that when a cpu player produces large (size 3+) units, it is very rare for them to be included when they launch their massive attacks.

I used to feel as though this was due to crowding at the base and poor pathfinding. However, after playing with the  MinBuildSpacing Ai Behavior I believe this is not the reason.
Even with ample space these units still remain at base while the rest of the army charges at the enemy.

I'm wondering why that is? Has anyone else encountered this problem?

Computer Info:

Laptop Windows 7, 8 gigs ram, Nvidia Geforce card,  Intel I7
« Last Edit: 6 December 2013, 02:29:12 by titi »
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Size 3+ Units are non aggressive
« Reply #1 on: 3 December 2013, 21:38:17 »
What kind of attack has this big unit and which other skills does it have ?  All this affects the decision if this unit is part of a big attack or not. PLease show us the xml file.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Size 3+ Units are non aggressive
« Reply #2 on: 4 December 2013, 04:24:43 »
Only has one attack skill, but here is xml:

Code: [Select]
?xml version="1.0" standalone="no"?>

<unit>
<parameters>
<size value="3"/>
<height value="3"/>
<max-hp value="2400" regeneration="6"/>
<max-ep value="0" regeneration="1"/>
<armor value="150"/>
<armor-type value="hard"/>
<sight value="10"/>
<time value="60"/>
<multi-selection value="true"/>
<cellmap value="false"/>
<levels>
<level name="taste_blood" kills="10"/>
<level name="carnivore" kills="30"/>
<level name="ptreditor" kills="60"/>
</levels>
<fields>
<field value="land"/>
</fields>
<properties>
<property value="rotated_climb"/>
</properties>
<light enabled="false"/>
<unit-requirements>
</unit-requirements>
<upgrade-requirements/>
<resource-requirements>
<resource name="organic" amount="600"/>
<resource name="housing" amount="4" />
</resource-requirements>
<resources-stored>
</resources-stored>
<image path="images/swordman.bmp"/>
<image-cancel path="images/swordman_attack.bmp"/>
<meeting-point value="false"/>
<selection-sounds enabled="true">
<sound path="sounds/sel1.wav"/>
<sound path="sounds/sel2.wav"/>
<sound path="sounds/sel3.wav"/>
</selection-sounds>
<command-sounds enabled="true">
<sound path="sounds/sel1.wav"/>
<sound path="sounds/sel2.wav"/>
<sound path="sounds/sel3.wav"/>
</command-sounds>
</parameters>

<skills>

<skill>
<type value="stop"/>
<name value="stop_skill"/>
<ep-cost value="0"/>
<speed value="1000"/>
<anim-speed value="45"/>
<animation path="models/vore_stand.g3d"/>
<sound enabled="false"/>
</skill>

<skill>
<type value="move"/>
<name value="move_skill"/>
<ep-cost value="0"/>
<speed value="180"/>
<anim-speed value="100"/>
<animation path="models/vore_run.g3d"/>
<sound enabled="false"/>
</skill>

<skill>
<type value="be_built" />
<name value="be_built_skill"/>
<ep-cost value="0" />
<speed value="300" />
<anim-speed value="300" />
<animation path="models/vore_run.g3d" />
<sound enabled="false" />
</skill>

<skill>
<type value="move"/>
<name value="charge_skill"/>
<ep-cost value="0"/>
<speed value="180"/>
<anim-speed value="100"/>
<animation path="models/vore_run.g3d"/>
<sound enabled="false"/>
</skill>

<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="100"/>
<anim-speed value="50"/>
<animation path="models/vore_eat.g3d"/>
<sound enabled="true" start-time="0.25">
<sound-file path="sounds/attack2.wav"/>
</sound>
<attack-strenght value="700"/>
<attack-var value="200"/>
<attack-range value="1"/>
<attack-type value="eat"/>
<attack-fields>
<field value="land"/>
</attack-fields>
<attack-start-time value="0.25"/>
<projectile value="false"/>
<splash value="true">
<radius value="0"/>
<damage-all value="false"/>
<particle value="false"/>
</splash>
</skill>

<skill>
<type value="die"/>
<name value="die_skill"/>
<ep-cost value="0"/>
<speed value="60"/>
<anim-speed value="60"/>
<animation path="models/vore_stand.g3d"/>
<particles value="true" start-time="0.0" end-time="0.1">
<particle-file path="splat.xml"/>
</particles>
<sound enabled="true" start-time="0">
<sound-file path="sounds/die1.ogg"/>
<sound-file path="sounds/die2.wav"/>
<sound-file path="sounds/die3.ogg"/>
</sound>
<fade value="true"/>
</skill>

<skill>
<type value="harvest"/>
<name value="mine_skill"/>
<ep-cost value="0"/>
<speed value="100"/>
<anim-speed value="50"/>
<animation path="models/vore_eat.g3d"/>
<sound enabled="true" start-time="0.5">
<sound-file path="sounds/attack2.wav"/>
</sound>
</skill>

<skill>
<type value="build"/>
<name value="build_skill"/>
<ep-cost value="0"/>
<speed value="225"/>
<anim-speed value="90"/>
<animation path="models/vore_eat.g3d"/>
<sound enabled="true" start-time="0.5">
</sound>
</skill>

</skills>

<commands>

<command>
<type value="stop"/>
<name value="stop"/>
<image path="images/swordman_attack.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<stop-skill value="stop_skill"/>
</command>

<command>
<type value="move"/>
<name value="move"/>
<image path="images/swordman_attack.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
</command>

<command>
<type value="attack"/>
<name value="devour"/>
<image path="images/swordman_attack.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="charge_skill"/>
<attack-skill value="attack_skill"/>
</command>

</commands>
</unit>
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Size 3+ Units are non aggressive
« Reply #3 on: 4 December 2013, 23:59:46 »
The reason is, it has a mine skill and a build skill. By this it is counted as a worker and is usually not send to fight. Compare this to the intiates of magic or the persian worker. both are not used to attack because they have "worker skills".
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Size 3+ Units are non aggressive
« Reply #4 on: 5 December 2013, 01:19:56 »
Actually they do attack when required, i think i  had made a change a long time ago for that.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Size 3+ Units are non aggressive
« Reply #5 on: 5 December 2013, 10:40:29 »
To me, this brings up three questions:
Which version is Ishmaru testing on?
Does this unit behave the same if it's size 1?
Should an option be added to the unit XML which, if set, makes a "worker" unit which also has an attack skill attack like any other unit. (And would this involve giving up harvesting to attack?)
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Size 3+ Units are non aggressive
« Reply #6 on: 5 December 2013, 16:25:44 »
The code already knows about workers that harvest AND attack. These units will attack when enemies are around.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Size 3+ Units are non aggressive
« Reply #7 on: 6 December 2013, 00:39:03 »
The reason is, it has a mine skill and a build skill. By this it is counted as a worker and is usually not send to fight. Compare this to the intiates of magic or the persian worker. both are not used to attack because they have "worker skills".


you were correct titi that was the issue thanks!

softcoder: Yes you set it so that harvest units can attack. however it's dependant on weather or not the minimum workers harvesting is met. which explains why this unit rarely attacked instead of never.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

 

anything