Go Back   Novahq.net Forum > Games > Joint Operations
FAQ Community Calendar Today's Posts Search

Joint Operations Anything about the Joint Operations series of games.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-02-2021, 08:35 PM
JakeHunter is offline JakeHunter
Registered User

Join Date: Apr 2018
Location: Indiana
Posts: 3

AI Node Coordinate System

Does anyone know if the AI Node Palette in the Nile Editor actually works in allowing AI to move around objects intelligently? I have never gotten it to do anything in any maps I've experimented with.

I did an experiment to see if the game engine actually recognized and loaded a .AIN file by putting a breakpoint on an address with a "_AINode::LoadNodeFile" reference inside an executable debugger. The break point was set off on the load screens that had a .AIN file attached to the mission but the ones lacking one never hit the breakpoint and continued on. This tells me there is some way to use the AI node files because the game does seem to read the .AIN files.

Even with the .AIN file loaded I'll tell a soldier to move to a building and place obstructions in front of him with the nodes generated from the Nile Editor and he still won't follow the nodes around said objects without a waypoint.



Reply With Quote
  #2  
Old 10-03-2021, 03:53 PM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 584

Perhaps the AI needs some flag or another activated to acknowledge the .ain information? Maybe some AIs don't even have an .ain following routine in their programming? Is there any level of incompetence NeverLogic could sink to that would truly baffle me?

I'm feeling a little cynical right now, and I usually joke about rooting for the asteroid, but tonight? No comment.
__________________
////////////////////<- SIGNATURE STARTS ->\\\\\\\\\\\\\\\\\\\\\
The NSO Deadline Mod at NovaHQ.net:
/////////////////////<- SIGNATURE ENDS ->\\\\\\\\\\\\\\\\\\\\\\
Reply With Quote
  #3  
Old 10-03-2021, 04:30 PM
JakeHunter is offline JakeHunter
Registered User

Join Date: Apr 2018
Location: Indiana
Posts: 3

Perhaps, I wish I knew but I don't know a whole lot about the mod tools, editors, or the game engine. I have a little bit of reverse engineering knowledge and find it quite interesting that I can't find almost any information on the Nile Editor's node system on Google. It makes sense to get it working because it would make COOP missions much better for AI navigation.
Reply With Quote
  #4  
Old 10-12-2021, 01:13 AM
jabo1SFH is offline jabo1SFH
jabo1SFH's Avatar
Registered User

Join Date: Jul 2019
Location: AZ
Posts: 524

good luck.

almost every single coop mapper just made sure there were no obstructions to impede the AI in a coop map and/or we just set up waypoints for them to follow around objects.


Reply With Quote
  #5  
Old 12-02-2023, 07:01 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 259

Quote:
Originally Posted by jabo1SFH View Post
good luck.

almost every single coop mapper just made sure there were no obstructions to impede the AI in a coop map and/or we just set up waypoints for them to follow around objects.



Problem with this is that it is so generic. If nodes worked, you could have AI move to ever changing objectives without getting lost. They could hunt down the player no matter where they hide.

I tried to make my own node system with a WAC script using waypoints as nodes. I set up a test map with a small set of city blocks and only about 20 waypoints which would help AI navigate around buildings and such.

I then created a virtual adjacency matrix which assigned each node's neighbor. The WAC would tell the AI that if you are at X node, you can go to Y or Z.

The hardest part was creating a wac script that would tell the AI the shortest path to the objective. In this case, the player.

I did this by assigning each nodes variable as a number that represented the correct direction. Then which ever node the player was closest to, that variable would be set to 1 then all of their neighbors variables would increase by 1.

This creates a path for the AI because when it gets to the node, it has to decide the next one to go to. In this case, as long as it goes to the node with the lowest variable, it will be lead to the player.

This all worked beautiful. No matter where i went in those city blocks, my test AI would follow my nodes to me.

The problem is that it took a lot of lines of wac code for just one AI. After setting up scripts for about 4 total AI on my test map with only about 20 nodes for navigation, it crashed the game. LOL

Not sure why, probably too many variables changing and such. A real bummer though because it worked great with 2 or 3 AI.
Reply With Quote
  #6  
Old 02-21-2024, 10:06 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 259

Thought I'd attach this here, if anyone else wants to play around with this. This is a simple experimental set up.

I did some refining to it, but it works about the same. Using waypoints as simple markers for "nodes".

Each waypoint has a value that represents it, these values are all set to 0. A WAC script gets the players position when the player is a few meters away from a node. Now that it knows which node you are at, it begins increasing that node's value by 1 which triggers every node linked to it to also begin increasing. So the values begin to climb, spreading out from the player's node position. This continues until all node values are greater than 0 then it stops. So now the nodes that are the furthest path from the player should have a value of 1, the players node will have the highest value.

