.reloadcob
Moderator: Moderators
.reloadcob
For all you BOS scripters...
I've added the .reloadcob <unitname> command for the next
release. Combined with the ability to call cob functions directly
from the game console(via the lua interface), it should make your
COB development and debugging much easier.
P.S. The command is only available when cheating is enabled. It's
almost guaranteed to cause desyncs if used in a real game.
I've added the .reloadcob <unitname> command for the next
release. Combined with the ability to call cob functions directly
from the game console(via the lua interface), it should make your
COB development and debugging much easier.
P.S. The command is only available when cheating is enabled. It's
almost guaranteed to cause desyncs if used in a real game.
Last edited by trepan on 03 Mar 2007, 21:55, edited 1 time in total.
-
- Posts: 854
- Joined: 28 Jan 2005, 18:15
Calling cob functions via the lui interface? As in any, arbitrarily named cob function? Is doing such properly synced? Is it healthy for my brain to try to kick into overdrive when I am as burned out as I am right now?
Well, I don't expect an answer on the latter one, but the other 3 would be awesome!
Well, I don't expect an answer on the latter one, but the other 3 would be awesome!
http://spring.clan-sy.com/phpbb/viewtopic.php?t=9329
Yes, any COB function (with input params, output params, and callbacks).
This LUA->COB calls are not available to LuaUI (obviously).
Yes, any COB function (with input params, output params, and callbacks).
This LUA->COB calls are not available to LuaUI (obviously).
KDR_11k
Here's an example of how you can add a graphics command to the UI
using lua to call into a COB. This code adds a new command to the menu,
and uses a custom command id code to make units "dance" (if they have
a Dance function available).
Note that LuaUI is disabled. The Dance command comes from the mod.
// included into armdfly.bos
http://trepan.bzflag.bz/spring/dflydance.bos
// code goes into LuaMod/main.lua
http://trepan.bzflag.bz/spring/dflydance.lua

Here's an example of how you can add a graphics command to the UI
using lua to call into a COB. This code adds a new command to the menu,
and uses a custom command id code to make units "dance" (if they have
a Dance function available).
Note that LuaUI is disabled. The Dance command comes from the mod.
// included into armdfly.bos
http://trepan.bzflag.bz/spring/dflydance.bos
// code goes into LuaMod/main.lua
http://trepan.bzflag.bz/spring/dflydance.lua

trepan, I hope you have a fix for the huge meltdown that would happen if all the modders started going crazy with lua UI commands and lua game mechanics and the immense lack of information the AIs have. GroupAI and Skirmish AI are going to be crippled by custom game mechancis the AI cant possibly know about.
AF:
I'd asked BetaLord to add controls for gaia and modrules to TASClient,
even before your initial post here. I'll probably want something added to
Settings.exe too (.springrc/registry controls them unless a startup script
is being used).
P.S. The reason I don't do it myself is that I do not have
access to the required build environment (no windows).
I'd asked BetaLord to add controls for gaia and modrules to TASClient,
even before your initial post here. I'll probably want something added to
Settings.exe too (.springrc/registry controls them unless a startup script
is being used).
P.S. The reason I don't do it myself is that I do not have
access to the required build environment (no windows).
What about modders who're handed a set of tools then told that if they use them AIs wont work so they have to be able to turn them on and off at will?
And in a project where we have 3 lobbies why is the 1 lobby getting preferential treatment? The "tasclient is the only working lobby" arguement just doesnt hold. Both alternative lobbies have managed to launch games of spring before xmas 2006, and both are moving forward faster than ever.
And turning the whole lua feature off for AIs is not the only method. As of yet there is no CanBuild() function for AIs and no way for AIs to look up game rules save by running a parrallel simulation of the game which is a ludicrous idea. You cant change huge quantities of the udnerlying game mechanics, not provide new callbacks for AIs, and not expect a thriving part of the community to dwindle from neglect, the signs of which we're already starting to see with the premature death of the groupAI.
As for build environment, you have wine. Not that the only people I'm aware of who have managed to compile tasclient ever are betalord, Zenka, and altaric.
My only answer for the direction things are headed is that you intend to add lua skirmish AIs or at least the possibility.
And in a project where we have 3 lobbies why is the 1 lobby getting preferential treatment? The "tasclient is the only working lobby" arguement just doesnt hold. Both alternative lobbies have managed to launch games of spring before xmas 2006, and both are moving forward faster than ever.
And turning the whole lua feature off for AIs is not the only method. As of yet there is no CanBuild() function for AIs and no way for AIs to look up game rules save by running a parrallel simulation of the game which is a ludicrous idea. You cant change huge quantities of the udnerlying game mechanics, not provide new callbacks for AIs, and not expect a thriving part of the community to dwindle from neglect, the signs of which we're already starting to see with the premature death of the groupAI.
As for build environment, you have wine. Not that the only people I'm aware of who have managed to compile tasclient ever are betalord, Zenka, and altaric.
My only answer for the direction things are headed is that you intend to add lua skirmish AIs or at least the possibility.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
Simply fact of life to hard for all 3 of us to agree on things....
And to be fair betalord not a bad dictator :)
While there some lobby changes (note not protocol changes) would like to see, they are tedious and get done in time. Besides dont want to have to help maintain Lobby Server.
Well minus some units that are based of TASClient way it stores data versus using same values script.txt / unitsync uses...
But there all implentmention details, that were added before we got more lobbys
edit: Although a mailing list for lobby dev wouldnt go a miss, would make it alot easier to keep up todate with (upcoming) changes. As i still not sure what the hell this topic is about really. Hell i not even use how lobby client gets unit restrictions :/
And to be fair betalord not a bad dictator :)
While there some lobby changes (note not protocol changes) would like to see, they are tedious and get done in time. Besides dont want to have to help maintain Lobby Server.
Well minus some units that are based of TASClient way it stores data versus using same values script.txt / unitsync uses...
But there all implentmention details, that were added before we got more lobbys
edit: Although a mailing list for lobby dev wouldnt go a miss, would make it alot easier to keep up todate with (upcoming) changes. As i still not sure what the hell this topic is about really. Hell i not even use how lobby client gets unit restrictions :/