Jump to content


Photo

Target for enemies and exp. award


  • Please log in to reply
16 replies to this topic

#1 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 22 December 2008 - 03:24 PM

I've added some new units to my personal mod, and also added them to experioencelevels.ini how it should be.
They also gain levels like the other normal units, but I figured out that they don't award experience to the units which eliminate them.
What did I do wrong, or where must I add some codes?? :D

And the other problem is Sauron of EA. I added him as a summon power to Mordor, no problems there, but the enemy archers (even goblin archers from the creeps) don't shoot at him, they don't even recognize him, like he wouldn't even exist at all.
Why the hell does that happen?
Please help me, I'm despairing of this problem.
Posted Image

#2 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 22 December 2008 - 03:42 PM

Post the unit's experiencelevel entries (from experiencelevels.ini) and Sauron's object code (in codebox).

But i can already tell you this, if you look at the xp-entries, something really logical springs to mind:

;------------ Elves ---------------
ExperienceLevel ElvesGenericLevel1
TargetNames = Elves
RequiredExperience = 1
ExperienceAward = 0
Rank = 1
...
END



As for the AI attacking certain targets with certain units, the objects in question must have the following piece of code, both for other units targetting them and for them to identify their own preferred targets:

ThreatBreakdown Object_DetailedThreat
  AIKindOf = STRUCTURE; or CREEP or HERO or whatever... (see below)*
End

*check out the file 'skirmishdata.ini', specifically the AttackChain section for more...

Sûl

Edited by Sûlherokhh, 22 December 2008 - 03:43 PM.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#3 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 22 December 2008 - 04:36 PM

Post the unit's experiencelevel entries (from experiencelevels.ini) and Sauron's object code (in codebox).

But i can already tell you this, if you look at the xp-entries, something really logical springs to mind:

;------------ Elves ---------------
ExperienceLevel ElvesGenericLevel1
TargetNames = Elves
RequiredExperience = 1
ExperienceAward = 0
Rank = 1
...
END



As for the AI attacking certain targets with certain units, the objects in question must have the following piece of code, both for other units targetting them and for them to identify their own preferred targets:

ThreatBreakdown Object_DetailedThreat
  AIKindOf = STRUCTURE; or CREEP or HERO or whatever... (see below)*
End

*check out the file 'skirmishdata.ini', specifically the AttackChain section for more...

Sûl


Ok I fixed that part with the experience award. :D
My new units have build variations, and I forgot to add the single members to the codes in experiencelvels.ini :lol:

