Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 7 - Falcon's Last Flight > Thread: AI Scripts modding tutorialresearch
Thread: AI Scripts modding tutorialresearch This thread is 3 pages long: 1 2 3 · NEXT»
Biopat
Biopat

Tavern Dweller
posted January 04, 2017 08:48 PM bonus applied by Brukernavn on 05 Jan 2017.
Edited by Biopat at 20:48, 04 Jan 2017.

AI Scripts modding tutorial/research

Hi, I made some progress with MMH7 scripts modding. I found how to inject my own scripts into game. I don't have time to make any usable mod but I want to share my knowledge. I think that modding of Artificial Intelligence scripts is possible and I wrote tutorial how to do it.

My project is fork of LukaOo code. Thank you LukaOo again.

[url=https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods]Project[/url]
[url=https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/wiki]Scripts Modding Tutorial[/url]
[url=https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/wiki/AI-Mod]AI Modding example[/url]
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
LizardWarrior
LizardWarrior


Honorable
Legendary Hero
the reckoning is at hand
posted January 04, 2017 10:23 PM
Edited by LizardWarrior at 22:29, 04 Jan 2017.

Nice work. You sure got talent but it's a shame that it's wasted on such a forgettable game.

If such levels of programming are involved, I'd rather make my own game than continue working on that abomination. (yes, I don't use unreal's default damage class)

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Galaad
Galaad

Hero of Order
Li mort as morz, li vif as vis
posted January 04, 2017 11:29 PM

Oh my hands, still not textured.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Moritzbradtke
Moritzbradtke


Known Hero
posted January 05, 2017 02:39 PM

yes, time is a problem these days, especially if u dont have much Knowledge about programming ): but i still think H7 is an awesome game, advneture map AI and hero managing is one of its biggest Problems though

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted January 05, 2017 04:23 PM

Outstanding job, Biopat! (suggesting to award you with QP)
Hopefully someone finds a way how to fix some of the biggest problems.

Especially if Ubi is not planning to release another HoMaM or MMH, it would be extremely nice to see H7.5 coming one day.



____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Moritzbradtke
Moritzbradtke


Known Hero
posted January 05, 2017 08:20 PM

Antalyan said:
Outstanding job, Biopat! (suggesting to award you with QP)
Hopefully someone finds a way how to fix some of the biggest problems.

Especially if Ubi is not planning to release another HoMaM or MMH, it would be extremely nice to see H7.5 coming one day.





/signed , would be cool to see some remaing Bugs fixed at last, like the infinite aoe Loop of AI Units in Firewalls etc., or an AI mage that actually has some high lv spells and knows how to use em, one can still dream!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Moritzbradtke
Moritzbradtke


Known Hero
posted July 18, 2017 01:11 AM
Edited by Moritzbradtke at 02:23, 18 Jul 2017.

just for case anyone is ever going to do an AI mod for the game, one big Problem is that AI is not always using skills of creatures and spells on hereos even if it has a spell, it seems dmg spells with target enemy work fine, buff spells are just randon thrown in but some spells like heal i dont think the AI can cast the A_Heal spell

edit: just checked that post again and too bad that Person didnt continue working on it even he had such bug sucess /: maybe he will come back at some Point and do a Little AI mod at last

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vildark
Vildark


Hired Hero
posted June 28, 2018 12:15 PM
Edited by Vildark at 12:26, 28 Jun 2018.

Hello H7 fans,
When I offered my help for IA improvement on UCP mod to Antalyan, he sent me here.

So here I am, trying to start from BioPat's work.
I followed his useful wiki: [url=https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/wiki]https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/wiki[/url]
But I am getting errors on script compilation:
Quote:
--UDKBase - Release--
Analyzing...
D:GamesMH7-SonnyDevelopmentSrcUDKBaseClassesMobilePlaceablePawn.uc(64) : Error, BEGIN OBJECT: No base template named CollisionCylinder found in parent class GamePawn:     Begin Object Name=CollisionCylinder
D:GamesMH7-SonnyDevelopmentSrcUDKBaseClassesSimplePawn.uc(160) : Warning, ComponentProperty Engine.Actor:Components.Components: unresolved reference to 'Sprite)'
D:GamesMH7-SonnyDevelopmentSrcUDKBaseClassesSimplePawn.uc(160) : Error, Unable to parse parameter value 'Sprite)' in defaultproperties array operation:     Components.Remove(Sprite)
D:GamesMH7-SonnyDevelopmentSrcUDKBaseClassesSimplePawn.uc(163) : Error, BEGIN OBJECT: No base template named CollisionCylinder found in parent class GamePawn:     Begin Object Name=CollisionCylinder
Compile aborted due to errors.


I will eventually deal with this error. I already understand that BioPat's files overwrites UDK's. I just have to dive in and make my own compilation of both source code.
But it seems like I don't have the good UDK base, even if, as advised by BioPat, I took UDK-2014-02 that I found here:
[url=https://forums.unrealengine.com/legacy-tools-unreal-engine-3-udk/udk-content-creation-and-design/69672-all-udk-downloads?p=925576#post925576]https://forums.unrealengine.com/legacy-tools-unreal-engine-3-udk/udk-content-creation-and-design/69672-all-udk-downloads?p=925576#post925576[/url]

Have someone already worked this out and may speed me up?

Thanks,
Vildark
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vildark
Vildark


Hired Hero
posted July 02, 2018 10:18 AM

Hello there,
As I said I would, I did managed to compile scripts.
For information, that's what I did:

Pawn.uc: BioPat's Pawn.uc was missing defaultProperties so I took them from UDK's.

DefaultEngine.ini:
Completed necessary packages list:
Quote:
[UnrealEd.EditorEngine]
+EditPackages=OnlineSubsystemUPlay
+EditPackages=MMH7Engine
+EditPackages=MMH7GameStub
+EditPackages=AkAudio
+EditPackages=MMH7Game


After that, compilation was succesful.

Then, I added MMH7AIMod.u to my game, but now the game crash on launch.
I have 3 ideas of how to fix it:
- look at the crash log if there is one
- fix all compilation warnings
- find specifities of BioPat's mod between 1.8 and 2.21 version (because I am currently trying on 1.8 as I did not buy the game yet, therefore my other thread on what to buy.). Problem is, I don't know how to get .uc files for 1.8 (BioPat only shared 2.21 .uc files. But maybe they are the same. I don't know).

Like before, any help would be gladly appreciated.
Thanks
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted July 04, 2018 11:23 PM

You should be working with the newest version 2.21, otherwise it would not be compatible. I can send you any files as soon as I return from my holidays.
____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
vildark
vildark


Hired Hero
posted July 08, 2018 05:35 PM

I finally bought Trial by Fire.

I followed BatPio's instructions:
Copy "UDKGameScriptMMH7AIMod.u" to game directory "Might and Magic Heroes VIIMMH7GameCookedPC"
Open file "[My Documents]My GamesMight & Magic Heroes VIIMMH7GameConfigMMH7Engine.ini". Add to section [Engine.ScriptPackages] entry NativePackages=MMH7AIMod
Run game and wait until main menu appears.
Inject mod dll "MMH7ScriptsMod.dll" using "Extreme Injector".

I used BatPio's MMH7ScriptsMod.dll and MMH7AIMod.u (MMH7ScriptsAIModExampleUdk/UDKGame/Script/).

But I don't see any difference in AI behaviour. They can still wait or not wait. Maybe because it is not compatible with Trial by fire.

Has someone already made this work?
@Antalyan: Can you please try on 2.2.1 vanilla?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
MoritzBradtke
MoritzBradtke


Known Hero
posted July 11, 2018 05:02 PM

I wish u good luck, Maybe u'll figure it out and we'll see a small AI mod for the game that can improve some aspects (:

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted July 15, 2018 03:45 PM

vildark said:
I finally bought Trial by Fire.

I followed BatPio's instructions:
Copy "UDKGameScriptMMH7AIMod.u" to game directory "Might and Magic Heroes VIIMMH7GameCookedPC"
Open file "[My Documents]My GamesMight & Magic Heroes VIIMMH7GameConfigMMH7Engine.ini". Add to section [Engine.ScriptPackages] entry NativePackages=MMH7AIMod
Run game and wait until main menu appears.
Inject mod dll "MMH7ScriptsMod.dll" using "Extreme Injector".

I used BatPio's MMH7ScriptsMod.dll and MMH7AIMod.u (MMH7ScriptsAIModExampleUdk/UDKGame/Script/).

But I don't see any difference in AI behaviour. They can still wait or not wait. Maybe because it is not compatible with Trial by fire.

Has someone already made this work?
@Antalyan: Can you please try on 2.2.1 vanilla?

What exactly shall I try?

If you have any question regarding Biopat's work, I suggest that you could contact him, that's probably the easiest way to hget the answers.
____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
vildark
vildark


Hired Hero
posted July 15, 2018 08:46 PM
Edited by vildark at 20:52, 15 Jul 2018.

Thanks for cheering me up MoritzBradtke

I am already trying to contact BatPio.

You should follow the installation process of AI mod:

1) Copy https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/blob/master/MMH7ScriptsAIModExampleUdk/UDKGame/Script/MMH7AIMod.u
Paste it in game directory: Might and Magic Heroes VII / MMH7Game / CookedPC (where there already is MMH7Game.u)

2) Open file "[My Documents] / My Games / Might & Magic Heroes VII / MMH7Game / Config / MMH7Engine.ini". Add to section [Engine.ScriptPackages] entry: NativePackages=MMH7AIMod

3) Download extreme injector: https://www.unknowncheats.me/forum/downloads.php?do=file&id=21570 (You might have to register on the site)

