Jump to content


Photo

Why can't heroes use their own special abilities?


  • Please log in to reply
9 replies to this topic

#1 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 21 November 2021 - 10:06 AM

Hello, I'm a new member. Sorry for not speaking English. I use translation. I have a question. The artificial intelligence in the game does'nt use the special abilities of the heroes enough. I've also added Earthshaker and Word of Power abilities to Gimli. But artificial intelligence does'nt use these abilities. So what can I do for the AI to use both the hero's own powers and the powers I added later?  For instance: So what needs to be done for artificial intelligence to use the Word Of Power of Gimli?  I don't know much about coding.


Edited by Gloin1245, 21 November 2021 - 12:22 PM.


#2 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 21 November 2021 - 12:13 PM

I'm sorry, is there anyone?



#3 bilbothehobbit

bilbothehobbit
  • Members
  • 25 posts
  • Location:Israel
  • Projects:RR_Mod.
  •  Complete Idiot

Posted 22 November 2021 - 01:50 PM

You'll need to add to the object's code something like this:

 

 
Behavior = AISpecialPowerUpdate <A fitting name>
    CommandButtonName = <The Ability Command Button's name>
    SpecialPowerAIType = <An ENum, , look at similar powers for reference.>
    SpecialPowerRadius = <a number, look at similar powers for reference.>
End
 
For example, for Aragorn's Athelas power:
 
Behavior = AISpecialPowerUpdate AragornElendilAI
    CommandButtonName = Command_SpecialAbilityElendil
    SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
    SpecialPowerRadius = 200;
End
 
Hope I helped you.


#4 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 22 November 2021 - 04:56 PM

 

Nesnenin koduna şunun gibi bir şey eklemeniz gerekecek:

 

 
Behavior = AISpecialPowerUpdate <Bir uydurma adı>
    CommandButtonName = <Yetenek Komut Düğmesinin adı>
    SpecialPowerAIType = <Bir ENum, , referans için benzer güçlere bakın.>
    SpecialPowerRadius = <bir sayı, referans için benzer güçlere bakın.>
Son
 
Örneğin, Aragorn'un Athelas gücü için:
 
Behavior = AISpecialPowerUpdate AragornElendilAI
    CommandButtonName = Command_SpecialAbilityElendil
    SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
    ÖzelGüç Yarıçapı = 200;
Son
 
Umarım sana yardımcı olmuşumdur.

 

 

 

It worked. endless thanks. I am thankful to you. I have a few more questions.
 
1- How can I do this for Create a Hero? For example: I added Athelas and Word of Power abilities to my dwarf hero (CAH). But the AI does not use both these abilities and its own abilities. So I want my dwarf hero (CAH) to use both Word of Power and Earthsaker (his own power). Why doesn't AI use these capabilities for CAH?
 
 
2- The heroes of the artificial intelligence in the game do not respawn after they die. What do I need to do to make the heroes respawn (after each death)?
 
I hope I was able to explain. I'm sorry for my bad english.

Edited by Gloin1245, 22 November 2021 - 06:14 PM.


#5 bilbothehobbit

bilbothehobbit
  • Members
  • 25 posts
  • Location:Israel
  • Projects:RR_Mod.
  •  Complete Idiot

Posted 23 November 2021 - 10:34 AM

I have no experience in CaHs, but I can answer your second question

go to skirmishaidata.ini located in data\ini\default

search with control+f for HeroBuildOrder and add your hero to the list for whatever faction you want him to be



#6 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 23 November 2021 - 11:18 AM

I have no experience in CaHs, but I can answer your second question

go to skirmishaidata.ini located in data\ini\default

search with control+f for HeroBuildOrder and add your hero to the list for whatever faction you want him to be

 

Thank you for your answer. But their names are already on the list. Could this problem be related to the map? Because on some maps, heroes appear more.

 

 

skirmishaidata.ini

HeroBuildOrder = ElvenGaladriel_RingHero DwarvenGimli DwarvenDain DwarvenGloin
 
 
 
I reduced the cost of heroes. (from gamedata) But another problem arose.
For example, I made the price of Gimli 800. This time, the AI started Gimli at Level 1 after he died. 
Gimli was Level 5 when he died. But it started again at level 1. 
When the Level 1 Gimli died, the Level 5 Gimli was born again.
After he died too, the AI didn't spawn heroes.


#7 FatManInABox2

FatManInABox2
  • New Members
  • 2 posts

Posted 23 November 2021 - 07:13 PM

The file you need to edit for CaHs is CreateAHeroAISpecialPower.inc which can be found in the data/ini/object/creatahero folder



#8 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 23 November 2021 - 09:59 PM

The file you need to edit for CaHs is CreateAHeroAISpecialPower.inc which can be found in the data/ini/object/creatahero folder

 

I looked for the file inside the .ini

But I couldn't find it.

Can you help me find it?

 

 

I found these.

 

data/ini/object/creatahero/creatahero.ini

data/ini/object/creatahero/creataheroanims.inc

data/ini/object/creatahero/creataheroarmorupgrades.inc

data/ini/object/creatahero/creataheroattributemodifiers.inc

data/ini/object/creatahero/creataheroaudi.inc

data/ini/object/creatahero/creataherodesign.inc

data/ini/object/creatahero/creataherodrawmodules.inc

data/ini/object/creatahero/creataheromodelconditionupgrades.inc

data/ini/object/creatahero/creataheromodels.inc

data/ini/object/creatahero/creataheroobjects.inc

data/ini/object/creatahero/creataheropowers.inc

data/ini/object/creatahero/creataheroreaction.inc

data/ini/object/creatahero/creataheroremoveupgradeupgrades.inc

data/ini/object/creatahero/creataherorespawn.inc

data/ini/object/creatahero/creataheroweaponupgrades.inc

data/ini/object/creatahero/creataamountedheroanims.inc



#9 FatManInABox2

FatManInABox2
  • New Members
  • 2 posts

Posted 24 November 2021 - 11:23 AM

My apologies, I'd forgotten that it wasn't included in the original game. It needs to be downloaded from The 3rd Age...

 

https://www.the3rdag...tem-576?addview

 

The download link is at the bottom of the page. Once you've downloaded it, follow the instructions in the article.



#10 Gloin1245

Gloin1245
  • Members
  • 6 posts

Posted 24 November 2021 - 01:47 PM

My apologies, I'd forgotten that it wasn't included in the original game. It needs to be downloaded from The 3rd Age...

 

https://www.the3rdag...tem-576?addview

 

The download link is at the bottom of the page. Once you've downloaded it, follow the instructions in the article.

 

 

Thank you so much for your time. I am grateful to both of you.


Edited by Gloin1245, 24 November 2021 - 01:52 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users