Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node graph building and game parameters for cubemaps #220

Open
WonderlandWar opened this issue Sep 4, 2023 · 4 comments
Open

Add node graph building and game parameters for cubemaps #220

WonderlandWar opened this issue Sep 4, 2023 · 4 comments

Comments

@WonderlandWar
Copy link

WonderlandWar commented Sep 4, 2023

Just a small extra convenience, you'd probably need to have it load into the game to build the node graphs (building cubemaps doesn't build node graphs for some reason despite loading into the map)

For cubemaps, I do think it would be nice to add custom game parameters when the game starts. Like +building_cubemaps, for example.

@WonderlandWar WonderlandWar changed the title Add node graph building Add node graph building and game parameters for cubemaps Sep 4, 2023
@Exactol
Copy link
Collaborator

Exactol commented Sep 5, 2023

Not familiar with node graphs, would the nav step create it?

@WonderlandWar
Copy link
Author

Not familiar with node graphs, would the nav step create it?

Not sure, but I think what you could do is have the map start to build the node graphs, and to detect when the node graphs are done rebuilding, you can detect if the .ain file changes and if it does, it's likely done building the node graphs.

@SnabbSpelare
Copy link

SnabbSpelare commented Aug 24, 2024

Not familiar with node graphs, would the nav step create it?

Not sure, but I think what you could do is have the map start to build the node graphs, and to detect when the node graphs are done rebuilding, you can detect if the .ain file changes and if it does, it's likely done building the node graphs.

Node Graph Generation and .nav Files

I don't think you understand. Whenever you load a map that hasn't been opened before, it will generate a Node Graph (".nav") when you're fully loaded into the map. See image: Node Graph after running the game.

But this doesn't mean it generates AI nodes automatically—it never does. The nav_generate command simply generates the navigation mesh, which are the paths NPCs will use, based on the AI nodes that already exist in the map. These AI nodes have to be manually placed by the map developer. This cannot be done via a launch parameter, so I'm not sure what the suggestion will achieve.

The Importance of Packing .nav Files

This is especially true if a map hasn't been packed with a .nav file (which is possible for GMod and CSGO) or if it's not included separately in the maps folder in the addon. This is a very common practice, but beginners often don't know this, based on what I've seen. Additionally, many roleplay developers don't bother adding or generating nav or AI nodes because they are useless in DarkRP and many other gamemodes unless NPCs are important.

The Challenges of Recompiling Maps

Also, after each compile, the .nav file needs to be rebuilt, which adds extra work for developers. Every time you compile the map, you have to remember to include or pack the newly generated .nav file. If you don't, the game will say that its outdated Graph Node leading to it being rebuilt anyway. This is often ignored by developers who might skip this step due to laziness or oversight.

Automated Tools for Node Graph and Navigation Node Packing

Actually, there is a point to packing the Node Graph and Navigation Nodes, but this is best done using a tool like the AutoBSPpackingTool (No offense! - Scout), which automates the process for you. Alternatively, you can manually grab the .ain and .nav files and add them to your map's addon folder in their respective folders. The only problem with your suggestion, in my opinion, is that you're asking for a feature to automatically generate and pack something that isn't commonly used. And when it is used, it's not hard to do manually unless you're in a situation where speed is critical.

Final Thoughts

There's no point in automating the creation of .nav files since they are already generated automatically when needed. I understand you want to automate the Navigation Nodes, but it's recommended to include AI Node hints and other elements like flight paths, etc., which need to be manually placed by the map developer.

Conclusion

I hope this explanation helps clarify the situation. Thanks for your time, and I hope this was useful to you.

Best regards.

@SnabbSpelare
Copy link

SnabbSpelare commented Aug 24, 2024

Just a small extra convenience, you'd probably need to have it load into the game to build the node graphs (building cubemaps doesn't build node graphs for some reason despite loading into the map)

For cubemaps, I do think it would be nice to add custom game parameters when the game starts. Like +building_cubemaps, for example.

It doesn't build the .nav file because you're not loading into the game as a player but as a camera. That's why the game automatically forces you to exit after it's done building cubemaps. That's why it's required you to load the map as a player to generate the node graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants