Sneak Peeks, Coming Attractions, Works-In-Progress

Campaign Series: Vietnam is a new turn-based, tactical/operational war game that focuses on the Indochina War, Vietnam Civil War and the first years of US involvement in Vietnam with over 100 historical scenarios.

Moderator: Jason Petho

User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

All Bets Are Off - Battle of Phu Tho Racetrack

January 30th, 1968
[Cholon District, Saigon, South Vietnam]: [H2H/SIDE A][HIS][CSL]: Fighting erupted all around Saigon in the early hours of January 30, the eve of Tet, the Vietnamese New Year, but none that would last as long as the fighting in the southeast Cholon District of Saigon. The Viet Cong 6th Binh Tan Battalion was tasked with attacking the Chi Hoa Prison in western Saigon. The battalion was to infiltrate the city from the west and establish a base of operations at Phu Tho Racetrack and then launch their attack on the prison 1.5km to the northeast. At 03:00 on 30 January, the 200-man 6th Binh Tan Battalion and 100 conscripted civilian porters, infiltrated the city from the west and were met by local VC guides who led them to the Phu Tho Racetrack. A second set of guides who were supposed to lead the Battalion to the Chi Hoa Prison didn't turn up and eventually the Battalion commander sent two companies into the city to try to find the Prison while keeping his remaining two companies at the Racetrack. Elements of the U.S. 716th Military Police battalion engaged the Viet Cong 6th Battalion at various times throughout the morning, but they were unable to make any progress against the Viet Cong. A Task Force was established using elements from the 3rd/7th Infantry, Troop D/17th Cavalry and two companies of the ARVN 33rd Ranger Battalion. These would advance from the southwest into the city, with the task of seizing the Phu Tho Racetrack from the Viet Cong 6th Battalion. To the northwest of Cholon, elements of the ARVN 38th Ranger Battalion would attempt to meet the Task Force at the Racetrack. The Task Force entered Cholon with little fanfare until the were within blocks of the racetrack, it was then the Viet Cong had unleashed withering fire with small arms and RPG's upon the columns, forcing the Task Force to fan out and start tedious clearing of city blocks as they approached the racetrack. [ALL][CSEE, Variable Objectives][1.00]

Image
Attachments
Annotation..1225221.jpg
Annotation..1225221.jpg (909.99 KiB) Viewed 1150 times
dox44
Posts: 653
Joined: Sun May 07, 2000 8:00 am
Location: the woodlands, texas

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by dox44 »

brings back memories. wife was 9 at time and lived in saigon in 1968 on phan thanh gian...had a good friend lived near racetrack she visited often...
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

Ride of the Valkyries - Battle of Quang Tri

January 31st, 1968
[Quang Tri, Quang Tri Province, South Vietnam]: [H2H/SIDE A][HIS][CSL]: Quang Tri City was a small market town and the capital of Quang Tri Province, the northernmost province of South Vietnam, bordering North Vietnam to the north, and Laos to the west. Quang Tri City was an important symbol of South Vietnamese government authority and was arguably the most vulnerable provincial capital in South Vietnam, it was a prime target of the North Vietnamese during the 1968 Tet Offensive. The permanent loss of the city to the Communists would be a political embarrassment and weaken the government's legitimacy and would allow the establishment of a Communist administrative center in the South. The PAVN had attacked and briefly overrun and occupied the city ten months earlier, on April 6th, 1967, in a large scale coordinated attack by a reinforced PAVN regiment, freeing 200 prisoners from a city prison. The PAVN 812th Regiment was assigned the task of capturing and holding Quang Tri City. Its regular battalions, K-4, K-5, K-6 and reinforced by the K-8/90th numbered about 400 men each. Along with elements of the 10th Sapper Battalion, signal, reconnaissance and heavy weapons support companies, the regiment totaled about 2,000 troops for the assault. Their numbers were augmented by the 600-man Viet Cong 814th Main Force Battalion. Defending the area around the city was the ARVN 1st Regiment with an APC Troop attached, the 9th Airborne Battalion, the Republic of Vietnam National Police and Popular Force elements in the city. While the U.S. Marines had shifted some forces to the besieged Khe Sanh Combat Base, MACV had replaced them with 1st Brigade/1st Cavalry, which was operating to the southwest of in Base Area 101 under the guise of Operation JEB STUART. The assault began by the 10th Sapper Battalion at 0200 on January 31st, against the city centre and citadel. The follow-on attacks by the 812th Regiment fared little better as did the eventual ARVN counterattack that stalled in the outskirts of the city. It wasn't until the armada of helicopters appearing in the skies above Quang Tri city that would deposit elements of two battalions from the U.S. 1st Brigade southeast of the city that would turn the tide of the fighting to recapture Quang Tri. [ALL][CSEE, Variable Objectives][1.00]

Image
Attachments
Annotation_20200408.jpg
Annotation_20200408.jpg (296.36 KiB) Viewed 1150 times
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

Steadfast Resolve - Battle of Pleiku

January 30, 1968
[Pleiku, Pleiku Province, South Vietnam]: The second target for the Tet Offensive in the western highlands was Pleiku City, the capital of Pleiku Province. Pleiku was strategically important during the Vietnam War because it was the primary terminus of the military supply logistics corridor extending westwards along Highway 19 from the coastal population centre and port facilities of Qui Nhon. Additionally, its central location on the plateau, between Kontum to the north, Ban Me Thuot to the south, and the North Vietnamese Army's base areas inside Cambodia to the west made Pleiku the main centre of defense of the entire highland region of the Republic of Vietnam. The South Vietnamese II Corps was headquartered just north of town near a host of other military facilities, including the New Pleiku airfield, the main base of the U.S. 52nd Artillery Group, the headquarters of the South Vietnamese 2nd Ranger Group, a Montagnard training center, and a U.S. Special Forces cantonment. The South Vietnamese 3d Armored Cavalry Regiment was stationed just east of town, and beyond it was Camp Holloway, an airfield complex that contained the headquarters of the U.S. 52nd Aviation Battalion. The closest U.S. ground combat units were located nine kilometres to the south at Camp Enari, home of the 4th Infantry Division. At 130 on January 30th, the K31 Battalion, 40th Artillery Regiment, opened fire on the two airfields, the artillery firebase, and the ranger compound. The ground attack got under way ninety minutes later when Viet Cong sappers probed the Montagnard training center on the north side of Pleiku City. Soon the entire city and both airfields were under attack by the 408th Sapper Battalion, half of the H15 Local Force Battalion, elements of the 407th Sapper Battalion, a company from the 28th Sapper Battalion, and over a hundred local guerrillas. The ARVN 3rd Armoured Cavalry, acting as a mobile fire brigade, proved especially effective, with steadfast resolve, in blunting the attack. Always in the thick of fighting, the squadron would lose multiple M41 tanks and armoured vehicles as the fighting continued throughout the early morning hours before the dawn counterattack by nearby ARVN and U.S. forces. [H2H/SIDE A][HIS][CSL]: [ALL][CSEE, Variable Objectives][1.00]


