Go Back   Novahq.net Forum > Games > Joint Operations

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: 2

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: 529

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: 2

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: 445

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: 229

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: 229

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, 2 views)
Reply With Quote
Reply


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

Advanced Search
Display Modes

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 10:26 AM.




Powered by vBulletin®