If you move away from the node, all nodes will go back to 0.

There's several scripts that direct the bot to each node according to the nodes that are linked to the bot's current position. These scripts direct the bot to go to the next node that has the highest value.

As the bot follows the nodes with the higher values, it will always lead it to the player's node within one node step of the player.

Play around with it if you want, maybe see if you can come up with a better system. The problem with the current set-up is that if you try to set up 3 or 4 bots, the game begins to crash. Not sure but it may have something to do with too many variables being changed at once. But I just don't know of a more optimized way to do it. Maybe some programmer out there can come up with a better system. I'm not a programmer, so the way I'm doing it might be very inefficient. It's the best I could come up with given the limitations of the mapping tools and WAC.

Run the map and press J to see each node's current value. Then move to one of the nodes (Marked by green lights) and watch the nodes begin to work their magic. Watch the friendly team mate on the map as he finds the shortest path to you.

Try it out and see if you can make him get stuck or lost. lol
Attached Files
File Type: zip AI Node experiment.zip (9.2 KB, 3 views)
Reply With Quote
  #7  
Old 06-20-2025, 04:01 AM
JakeHunter is offline JakeHunter
Registered User

Join Date: Apr 2018
Location: Indiana
Posts: 3

There definitely is a built in node array system for AI to path find. Even BHD had it for campaign missions. I am not sure if it was ever toggled on in BHD either. I am surprised that no one in this community has tried to reverse engineer any of this in Ghidra, IDA, OllyDBG.
Reply With Quote
  #8  
Old 06-20-2025, 07:44 AM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 584

The problem with reverse engineering an .ain creator for NeverLogic games is that it's only necessary for good AI movement, and the attitude that NL gamers have toward single player and co-op modes notoriously range from indifferent to actively hostile.

MechWarrior IV: Mercenaries was a game that came with a mission editor. It was too complicated for me to get a grip on it over a weekend, so I never got a lot done with it, but it had a 'node maker' tool that you ran once you completed item insertions and AI placement. I took ages to finish noding a map.

Battlefield 2 also had a mission editor, it also had a 'node maker' tool and it also was the longest-taking part of map editing. I think.

I've never worked with NILE, I know next to nothing about it. I've done limited work in MEds beyond DFBHD(TS). I don't know much about how AI get around in DFX, DFX2, or JO.

I've done extensive SP and Co-op mapping in DFBHD(TS). According to my DFBHD notes:

Code:
16:06 30.09.2008
----------------

MED Item limits

In one map, you can have:

Buildings and Decorations	1200
Vehicles and Objects		1200
Markers				768
People				256 (including players)
Tiles				6144 (minus sum of the above)

But no more than:

Vehicles			64
Events				255 (I think)
So I believe that attempting to node a map with waypoints by hand is going to be extremely limited in success.

Not to forget that AI that move in DFBHD(TS) co-op maps are ridiculously buggy for clients. An .ain file might help with that, but I have no experience as a client on a co-op map with an .ain file, so I don't know.

An .ain file creator for DFBHD(TS) might be in high demand, but only by, like, half a dozen mappers, ever, 'cause nobody but us cares about single player.



__________________
////////////////////<- SIGNATURE STARTS ->\\\\\\\\\\\\\\\\\\\\\
The NSO Deadline Mod at NovaHQ.net:
/////////////////////<- SIGNATURE ENDS ->\\\\\\\\\\\\\\\\\\\\\\

Last edited by Baldo_the_Don; 06-20-2025 at 06:46 PM.
Reply With Quote
  #9  
Old 06-21-2025, 03:42 PM
jabo1SFH is offline jabo1SFH
jabo1SFH's Avatar
Registered User

Join Date: Jul 2019
Location: AZ
Posts: 524

the problem is that .ain files are really only for the server. the client should "in theory" see that without needing the file. but is it operational? i dont think anyone has ever deliberately set out to see if that really is the case. nova didnt have SP maps other than the training missions for jo. in BHD the .ain files only worked intermittently....



Reply With Quote
  #10  
Old 06-21-2025, 03:48 PM
jabo1SFH is offline jabo1SFH
jabo1SFH's Avatar
Registered User

Join Date: Jul 2019
Location: AZ
Posts: 524

you can tweak ai attributes in the med:


making the max attack distance say, 500
max engagement distance, 250
min engagement distance, 100


would cause the ai to engage any player or opposite team ai by running toward them and they will attempt to go around objects. i see that in alot of old HmS jo maps. ai success getting around object in this manner is about 90-95% with those attributes.

im guessing that nova has the .ain hard coded in those specific attibutes for the jo ai. just a guess though.
Attached Images
File Type: jpg attrib.jpg (71.3 KB, 3 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:39 AM.




Powered by vBulletin®