Image
Attachments
Annotation_20200413.jpg
Annotation_20200413.jpg (543.04 KiB) Viewed 1150 times
dox44
Posts: 653
Joined: Sun May 07, 2000 8:00 am
Location: the woodlands, texas

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by dox44 »

4 sisters, mom & dad. lived in vietnam from 1961 to 1974.
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Good to hear they escaped.

That will be the last Vietnam scenario dealing with Tet. There are currently 26 Tet related scenarios that are built.
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

Tanks in the Wire - Battle of Lang Vei

6 February, 1968
[Lang Vei, Quang Tri Province, South Vietnam]: On January 23rd, 1968, the PAVN 24th Regiment attacked the small Laotian outpost at Bane Houei Sane, under the control of the Royal Laos Army BV-33 'Elephant' Battalion. It was not until elements of the PAVN 198th Tank Battalion turned up at Bane Houei Sane, the Laotian soldiers and their families panicked and retreated into South Vietnam. After Bane Houei Sane was captured, the PAVN 24th Regiment was tasked with the capture of Lang Vei. Tucked away in the northwest corner of Quang Tri Province, in densely wooded, rugged terrain of the I Corps tactical zone, Lang Vei seemed a likely place for a Free World outpost. It was thirty-five kilometres south of the Demilitarized Zone and one and a half kilometres east of the Xe Pone River, the Laotian border. To the northeast, eight kilometers away, was the Marine combat base at Khe Sanh. The Lang Vei Special Forces Camp was south of Lang Vei Village, built along a stretch of Highway 9, a major east-west, all-weather road. The road was cut-off at Khe Sanh Village following the attack by elements of the PAVN 66th Regiment the PAVN 24th Regiment, supported by a tank company of the 198th Tank Battalion, two sapper companies and 152mm artillery at Co Roc Mountain in Laos. Defending the camp was the U.S. Special Forces Detachment A-101, with a few companies of CIDG, with heavy weapons that was later reinforced by a MIKE Company. Some of the heavy weapons included 4.2-inch mortars, M-72 Antitank Rocket Launchers, 57mm Recoilless Rifles and 106mm Recoilless Rifles. During the day of February 6th, the PAVN had bombarded the camp at various times throughout the day, but at 23:15, the 152mm and mortars shells pounded the camp, which covered the movements of the 24th Regiment as it moved into position. Ten minutes later, the PAVN 24th Regiment, supported by eleven PT-76 light reconnaissance tanks, attacked from three directions against Lang Vei. The defenders would be grateful for the presence of the recoilless rifles would help blunt the tank attack, but it would not be long before they would have tanks in the wire. [H2H/SIDE A][HIS][CSL]: [ALL][CSEE, Variable Objectives][1.00]

Image
Attachments
Annotation..8211108.jpg
Annotation..8211108.jpg (621.25 KiB) Viewed 1150 times
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: User Interface

As the game is getting more complex, so is the reporting. You'll see in the screenshot a few new things.

1. A new optional time delay that the user can set for the reports to be displayed - 1 to 5 seconds.

2. The new turn report dialog

3. The new additions to the dialog, in particular the new headings and the location identified of the impacted units.

Image
Attachments
ReportDialog4.jpg
ReportDialog4.jpg (1.45 MiB) Viewed 1150 times
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

Nine Lives - Battle of Khe Sanh Village

22 January, 1968
[Khe Sanh Village, Quang Tri Province, South Vietnam]: [H2H/SIDE A][HIS][CSL]: Khe Sanh Village was located 3 kilometres south of Khe Sanh Combat Base near the road that connected the combat base with Route 9. The village was defended by 175 soldiers and Marines, including two platoons of the South Vietnamese 915th Regional Force Company, a four-man U.S. Army advisory group and two platoons from Marine Combined Action Company Oscar. The Combined Action Company consisted of a few platoons organized pairing a U.S. Marine Rifle Squad with a platoon of Popular Force. The forces were split between Khe Sanh Village and the old Special Forces camp near the old French Fort to the west of the village. The fighting around Khe Sanh Combat Base had picked up over the previous couple days with heavy fighting at Hill 881S two days in a row and a large attack on Hill 861, followed by a heavy barrage at the combat base which destroyed the main ammunition dump. While the PAVN were bombarding Khe Sanh, in an effort to squeeze the ring around the combat base, the PAVN assigned a battalion to attack the village of Khe Sanh and secure the Route 9 road junction at the French Fort. The PAVN 7th/66th Regiment, supported by heavy weapons and sappers, because their assault in the early morning of January 21st. The multi-prong assault would be met with devastating fire from the defenders, airstrikes and artillery bombardments. On the second day of fighting and attempting to save the village, the ARVN 256th Regional Force Company was combat assaulted by the "Black Cats" 282nd Assault Helicopter Company to the east of the French Fort. [ALL][CSEE, Variable Objectives][1.00]

Image
Attachments
Annotation..2103103.jpg
Annotation..2103103.jpg (914.92 KiB) Viewed 1150 times
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by berto »


Another recent (private) Dev Forum post:
ORIGINAL: berto

Quoting from [...]:
ORIGINAL: berto

Based on these results, I am thinking that maybe the NVA/VC assault_attack_aggressiveness_effect value is rather too high at 150. 125 may be closer to right. Then again, that would mean a weaker NVA/VC showing in the fight for LZ X-Ray Part 1. With these and future playtest results of other scenarios, we'll figure out a best overall figure eventually.
I have what I think is an elegant, generalized solution to this issue.

Here is a new uber function, in user.lua:

function adjust_adaptive_ai (side, nation, parameter, adjustment)

local index = ai_index (parameter)
local v = "_" .. upper_case(parameter) .. "_" .. nation
local turn = current_turn()
local phase = current_side()

