Giter VIP home page Giter VIP logo

Comments (6)

thebigsleepjoe avatar thebigsleepjoe commented on June 22, 2024

Will be tackled around the same time as #18 -- actually sounds pretty easy to run an incremental generation if the optimizer addon is installed. Thank you for providing a snippet and some extra background, very helpful.

from ttt-bots-2.

thebigsleepjoe avatar thebigsleepjoe commented on June 22, 2024

I'm thinking of having a feature like this be a cvar that is automatically enabled (e.g., "ttt_bot_nav_auto 1") and it will generate a navmesh for the map on the first load. Thoughts?

from ttt-bots-2.

EntranceJew avatar EntranceJew commented on June 22, 2024

from ttt-bots-2.

thebigsleepjoe avatar thebigsleepjoe commented on June 22, 2024

Since navmesh optimizer requires sv_cheats to be 1, which is a protected cvar. This is not possible to perform automatically.

Tried:

  • function game.ConsoleCommand
  • Player:ConCommand
  • RunConsoleCommand

The worst part is that I only discovered this fact after writing 98% of the code.... haha....

from ttt-bots-2.

thebigsleepjoe avatar thebigsleepjoe commented on June 22, 2024

In-progress, working on similar command which can be placed between sv_cheats, as such:

sv_cheats 1; ttt_bot_nav_gen; sv_cheats 0;

from ttt-bots-2.

thebigsleepjoe avatar thebigsleepjoe commented on June 22, 2024

Unfortunately, I've discovered that even this ^ is impossible. Below is the only working method with the new concommand I'll be adding in v1.3:

  1. Enter sv_cheats 1 in the console
  2. Type ttt_bot_nav_gen
  3. Wait for a bit
  4. Enter sv_cheats 0

We cannot run it synchronously, as N.O. (and nav_generate_incremental, which it relies on) is asynchronous by design. Namely, N.O. uses timers and concommands heavily to generate its navmeshes. Running the above commands is an acceptable solution for small servers or servers of trusted friends, so I'm leaving it in.

If you wish to avoid the prep work, the only solution is to use find navmeshes on the workshop and limit your map pool to maps with navmeshes. I wish more mappers included navmeshes in them.

from ttt-bots-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.