OpenXcom Forum

Modding => Help => Topic started by: The Martian on May 16, 2023, 03:29:59 pm

Title: Is there a limit to the number of AI Route Nodes per map?
Post by: The Martian on May 16, 2023, 03:29:59 pm
Is there a limit to the number of AI Route Nodes per map?
(https://openxcom.org/forum/index.php?action=dlattach;topic=11266.0;attach=59778)
Title: Re: Is there a limit to the number of AI Route Nodes per map?
Post by: kevL on May 16, 2023, 03:46:53 pm
Is there a limit to the number of AI Route Nodes per map?

good question. Mv2 at present, i believe, limits the count to 256 ... but here are some notes for the next release:

Quote
- hardcap Link destinations to MaxDestId=250. The value is stored as a byte in
  the Routefile but the top 5 values are reserved for the compass points and the
  NotUsed value. Note that Routenode IDs are not limited to Byte.MaxValue but
  they can't be linked to if their ID is greater than 250.
- support more than 256 routenodes in a Routefile.

That is, the count of routenodes is basically unlimited (the maxsize of an RMP file on disk). But the link destination is stored in a byte ... so that needs to be limited.

but not sure how OxC/e handles this
Title: Re: Is there a limit to the number of AI Route Nodes per map?
Post by: Solarius Scorch on May 16, 2023, 11:03:24 pm
Yeah, I managed to break the 255 limit once. :P
Title: Re: Is there a limit to the number of AI Route Nodes per map?
Post by: The Martian on May 18, 2023, 06:37:39 pm
In that case I'll have to keep an eye on the number of nodes I have left while routing.

Since the aliens will path themselves around obstacles the limit shouldn't be too bad.

Thank you for the information.
Title: Re: Is there a limit to the number of AI Route Nodes per map?
Post by: Solarius Scorch on May 18, 2023, 07:11:43 pm
Yeah, there is no need to put many nodes. I mean, I usually place a lot of them, because I tend to direct the AI to perform in specific ways (peeking from the windows, patrolling around important spots like stairs, etc.), but it's not exactly required.

The case I mentioned before happened when I was making routes for the TFTD luxury liner, the version which has both top and bottom parts as one map. So, pretty extreme, especially with all those countless little rooms.