if turn == 1 then
_G[v] = adaptive_ai(side, nation, index)
else
local newval = _G[v] + adjustment
set_adaptive_ai (side, nation, index, newval)
end

if DEBUG then
log(APPLOG, LOG_DEBUG, "turn " .. turn .. ", side " .. side .. ", for nation " .. nation .. ", " .. parameter .. " " .. adaptive_ai(side, nation, index))
end

end

And here is a typical invocation (in this case, in the VN_651117_LZ_Albany.lua file):

function on_next_phase (turn, side) -- DO NOT REMOVE

...

-- every phase, adjust downward the NVA assault_attack_aggressiveness_effect bonus per their current loss rate
adjust_adaptive_ai (sideof(NORTH_VIETNAM_NATION), NORTH_VIETNAM_NATION, "assault_attack_aggressiveness_effect", - total_loss_rate(sideof(NORTH_VIETNAM_NATION)))

if DEBUG then -- where DEBUG is set in user.lua
csee_check(turn, side)
end

end

Or more succinctly:

adjust_adaptive_ai ("b", 21, "assault_attack_aggressiveness_effect", - total_loss_rate("b"))

Relative to its original starting value, adjust_adaptive_ai() adjusts the given AAI parameter up or down, depending on the final 'adjustment' value.

In the VN_651117_LZ_Albany.lua example, it says to adjust downward the original assault_attack_aggressiveness_effect value by the amount of the NVA side's total loss rate. For example, the initial nation #21 assault_attack_aggressiveness_effect is 150. When this function is called, if the NVA have suffered 10% total losses, their adjusted assault_attack_aggressiveness_effect value would be: 150 - 10 = 140. At 25% losses, it would be: 150 - 25 = 125. At 50% losses, it would be 150 - 50 = 100. (Which is nearing that effect value for the other nations.)

With DEBUG set to 'true' and with debug logging turned on, here are some sample results:

rober@Rob10rto /cygdrive/r/Temp/Logs
$ egrep "losses" /cygdrive/r/Temp/Logs/lua.log; egrep "assault_attack_aggressiveness_effect" /cygdrive/r/Temp/Logs/engine.log
2020-04-24 12:01:28 vnengine.exe: [INFO ID 10] at turn 1, side a, total loss rate A 0, total loss rate B 0, total loss rate A 0, total loss rate B 0, total losses A 0, total losses B 0, total losses A:B nil
2020-04-24 12:02:48 vnengine.exe: [INFO ID 10] at turn 1, side b, total loss rate A 0, total loss rate B 0, total loss rate A 0, total loss rate B 0, total losses A 0, total losses B 0, total losses A:B nil
2020-04-24 12:04:41 vnengine.exe: [INFO ID 10] at turn 2, side a, total loss rate A 0, total loss rate B 0, total loss rate A 0, total loss rate B 0, total losses A 0, total losses B 0, total losses A:B nil
2020-04-24 12:06:20 vnengine.exe: [INFO ID 10] at turn 2, side b, total loss rate A 0, total loss rate B 1, total loss rate A 0, total loss rate B 1, total losses A 0, total losses B 1, total losses A:B 0.0:1.0
2020-04-24 12:08:32 vnengine.exe: [INFO ID 10] at turn 3, side a, total loss rate A 0, total loss rate B 1, total loss rate A 0, total loss rate B 1, total losses A 0, total losses B 1, total losses A:B 0.0:1.0
2020-04-24 12:10:01 vnengine.exe: [INFO ID 10] at turn 3, side b, total loss rate A 0, total loss rate B 1, total loss rate A 0, total loss rate B 1, total losses A 0, total losses B 1, total losses A:B 0.0:1.0
2020-04-24 12:12:16 vnengine.exe: [INFO ID 10] at turn 4, side a, total loss rate A 0, total loss rate B 1, total loss rate A 0, total loss rate B 1, total losses A 0, total losses B 1, total losses A:B 0.0:1.0
2020-04-24 12:13:45 vnengine.exe: [INFO ID 10] at turn 4, side b, total loss rate A 0, total loss rate B 4, total loss rate A 0, total loss rate B 4, total losses A 0, total losses B 6, total losses A:B 0.0:1.0
2020-04-24 12:16:20 vnengine.exe: [INFO ID 10] at turn 5, side a, total loss rate A 0, total loss rate B 6, total loss rate A 0, total loss rate B 6, total losses A 0, total losses B 9, total losses A:B 0.0:1.0
2020-04-24 12:17:14 vnengine.exe: [INFO ID 10] at turn 5, side b, total loss rate A 0, total loss rate B 6, total loss rate A 0, total loss rate B 6, total losses A 0, total losses B 9, total losses A:B 0.0:1.0
2020-04-24 12:19:50 vnengine.exe: [INFO ID 10] at turn 6, side a, total loss rate A 1, total loss rate B 7, total loss rate A 1, total loss rate B 7, total losses A 1, total losses B 10, total losses A:B 0.1:1.0
2020-04-24 12:21:56 vnengine.exe: [INFO ID 10] at turn 6, side b, total loss rate A 1, total loss rate B 7, total loss rate A 1, total loss rate B 7, total losses A 1, total losses B 11, total losses A:B 0.1:1.0
2020-04-24 12:24:38 vnengine.exe: [INFO ID 10] at turn 7, side a, total loss rate A 2, total loss rate B 9, total loss rate A 2, total loss rate B 9, total losses A 4, total losses B 14, total losses A:B 0.3:1.0
2020-04-24 12:26:55 vnengine.exe: [INFO ID 10] at turn 7, side b, total loss rate A 2, total loss rate B 11, total loss rate A 2, total loss rate B 11, total losses A 4, total losses B 16, total losses A:B 0.3:1.0
2020-04-24 12:29:14 vnengine.exe: [INFO ID 10] at turn 8, side a, total loss rate A 4, total loss rate B 12, total loss rate A 4, total loss rate B 12, total losses A 7, total losses B 18, total losses A:B 0.4:1.0
2020-04-24 12:31:11 vnengine.exe: [INFO ID 10] at turn 8, side b, total loss rate A 4, total loss rate B 23, total loss rate A 4, total loss rate B 23, total losses A 7, total losses B 34, total losses A:B 0.2:1.0
2020-04-24 12:32:44 vnengine.exe: [INFO ID 10] at turn 9, side a, total loss rate A 8, total loss rate B 24, total loss rate A 8, total loss rate B 24, total losses A 13, total losses B 36, total losses A:B 0.4:1.0
2020-04-24 12:34:31 vnengine.exe: [INFO ID 10] at turn 9, side b, total loss rate A 8, total loss rate B 27, total loss rate A 8, total loss rate B 27, total losses A 13, total losses B 40, total losses A:B 0.3:1.0
2020-04-24 12:36:02 vnengine.exe: [INFO ID 10] at turn 10, side a, total loss rate A 9, total loss rate B 29, total loss rate A 9, total loss rate B 29, total losses A 14, total losses B 43, total losses A:B 0.3:1.0
2020-04-24 12:37:21 vnengine.exe: [INFO ID 10] at turn 10, side b, total loss rate A 9, total loss rate B 33, total loss rate A 9, total loss rate B 33, total losses A 14, total losses B 49, total losses A:B 0.3:1.0
2020-04-24 12:38:56 vnengine.exe: [INFO ID 10] at turn 11, side a, total loss rate A 10, total loss rate B 36, total loss rate A 10, total loss rate B 36, total losses A 17, total losses B 53, total losses A:B 0.3:1.0
2020-04-24 12:41:41 vnengine.exe: [INFO ID 10] at turn 11, side b, total loss rate A 10, total loss rate B 39, total loss rate A 10, total loss rate B 39, total losses A 17, total losses B 58, total losses A:B 0.3:1.0
2020-04-24 12:44:45 vnengine.exe: [INFO ID 10] at turn 12, side a, total loss rate A 10, total loss rate B 42, total loss rate A 10, total loss rate B 42, total losses A 17, total losses B 62, total losses A:B 0.3:1.0
2020-04-24 12:01:27 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 1, side b, for nation 21, assault_attack_aggressiveness_effect 150
2020-04-24 12:02:48 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 1, side b, for nation 21, assault_attack_aggressiveness_effect 150
2020-04-24 12:04:41 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 2, side b, for nation 21, assault_attack_aggressiveness_effect 150
2020-04-24 12:06:20 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 2, side b, for nation 21, assault_attack_aggressiveness_effect 149
2020-04-24 12:08:31 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 3, side b, for nation 21, assault_attack_aggressiveness_effect 149
2020-04-24 12:10:01 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 3, side b, for nation 21, assault_attack_aggressiveness_effect 149
2020-04-24 12:12:16 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 4, side b, for nation 21, assault_attack_aggressiveness_effect 149
2020-04-24 12:13:45 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 4, side b, for nation 21, assault_attack_aggressiveness_effect 146
2020-04-24 12:16:20 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 5, side b, for nation 21, assault_attack_aggressiveness_effect 144
2020-04-24 12:17:13 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 5, side b, for nation 21, assault_attack_aggressiveness_effect 144
2020-04-24 12:19:50 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 6, side b, for nation 21, assault_attack_aggressiveness_effect 143
2020-04-24 12:21:56 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 6, side b, for nation 21, assault_attack_aggressiveness_effect 143
2020-04-24 12:24:38 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 7, side b, for nation 21, assault_attack_aggressiveness_effect 141
2020-04-24 12:26:55 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 7, side b, for nation 21, assault_attack_aggressiveness_effect 139
2020-04-24 12:29:13 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 8, side b, for nation 21, assault_attack_aggressiveness_effect 138
2020-04-24 12:31:11 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 8, side b, for nation 21, assault_attack_aggressiveness_effect 127
2020-04-24 12:32:44 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 9, side b, for nation 21, assault_attack_aggressiveness_effect 126
2020-04-24 12:34:31 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 9, side b, for nation 21, assault_attack_aggressiveness_effect 123
2020-04-24 12:36:02 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 10, side b, for nation 21, assault_attack_aggressiveness_effect 121
2020-04-24 12:37:21 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 10, side b, for nation 21, assault_attack_aggressiveness_effect 117
2020-04-24 12:38:55 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 11, side b, for nation 21, assault_attack_aggressiveness_effect 114
2020-04-24 12:41:41 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 11, side b, for nation 21, assault_attack_aggressiveness_effect 111
2020-04-24 12:44:45 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 12, side b, for nation 21, assault_attack_aggressiveness_effect 108

At Turn 12, Side A phase, the NVA have suffered 42% losses at that point. Due to flagging zeal from the high losses, their aggressiveness bonus is thus reduced to 150 - 42 = 108.

Yes, the NVA aggressiveness bonus begins rather high. But as the scenario wears on, as the losses mount, they become less and less aggressive. With high enough (suicidal) losses, they would be so demoralized that their aggressiveness effect might even drop below their opponent's.

Note that we could cut the drop rate in half by the following:

-- every phase, adjust downward the NVA assault_attack_aggressiveness_effect bonus per their current loss rate
adjust_adaptive_ai (sideof(NORTH_VIETNAM_NATION), NORTH_VIETNAM_NATION, "assault_attack_aggressiveness_effect", - total_loss_rate(sideof(NORTH_VIETNAM_NATION)) / 2)

That is, for example, if their losses were 50%, the downward adjustment would be only half that, 25, setting their adjusted aggressiveness effect to 125.

This aggressiveness adjustment can be applied to other nations, of course. But I don't think it is so necessary as in the NVA case.

The adjust_adaptive_ai() function is generalized. We can use it to adjust other AAI parameters by supplying the appropriately named input parameter. We can adjust upward or downward by indicating '-' or '+' (the implied default). We can also adjust by something other than total_loss_rate(). As usual, there is lots of flexibility here.

Adjusting AAI parameter values dynamically in the course of a scenario -- quite a powerful technique this is.

One other thing. Note this (the highlighted):

function adjust_adaptive_ai (side, nation, parameter, adjustment)

local index = ai_index (parameter)
local v = "_" .. upper_case(parameter) .. "_" .. nation
local turn = current_turn()
local phase = current_side()

if turn == 1 then
_G[v] = adaptive_ai(side, nation, index)
else
local newval = _G[v] + adjustment
set_adaptive_ai (side, nation, index, newval)
end

if DEBUG then
log(APPLOG, LOG_DEBUG, "turn " .. turn .. ", side " .. side .. ", for nation " .. nation .. ", " .. parameter .. " " .. adaptive_ai(side, nation, index))
end

end

For this to be generalized, we need a general way to, on the fly, create a suitable variable name per the parameter and the nation. The above code does that.

From the value dump in engine.log (which happens when DEBUG is set to 'true' in user.lua), we might see this:

...
2020-04-24 12:44:45 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) turn 12, side a: _ASSAULT_ATTACK_AGGRESSIVENESS_EFFECT_21: 150
2020-04-24 12:44:56 vnengine.exe: [DEBUG ID 10] (lua.cpp, line 413, l_log()) in get_luav(), index 281, val _ASSAULT_ATTACK_AGGRESSIVENESS_EFFECT_21:150
...

_ASSAULT_ATTACK_AGGRESSIVENESS_EFFECT_21 is a Lua auto-created variable name set (at Turn 1) to remember the initial assault_attack_aggressiveness_effect value for nation #21. We don't have to manage that variable ourselves; the adjust_adaptive_ai() does that for us automatically.

This _G[] global namespace feature is one of the really cool features of Lua. Loving it! [8D]
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: ALPHA Graphics: SCENARIO DESIGN
New scenario:

The Premonition - Battle of Hill 881N and 861

January 20th, 1968
[Hill 861, Quang Tri Province, South Vietnam]: [SIDE A][HIS][CSL]: On the afternoon of January 18th, reconnaissance team was ambushed on Hill 881 North, to the northwest of Khe Sanh Combat Base. The 3rd Platoon, Company I/3rd/26th Marines was sent to help them but as the platoon reached the trapped reconnaissance team only to discover that whatever NVA had been there were gone. They evacuated the wounded before making their way back to Hill 881 South. Later, Company I/3rd/26th Marines was notified that a radio and classified radio code sheets had been left behind by the reconnaissance team. A heavily reinforced 1st platoon from I Company was dispatched to recover the equipment. As the unit advanced along a finger of Hill 861 North, it came under heavy fire and as casualties mounted, was forced to withdraw back to Hill 861 South. After two days of enemy contact, Company I's commander, having a premonition that something was about to happen, requested to conduct a reconnaissance-in-force to Hill 881 North with his entire company. Split in two columns, the company advanced towards Hill 881 North under the cover of the common morning fog. As the columns approached Hill 881 North, the fog began to lift and the dug in PAVN machine guns began to let loose on to what was to become an all-day affair. Little did Company I/3rd/26th Marines know what the rest of the day was about the bring. [ALL][CSEE, Variable Objectives][1.00]

Image
Attachments
Annotation..5233711.jpg
Annotation..5233711.jpg (836.04 KiB) Viewed 1150 times
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: Mapping

I have been working on the DMZ map this past week and finished the area necessary for "A Week in..." scenario that will deal with the highlights of the fighting at Khe Sanh. Here's what I have come up with.

Image
Attachments
Annotation..1145823.jpg
Annotation..1145823.jpg (972.9 KiB) Viewed 1150 times
User avatar
budd
Posts: 3159
Joined: Sat Jul 04, 2009 3:16 pm
Location: Tacoma

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by budd »

I just really like the map. Any chance of posting a map terrain legend? What's the terrain under the green square?
Enjoy when you can, and endure when you must. ~Johann Wolfgang von Goethe

"Be Yourself; Everyone else is already taken" ~Oscar Wilde

*I'm in the Wargamer middle ground*
I don't buy all the wargames I want, I just buy more than I need.
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

It's a hex with light village type buildings. A couple/few huts.

This will change in the scenario editor, of course.
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Here's a quick 3D shot.

Image
Attachments
Annotation..1210544.jpg
Annotation..1210544.jpg (933.02 KiB) Viewed 1151 times
benpark
Posts: 3073
Joined: Mon Aug 12, 2002 1:48 pm

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by benpark »

I really like the new building/terrain details for the base.

If you could, possibly think about leaving a few extra graphic slots in the upcoming games for additional structures.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

You'll see that the a lot of the buildings have been added to, for additional content.

Of course, as with always, things are modable.
User avatar
Jason Petho
Posts: 17793
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Jason Petho »

Campaign Series Vietnam: Scenario Scripting

While it appears that it is quiet with the game development, that is not the case! We are heavily into scripting the Vietnam scenarios and testing them at the moment.

I am new to scripting, so there is much to learn to get right to make the scenario play as I intended it and include a few twists to keep things interesting, because I am evil like that.

Here is a screenshot of me scripting the French into position. Of course, the Viet Minh will be attacking this location heavily, but one thing at a time. It is exciting to see things working!

Image
Attachments
Annotation..3113522.jpg
Annotation..3113522.jpg (1.12 MiB) Viewed 1151 times
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by berto »


Here, more or less, is the latest roster of CSEE (Campaign Series Event Engine) functions:
LUA_FUNCTIONS_REFERENCE


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

TRIGGERS