Now I will look for Sauron (the codes of him are already in the vanilla INI file of EA, just look in evilfaction.units, there you'll find him).
But I just found out that the enemy archers also don't target at my new units, like they wouldn't exist.
I will look up in the ini you told me, if I can't find anything, I'll come back and ask.
Posted Image

#4 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 22 December 2008 - 04:46 PM

As for the AI attacking certain targets with certain units, the objects in question must have the following piece of code, both for other units targetting them and for them to identify their own preferred targets:

ThreatBreakdown Object_DetailedThreat
  AIKindOf = STRUCTURE; or CREEP or HERO or whatever... (see below)*
End

*check out the file 'skirmishdata.ini', specifically the AttackChain section for more...


That piece of code (AIKindOf=...) , where is it supposed to be?
And where is skirmishdata.ini? (I thought that this just exists in Bfme2?)

But I'm wondering, is it possible that it ha to do with the lib_object_lists.map (in Libraries.big) and the unit lists?
Posted Image

#5 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 22 December 2008 - 05:42 PM

Yes, you are right. I made a mistake. I will check the attack priorities and threat levels for BfMe1. I'll get back to ya... :D


Edit: Allright, here it is:

Every nonhorde unit and every horde, if capable of attacking, has a set of attack priorities. It is determined like this:
Object IsengardFighterHorde
  ...
  Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
	...
	AttackPriority =  AttackPriority_Infantry
  End
  ...
End

or this

Object MordorFellBeast
  ...
  Behavior = GiantBirdAIUpdate ModuleTag_GiantBirdAI
	...
	AttackPriority =  AttackPriority_FellBeast
  End
  ...
End

Every unit with AI behavior has some sort of '...AIUpdate' which contains the AttackPriority set used.


The sets are defined in the file 'data/ini/default/aidata.ini', like this

AttackPriority AttackPriority_FellBeast
  Default = 35
  Target GondorTrebuchetWall = 50
  Target GondorTrebuchet = 50
  Target GondorGandalf = 50
  Target GondorGandalfGrey = 50
  Target GondorGandalfWhite = 50
End

A fellbeast would therefore attack every target equally (default priority = 35), unless a trebuchet or Gandalf are in sight, in which case it would target them exclusively (priority = 50).

Since your unit presumably has a new object name and since you probably did not add this object name in the AttackPriority lists, any unit in the vicinity of your new unit will use the default priority, which is in every case slightly or considerably lower than any of the listed ones. This might be the cause of no unit targeting your new objects. Probably when testing this you also had standard units around. And the standard units would in this case always have a higher priority.

Hopefully adding your new units the the priority sets will cause your problem to go away.

Edited by Sûlherokhh, 22 December 2008 - 05:58 PM.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#6 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 22 December 2008 - 05:43 PM

I think that is a BFME2 thing.

Check your kindofs the answers probably there.
If I remember right there should be a TARGETABLE KindOf
or something like that

Break dancing into the hearts of millions


#7 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 22 December 2008 - 06:47 PM

In the Sauron object.ini there is this code:

Behavior = AIUpdateInterface ModuleTag_04
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
AILuaEventsList = SauronFunctions


And you mentioned the 'data/ini/default/aidata.ini', but Sauron is already in there.
I just use the Sauron of EA, so that shouldn't be the problem
Posted Image

#8 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 22 December 2008 - 06:55 PM

If you use the same Object name, heed Rad's advice. Sauron should have the same terms next to 'KINDOF =' like any other melee hero, Boromir for example.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#9 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 22 December 2008 - 08:39 PM

Radspakr what do you mean with 'TARGETABLE kindof' ?

In Saurons ini there is this:

RadarPriority = UNIT
KindOf = HERO PRELOAD CAN_CAST_REFLECTIONS INFANTRY MONSTER SCORE PATH_THROUGH_INFANTRY ARMY_SUMMARY SCARY
PathfindDiameter = 40.0


Btw, my other units I've added work.
But with Sauron it's really odd, heroes and swordsmen attack and follow him, but it's only the archers who don't recognize him, even if he is totally alone on the battlefield they walk past him if he would be a ghost.
It's odd as ****.
Posted Image

#10 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 25 December 2008 - 06:36 PM

here is the Kindof for my Sauron from Lone Wolf.
KindOf = HERO PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY MONSTER SCORE PATH_THROUGH_INFANTRY ARMY_SUMMARY SCARY

Make sure he has a working geometry as well here is the one from LW.

 Geometry = CYLINDER
  GeometryMajorRadius = 11.2
  GeometryMinorRadius = 11.2
  GeometryHeight = 32.0
  GeometryIsSmall = No
  Shadow = SHADOW_DECAL
  ShadowSizeX = 22;
  ShadowSizeY = 22;
  ShadowTexture = ShadowI;

Break dancing into the hearts of millions


#11 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 25 December 2008 - 07:49 PM

Mate the KindOf and geometry you've posted is identical with the original Sauron INI of EA.
I haven't changed anything there, so that can't be the problem.
I really don't know what it is, I've already given up.
For some odd reason it's just the archers who ignore Sauron.
Posted Image

#12 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 25 December 2008 - 08:33 PM

I don't know then.
Can you attack him with Archers if so,then your issue is probably AI related.

Edited by Radspakr, 25 December 2008 - 08:36 PM.

Break dancing into the hearts of millions


#13 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 26 December 2008 - 02:35 PM

Of course I can attack archers with him.
But anyway, I will just scrap him as a summon then. :lol:
Thank you guys for the help anyway.
Posted Image

#14 Baki

Baki

    title available

  • Project Team
  • 357 posts
  • Location:Germany
  • Projects:TDH AI

Posted 29 December 2008 - 01:33 PM

YAY I fixed it!
Guess what? It had to do with Saurons armor.
Following entries for Sauron were in armor.ini:

Armor SauronArmor
Armor = DEFAULT 1%
Armor = PIERCE 0%
Armor = SPECIALIST 0%
Armor = HERO 100%
End


As Sauron didn't take damage fom arrows (pierce) and pikes (specialist), these kind of units didn't attack him for this reason.
When I changed those values from 0% to 1% it worked!
That was all. :grin:
Posted Image

#15 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 29 December 2008 - 05:32 PM

Nice. Sometimes mistakes lurk in corners not immediately obvious. All it takes is some persistence and comparing exiting (and working) unit's traits.

Edited by Sûlherokhh, 29 December 2008 - 09:54 PM.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#16 jakonic

jakonic
  • New Members
  • 5 posts

Posted 22 January 2009 - 01:25 AM

i am modder and i know answer for sauron and all other bad stuffs in bfme

sauron in bfme was not finished at all,...he was build only about of 7% of Hero,..not like Aragorn who was build 100%...i was make my bfme to the bfme ultimate...everything is possible in my game...if u need help...i will help u to i mod your file..and make bfme interessting...just answer me

Sauron is made from metal...arrows cant hurt him because in Armor.ini have "PIERCE = 0%" pierce means arrows...
later answers tomorow..just give me your Sauron.ini and i will make him totaly great

i need files
armor.ini
sauron.ini
commandset.ini
commandbutton.ini
specialpowers.ini
..etc for making new Sauron..
you give me,...i make...and upload files...give you link and you download,...put that files in game and GAME will be real BOOM

who want to i add my INI.big with my Sauron and all....
just answer

#17 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 22 January 2009 - 06:44 AM

This was fixed awhile ago.
You should read through threads before posting.

Break dancing into the hearts of millions





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users