4) Download MMH7ScriptsMod.dll here: https://github.com/BatPio/Might-And-Magic-Heroes-VII-Mods/releases

5) Run game and wait until main menu appears.

6) Inject "MMH7ScriptsMod.dll" using "Extreme Injector".

Then see if IA will always wait.
I hope it works, because Biopat's did a huge work, and it would be very hard to fix it.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted July 16, 2018 05:34 PM
Edited by Antalyan at 18:11, 16 Jul 2018.

@vildark
I don't have just the plain vanilla either but it should not make any difference, both of them are merged, only some content is locked without TbF.

EDIT:
One unrelated question, would you be able to look into the properties of Moats? I don't have any idea how the things you do work but I have run out of all ideas what to do with them, there must be a mistake in the source code, so the creature is trapped inside.

I tried to changed them into Traps but the game treats them as if they were creatures from one half, so they can be targeted etc.

If you are able to do sth. with at least one of those archetypes, I'd be really thankful.
____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vildark
Vildark


Hired Hero
posted July 17, 2018 10:52 AM

Ok let me know if IA mod work for you.

Arf IA get stuck in Moats too?! Maybe it is the same problem as AOE like firewall. I won't test what I change for the moment as the mod doesn't work on my game, but I can already look into the source code to get the problem.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted July 17, 2018 06:10 PM

Vildark said:
Ok let me know if IA mod work for you.

Arf IA get stuck in Moats too?! Maybe it is the same problem as AOE like firewall. I won't test what I change for the moment as the mod doesn't work on my game, but I can already look into the source code to get the problem.

I cannot test myself at this moment but I will pass that to my testing team to do that

It's not the problem of AI but of general mechanics, any creature entering the moat is trapped there forever, even controlled by the player.
____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
MoritzBradtke
MoritzBradtke


Known Hero
posted July 17, 2018 07:41 PM

just in case u make Progress with the AI MOD and Need some hints what could Need improvement, let me know, Combat AI is fine for most part, Adventure AI could Need some improvements but without putting some effort in and it and being able to understand everything what is written in the AI script, it seems impossible to improve the script, i've alrdy checked both so i do understand how some Things in the game work but i dont understand everything in the scripts

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vildark
Vildark


Hired Hero
posted July 18, 2018 10:19 AM

It won't matter long anyway: I got in touch with Biopat. I think he will quickly help me through it

Oh ok for moats. But now I wonder, does the player get stuck in AOE like firewall too? That would explain why IA get stuck in AOE: not an IA problem but an AOE problem. I will test this evening. And I will soon look into moats source code.

Thank you MoritzBradtke. I think it will definitly come in handy that you already looked into it. I will get back to you as soon as AI mod work for me.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Antalyan
Antalyan


Promising
Supreme Hero
H7 Forever
posted July 18, 2018 06:20 PM

Vildark said:
It won't matter long anyway: I got in touch with Biopat. I think he will quickly help me through it

Oh ok for moats. But now I wonder, does the player get stuck in AOE like firewall too? That would explain why IA get stuck in AOE: not an IA problem but an AOE problem. I will test this evening. And I will soon look into moats source code.

Thank you MoritzBradtke. I think it will definitely come in handy that you already looked into it. I will get back to you as soon as AI mod work for me.

It has been tested and it doesn't seem to do what's intended - however, I'm glad you find a better way to get desirable information.


The problem is that the player is wise enough to get out of the AOC while the AI is not and stays in. However, there is another problem with Firewall: The interrupt movement action in the whole game does not work correctly.

____________
Important H7 tips & tricks
H7 Community Patch (UCP)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 3 pages long: 1 2 3 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0599 seconds