[Solved] Route system error

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

[Solved] Route system error

Post by Bjarne BZR »

I get this, and the routes are not working:
JvBot 1.1 wrote:ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route axis_bomb_long
ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route axis_bomb_short
ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route allied_bomb_short

...but...
Multiplayer Bots Manual wrote:Add key ?#id? and value ?1? for the node nearest to the destination of the route.

Is this incorrect? Should the enumeration start at 0?
Last edited by Bjarne BZR on Mon Jun 30, 2003 5:23 pm, edited 1 time in total.
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

No node 0 is the destination node and should automatically be set by the bot script. I think you have made certain routes but there isn't an entity with a $route key equal to that route, or a routelist is missing. It may also be a missing 'route tracer', i.e. the node isn't checked for a $route key. The bot script by default checks all entities with certain targetnames, and if you add the $route key to an entity with a different targetname the script can find this destination. So did you assign a $route key to certain entities? And if yes, what's their targetname?

One more note, the bot scripts include a route debug tool, which can be enabled through the bot parameters:
waitthread global/jv_bots/jv_mp_ai.scr::enable 0 0 1 0

The '1' (third parameter) enables the route debuging, which results in console output while setting up the routes.
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

There is no entity with the $route key... but a script_model ( a bomb ) with the $routelist key ( value: routes_to_bomb ) and in the script I've got

Code: Select all

level.routelist[routes_to_bomb] = "axis_bomb_short"::"allied_bomb_short"::"axis_bomb_long"


Here is the trace with route debugging enabled:

Code: Select all

INFO[jv_mp_ai::enable]: Route debug enabled.
INFO[jv_mp_ai::addroute]: Added route tracer for targetname sniper.
INFO[jv_mp_ai::routesetup]: Tracing routes to sniper
Route: axis_bomb_long
-------------------------
ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route axis_bomb_long
   Node: [0] NIL
   Node: [1] route
   Node: [2] route
   Node: [3] route
   Node: [4] route
   Node: [5] route
   Node: [6] route
   Node: [7] route
   Node: [8] route
LastID: 8
-------------------------
Route: axis_bomb_short
-------------------------
ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route axis_bomb_short
   Node: [0] NIL
   Node: [1] route
   Node: [2] route
   Node: [3] route
   Node: [4] route
   Node: [5] route
   Node: [6] route
   Node: [7] route
LastID: 7
-------------------------
Route: allied_bomb_short
-------------------------
ERROR[jv_mp_ai::routesetup]: Node 0 is missing for route allied_bomb_short
   Node: [0] NIL
   Node: [1] route
   Node: [2] route
   Node: [3] route
   Node: [4] route
   Node: [5] route
   Node: [6] route
LastID: 6
-------------------------

It IS the bomb that should have the $routelist key, right? Not the last pathnode?
Admin .MAP Forums
Image
Head above heels.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Bjarne BZR wrote:It IS the bomb that should have the $routelist key, right? Not the last pathnode?


After reading the manual with the exactness of a laser beam... I've noticed that the examples talk of setting up a bombnode entity as the destination of a route... If this is correct, the node 0 is indeed missing because it wont look at bombs... only pathnodes... right?

I'm going to try to set it up this way, and do a re-compile... back in 6 or so hours... if I'm way out of line here: Please ttell me so at once so I can break the unnessesary compile...
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

That's right, you need to add the $routelist key to the bombnode entity, since it's where the bot walks to ;).
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Hmm... yeah.... I really must take some time one of these days to R T F M !!!!! :wink:
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well the manual isn't always all that clear :oops:
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Maby not clear, but the info always seem to be there. I prefer good info to good structure ( But OK, both is better :wink: ).
Admin .MAP Forums
Image
Head above heels.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

jv_map wrote:It may also be a missing 'route tracer', i.e. the node isn't checked for a $route key. The bot script by default checks all entities with certain targetnames, and if you add the $route key to an entity with a different targetname the script can find this destination. So did you assign a $route key to certain entities? And if yes, what's their targetname?
I'm now having the same problem setting up routes to the "targetname triggernode" pathnode that is used by the trigger task you created. My guess is that "triggernode" is not one of the targetnames that the bot-script searches for... and if so: can I tell it to search for it?
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes you can (actually I should've added it to the setup section of the trigger task :oops: ).

Here's the line you can either put in your map's script or add to task_trigger.scr in the setup thread:

waitthread level.jvbot_main_script::addroute triggernode
(if placed in task_trigger.scr)

or
waitthread global/jv_bots/jv_mp_ai.scr::addroute triggernode
(if placed above the bots enable line in your map script)
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

OK... the good thing:

I'm getting this in the console:
console wrote:INFO[jv_mp_ai::addroute]: Added route tracer for targetname triggernode.
...but there is someting wrong with the routelists now, they look like this and dont work:

Code: Select all

-------------------------
Route: bomb_to_desk
-------------------------
	Node: [0] Type 'array'
	Node: [1] route
	Node: [2] route
	Node: [3] route
	Node: [4] route
	Node: [5] route
	Node: [6] route
	Node: [7] route
	Node: [8] route
	Node: [9] route
	Node: [10] route
LastID: 10
The workin ones look like this:

Code: Select all

Route: allied_bomb_short
-------------------------
	Node: [0] list:
		[1] bombnode
		[2] bombcamp
		[3] bombcamp
		[4] bombcamp
		[5] bombcamp
		[6] bombcamp
		[7] bombcamp
		[8] bombcamp
	Node: [1] route
	Node: [2] route
	Node: [3] route
	Node: [4] route
	Node: [5] route
	Node: [6] route
LastID: 6
My guess here is that the fault is still in Node: [0]... because the

Code: Select all

INFO[jv_mp_ai::addtask]: Added task trigger (priority: 100).
is printed in the log AFTER the routes has been set up... and alll other tasks are added before the route setup...

???

My script looks like this:

Code: Select all

level waittill spawn
	level.routelist[routes_to_desk_doc] = "wall_to_desk"::"bomb_to_desk"
	level.routelist[routes_to_wall_doc] = "desk_to_wall"::"bomb_to_wall"
	level.routelist[routes_to_bomb] = "axis_bomb_short"::"allied_bomb_short"::"axis_bomb_long"
	$distiller_bomb thread global/jv_obj_dm.scr::bomb_thinker
	waitthread global/jv_bots/jv_mp_ai.scr::addroute triggernode 
	waitthread global/jv_bots/jv_mp_ai.scr::enable 1 1 1 1
	waitthread level.jvbot_main_script::addtask trigger 100
(The bot-part anyway)
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm there doesn't seem anything wrong with this output. The 'type array' is a bit weird but it happens often, I'm still not sure why :?

The 'added task trigger' message appears later since it's added from your map script after the bots are enabled, but this shouldn't be a problem (tasks are independent from routes).
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

So the route should work with Node: [0] Type 'array' ?
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes :)
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Guess what... they work like a... a... a thing that works. :D

It just needed a proper compile ( the 24h kind, not the wonderful ?minute -onlyents compile ).

-> :D <-
Admin .MAP Forums
Image
Head above heels.
Post Reply