View Full Version : [QUE] Using scripting for "special effects"
csThor
04-27-2012, 08:55 AM
To be frank I am a complete idiot when it comes to coding. I couldn't code if my life depended on it. I am, however, very much interested in historical missions and so far scripting has been used almost exclusively for player interaction, AI aircraft spawning, sub-mission loading etc ...
I do wonder, however, if scripting could be used for more than that. Imagine a battery of artillery shelling enemy positions (= target area or at least in-game coordinates) for a pre-defined amount of time or as long as moving enemy ground objects are within a certain area ... Or a Gruppe of Stukas milling over an enemy position trying to take out AT guns and artillery and the tanks get moving once the Stukas take out a certain amount of enemy objects. Or a battery of towed artillery shaking out of a column to deploy in the field, kind of a trigger which activates once enemy objects are within a certain range which makes this small column leave the road and deploy to a field, replace the column with artillery and some other objects (ammunition, static prime movers etc) ... A battery of AT guns remaining hidden until enemy tanks have maneuvered themselves into an ambush.
All these kinds of things that make the battlefield come alive. Possible? Doable?
FG28_Kodiak
04-27-2012, 09:40 AM
Yepp
csThor
04-27-2012, 09:45 AM
Short, definitive. Nice answer, although I had hoped for some discussion and "brainstorming". ;)
I do, however, guess that these scripts would have to be made specifically for the location/situation depicted in the mission, wouldn't they? I can't imagine a "one-size-fits-all" kind of script for the multitude of different geographical locations and the resulting layout of ground engagements.
hc_wolf
04-27-2012, 09:58 AM
Kodiak is spot on and for us to go into any detail would take us all a long time to just post some of our entire missions that we have been writting for the past month or so with 4000 lines of code.
You will find in many missions and examples people have put on here, that much of what you ask has already been done or is in the process of been written.
My advice is start on simple missions, take a posted one and slowly build it up. Have a plan of your overall mission.
Or. Jump on ATAG server 2 and have a play on Channel War 1.4 and see some of the things that are possible.
The other thing is that most online wars are on the english channel with english taking off from england and germans from france. So there is not much need for tank scripting and capturing towns etc as they can't swim.
But there are many missions already created which have land air and sea AI all battling eachother trying to win a battle without human need.
csThor
04-27-2012, 10:09 AM
4000 lines of code? :shock::shock::shock:
*faints*
Ataros
04-27-2012, 11:44 AM
Most of what you mentioned can be achieved with a more simple script: trigger set to a certain condition (AT guns destroyed) loads a submission which contains required action (tanks spawn and attack).
4000+ lines scripts are more similar to dynamic war generators than to a single mission script.
E.g. Operation SeaLion (http://forum.1cpublishing.eu/showthread.php?t=22185&highlight=sealion&page=13) mission with generation of sea convoys and landing parties, airfield capture, basic resource management, aircraft limitation, vulch protection, etc. is about 3000 lines.
IV/JG7_4Shades
04-28-2012, 02:20 AM
Interesting. Some of the SEOW afficionados in IL-2 have prompted me to visit here again. It is good to see people being creative with the C# API and building wonderful things for CoD.
A question, are the dynamic campaign generators all "in-game" scripts? Or are people interfacing them with external applications, e.g. databases, web services, SMS etc? People regularly ask me to develop a SEOW-like add-on for CoD, and I am just trying to gather basic architectural information at the moment.
Maybe someone else is already developing a full-featured strategic campaign environment for CoD?
Cheers,
4Shades
FG28_Kodiak
04-28-2012, 04:26 AM
You have access to the .Net-Api, so it's no problem to integrate a database for example.
Skoshi Tiger
04-28-2012, 09:15 AM
Does anyone know if you can send UDP datagrams?
Cheers!
bolox
04-28-2012, 10:18 AM
should be more than possible;)
http://msdn.microsoft.com/en-us/library/tst0kwb1.aspx
it's several(many:rolleyes:) levels above my scripting competance to even think about getting the data written into a format it can be queried by the client (we are talking udpspeed /devicelink i presume)
vBulletin® v3.8.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.