July 20, 2019, 07:12:00 AM

Username
Password

Pages: 1 2 3 [4]   Go Down
Print
Author Topic: Dark Omen Reborn  (Read 23798 times)
0 Members and 1 Guest are viewing this topic.
devast3d
Developer
*
Offline Offline

Posts: 31


View Profile
« Reply #45 on: July 06, 2019, 08:57:27 AM »

I decided to go from scratch because it's faster. Waypoints are taken from BTB file.
Logged
cuthalion
Campaign Creator
*
Offline Offline

Posts: 377


View Profile
« Reply #46 on: July 06, 2019, 11:01:49 AM »

Interesting, could you elaborate on the AI behaviour a bit? How enemy units decide "what they should do"? Has this logic to be reprogrammed for each melee/ranged unit on each map or is it something that can be applied to all maps?

In CTL files, "AI" logic was not de facto AI, it was a set of scripts that defined behaviour of each unit on one map.
Melee unit scripts (cavalry, infantry, chariots) were pretty straightforward:
1) Waiting for a certain even to get teleported to a certain place on the map.
   The event can be: timer, player unit within a certain range, certain unit alive/dead etc. Sometimes unit is not teleported but stands at a certain place on the map, waiting for event trigger.
2) Basically hunt nearest player unit, or if none can be seen, patrol between waypoints.

Archers had more complicated "AI". I cannot really call it an AI. It was basically instruction to go to a certain predefined waypoint, and shoot everyone from there. 2-3 waypoints were set up, archers moved between them, if they suffered damage etc...Every ctl map had to have its own set of scripts for each archer regiment.

Mages also had a pre-programmed behavour that defined their spells and moves on one map. Everything except event handlers should have been reprogrammed for any map.

This was very clumsy and not modding-friendly. On the other hand, all existing mods - at least mine - are bound to CTL files and will be completely broken otherwise.

Thank you very much again, for the UE demo of Dark Omen looks really promising.
Logged
devast3d
Developer
*
Offline Offline

Posts: 31


View Profile
« Reply #47 on: July 09, 2019, 11:43:00 AM »

I'm using Behavior Trees - https://docs.unrealengine.com/en-US/Engine/AI/BehaviorTrees/QuickStart/index.html

They are applied to the unit type and work the same on different levels. Waypoints are just parameters. Scripting manually is too much work.
Logged
cuthalion
Campaign Creator
*
Offline Offline

Posts: 377


View Profile
« Reply #48 on: July 10, 2019, 08:16:14 AM »

Thanks!
Logged
Pages: 1 2 3 [4]   Go Up
Print
Jump to: