Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Drivable Vehicles
Re: Drivable Vehicles[message #333869] Mon, 23 June 2014 22:16 Go to previous messageGo to next message
sevenfm

 
Messages:1278
Registered:December 2012
Location: South Urals
More tank (apc) STI's, from Green Eyes
vehicles STI


Re: Drivable Vehicles[message #334011] Fri, 04 July 2014 03:26 Go to previous messageGo to next message
Marcho

 
Messages:14
Registered:November 2008
Location: Finland
This is sick. I always had nightmares about mobilized tanks intercepting me in Meduna. "What if they moved?" Damn tanks required a lot of explosives to blow up too, not to talk about the ridiculously fast rotation of the tank's turret.
@anv
If are you planning to add tank crews and something more then these would be my features I'll ask for:
*Tank turret takes at least (1) turn to be rotated and cannot fire in the same turn: One of those things I have a great hatred targeted at.
*Disabling vehicle or parts of it:
Tire damage: Slows down or terminates the vehicles mobility.
Engine damage: Disables mobility and a small chance of the vehicle catching fire (Spawn fire [molotov effect]).
Killing the driver (stationary): Vehicle stops and a new driver has to take old one's place.
Killing the driver (moving): Vehicle keeps the same speed and stops after a few (4-6 tiles) or continues as far as the thing rams against something.
*Driver and passenger(s) eject: Shall the automobile take enough beating or ignite in a glorious fire.. Shalt thou run their arses off.
*Disabling tank or parts of it:
Engine/Fuel tank damage: Disables mobility, chance of tank catching fire (Spawn fire [molotov effect]).
Track damage: Disables mobility.
Turret damage: Disables rotation of the turret or disables the turret from firing completely.
Ammo storage damage: Small chance of f*cking everything up.
These could be like legs/arms/torso/head for the tank, or simply "x chance of" modifiers. (Like 30% chance of disabling the tracks or 25% chance of disabling the engine with a 40% chance of the tank catching fire)
*Smoke screen: For tanks and other armored special duty vehicles, would decrease chance to hit and in worst cases: visibility.
*Tank crew ejection: If or when the tank takes significant amount of damage or vital parts of the tank are disabled, tank crew would eject.
*Capturing and manning a tank: If the tank was not completely destroyed in the process, but only left disabled.. A skilled mechanic/engineer could repair it. (No unlimited ammo though, rare special shells could be used)
*Tank indicator in enemy patrols/pools: Really, while it might be cute to have 6 red dots from which it doesn't matter are they admins or elites.. BUT HAVING A TANK IS DISGUISED AS A RED DOT TOO? Have at least purple to indicate them. Even militia has green, light blue and dark blue.
Toggle Spoiler

*APC's for the Queen's army and the player:
It would be cool if one of these bad boys were to assault a fortified position, for example a house.. *gargles in drool*
Toggle Spoiler

*Ability to look for/scavenge cars: In the map screen.. Different grids would have a special perform action: Search for cars. Most of these would be highly damaged and out of fuel, but the idea is not to make an Arulco racing team.. But to make vehicles more common in order to have them used in different (normally sacrificial) tasks like car bombings, disguises and generic drive-by's.
*Special inventory: Not the one in the map screen, but rather a simplified inventory that can be used in tactical and combat. For example: Delivering ammunition, guns and supplies.. Or having a car full of explosives.. Then have it detonated, along with the driver or without.

Forgive me if I added something that you already have developed or something that is theoretically impossible to have coded inside the game, that even the idea sounds stupid.
But nevertheless, outstanding job!
I've never thought I would see this, I just used to have that small feeling of euphoria when in non-modded JA2 you could move 1-2 tiles to pick your parking place... Oh my god, it was the best.. Not.

[Updated on: Fri, 04 July 2014 13:12] by Moderator

Re: Drivable Vehicles[message #334013] Fri, 04 July 2014 09:38 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
Don't know if the following has been considered already:

Vehicles should not be able to spot landmines.

Hummer should have better ram protection than icecream truck / el dorado / jeeps.




Re: Drivable Vehicles[message #334074] Tue, 08 July 2014 01:04 Go to previous messageGo to next message
Flugente

 
Messages:3099
Registered:April 2009
Location: Germany
As of r7314 and GameDir r2062, tanks can now be shown on the strategic view. For visual reasons, only one will be shown, even if there are multiple ones.
http://i59.tinypic.com/v3gdpu.pngNote that this works for tanks spawned by this very feature, but not necessarily for tanks that spawn around Meduna.

The new sti libraries from 2062 are required, otherwise the game will crash if it wants to display an icon and cannot find it.

The icon looks kinda meh. If someone else has a better one, feel free to integrate it into the lib and commit it (make sure its size fits).


Re: Drivable Vehicles[message #334077] Tue, 08 July 2014 11:24 Go to previous messageGo to next message
Randok

 
Messages:299
Registered:March 2004
Location: Poland
IMHO icon is too large (an 8 squares). Better perhaps to replace square circle or triangle, change color.
Smile
Re: Drivable Vehicles[message #334078] Tue, 08 July 2014 12:14 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
I agree with Randok. The tank icon looks cool, but is probably too large.

Reducing icon size to 2x2 squares should do.


Re: Drivable Vehicles[message #334094] Tue, 08 July 2014 22:21 Go to previous messageGo to next message
Thor

 
Messages:430
Registered:February 2007
Location: Belgium
Suggestions (just brainstorming): Here's a smaller image suggesting a tank... and 2 others suggesting tank cannons(vertically - in a place which up till now is unused:
http://i59.tinypic.com/j63dio.png
Always willing to make a .STI file for one of them...

[Updated on: Tue, 08 July 2014 22:31] by Moderator

Re: Drivable Vehicles[message #334108] Wed, 09 July 2014 17:14 Go to previous messageGo to next message
Buggler

 
Messages:216
Registered:November 2009
For simplicity in coding & presentation, suggest to use a different color for tanks.
Vehicles uses white color, so tanks could use a different shade like grey/metallic color.

http://i.imgur.com/dfeC6DC.png
800x600 sample; 1024x768 will look better.

The sample on the right with light grey corners is to represent 10x quantity, be it mercs/militia/enemy/tanks(? - Someone muz b crazy). Smile
(Already proposed to Flugente. Fingercrossed that he will do it together with the tank icon modification. Took the initiative so that he can focused on other features.)

Always good to throw in different ideas and then have the best combination implemented.

Edit:
The first enemy icon is a T in 640x480 & 800x600.

http://i.imgur.com/N69aMVe.png

Different shapes/letters will be hard to decipher. Either go with larger Tank icons or different colored square blocks. Have to take into consideration the 3x1 tank in lower resolution. Smile

[Updated on: Tue, 15 July 2014 05:12] by Moderator

Re: Drivable Vehicles[message #334109] Wed, 09 July 2014 17:16 Go to previous messageGo to next message
sevenfm

 
Messages:1278
Registered:December 2012
Location: South Urals
Or maybe use T sign instead of square?
C for car
J for jeep
A for APC =)


Re: Drivable Vehicles[message #334110] Wed, 09 July 2014 17:21 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3756
Registered:July 2009
Imho, the differently colored squares, while consistent, just don't convey the same feeling of "Oh my god, it's a motherf***ing TANK!!!!"


Re: Drivable Vehicles[message #334111] Wed, 09 July 2014 17:22 Go to previous messageGo to next message
Randok

 
Messages:299
Registered:March 2004
Location: Poland
I think that this proposal is better than a large icon.
Re: Drivable Vehicles[message #334113] Wed, 09 July 2014 18:46 Go to previous messageGo to next message
tais

 
Messages:804
Registered:February 2008
Location: NL
Just make a tank the same red as the other enemies but just a turret that takes three horizontal spots, would be clear enough imo

http://i.imgur.com/4SLagtC.png
http://i.imgur.com/CS55Oqc.png

☆☆M☆☆
Re: Drivable Vehicles[message #334115] Wed, 09 July 2014 20:37 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
I like Thor's tank the best so far.


Re: Drivable Vehicles[message #334116] Wed, 09 July 2014 20:45 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3756
Registered:July 2009
I think that one needs its turret moved or extended to the left by a few pixels to be more proportionate.


Re: Drivable Vehicles[message #334142] Thu, 10 July 2014 21:25 Go to previous messageGo to next message
sevenfm

 
Messages:1278
Registered:December 2012
Location: South Urals
Thor
you can probably reduce it to 2x1 ? =)


Re: Drivable Vehicles[message #334143] Thu, 10 July 2014 21:26 Go to previous messageGo to next message
Thor

 
Messages:430
Registered:February 2007
Location: Belgium
With some color variants: http://i59.tinypic.com/20hkq5h.jpg
Re: Drivable Vehicles[message #334144] Thu, 10 July 2014 21:28 Go to previous messageGo to next message
Thor

 
Messages:430
Registered:February 2007
Location: Belgium
Instead of 3x1, you mean? Will be difficult.. I'll try.

I think a tank should fit in the row, so take the space of 2 or 3 soldier blocks... this one takes three, but I'll try to fit it in the space of 2...

[Updated on: Thu, 10 July 2014 21:31] by Moderator

Re: Drivable Vehicles[message #334145] Thu, 10 July 2014 21:40 Go to previous messageGo to next message
sevenfm

 
Messages:1278
Registered:December 2012
Location: South Urals
I think it's possible

http://i.imgur.com/VwjQAFG.png
p.s. my tank looks like a gunboat ROFL

[Updated on: Thu, 10 July 2014 21:49] by Moderator



Re: Drivable Vehicles[message #334147] Thu, 10 July 2014 22:08 Go to previous messageGo to next message
Thor

 
Messages:430
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

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

 
Messages:3099
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...


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

 
Messages:430
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?
Re: Drivable Vehicles[message #334174] Sat, 12 July 2014 12:45 Go to previous messageGo to next message
smeagol

 
Messages:2713
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



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

 
Messages:2713
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).



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

 
Messages:232
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


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

 
Messages:1278
Registered:December 2012
Location: South Urals
@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


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

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


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

 
Messages:1605
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:


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

 
Messages:288
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

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

 
Messages:3099
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.


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

 
Messages:64
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

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.
Re: Drivable Vehicles[message #336373] Wed, 01 October 2014 19:53 Go to previous messageGo to next message
RoWa21

 
Messages:2046
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??


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

 
Messages:2713
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.


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() )

Re: Drivable Vehicles[message #336385] Thu, 02 October 2014 04:16 Go to previous messageGo to next message
Buggler

 
Messages:216
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

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!
Re: Drivable Vehicles[message #336429] Fri, 03 October 2014 12:43 Go to previous messageGo to next message
RoWa21

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


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.
Re: Drivable Vehicles[message #338228] Fri, 12 December 2014 13:05 Go to previous messageGo to next message
crackwise

Messages:5
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

Re: Drivable Vehicles[message #338235] Fri, 12 December 2014 21:00 Go to previous messageGo to previous message
RoWa21

 
Messages:2046
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



Previous Topic: Radio expansion
Next Topic: RPG decisions
Goto Forum:
  


Current Time: Thu Aug 24 09:57:04 EEST 2017

Total time taken to generate the page: 0.01730 seconds