Colobot Forum - International Colobot Community
Help with CBOT environment control: - Printable Version

+- Colobot Forum - International Colobot Community (https://colobot.info/forum)
+-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76)
+--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58)
+---- Forum: Help (https://colobot.info/forum/forumdisplay.php?fid=61)
+---- Thread: Help with CBOT environment control: (/showthread.php?tid=907)



Help with CBOT environment control: - Quartofel - 03-08-2017

Hiya!

I'm currently working on a really cool mode (at least I think it's cool) for Code Battles. King of The Hill to be exact. And I'm a bit stalled, as it'll rely heavily on Overlord Bot, wich will take care about respawning destroyed bots. The issues I have are:
  • Is it possible to produce(); damaged and powered vehicle?
  • Is it possible to produce(); vehicle with loaded and running user's program without necessity to paste it earlier in predefined directory? (i.e. Save program as public and run it at respawn.
  • Is it possible for neutral bot to spawn teamed bot?
I answers to those are "No." I'll be rather unhappy, but I already have workarounds prepared. But they're not foolproof and rather complicated to implement (namely multiple "service" bots, at very least 8 of them).

Also, I'd appreciate if someone passed me knowledge on how to dynamically keep track on bots, specially their ammount.
I'll need to write a CBOT script to keep 2 Tracked OrgaShooters and one Practice Bot per team with 5s respawn cooldowns (it's completely untested ammount obviously and I will adjust it as needed.

Also, question for you guys - would you prefer to play it 'till first bot gets on platform or first-to-get-3? CBOT Overlord program adds shitton of possibilities to Code Battles.

PS Yes, I am hyped.


RE: Help with CBOT environment control: - krzys_h - 03-09-2017

(03-08-2017, 08:29 PM)Quartofel Wrote: Overlord Bot
The concept of using a CBOT script to contol a level is not new. We call this a LevelController script, but some people still use the old temporary name GhostBot. The level files even have an LevelController command which creates an invisible object (but after some refactoring it will likely have no assockated object at all). The only problem is, as you noticed, CBOT is missing many functions for doing anything advanced with it.

(03-08-2017, 08:29 PM)Quartofel Wrote:
  • Is it possible to produce(); damaged and powered vehicle?
Unfortunately, no. But allowing produce() to specify other object parameters is something that has been on my TODO list for quite a while.

(03-08-2017, 08:29 PM)Quartofel Wrote:
  • Is it possible to produce(); vehicle with loaded and running user's program without necessity to paste it earlier in predefined directory? (i.e. Save program as public and run it at respawn.
You can try ../program/ProgName.txt for public saved programs, but I can't promise that works because I never tried it.

(03-08-2017, 08:29 PM)Quartofel Wrote:
  • Is it possible for neutral bot to spawn teamed bot?
No, see the point about expanding produce() parametrs.

(03-08-2017, 08:29 PM)Quartofel Wrote: Also, I'd appreciate if someone passed me knowledge on how to dynamically keep track on bots, specially their ammount.
Try sizeof(radarall(PracticeBot)); (also works with other radar parameters for team selection)
Keep in mind this is untested, and radarall is quite a new addition to CBOT.


RE: Help with CBOT environment control: - Quartofel - 03-09-2017

Ok, thank you. Workarounds then, I still think that this concept is doable.