Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Drivable Vehicles
Re: Drivable Vehicles[message #334147] Thu, 10 July 2014 22:08 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
http://i57.tinypic.com/2gx4ivb.jpg indeed possible - damn! Wink
my tank doesn't look much like a tank either... could be a croc.. Isn't there a way to get the zoom effect like in the inventory? Razz

[Updated on: Thu, 10 July 2014 22:12] by Moderator

Report message to a moderator

Master Sergeant
Re: Drivable Vehicles[message #334148] Thu, 10 July 2014 22:12 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
I had that effect. That's why I made a 4x2 Wink

Also, note that a 'block' is 6x6 pixels on highest resolution, 4x4 on 800x600 and 3x3 on lowest...

Report message to a moderator

Captain

Re: Drivable Vehicles[message #334149] Thu, 10 July 2014 22:26 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
T(h)anks.. Wink
Good that you tell me! Razz

Well, without zoom-in effect... I suggest we stick to a T sign... ^^ The blocks are abstract as well,right?

Report message to a moderator

Master Sergeant
Re: Drivable Vehicles[message #334174] Sat, 12 July 2014 12:45 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
Okay... I just mowed down my first few enemies "hood-style" from the seats of the El Dorado. Very, very cool feature!

But... cars seem to be rather slow. I think they need either twice the amount of APs or need far less APs for moving around. Also it's not entirely clear all the time which speed mode the car uses. Maybe adding a small icon could do the trick?

Also view range from within the vehicle is kinda low (using same vehicles.xml as 1.13), it's rather hard to see enemies from time to time, even if driving by closely.

[Updated on: Sat, 12 July 2014 12:48] by Moderator

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #334194] Sun, 13 July 2014 18:10 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
How about adding the option to upgrade vehicles with armour plates?

You'd of course need an item "steel plate" and a facility in that can perform the necessary modifications (think of those "A-Team homemade tanks").

Probably at least a small workshop would be needed for those modifications, adding steel plates could increase armour value by 50% or some such (maybe additionaly slightly lowering speed).

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #334196] Sun, 13 July 2014 19:39 Go to previous messageGo to next message
anv is currently offline anv

 
Messages:258
Registered:March 2013
@Sevenfm:
These STI are great and in the same style as vanilla graphics. Toy cars already gave me another psychotic idea. Did Green Eyes give permission to freely use his work, if not, how can I blackmail him into it?

I'm going to add (well, already added here cause it's copypasta) few modder friendly bodytypes, that will require only sti and jsd (jsd can be copied from already existing ones though) to add to introduce new vehicles without overwriting existing ones. Armoured jeep will require vehicle weapons handling in code (dedicated gunner) for full functionality.

@Marcho:
That's the idea, critical vehicle hits are already partially supported (their effects anyway, not way to get them or fix them).
Problem is, I want to add full aiming selection on Player's side, so just like Head/Torso/Legs, Engine/Tire/Treads/Crew/Gas Tank will appear which is not that easy due to how things are handled (for soldier, rectangle around them is considered, and only height of cursor in it specifies location - for vehicle location will change with every bodytype and rotation). Also critical location of any vehicle segment is specified in jsd, but they are messed up (less when before I reworked vehicle jsds though). BTW, there's no "arms" aim location on enemies, shame, I wish there was full Fallout-style selection.

Turret taking 1 turn would break balance completely, but other (higher) value than standard configurable through APBPConstants should be enough (like 10AP per direction, meaning 40AP to do 180). After all it makes sense turret rotates slower than person.

Part with APC and soldiers jumping out straight in your face would require extensive AI changes, because AI IS A MESS AND ENEMIES ARE MORONS.

@smeagol:
Vehicles and passengers don't spot landmines. Better ramming protection will be dependent on armour (they already had armour type linked, just it doesn't do anything. Interestingly enough, so does helicopter). AP for vehicles moving will get own AP constant. Slower movement mode will get own yellow cursor icon (like walking/running cursors).

I wanted to add possibility to repair critical hits depending on skill traits (so anyone can change a tire, fixing leaking gas tank or severed tank tread requires technician and damaged engine requires engineer). If we add facility requirement to some repairs and also upgrades (changing armour types and weapons) will need that facility placed somewhere. At the moment only facility that offers vehicle repair as assignment is junkyard. Another could be Joe's gas station and maybe also selected workshops in towns.

I guess Joe could also function like Waldo and offer repair for money.

@tank icon saga:
I wanted just bigger squares for tank :< After seeing icons already on screens I vote for standard block with changed colour instead of fancy icon after all, mostly due to look in the lowest resolution. Precedence is already made with normal Player controlled vehicles which are just white squares instead of yellow and consistency is a good thing. One thing, we should get exact number of tanks. I would think one tank more or less makes a bigger difference than one admin Razz

Report message to a moderator

Master Sergeant

Re: Drivable Vehicles[message #334197] Sun, 13 July 2014 19:52 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@anv
Yes, he gave his permission to use these sti's.

Unfortunately, there is no jsd for them. And the projection (perspective) is not perfect, but it's hardly noticable.
Also, he is working on other 3d models of vehicles, so there will be more vehicles/tanks later Smile
http://i.imgur.com/n73ONpY.gif

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #334198] Sun, 13 July 2014 20:33 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3721
Registered:February 2006
Location: Scotland
The NOPS attack jeeps are very rough looking , better to have new ones , imo .

Report message to a moderator

Captain

Re: Drivable Vehicles[message #334209] Mon, 14 July 2014 06:36 Go to previous messageGo to next message
Hawkeye is currently online Hawkeye

 
Messages:2412
Registered:October 2005
Location: Australia
smeagol

Also view range from within the vehicle is kinda low (using same vehicles.xml as 1.13), it's rather hard to see enemies from time to time, even if driving by closely.


Maybe this is a reflection how hard it is to actually shoot from a moving car, unless you are in an open top or utility vehicle. Possible disadvantages could also be the use of rifles compared to SMG's and pistols, as swinging or shooting a longer fire-arm really limits possible arcs of fire you have. Believe me, I'm speaking from experience! :laugh:

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #334256] Tue, 15 July 2014 20:45 Go to previous messageGo to next message
Strohmann is currently offline Strohmann

 
Messages:287
Registered:August 2011
Location: Division Thought Crimes
Revision 2071 with exe 7337:

While taking a quick peek at these new features, many issues leap to my eye.
  • All explosives damage tanks, because no flag for anti-tank/armor-piercing possible like in AmmoTypes.xml. Can destroy tanks with frag grenade spam etc.
  • Tanks take damage even when crushing down simple wooden fence.
  • Tanks can slide sideways against the alignment of their hull.
  • Tanks don't overlay enviromental obstacles, they're "under" them.
  • Tanks occasionally slow the game down to a crawl in their turn (frame drop to 1 fps).
  • They loose reputation like mercs when fired upon/hit. Edit: If it matters the merc was completly alone, no one else hired/in the squad
  • Occasionally i had tanks that could be damaged with simple rifle ammunition. Will try to investigate/reproduce.
  • Balancing: can fire main gun up to two times per round (if not moving), turret turning way too fast/too low ap-cost.
(to be continued)

[Updated on: Tue, 15 July 2014 21:00] by Moderator

Report message to a moderator

Master Sergeant
Re: Drivable Vehicles[message #334268] Wed, 16 July 2014 13:03 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Strohmann
...
  • Tanks take damage even when crushing down simple wooden fence.
  • They loose reputation like mercs when fired upon/hit. Edit: If it matters the merc was completly alone, no one else hired/in the squad
...
Fixed in r7340.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #334521] Thu, 24 July 2014 11:53 Go to previous messageGo to next message
mmm is currently offline mmm

 
Messages:63
Registered:May 2013
I haven't actually tried out the feature myself yet so the following is purely my speculation. From what I read from the post, I got the feeling that the moving tanks will be the first enemies you encounter in a tactical combat, which in turn means that they need to be dispatched very early in the battle. In that case the moving tanks are only making their presence felt early in the battle. In case the mercs survive the initial tank push, the battle becomes the old fashioned infantry on infantry battle. If it is indeed the way AI employs the tank, some changes to the tank AI may need to be done to make the presence of tank felt throughout the whole battle, say for example forcing tanks to pace their movement, only to make a push when the infantry have pinpointed the target location. Also I don't know if tank could reinforce from the border, or they have to be placed at the beginning of the battle, with the former being more preferable IMHO.

It's been a very long time since I last fought a tank. But from what I remember, the tanks are only minimally more detectable than human targets, that may need to be changed.

How does the AI handle an enemy tank, say I bring my mobile militia to a patrol and run into some tank? I hope they know how to deal with a tank if they are appropriately equipped or run for their lives if they're not.

Any ways to gain early access to my own tanks :diabolical: ? Frankly though it is gonna be purely for transportation, I just don't feel comfortable bringing soft skinned cars to a war zone with all the stray bullets flying around(from both the enemy and the militia).

As a complement feature, may I ask for a "ready" state for rocket launchers just like any other firearms so I can actually receive vision range bonus from the launcher? I've always wanted this feature, but the moving tanks are make it absolutely necessary.

[Updated on: Thu, 24 July 2014 11:55] by Moderator

Report message to a moderator

Corporal
Re: Drivable Vehicles[message #336358] Wed, 01 October 2014 06:13 Go to previous messageGo to next message
Ocular

 
Messages:24
Registered:September 2014
Hello,

I love this feature, but the early game, as anv mentioned, is almost impossible with either ARMY_USES_TANKS_IN_PATROLS or ARMY_USES_TANKS_IN_ATTACKS set to true.

One compromise between tanks and no tanks is to only dispatch tanks once game progress reaches a point where the user has had an opportunity to attain anti-tank weapons.

For example, I use the following in my own build:

https://gist.githubusercontent.com/anonymous/50b42807f77e5677e712/raw/f75b04d07f73dafaaa31c05a241205b8b173083f/min-progress-for-tank-use.patch

commit a02c8add0e7fd69d71534abdff7bc1f5e55c0bee
Author: Ocular 
Date:   13 days ago

    Do not create tanks unless past MIN_PROGRESS_FOR_TANK_USE
---
 Build/Strategic/Strategic AI.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/Build/Strategic/Strategic AI.cpp b/Build/Strategic/Strategic AI.cpp
index 9ef819e..5e22a18 100644
--- a/Build/Strategic/Strategic AI.cpp	
+++ b/Build/Strategic/Strategic AI.cpp	
@@ -217,6 +217,8 @@ UINT8		gubHoursGracePeriod		= 0;
 UINT16	gusPlayerBattleVictories = 0;
 BOOLEAN gfUseAlternateQueenPosition = FALSE;
 
+#define MIN_PROGRESS_FOR_TANK_USE 40
+
 //padding for generic globals
 #define SAI_PADDING_BYTES				97
 INT8		gbPadding[SAI_PADDING_BYTES];
@@ -1505,7 +1507,7 @@ void InitStrategicAI()
 			ubNumTroops = (UINT8)max( gubMinEnemyGroupSize, min( iMaxEnemyGroupSize, ubNumTroops ) );
 			ubNumTanks = 0;
 
-			if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols )
+			if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 			{
 			
 			UINT32 val2;
@@ -4504,7 +4506,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 			{
 				grouptroops[ubCounter] = ubNumSoldiers;
 				grouptanks[ubCounter] = 0;
-				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 				{
 					if( Random(10) < val )
 					//if( Random(10) < gGameOptions.ubDifficultyLevel )
@@ -4589,7 +4591,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				{
 					grouptroops[ubCounter] = ubNumSoldiers;			
 					grouptanks[ubCounter] = 0;
-					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 					{
 						if( Random(10) < gGameOptions.ubDifficultyLevel )
 					//	if( Random(10) < value )						
@@ -4798,7 +4800,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value2 * 3);
 				//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 3);
 				// anv: replace one of soldiers with tank
-				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 				{
 					ubNumSoldiers--;
 					ubNumTanks++;
@@ -5062,7 +5064,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 			ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value4 * 4);
 			//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 4);
 			// anv: replace one of soldiers with tank
-			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 			{
 				if( Random( 10 ) < value4 )
 				//if( Random( 10 ) < gGameOptions.ubDifficultyLevel )
@@ -5189,7 +5191,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 					}
 					Assert(adminsThisSquad + troopsThisSquad + elitesThisSquad == soldiersThisSquad);
 					// anv: replace one of soldiers with tank
-					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 					{
 					
 						if( Random( 10 * 100 ) < value5 * direness )
@@ -5346,7 +5348,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				giReinforcementPool -= ubNumSoldiers;
 
 			// anv: replace one of soldiers with tank
-			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && CurrentPlayerProgressPercentage() >= MIN_PROGRESS_FOR_TANK_USE )
 			{
 				if( Random( 10 * 100 ) < value7 * HighestPlayerProgressPercentage() )
 				//if( Random( 10 * 100 ) < gGameOptions.ubDifficultyLevel * HighestPlayerProgressPercentage() )



Does anybody else like this compromise?

ps. I'm not suggesting this is a difficult change, but I like to post code when I can.

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #336373] Wed, 01 October 2014 19:53 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
It seems the patch makes sense. I would like to add it to the development trunk.
is anyone against adding the patch??

Report message to a moderator

Sergeant Major

Re: Drivable Vehicles[message #336374] Wed, 01 October 2014 20:23 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
RoWa21
It seems the patch makes sense. I would like to add it to the development trunk.
is anyone against adding the patch??


Even if encouraging the player to use scouting / retreating as possible tactical options during early game to evade tanks would be nice to have, I do agree that tanks in early game encounters are basically not or only very hard too beat.

And having an ini option that can be adjusted is always good, so I would say, go for it.

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #336378] Wed, 01 October 2014 22:06 Go to previous messageGo to next message
Ocular

 
Messages:24
Registered:September 2014
smeagol
And having an ini option that can be adjusted is always good, so I would say, go for it.


That's a very good idea. I've updated the patch and added a new one to use a new INI option: TANK_MINIMUM_PROGRESS (like ASSASSIN_MINIMUM_PROGRESS).

Gamedir patch:

https://gist.githubusercontent.com/anonymous/9a0ac6262960fd86fc9e/raw/a6982630af5487dced8d8b6e7f8d3f1001cbaeac/gamedir-tank-minimum-progress.patch

This patch also fixes the ARMY_USES_TANKS_IN_* comments so they are above the correct corresponding options.

diff --git a/Data-1.13/Ja2_Options.INI b/Data-1.13/Ja2_Options.INI
index 8805f4b..ddcf1e0 100644
--- a/Data-1.13/Ja2_Options.INI
+++ b/Data-1.13/Ja2_Options.INI
@@ -3065,10 +3065,12 @@ RND_ENTER_MILITIA_REINFORCEMENTS = 6
 ; Don't allow permanent items removal for no merc in that sector
 NO_REMOVE_RANDOM_SECTOR_ITEMS = TRUE
 
-; Depending on game difficulty enemy patrols at game start can be randomly reinforced with tank.
-ARMY_USES_TANKS_IN_ATTACKS = FALSE
 ; Depending on game difficulty enemy groups created during offensives can include tanks.
+ARMY_USES_TANKS_IN_ATTACKS = FALSE
+; Depending on game difficulty enemy patrols at game start can be randomly reinforced with tank.
 ARMY_USES_TANKS_IN_PATROLS = FALSE
+; Minimum progress required for tanks to appear.
+TANK_MINIMUM_PROGRESS = 0
 
 ;------------------------------------------------------------------------------------------------------------------------------
 ; Vehicle Inventory
diff --git a/Data/Ja2_Options.INI b/Data/Ja2_Options.INI
index 5ecd741..cecebf1 100644
--- a/Data/Ja2_Options.INI
+++ b/Data/Ja2_Options.INI
@@ -3039,10 +3039,12 @@ RND_ENTER_MILITIA_REINFORCEMENTS = 6
 ; Don't allow permanent items removal for no merc in that sector
 NO_REMOVE_RANDOM_SECTOR_ITEMS = FALSE
 
-; Depending on game difficulty enemy patrols at game start can be randomly reinforced with tank.
-ARMY_USES_TANKS_IN_ATTACKS = FALSE
 ; Depending on game difficulty enemy groups created during offensives can include tanks.
+ARMY_USES_TANKS_IN_ATTACKS = FALSE
+; Depending on game difficulty enemy patrols at game start can be randomly reinforced with tank.
 ARMY_USES_TANKS_IN_PATROLS = FALSE
+; Minimum progress required for tanks to appear.
+TANK_MINIMUM_PROGRESS = 0
 
 ;------------------------------------------------------------------------------------------------------------------------------
 ; Vehicle Inventory


New source patch:

https://gist.githubusercontent.com/anonymous/655c678eb4e824ecdd80/raw/c126ed66d0b1ce1a4ecda1012286c13af1ee5073/tank-minimum-progress.patch

I noticed that the ASSASSIN_MINIMUM_PROGRESS feature compares progress against HighestPlayerProgressPercentage(), so I've switched to that function as well.

diff --git a/Build/GameSettings.cpp b/Build/GameSettings.cpp
index 7a22bfc..26289f4 100644
--- a/Build/GameSettings.cpp
+++ b/Build/GameSettings.cpp
@@ -2187,6 +2187,7 @@ void LoadGameExternalOptions()
 
 	gGameExternalOptions.fArmyUsesTanksInAttacks			= iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_ATTACKS", FALSE);
 	gGameExternalOptions.fArmyUsesTanksInPatrols					= iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_PATROLS", FALSE);
+	gGameExternalOptions.usTankMinimumProgress				= iniReader.ReadInteger("Strategic Gameplay Settings","TANK_MINIMUM_PROGRESS", 0, 0, 100);
 
 	// WANNE: This is just a debug setting. Only in debug version we set that property to TRUE.
 	// In Release version this should always be set to FALSE
diff --git a/Build/GameSettings.h b/Build/GameSettings.h
index 935133c..dce7d0f 100644
--- a/Build/GameSettings.h
+++ b/Build/GameSettings.h
@@ -851,6 +851,7 @@ typedef struct
 
 	BOOLEAN fArmyUsesTanksInAttacks;
 	BOOLEAN fArmyUsesTanksInPatrols;
+	UINT8 usTankMinimumProgress;
 
 	// WANNE: Always use "prof.dat".
 	BOOLEAN fUseDifficultyBasedProfDat;
diff --git a/Build/Strategic/Strategic AI.cpp b/Build/Strategic/Strategic AI.cpp
index d847108..b20c397 100644
--- a/Build/Strategic/Strategic AI.cpp	
+++ b/Build/Strategic/Strategic AI.cpp	
@@ -1504,7 +1504,7 @@ void InitStrategicAI()
 			ubNumTroops = (UINT8)max( gubMinEnemyGroupSize, min( iMaxEnemyGroupSize, ubNumTroops ) );
 			ubNumTanks = 0;
 
-			if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols )
+			if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 			{
 			
 			UINT32 val2;
@@ -4503,7 +4503,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 			{
 				grouptroops[ubCounter] = ubNumSoldiers;
 				grouptanks[ubCounter] = 0;
-				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 				{
 					if( Random(10) < val )
 					//if( Random(10) < gGameOptions.ubDifficultyLevel )
@@ -4588,7 +4588,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				{
 					grouptroops[ubCounter] = ubNumSoldiers;			
 					grouptanks[ubCounter] = 0;
-					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 					{
 						if( Random(10) < gGameOptions.ubDifficultyLevel )
 					//	if( Random(10) < value )						
@@ -4797,7 +4797,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value2 * 3);
 				//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 3);
 				// anv: replace one of soldiers with tank
-				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+				if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 				{
 					ubNumSoldiers--;
 					ubNumTanks++;
@@ -5061,7 +5061,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 			ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value4 * 4);
 			//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 4);
 			// anv: replace one of soldiers with tank
-			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 			{
 				if( Random( 10 ) < value4 )
 				//if( Random( 10 ) < gGameOptions.ubDifficultyLevel )
@@ -5188,7 +5188,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 					}
 					Assert(adminsThisSquad + troopsThisSquad + elitesThisSquad == soldiersThisSquad);
 					// anv: replace one of soldiers with tank
-					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+					if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 					{
 					
 						if( Random( 10 * 100 ) < value5 * direness )
@@ -5345,7 +5345,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
 				giReinforcementPool -= ubNumSoldiers;
 
 			// anv: replace one of soldiers with tank
-			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
+			if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
 			{
 				if( Random( 10 * 100 ) < value7 * HighestPlayerProgressPercentage() )
 				//if( Random( 10 * 100 ) < gGameOptions.ubDifficultyLevel * HighestPlayerProgressPercentage() )

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #336385] Thu, 02 October 2014 04:16 Go to previous messageGo to next message
Buggler is currently offline Buggler

 
Messages:211
Registered:November 2009
@Ocular
Could you try using e following command to create a TortoiseSVN-friendly patch to facilitate SVN managers in committing the patches?
(Failed in test commit by simple copy-and-paste)
(Failed in test commit by patching through TortoiseSVN GUI)


[color:#999999]
git diff --no-prefix master..branch > [patchfile]
[/color]
Thanks. Smile

Edit:

Stick to your usual method as new method still does not work in TortoiseSVN GUI. Able to successfully commit both formats using SVN cmdline.

[Updated on: Thu, 02 October 2014 05:40] by Moderator

Report message to a moderator

Sergeant 1st Class
Re: Drivable Vehicles[message #336387] Thu, 02 October 2014 04:31 Go to previous messageGo to next message
Ocular

 
Messages:24
Registered:September 2014
Buggler

git diff --no-prefix master..branch > [patchfile]



Oh, sure! I'll make sure to do that in the future.

Here's the GameDir patch:

https://gist.githubusercontent.com/anonymous/2655504cced00be46ef9/raw/5bfa8d1aaaaebfc59847117a11d7fef2aef9201a/gamedir-tank-minimum-progress.patch

and here's the source patch:

https://gist.githubusercontent.com/anonymous/8e7c05fe881554b7269e/raw/1a5c2196bc4a0919bfad8f3e554fdb58b430650a/tank-minimum-progress.patch

Thank you!

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #336429] Fri, 03 October 2014 12:43 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
Thanks Ocular, I just committed the patch files to the svn development source and gamedir.

Report message to a moderator

Sergeant Major

Re: Drivable Vehicles[message #336441] Fri, 03 October 2014 22:21 Go to previous messageGo to next message
Ocular

 
Messages:24
Registered:September 2014
Thanks! I think TANK_MINIMUM_PROGRESS of 30 with both features switched on is a great default.

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #338228] Fri, 12 December 2014 13:05 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Hi everyone, thank you so much for those awesome mods!

I stumbled upon JA 2 somewhat recently and I am also quite new around the forum. So pardon me if this is not the most suitable thread to post this issue about driving cars in the game.

I have this bug happening while on the tactical screen (so far have driven the Ice Cream Truck only):

While driving the truck in the tactical screen and there are enemies present on that sector, when I move close to the let's say southern edge of the map and try to get the cursor to change so that I can move to the southern sector with the truck, the game crashes.

I have the 1.13 build 7667. Just wanted to let you know about the issue.

[Updated on: Fri, 12 December 2014 20:15] by Moderator

Report message to a moderator

Sergeant
Re: Drivable Vehicles[message #338235] Fri, 12 December 2014 21:00 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
The crash only occurs with a VS2008 Release build (VS2005 and VS2010 builds work fine).

Here is a savegame to reproce the bug. Just try to exit the sector in tactical with the vehicle. It will crash befor the cursor changes to the exit sector cursor.

https://dl.dropboxusercontent.com/u/34560718/VS2008_Release_Crash_When_Leaving_Sector_In_Vehicle.zip

Buggler investigated, that the bug was introduced in revision 7216 (development trunk).

[Updated on: Fri, 12 December 2014 21:44] by Moderator

Report message to a moderator

Sergeant Major

Re: Drivable Vehicles[message #338239] Fri, 12 December 2014 22:00 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
So if I have understood correctly, there is no remedy for this bug at the moment with the current 7667 development release?

Thanks for your time regardless.

Report message to a moderator

Sergeant
Re: Drivable Vehicles[message #338246] Sat, 13 December 2014 04:03 Go to previous messageGo to next message
Buggler is currently offline Buggler

 
Messages:211
Registered:November 2009
Quote:
Buggler investigated, that the bug was introduced in revision 7216 (development trunk).


I will take this back as it happens before that as well.

Cannot test e specific version as prior to that e vehicles r invisible on tactical screen (they can be shown present but still unable to board by using GABBI 'Alt+E').

crackwise
So if I have understood correctly, there is no remedy for this bug at the moment with the current 7667 development release?

If you are using Depri's package (VS2010), then it's probably another bug.

Please post your savegame just before the bug occurs so that coders can have a look.

Report message to a moderator

Sergeant 1st Class
Re: Drivable Vehicles[message #338367] Wed, 17 December 2014 10:40 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Found some bugs/issues while I was making this moving vehicle demo:

-sometimes when zombie tries to attack vehicle, he disappears from screen and can later prevent vehicle from moving
-it seems that dead corpses sometimes are shown over the vehicle
-dynamic flashlights of the passengers are not always updated when vehicle reaches destination and stops
-when the vehicle approaches the edge of the map, the game crashes always

Also some suggestions:
-make it possible for the passengers to be hit with bullets that penetrate vehicle's armor, for example for AP ammo
-currently when the vehicle is destroyed all passengers are killed, that's not very realistic - maybe instead hurt them and place near the destroyed vehicle, with a small chance of explosion depending on the amount of gas in tank
-add front light to the vehicle, with some way to turn it on/off

Also a question for AI - will the enemy try to use RPG's against player vehicles (without usual restrictions and with ENEMIES_DONT_SPARE_LAUNCHABLES = FALSE)?

[Updated on: Wed, 17 December 2014 10:49] by Moderator

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #338492] Sun, 21 December 2014 16:06 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
I am playing with "Army uses tanks in attacks" turned on. I really liked it a lot that the army made a combined attack with *several* tanks and over 40 soldiers to my guys at Grumm. It is a great feature and makes the game much more fun. (Of course I got obliterated Very Happy )

I would like to make a suggestion though: It is really an overkill when one tank is assigned per army unit (i.e. something like 1 tank per 10 men). I mean when 40 soldiers attack with 4 tanks, it is unbeatable and not that fun.

Therefore, is it possible to make it such that there is only 1 tank attacking the map regardless of number of soldiers? It would make it much more managable.

Report message to a moderator

Sergeant
Re: Drivable Vehicles[message #340826 is a reply to message #338492] Fri, 01 May 2015 14:46 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
In my opinion vehicles are still too slow (they can move maybe something like 6 tiles more than a running merc in turnbased). Changing max number APs of a vehicle in the APBPconstants.ini doesn't seem to affect anything, though. Any fix to this?

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #340828 is a reply to message #340826] Fri, 01 May 2015 17:42 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
AP_VEHICLE_MAXIMUM is the maximum AP a vehicle can have. This does not change the fact that APs are calculated as usual - and as a vehicle has abysmal stats, the APs generated are very low. They do get a hardcoded +35 AP though, as well as less AP for damage to tires and stuff. You could increase APs by altering the stats, but as this is the merc's profiles, this will require a new game (or savegame editing via debugger).

Reading the code and this thread leads me to believe that nobody ever encountered this issue (vehicles having lower AP and being slower than running mercs) before, or did not care. Which leads me to believe that as usual, people happily request/comment anything, but rarely ever try it out not sure



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #340829 is a reply to message #340828] Fri, 01 May 2015 18:03 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
As of r7838, Vehicles now generate AP_VEHICLE_MAXIMUM AP each turn. The previous calculation was based on stats, which is stupid for a car, and did not allow more than 100 AP. This means that using default values, a car has 200 AP, which allows it to travel quite a lot.

If you think that is too high, alter AP_VEHICLE_MAXIMUM in APBPConstants.ini. If you don't like this code change, sucks to be you. I'm not adding another damn ini option for stuff people request for the pure sake of requesting ini options.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #340830 is a reply to message #340828] Fri, 01 May 2015 18:44 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
Flugente wrote on Fri, 01 May 2015 16:42


Reading the code and this thread leads me to believe that nobody ever encountered this issue (vehicles having lower AP and being slower than running mercs) before, or did not care. Which leads me to believe that as usual, people happily request/comment anything, but rarely ever try it out not sure


Hehehe... I rarely have time to play, and if I do, I always seem to find some issues with stuff that was added...

so yeah... great this has been fixed. Thanks! Will try out the changes asap.

Report message to a moderator

Lieutenant

Re: Drivable Vehicles[message #342013 is a reply to message #340830] Fri, 07 August 2015 23:19 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
During code cleanup (r7960), I've removed code that made it possible for Mike and hostile Iggy to be spawned as friggin' tanks. I've also made tanks to always spawn with 100 HP, because why would game progress affect the effectivity of armour?


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #342014 is a reply to message #342013] Sat, 08 August 2015 05:37 Go to previous messageGo to next message
NewAgeOfPower is currently offline NewAgeOfPower

 
Messages:110
Registered:June 2010
Flugente wrote on Fri, 07 August 2015 20:19
I've also made tanks to always spawn with 100 HP, because why would game progress affect the effectivity of armour?


As the conflict rages on, the Queen buys armor upgrade kits and installs them? Or her tank crews, terrified of can-opener equipped rebels, jury rig extra armor modules?

Correct maintenance affects ceramic armor too, but Arulco in 1988 is very unlikely to have those.

Report message to a moderator

Sergeant
Re: Drivable Vehicles[message #342204 is a reply to message #342014] Wed, 26 August 2015 22:39 Go to previous messageGo to next message
Hanakin is currently offline Hanakin

 
Messages:33
Registered:June 2008
Location: Czech Rep.
I encountered a small graphical glitch (not really worth talking about). It might not be easily solvable, but I am in no position to know happy

The vehicle gets drawn under a tall grass tile.

Evidence for any gentlemen who might doubt this:
http://i.imgur.com/1iC7Mvx.jpg

But as I said, it's not that big of a deal.

I really enjoy the feature. I find it a bit weird that all the passengers' AP go down when the car moves, like it's a pedalo or something happy I know about the ini options, but I looked at them and didn't see one where the car would just take the AP of a driver (which I am okay with, as it makes sense that he/she is busy driving), so in the end I learned to live with the default setting. It's still really cool to drive around Deidranna's soldiers, shoot them and occasionally ram the poor sods happy Thanks for this!

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #342205 is a reply to message #342204] Wed, 26 August 2015 23:12 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
hanakin wrote on Wed, 26 August 2015 21:39

I really enjoy the feature. I find it a bit weird that all the passengers' AP go down when the car moves, like it's a pedalo or something happy I know about the ini options, but I looked at them and didn't see one where the car would just take the AP of a driver (which I am okay with, as it makes sense that he/she is busy driving), so in the end I learned to live with the default setting. It's still really cool to drive around Deidranna's soldiers, shoot them and occasionally ram the poor sods happy Thanks for this!

It's not weird at all. When driving around all characters move and it takes all passengers the same time to move from A to B.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Drivable Vehicles[message #342229 is a reply to message #342205] Thu, 27 August 2015 23:25 Go to previous messageGo to next message
Hanakin is currently offline Hanakin

 
Messages:33
Registered:June 2008
Location: Czech Rep.
silversurfer wrote on Wed, 26 August 2015 22:12
hanakin wrote on Wed, 26 August 2015 21:39

I really enjoy the feature. I find it a bit weird that all the passengers' AP go down when the car moves, like it's a pedalo or something happy I know about the ini options, but I looked at them and didn't see one where the car would just take the AP of a driver (which I am okay with, as it makes sense that he/she is busy driving), so in the end I learned to live with the default setting. It's still really cool to drive around Deidranna's soldiers, shoot them and occasionally ram the poor sods happy Thanks for this!

It's not weird at all. When driving around all characters move and it takes all passengers the same time to move from A to B.


I get it. I am just used to thinking of AP as respective mercs' energy or reaction/movement stamina or something, not a time unit thing. And I understand the need for it from the gameplay perspective, to prevent exploits. It just limits those cool drive-bys a bit happy Which might be the exploit in question, actually happy

In my mind, it just makes sense to 'use the driver's energy' to drive and the other ones' to shoot/eat/sleep/whatever. I guess I have to get to grips with the AP being more of a time thing - then it makes sense that it goes down for everyone, as you pointed out.

But I don't want my personal problems to drown out the major point I was trying to make, which was that the feature is really cool and I'd like to thank anv for it (and anyone else involved as well). thumbs up Really, good job!

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #342252 is a reply to message #332193] Sat, 29 August 2015 19:23 Go to previous messageGo to next message
Hanakin is currently offline Hanakin

 
Messages:33
Registered:June 2008
Location: Czech Rep.
Found a bug, gentlemen. I don't know if anyone has caught this yet.

Driving around with mercs set to 'silent movement' mode (near enemies) results in those mercs raising their agility rather quickly.

In this picture you can see that Hamous has raised his AGI score by two points only from driving the car 'silently' for several meters. Hanakin got a point as well.

(You can also see a glitched roof of the van to the left - this seems to happen occasionally for no apparent reason).

It seems like the game thinks that a huge amount of APs were consumed. And as there was an enemy nearby, they were training their agility.

The easiest solution is not to drive with silent mode enabled. Or the game could disable this mode for mercs entering a vehicle. angel

Report message to a moderator

Private 1st Class
Re: Drivable Vehicles[message #344592 is a reply to message #342252] Thu, 17 March 2016 23:41 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Minor code fixes that are relevant to this from r8112:
  • When targetting a tank, mercs always aim for the 'head'. This results in constant misses if one changes the tank's JSDs to a lower silhouette. I've changed this to 'torso'. It's a friggin' tank. There is no reason not to shoot at the middle.
  • If vehicles destroy a wall, this can now bring down a building's roof. As a result, a tank plowing through a house is now even more of a sight to behold happy



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #344687 is a reply to message #344592] Wed, 23 March 2016 23:33 Go to previous messageGo to next message
Panzer is currently offline Panzer

 
Messages:89
Registered:February 2016
Location: Altis, Sometimes Tanoa
It's funny. You never realize how an ice cream truck is the ultimate strategic weapon until you use it to move troops and equipment around the country in such a way that the enemy has no capability to stop. And if I were to tell anyone not on this site that my ultimate strategic weapon is an Ice Cream Truck. I would probably lose most if not all credibility.


I have no Wife, Children, or real Job. This also means I have 24 hours a day and 7 days a week to think of a rebuttal. You have been warned.

"I got another problem: I am being overrun by Dinosaur Nazis on Hoverboards!" -Ravenhugger

"Before you judge a man, walk a mile in his shoes. After that who cares? He's a mile away - and you've got his shoes!" - Unknown Criminal

Report message to a moderator

Corporal 1st Class
Re: Drivable Vehicles[message #344735 is a reply to message #344687] Sun, 27 March 2016 01:13 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
As of r8127, if a tank just took a heavy hit, but cannot see an enemy to fire upon, it can detonate a smoke grenade on itself to hide. At the moment I'm not sure whether the smoke from the stock smoke grenade is enough, I might create a new explosion entry for a bigger and faster cloud.

Technically, I also taught the AI how to blow itself up with this. Theoretically suicide bombers are possible now, but I'll leave this a player-only tactic for now.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Drivable Vehicles[message #351374 is a reply to message #344735] Sun, 29 October 2017 03:37 Go to previous messageGo to previous message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Flugente wrote on Sun, 27 March 2016 04:13
As of r8127, if a tank just took a heavy hit, but cannot see an enemy to fire upon, it can detonate a smoke grenade on itself to hide. At the moment I'm not sure whether the smoke from the stock smoke grenade is enough, I might create a new explosion entry for a bigger and faster cloud.

Since it uses SMOKE_GRENADE item to create smoke effect, it will not work with Aimnas mod which has no item 151.



Left this community.

Report message to a moderator

Lieutenant

Previous Topic: Re-spawning items
Next Topic: Snitches + Externalised morale & reputation
Goto Forum:
  


Current Time: Fri Mar 29 07:41:35 GMT+2 2024

Total time taken to generate the page: 0.02234 seconds