|
Post by dogofwar on Dec 7, 2019 17:10:39 GMT 1
I have been away from BK map making for years. In fact, I only recently got back into playing BK thanks to Game Ranger. It's an old game, but still a classic, and I want to resurrect an old map project I never finished, mainly because I was not proficient at scripting based on certain conditions beyond the basics, and now I even have forgotten the basics so I feel I am starting from scratch. My Game Ranger friend Juris, suggested I open this forum account as it was the best place to learn more about map making. So here I be!
This is the first of what will probably be many threads regarding this, but one has got to start somewhere. So my first question is;
"Besides the basic LUA File for reinforcement sets, what other kind of files are there when reinforcements are conditionally based on certain conditions?"
|
|
|
Post by Quintaxel on Dec 7, 2019 18:35:29 GMT 1
Hello dogofwar, could you rephrase the question because I do not understand your are question ? Conditions for putting reinforcements on the map can be anything.
|
|
|
Post by dogofwar on Dec 7, 2019 23:30:28 GMT 1
Sure, by way of example;
In the historic battle for Crete in 1941, Operation Mercury invasion plan called for Major General Kurt Student's XI Fliegerkorps to land paratroopers and glider troops at key points along Crete's northern shore, to be followed by the 5th Mountain Division which would be airlifted into captured airfields.
I have already created those reinforcement sets representing the 5th Mountain Division airlift into 3 possible airfields, Malame, Retimo & Herakleion. But these reinforcement sets only come in if and when German paratroopers capture one or more of these airfields.
So would this condition be contained within a LUA file, or is there some other file that handles it? I am trying to understand how many different kinds of files I will need be familiar with in order to make it work right.
In fact, if you could post the exact scripting for doing this, it would help.
|
|
|
Post by Quintaxel on Dec 8, 2019 0:02:26 GMT 1
The condition to trigger the reinforcements is that the German paratroopers have captured one or more of the airfield. We must translate "captured one or more airfields" in more specific terms. One or more airfields can be understood as at least airfield. An airfield can be defined as a script area on the map. (example Arifield1, Airfield2, Airfield3) Now you also need to define what we understand under 'captured'. "Captured" could be defined as 'German paratroopers are in one of the script areas AND there are no enemy units in that same script area. The conditions need to be checked in Lua. I write a chunk of code that you can use in your map but it will have to wait until tomorrow.
|
|
|
Post by dogofwar on Dec 8, 2019 0:15:19 GMT 1
Sounds good. I will give you more specifics next time I log on. Thanks
|
|
|
Post by dogofwar on Dec 8, 2019 1:00:00 GMT 1
Map can be played as a 1v1 or 2v2
There are 3 airstrips. Scripted Area names are ....... MalemeAirstrip ... RetimoAirstrip ... HerakleionAirstrip
1- Script so checking for available captured/controlled airstrips to land at, always goes in order of MalemeAirstrip, then RetimoAirstrip, then HerakleionAirstrip........ While the possibilities are endless, the pattern remains the same.
2- Each German player has potentially 8 airlift groups that can be airlifted into captured/controlled airstrips.
3- Capture/control of airstrip zones should work exactly as flag capture/control works. Zone is not captured until every enemy unit in zone has been eliminated or forced to retreat from zone. Then 15 secs to control it. Same would apply on recapturing the airstrip.
4- The 1st Airlift Group then lands at the very first captured/controlled airstrip, 5 mins afterwards.
5- Airlift Groups 2 through 8 then continue to airlift into an airstrip every 10 mins thereafter until all 8 Airlift Groups are airlifted in, so long as Germans continue to control the airstrip.
6- If Germans lose control of airstrip, Germans would need to recapture it before future Airlift Groups could be airlifted in again.
7- If Germans capture additional airstrips, each German player can use them according to the same rules, so long as they continue to control the airstrips. Should Germans capture/control all 3 airstrips they could potentially land a max three Airlift Groups all at the same time, one at each new airstrip
8- Therefore if Germans controlled 3 airstrips, each German player could have as many as 3 Airlift Groups all being airlifted in every 10 mins until all eight airlift groups have airlifted in. So long as Germans continue to control the airstrips.
GERMAN AIRLIFT GROUPS (script numbers) MalemeAirstrip.....RetimoAirstrip.....HerakleionAirstrip 1st 2101 2201 2301 2nd 2102 2202 2302 3rd 2103 2203 2303 4th 2104 2204 2304 5th 2105 2205 2305 6th 2106 2206 2306 7th 2107 2207 2307 8th 2108 2208 2308
|
|
|
Post by [BMG]Neutro on Dec 9, 2019 23:40:06 GMT 1
To answer the Question, everything will be and is managed by the Lua file !
You may also need "Script Areas or Zones" they will be created with and within the Map editor on your map.
|
|
|
Post by dogofwar on Dec 10, 2019 2:20:33 GMT 1
ok, thanks Neutro.
|
|
|
Post by Quintaxel on Dec 10, 2019 12:28:25 GMT 1
As I see it you would have to set global variables for each airlift and for each player. You can give these variables the integer value 8. After each airlift you should then subtract 1 and check the value of the variable. When it reaches the value 0 then the air support paratroopers should be disabled. You will also have to set global variables to disable the air lifts for 10 minutes after each airlift. The timer would have to be reset when the status of an airfield changes. A air strip could be captured in the 10 minutes You will also have to consider the fact an airstrip can be recaptured in the 10 minutes delay between each airlift. As [BMG]Neutro said, this is all would have to be scripted. It should not be that difficult but a requires quite some scripting time. I can help but please understand that I do not have the time to write the whole script.
|
|
|
Post by dogofwar on Dec 10, 2019 14:00:46 GMT 1
ok Quintaxel, I'll take anything you can give me. Possibly even a general blueprint of a script to get started with, and I can ask specific questions from there. But I am not sure I am capable of writing any script at this point, as I have been away way too long, and was never good at it even then. This is the main reason I never finished the map. It's pretty much Greek to me, so I might just be dead in the water. Anyhow Neutro suggested I might get help coming here so that sounded good to me.
Thanks for your interest.
|
|
|
Post by Quintaxel on Dec 10, 2019 14:16:19 GMT 1
Well, you have to start somewhere and you have a pretty good idea of what you want. I suggest you create a "Sanbox map", so a map only containing the necessary elements for the script like the 3 landing strips and the diplomacy settings (Don't forget appear points for aviation). Also use BK vanilla for this. If the script works for a single map then it could be adapted for a multi player map. From there you can write the chunks of Lua. Let's start with the function to check the status of an airstrip then.
|
|
|
Post by dogofwar on Dec 10, 2019 23:12:25 GMT 1
What is BK vanilla? I already created the entire map maybe 6 years ago, along with every numbered potential reinforcement group. Scripting is my only hurdle to get over now. I was reading the " Calvin Guide to Programming Lua functions ver 1.6" again, but it is total Greek to me. Do you have a better online manual or source, for everything I ever wanted to know about BK map scripting that I could read up on? And maybe you could specify what section would apply for my needs.
|
|
|
Post by dogofwar on Dec 11, 2019 4:36:08 GMT 1
Here is a section of an old script I did years ago for normal reinforcements. But what new command and where should I fit it is the question?
function Beginnend() KillScript("Beginn"); end;
function support1() LandReinforcement(101); Suicide(); end;
function support2() LandReinforcement(102); Suicide(); end;
|
|
|
Post by Quintaxel on Dec 11, 2019 8:52:24 GMT 1
BK Vanilla is the standard BK version with the tagline'Attack is the best defense'. The first version with no extras. You could also use Rolling Thunder but no modded version. Putting reinforcements on the map is the least of concerns. The BK function is indeed LandReinforcement (iScriptId)
I'm afraid that what you want to achieve will require a lot more than basic BK instructions. Let's start with the sand box map. Do you have a version of BK vanilla ? If not what version of BK do you use.
|
|
|
Post by dogofwar on Dec 11, 2019 12:56:05 GMT 1
I have the STEAM BK Anthology version 1.2 now. Will that work?
I made a sandbox map, as you suggested. 10 x 10, with nothing on but three airstrip zones, with script names. two German reinforcement groups located there representing groups that would land should airstrips be captured, and some British infantry to defend them. Airplane appear locations for Germans. Beyond that there is nothing.
BTW, I should mention that the map I was working on is a multiplayer map, if that makes any difference.
|
|