on_air_attack (hc, pid, name, side, nation, points, strength)
on_arty_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_build_barrier (hc, trackid, pid, name, side, nation, oid, orgname)
on_build_light_bridge (hc, dir, trackid, pid, name, side, nation, oid, orgname)
on_build_vehicle_bridge (hc, dir, trackid, pid, name, side, nation, oid, orgname)
on_clear_hex (hc)
on_clear_lz (hc, trackid, pid, name, side, nation, oid, orgname)
on_damage (hc, trackid, pid, name, side, nation, oid, orgname)
on_entrench_hex (hc, trackid, pid, name, side, nation, oid, orgname)
on_hex_assault (hc, side)
on_hex_attack (hc, side, nation, attype)
on_ied_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_improve_hex (hc, trackid, pid, name, side, nation, oid, orgname)
on_lay_mine_field (hc, trackid, pid, name, side, nation, oid, orgname)
on_mine_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_next_phase (turn, side)
on_next_turn (turn)
on_objective_capture (hc, values, side)
on_resume ()
on_set_ied (hc, trackid, pid, name, side, nation, oid, orgname)
on_shutdown ()
on_startup ()
on_unit_arty_fire (hc, trackid, pid, name, side, nation, oid, orgname, strength)
on_unit_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader, attype)
on_unit_fire (hc, trackid, pid, name, side, nation, oid, orgname, strength)
on_unit_kill (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_move (hc_from, hc_to, trackid)
on_unit_reduce (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader, loss)
on_unit_reinforce (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_release (trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_remove (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)

AI

ai (side) [internal system function, undocumented]
is_ai (side)
is_human (side)

ai_sides ()
human_sides ()
both_sides ()

ai_index (parm)
ai_parameter (index)
adaptive_ai (side, nation, index)
inc_adaptive_ai (side, nation, index, increment)
max_ai_index ()
set_adaptive_ai (side, nation, index, value)

COUNTERS

counter_airlevel (trackid)
counter_assault (trackid)
counter_ctrackid (trackid)
counter_defend (trackid)
counter_exists (trackid)
counter_flags (trackid)
counter_hex (trackid)
counter_hq (trackid)
counter_leader (trackid)
counter_losses (trackid)
counter_morale (trackid)
counter_more_flags (trackid)
counter_name (trackid)
counter_nation (trackid)
counter_oid (trackid)
counter_orgname (trackid)
counter_pid (trackid)
counter_points (trackid)
counter_side (trackid)
counter_strackid (trackid)
counter_strength (trackid)
counter_turns_until_refuel (trackid)
counter_type (trackid)
counter_x (trackid)
counter_y (trackid)

counter_unit_carry_flags (trackid)
counter_unit_fire_flags (trackid)
counter_unit_more_flags (trackid)
counter_unit_move_flags (trackid)
counter_unit_other_flags (trackid)

counter_is_airborne (trackid)
counter_is_air_transport (trackid)
counter_is_civilian (trackid)
counter_is_hq (trackid)
counter_is_indirect_fire (trackid)
counter_is_leader (trackid)
counter_is_supply (trackid)
counter_is_transport (trackid)
counter_is_underground (trackid)

is_disrupted (trackids)
is_carried (trackids)
is_unloaded (trackids)
is_loaded (trackids)
is_concealed (trackids)
is_outofammo (trackids)
is_diggingin (trackids)
is_fatigued (trackids)
is_buybullet (trackids)
is_buywheel (trackids)
is_fixed (trackids)
is_lowonammo (trackids)
is_isolated (trackids)
is_buyrecon (trackids)
is_reduced (trackids)
is_lowonfuel (trackids)
is_outoffuel (trackids)
is_refueled (trackids)
is_attacked (trackids)
is_captured (trackids)

is_not_disrupted (trackids)
is_not_carried (trackids)
is_not_unloaded (trackids)
is_not_loaded (trackids)
is_not_concealed (trackids)
is_not_outofammo (trackids)
is_not_diggingin (trackids)
is_not_fatigued (trackids)
is_not_buybullet (trackids)
is_not_buywheel (trackids)
is_not_fixed (trackids)
is_not_lowonammo (trackids)
is_not_isolated (trackids)
is_not_buyrecon (trackids)
is_not_reduced (trackids)
is_not_lowonfuel (trackids)
is_not_outoffuel (trackids)
is_not_refueled (trackids)
is_not_attacked (trackids)
is_not_captured (trackids)

counter_on_map (trackid, verified_only)

counters_all (side, onmap_only)
counters_aorg (trackids, onmap_only)
counters_sorg (strackids, onmap_only)

hexes_aorg (trackids, onmap_only)

counters_highest_strength (trackids, verified_only)
counters_strongest (trackids, verified_only)

counters_lowest_strength (trackids, verified_only)
counters_weakest (trackids, verified_only)

counters_highest_morale (trackids, verified_only)
counters_lowest_morale (trackids, verified_only)

counters_highest_assault (trackids, verified_only)
counters_lowest_assault (trackids, verified_only)

counters_highest_defend (trackids, verified_only)
counters_lowest_defend (trackids, verified_only)

counters_highest_points (trackids, verified_only)
counters_lowest_points (trackids, verified_only)

counters_airborne (trackids)
counters_waterborne (trackids)
counters_land (trackids)

map_trackid (hc, number)
map_trackid_count (hc)
map_trackids (hc)
max_counters ()
max_turns_until_refuel (nation)

GENERAL

first_side ()
current_side ()
other_side (side)

sideof (nation)

current_turn ()
next_turn ()
previous_turn ()
final_turn ()

current_visibility ()

night (turn)
fow (side)
is_fow (side)
set_fow (side, switch)
is_night ()

HEXES

has_barrier (hc)
has_big_wrecks (hc)
has_block (hc)
has_bunker (hc)
has_cave (hc)
has_damage (hc, dir)
has_ied (hc)
has_ied1 (hc)
has_ied2 (hc)
has_ied3 (hc)
has_improved_position (hc)
has_landing_zone (hc)
has_light_bridge (hc)
has_minefield (hc)
has_minefield1 (hc)
has_minefield2 (hc)
has_minefield3 (hc)
has_obstacle (hc)
has_pillbox (hc)
has_pontoon_bridge (hc)
has_rubble (hc)
has_smoke (hc)
has_trench (hc)
has_tunnel (hc)
has_vehicle_bridge (hc)
has_wrecks (hc)
has_spotted (hc)

hexes_minefield (hcs, side)
hexes_ied (hcs, side)
hexes_block (hcs, side)
hexes_tunnel (hcs, side)
hexes_cave (hcs, side)

hexes_bunker (hcs, side)
hexes_improved_position (hcs, side)
hexes_pillbox (hcs, side)
hexes_trench (hcs, side)
hexes_fortification (hcs)

hexes_landing_zone (hcs)
hexes_wrecks (hcs)

hexes_terrain (hcs, terrain)

empty_transports_count (hc)
has_empty_air_transport (hc)
has_empty_transport (hc)
has_transport (hc)
max_transport_strength (hc)

is_sidea_aware (hc)
is_sidea_exclude (hc)
is_sideb_aware (hc)
is_sideb_exclude (hc)

is_airfield_hex (hc)
is_beach_hex (hc)
is_building_hex (hc)
is_cactus_hex (hc)
is_canal_hex (hc)
is_canal_shallow_hex (hc)
is_city_hex (hc)
is_clear_hex (hc)
is_colored_dirt_hex (hc)
is_dense_jungle_hex (hc)
is_dry_paddy_hex (hc)
is_forest_hex (hc)
is_grain_field_hex (hc)
is_hammada_hex (hc)
is_impass_hex (hc)
is_industrial_hex (hc)
is_installation_hex (hc)
is_light_jungle_hex (hc)
is_major_canal_hex (hc)
is_major_canal_shallow_hex (hc)
is_major_river_hex (hc)
is_major_river_shallow_hex (hc)
is_marsh_hex (hc)
is_meadow_hex (hc)
is_orchard_hex (hc)
is_palm_tree_hex (hc)
is_produce_field_hex (hc)
is_river_hex (hc)
is_river_shallow_hex (hc)
is_rough_hex (hc)
is_scrub_hex (hc)
is_shallow_hex (hc)
is_soft_sand_hex (hc)
is_suburb_hex (hc)
is_swamp_hex (hc)
is_tall_grass_hex (hc)
is_thicket_hex (hc)
is_village_hex (hc)
is_vineyard_hex (hc)
is_wadi_hex (hc)
is_water_hex (hc)
is_wet_paddy_hex (hc)

MAP

on_map (hc)

map_center (x, y)
map_height ()
map_sector (x, y)
map_up ()
map_width ()

map_up_half (x, y)
map_low_half (x, y)
map_left_half (x, y)
map_right_half (x, y)
map_up_left_quadrant (x, y)
map_up_right_quadrant (x, y)
map_low_right_quadrant (x, y)
map_low_left_quadrant (x, y)
map_nw_quadrant (x, y)
map_ne_quadrant (x, y)
map_se_quadrant (x, y)
map_sw_quadrant (x, y)
map_north_half (x, y)
map_south_half (x, y)
map_east_half (x, y)
map_west_half (x, y)

hexcoor (x, y)
x (hc)
y (hc)

map_side (hc)

occupied (hcs, side)
not_occupied (hcs, side)

owned (objectives, side)
not_owned (objectives, side)

hexes_all ()
hex_box (hc_upleft, hc_lowright)
hexes_within (hc, extent)
hex_adjacent (hc, dir)
hex_random (hc, extent)

hexes_nearest (hc, hcs)
hexes_farthest (hc, hcs)

range (from, to)

MESSAGING

_message (title, text)
message (title, text, reveal, phase)
message_once (title, text, reveal, phase)
_note (title, text)
note (title, text, reveal, phase)
note_once (title, text, reveal, phase)
_report (title, text)
report (title, text, reveal, phase)
report_once (title, text, reveal, phase)
log (logfile, loglevel, text)

show_briefing (side)

DEBUGGING

aistop (text)
exestop (text)

trace (event, line)
traceon ()
traceoff ()

LISTS

identical (list1, list2)
equivalent (list1, list2)

join (lists, unique_only)

member (element, list)
members (elements, list)
subset (list1, list2)

member_count (list)

union (list1, list2)
intersection (list1, list2)
difference (list1, list2)

remove (list, elements)

sort (list)
reverse (list)

duplicates (list)
singles (list)
uniques (list)

head (list)
tail (list)

MISC

upper_case (text)
lower_case (text)

ordinal (number)

dieroll (x)
random ()
random_index (l, u)
random_pick (list)

even (x)
odd (x)

round (x)

dir_from (origin, point)
hexdir_from (origin, point)

has_flag (flags, flag)

is_move_tracking ()
move_tracking ()
set_move_tracking ()
unset_move_tracking ()

is_qa_testing ()
qa_testing ()
set_qa_testing ()
unset_qa_testing ()

OBJECTIVES

objective_owner (hc)
objective_points ()
objective_values (hc)

set_objective (hc, values, side)
set_objective_values (hc, values)

REINFORCEMENTS

reinforcement_flags (id)
reinforcement_hex (id)
reinforcement_prob (id)
reinforcement_scatter (id)
reinforcement_turn (id)
reinforcement_x (id)
reinforcement_y (id)

set_reinforcement (id, hc, turn, prob, flags, scatter)
set_reinforcement_flags (id, flags)
set_reinforcement_hex (id, hc)
set_reinforcement_prob (id, prob)
set_reinforcement_scatter (id, scatter)
set_reinforcement_turn (id, turn)
set_reinforcement_x (id, x)
set_reinforcement_y (id, y)

inc_reinforcement_prob (id, increment)

arrived (id)

RELEASES

release_prob (id)
release_turn (id)
released (id)

set_release (id, turn, prob)
set_release_prob (id, prob)
set_release_turn (id, turn)

inc_release_prob (id, increment)

SCENARIO

options ()
set_options (value)
set_option (value)
unset_option (value)

event_points (side)
set_event_points (side, value)
inc_event_points (side, increment)

total_points ()

total_strength (side, onmap_only, verified_only, exclude_killed)
strength (trackids, verified_only)

total_losses (side)
losses (trackids, verified_only)

total_loss_rate (side, onmap_only, verified_only, exclude_killed)
loss_rate (trackids, onmap_only, verified_only, exclude_killed)

total_loss_points (side)

average_morale (side)
morale_shift (nation)
set_morale_shift (nation, value)
inc_morale_shift (nation, increment)

advantage ()
aggressiveness (side)
air_support (side)
ammo_level (side)
arty_ammo_level (side)

set_advantage (value)
set_aggressiveness (side, value)
set_air_support (side, value)
set_ammo_level (side, value)
set_arty_ammo_level (side, value)

inc_advantage (increment)
inc_aggressiveness (side, increment)
inc_air_support (side, increment)
inc_ammo_level (side, increment)
inc_arty_ammo_level (side, increment)

major_defeat ()
major_victory ()
minor_defeat ()
minor_victory ()

set_major_defeat (value)
set_major_victory (value)
set_minor_defeat (value)
set_minor_victory (value)

set_victory (majordefeat, minordefeat, minorvictory, majorvictory)

smoke_ammo (side)
star_shells (side)

set_smoke_ammo (side, value)
set_star_shells (side, value)

inc_smoke_ammo (side, increment)
inc_star_shells (side, increment)

SIDES

is_bocage_side (hc, dir)
is_cliff_side (hc, dir)
is_crest_side (hc, dir)
is_ditch_side (hc, dir)
is_dune_side (hc, dir)
is_embank_side (hc, dir)
is_escarpment_side (hc, dir)
is_ford_side (hc, dir)
is_gully_side (hc, dir)
is_heavy_bridge_side (hc, dir)
is_hedge_side (hc, dir)
is_high_side (hc, dir)
is_light_bridge_side (hc, dir)
is_medium_bridge_side (hc, dir)
is_minor_river_side (hc, dir)
is_path_side (hc, dir)
is_rail_side (hc, dir)
is_reef_side (hc, dir)
is_road_side (hc, dir)
is_stone_side (hc, dir)
is_stream_side (hc, dir)
is_unpaved_side (hc, dir)

UNITS

in_box (trackids, hc_upleft, hc_lowright, verified_only)
within (trackids, hc, extent, verified_only)
in_area (trackids, hcs, verified_only)

not_in_box (trackids, hc_upleft, hc_lowright, verified_only)
not_within (trackids, hc, extent, verified_only)
beyond (trackids, hc, extent, verified_only)
not_in_area (trackids, hcs, verified_only)

units_in_hex (hc)
units_in_hex_count (hc)

units_in_box (hc_upleft, hc_lowright, side, verified_only)
units_in_box_count (hc_upleft, hc_lowright, side, verified_only)

units_within (hc, extent, side, verified_only)
units_within_count (hc, extent, side, verified_only)

units_in_area (hcs, side, verified_only)
units_in_area_count (hcs, side, verified_only)

units_adjacent (hc, side, verified_only)

above (trackids, row, verified_only)
below (trackids, row, verified_only)
left_of (trackids, col, verified_only)
right_of (trackids, col, verified_only)

units_above (row, side, verified_only)
units_below (row, side, verified_only)
units_left_of (col, side, verified_only)
units_right_of (col, side, verified_only)

units_above_count (row, side, verified_only)
units_below_count (row, side, verified_only)
units_left_of_count (col, side, verified_only)
units_right_of_count (col, side, verified_only)

units_extent (trackids, verified_only)
units_nearest (hc, side, verified_only)

units_with_order (trackids, _aiorder)
units_with_orders (trackids, _aiorders)

SCRIPTED AI

at (trackids, hc)
defend_weak (trackids, hc, dir, radius, actprob)
defend_normal (trackids, hc, dir, radius, actprob)
defend_strong (trackids, hc, dir, radius, actprob)
defend_fanatical (trackids, hc, dir, radius, actprob)
move_norush (trackids, hc, dir, radius, actprob)
move_rush (trackids, hc, dir, radius, actprob)
move_recon (trackids, hc, dir, radius, actprob)
move_roam (trackids, hc, dir, radius, actprob)
attack_weak (trackids, hc, dir, radius, actprob)
attack_strong (trackids, hc, dir, radius, actprob)
attack_normal (trackids, hc, dir, radius, actprob)
attack_fanatical (trackids, hc, dir, radius, actprob)
attack_banzai (trackids, hc, dir, radius, actprob)
load (trackids, hc, actprob)
unload (trackids, hc, actprob)
disembark (trackids, hc, dir, actprob)
embark (trackids, hc, dir, actprob)
take_off (trackids, hc, actprob)
land (trackids, hc, actprob)
ascend (trackids, hc, actprob)
ascend_ground (trackids, hc, actprob)
ascend_noe (trackids, hc, actprob)
ascend_low (trackids, hc, actprob)
ascend_high (trackids, hc, actprob)
descend (trackids, hc, actprob)
descend_low (trackids, hc, actprob)
descend_noe (trackids, hc, actprob)
descend_ground (trackids, hc, actprob)
descend_underground (trackids, hc, actprob)
ascend_move (trackids, hc, radius, actprob)
move_descend (trackids, hc, radius, actprob)
exit (trackids, hc, actprob)
dig_in (trackids, hc, actprob)
reconnoiter (trackids, hc, actprob)
build_light_bridge (trackids, hc, dir, actprob)
build_vehicle_bridge (trackids, hc, dir, actprob)
lay_minefield (trackids, hc, actprob)
set_ied (trackids, hc, actprob)
build_barrier (trackids, hc, actprob)
build_block (trackids, hc, actprob)
damage (trackids, hc, dir, actprob)
clear_lz (trackids, hc, actprob)
fire_direct (trackids, hc, dir, radius, actprob)
fire_indirect (trackids, hc, dir, radius, actprob)
fire_special (trackids, hc, dir, radius, actprob)
air_strike (hc, actprob)
assault (trackids, hc, dir, radius, actprob)
withdraw (trackids, hcs, dir, radius, dftype)

hold (trackids, hc, actprob)
halt (trackids, hc, actprob)
unleash (trackids, hc, actprob)

move_way_point (trackids, hcs, dir, radius, actprob)
attack_way_point (trackids, hcs, dir, radius, actprob, attype)
defend_way_point (trackids, hcs, dir, radius, actprob, dftype)

landing (trackids, hc_from, hc_to)
taking_off (trackids, hc_from, hc_to)

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

USER.LUA (all subject to change)

adjust_adaptive_ai (side, nation, parameter, adjustment)
air_mission_fire (trackids, basept, targetpt, proximity, _range, airlevel)
air_mission_gunship_sortie (trackids, entrypt, targetpt, proximity, _range, airlevel)
air_mission_spot (trackids, basept, targetpt, proximity, airlevel)
air_transport_carriers (trackids, loadpt, unloadpt, roundtrip, airlevel)
air_transport_evacuate (trackids, entrypt, loadpt, roundtrip, airlevel)
air_transport_passengers (trackids, loadpt, unloadpt, assemblypt, airlevel)
air_transport_reinforce (trackids, entrypt, unloadpt, roundtrip, airlevel)
attack_nearest (trackids, dir, radius, attype, ground_only, unverified)
attack_nearest_to_hex (trackids, hc, dir, radius, attype, ground_only)
attack_nearest_way_point (trackids, hcs, dir, radius, actprob, attype, ground_only, unverified)
attack_supply (trackids, extent)
column_move (trackids, hc, dir, radius)
company_kill_check (trackid, coys, sides, eps, nations, mshifts)
company_reduce_check (trackid, coys, sides, eps, nations, mshifts, rate)
csee_check (turn, side)
fire_direct_nearest (trackids, ground_only)
fire_indirect_area (trackids, hc, radius, verified_only)
land_transport_carriers (trackids, loadpt, unloadpt, roundtrip)
land_transport_passengers (trackids, loadpt, unloadpt, assemblypt)
losses_dump (turn, side)
luaval_dump (all)
move_air_transport (ptrackids, ctrackids, loadpt, unloadpt, assemblypt, roundtrip, airlevel)
move_land_transport (ptrackids, ctrackids, loadpt, unloadpt, assemblypt, roundtrip)
move_water_transport (ptrackids, ctrackids, embarkpt, loadpt, disembarkpt, unloadpt, assemblypt, roundtrip)
victory_dump (turn, side)
water_transport_carriers (trackids, loadpt, unloadpt, roundtrip)
water_transport_passengers (trackids, embarkpt, loadpt, disembarkpt, unloadpt, assemblypt)

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
That's over 560 different functions. So many tools to work with!
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
Post Reply

Return to “Campaign Series: Vietnam”