.reloadcob

.reloadcob

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

.reloadcob

Post by trepan »

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.
Last edited by trepan on 03 Mar 2007, 21:55, edited 1 time in total.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

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!
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

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).
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

trepan wrote:This LUA->COB calls are not available to LuaUI (obviously).
Would be nice if we could add a list of functions to our mods that should be exposed to the UI.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

The cob / gaia / mod scripts can access the cob functions. That will
probably suffice for whatever it is that you are hoping to achieve.
Exposing COB calls to the unsynced LuaUI is a great way to cause
desyncs.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

This indeed should be handy. Ta very much trep. :-)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

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

Image
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

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.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

.modlua disable
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

*_* you cant seriously expect noobs to have todo that to get a skirmish AI to work??!?!?!?!?!?!?
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Sounds like someone will just have to code AIs that work with particular mods.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

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).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

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.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

TASClient is the only lobby that has full functionality atm, and actually has a working GUI.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

see paragraph two
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Once again...
P3374H wrote:TASClient is the only lobby that has full functionality atm, and actually has a Fully working GUI.

I don't think it's getting preferential treatment per se, it's simply the most workable of the lot for windows atm.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I asked BetaLord because he also controls the lobby protocol / server, afaik.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think the point was that it should have been more open rather than you should have gone to me or you should have gone to holllowsoul. A more open air about things that affect multiple projects is healthy imo.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

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 :/
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

Betalord is like Linus T in some sense :)

BDFL!


And trepan - this is uberschweetness :>

Now modders can hook up a two comps on a single LAN, set the mods dir as a shared network folder, one can run Spring, and the other can tinker with the mod. wiiiiiiiiiiiiiiiiiiiiiiin.
Post Reply

Return to “Engine”