Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Drivable Vehicles
Drivable Vehicles[message #332193] Mon, 05 May 2014 22:13 Go to next message
anv

 
Messages:232
Registered:March 2013
Drivable Vehicles

Fill hearts of you enemies with terror, their ears with purr of impending doom and their noses with stench of high octane nightmare fuel as your mercs race through the battlefield in shiny steamrollers of carnage. Requested here, and also here... in 2004?!

https://farm6.staticflickr.com/5516/13929319180_d541241a2d_o.png
El Dorado on the road to El Dorado

Driving in tactical view

You can now drive vehicles in tactical view. To control vehicle, click on it or on the steering wheel in team panel under driver's portrait.
Animations are a bit wonky and reminiscent of the first Emergency game, but that's as good as it can get in game with movement limited to 8 directions.
Vehicles have two gears - slow drive and fast drive, switchable just like walking and running ('S', 'R', double-click). Can't sidestep, obviously, but can drive in reverse.
Vehicles cannot sneak.
Vehicles working: Ice Cream Van, Hummer, Jeep, El Dorado and, potentially, tanks.

Shooting from vehicle

Passengers can be selected and ordered to open fire from the inside. Enemies shoot at the vehicle too (nothing new here). Passengers are treated as sitting for calculation purposes.
You can also open inventory screen for passengers, pass or throw items, etc.
https://farm6.staticflickr.com/5031/14112664831_db12d4f768_o.png
Today's special flavour: vanilla and lead (and terrible puns)

Action points, passengers and exploits

Normally vehicle is treated as any other merc and has its own APs. It has obvious disadvantages - it's possible to drive in the middle of the enemy group using vehicle's 100AP,
and then use all your mercs inside vehicle with their still full APs to kill everything that moves at point blank range - with even the driver participating!

To prevent that you can set Tactical Gameplay Settings > AP_SHARED_AMONG_PASSENGERS_AND_VEHICLE_MODE with following calculation methods:
  • 0 - No change.
  • 1 - APs deducted from vehicle are also deducted from all passengers.
    Example 1: Passenger has 70 AP, vehicle 100 AP when turn starts. Passenger shoots for 20 AP, has 50 now. Vehicle drives for 60 AP - passenger loses 60 AP too, has now -10AP.
    Idea is that APs correspond to the time and time flows for all inside the moving vehicle even if they do nothing. Note it's possible to end up with huge AP debt if you waste all APs, and then drive.
  • 2 - APs deducted from vehicle are also deducted from all passengers, but adjusted to initial APs of any given passenger.
    Example 1: Passenger has 70 AP, vehicle 100 AP when turn starts. Passenger shoots for 20 AP, has 50 now. Vehicle drives for 60 AP - passenger loses 42 AP (60 / 100 * 70), has now 8AP.
    Same as above, but treats single AP not as a time unit but merc specific amount of things given merc can do in a specified time unit. Still possible to end up with huge AP debt.
  • 3 - APs deducted from vehicle are also deducted from all passengers, but only to the certain threshold (default setting).
    Example 1: Passenger has 70 AP, vehicle 100 AP when turn starts. Passenger shoots for 20 AP, has 50 now. Vehicle drives for 60 AP - if passenger didn't shoot, he would lose 42 AP (60 / 100 * 70) and have 28 APs now. Since it's less than passenger's current 50, he ends up with 28 APs.
    Example 2: Passenger has 70 AP, vehicle 100 AP when turn starts. Passenger shoots for 70 AP, has 0 now. Vehicle drives for 60 AP - if passenger didn't shoot, he would lose 42 AP (60 / 100 * 70) and have 28 APs now. Since it's more than passenger's current 0, he ends up with 0 APs.
    Idea is similar to the 2, but acknowledges that actions can be concurrent - mercs shoot WHILE vehicle is moving, only sharing, umm, vehicle's timeline at the specific moment.
You can also set AP_SHARED_AMONG_PASSENGERS_AND_VEHICLE_SCALE to scale how much APs will be deducted just due to riding.

Entering or exiting vehicle costs 30 AP. When driver exits, next person automatically takes control of the steering wheel.

Download
Patch

To do:
- ramming enemies and structures,
- crits against vehicles (from commented out code: there were supposed to be different critical effects depending on which segment of vehicle was hit: tires, engine, gas tank, crew compartment).
- customised vehicle seats (FOV, protection, mounted guns, etc.; specific seat selectable on entering vehicle)
- wheelies, jumping ramps, drifting. OK, maybe not.
- force AI to use their own vehicles? Some car chases would be nice.


Re: Drivable Vehicles[message #332194] Mon, 05 May 2014 22:20 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3736
Registered:July 2009
:yikes:


Re: Drivable Vehicles[message #332195] Mon, 05 May 2014 22:59 Go to previous messageGo to next message
Slax

 
Messages:1435
Registered:July 2006
Location: People riding polar bears...
Wha-WHAAAA-
http://i.imgur.com/iXiXkJR.gif

You win the prize, anv. Bronze, silver, gold, hyper platinum... ALL OF THEM.

Re: Drivable Vehicles[message #332196] Mon, 05 May 2014 23:05 Go to previous messageGo to next message
JMich

 
Messages:580
Registered:January 2011
Location: Greece
Let me quote Depri
DepressivesBrot
:yikes:
Re: Drivable Vehicles[message #332197] Tue, 06 May 2014 00:52 Go to previous messageGo to next message
Azure_Repeater

 
Messages:152
Registered:March 2014
Location: Philippines
Ah, thank you, Anv! Finally, a dream come true! :cheerleader: :cheers: :super:
Re: Drivable Vehicles[message #332198] Tue, 06 May 2014 01:30 Go to previous messageGo to next message
Nasenbaer

 
Messages:36
Registered:July 2013
Location: Germany
unbelievable. just unbelievable...
Re: Drivable Vehicles[message #332199] Tue, 06 May 2014 01:42 Go to previous messageGo to next message
Shanga

 
Messages:3507
Registered:January 2000
Location: Danubia
Published on news, posted on FB, starring at the screen still not believing it's true...


Re: Drivable Vehicles[message #332200] Tue, 06 May 2014 03:22 Go to previous messageGo to next message
Shadow21

 
Messages:336
Registered:November 2001
Location: on route to San Hermanos
wow who would have thought that one day vehicles would be drivable in ja2.

great job!
Re: Drivable Vehicles[message #332202] Tue, 06 May 2014 08:05 Go to previous messageGo to next message
sidew

 
Messages:50
Registered:June 2012
OMG!! Surprised
Re: Drivable Vehicles[message #332203] Tue, 06 May 2014 08:42 Go to previous messageGo to next message
Randok

 
Messages:297
Registered:March 2004
Location: Poland
Suuuuuuper. Fantastic.I also was looking forward to.
:super:

Just only two new levels and will be a new ( fanastic ) era of the game. Smile
Re: Drivable Vehicles[message #332204] Tue, 06 May 2014 08:50 Go to previous messageGo to next message
Nasenbaer

 
Messages:36
Registered:July 2013
Location: Germany
would be nice to have civilian disguise for Persons beeing inside the ice cream truck - or at least for those beeing in the backside of the truck...
Re: Drivable Vehicles[message #332205] Tue, 06 May 2014 09:07 Go to previous messageGo to next message
Azure_Repeater

 
Messages:152
Registered:March 2014
Location: Philippines
Haha, this is the result when mixing Grand Theft Auto with JA2 Very Happy
Re: Drivable Vehicles[message #332206] Tue, 06 May 2014 09:23 Go to previous messageGo to next message
smeagol

 
Messages:2702
Registered:June 2008
Location: Bremen, Germany
Waking up and seeing this... almost needed to change clothes instantly.

Great work!


Re: Drivable Vehicles[message #332208] Tue, 06 May 2014 11:42 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
awesome work anv.

just one question: can you just make a simple bool value (ALLOW_DRIVING_VEHICLES_IN_TACTICAL) to allow the driving feature. If someone want to play the vanilla style (Data\ja2_options.ini) we could disable the feature. Thanks.

EDIT: Committed to development trunk

[Updated on: Tue, 06 May 2014 11:46] by Moderator



Re: Drivable Vehicles[message #332218] Tue, 06 May 2014 21:40 Go to previous messageGo to next message
sevenfm

 
Messages:1172
Registered:December 2012
Location: Russia
With this feature, ambushed squad has a chance to survive - at least they can drive away and have some protection.
And finally Hamous will be able to leave unwanted encounter with his truck.

I also think that enemy attack jeeps (or even moving tanks late in the game) are absolute must.
And some farm sectors can have moving tractors on the fields :biglaugh:

p.s. not much room for this on regular maps probably, but with bigmaps it should be more interesting.

p.s. what is the situatiuon with detecting mines and tripwire when you are driving? Do we need to attach a mine trawl to hummer? :wrysmiley:


Re: Drivable Vehicles[message #332219] Tue, 06 May 2014 21:42 Go to previous messageGo to next message
sevenfm

 
Messages:1172
Registered:December 2012
Location: Russia
@Repeater1947
Moving vehicles were in Fallout Tactics, and NightOps mod for JA2 also has moving enemy attack jeeps.


Re: Drivable Vehicles[message #332220] Tue, 06 May 2014 21:52 Go to previous messageGo to next message
Uriens

 
Messages:325
Registered:July 2006
I can't believe this feature is actually created. I always thought this would be impossible for this engine, or at least not without a major effort from team of programmers.
Anv is :magician:

Now lets have a party. :cheerleader: :cheers: :cheerleader: :rulez: :cheerleader: :yaysupplz: :clap: :headbanger: :cheerleader:
Re: Drivable Vehicles[message #332236] Wed, 07 May 2014 01:44 Go to previous messageGo to next message
anv

 
Messages:232
Registered:March 2013
@all: To be honest lot of functionality was already in code, just unused - not to even mention animations.

@Nasenbaer: I'm planning to add seats with different properties including hidden (e.g. cargo compartment of the ice cream van), so one could smuggle mercs in as long as visible driver and guy next to him are disguised.

@Sevenfm: Are NO jeeps replacement creatures/tanks or do enemies use them as actual vehicles? Guess even first version would be enough to reenact Mad Max. For traps - look below.

Small Update #1:
- Feature can be enabled/disabled with Tactical Gameplay Settings > ALLOW_DRIVING_VEHICLES_IN_TACTICAL.
- Fixed sweet spot finding for vehicles (before merc who exited vehicle and then was ordered to get back in would go around vehicle).
- Clicking anywhere on terrain when passenger or driver is selected will automatically switch to vehicle (sometimes faster and more intuitive than clicking on vehicle or steering wheel).
- Selecting vehicle driver in team panel will cause panel to show his own APs, not vehicle's (since driver can double as a shooter or exit vehicle and act as a normal merc). Would like to show vehicle portrait on its own, but in 640x480 there's not enough place for vehicle + 6 mercs :<
- Rotation: mercs can now look around freely, however when vehicle rotates they rotate with it (relative rotation). On entering, mercs turn in the same direction as vehicle.
- Fixed passengers footsteps on vehicle rotation.
- Fixed steering wheel behaviour when swapping mercs order in team panel.
- Blocked grabbing items by passengers while inside vehicle.
- Assured that passengers and vehicles won't detect mines and traps without exiting vehicle and performing proper search.
- Fixed unrelated bug with preset explosives having owner id 254, getting out of MercPtrs range and dealing no damage as a result (e.g. in Meduna Labirynth).

Patch


Re: Drivable Vehicles[message #332237] Wed, 07 May 2014 01:50 Go to previous messageGo to next message
Slax

 
Messages:1435
Registered:July 2006
Location: People riding polar bears...
How about a durability scaling option for vehicles?

Re: Drivable Vehicles[message #332240] Wed, 07 May 2014 02:03 Go to previous messageGo to next message
sevenfm

 
Messages:1172
Registered:December 2012
Location: Russia
@anv
Yes, NO jeeps and tanks just replace one of existing mercs in attacking squad, AFAIK.

This feature can add a lot of challenge, especially early in the game.

I remember also that NO players reported some problems with moving enemy vehicles - sometimes they get stuck or have problems with pathfinding and such (they are quite big comparing with regilar mercs).

Also, do the vehicles consume gas when moving in sector?

p.s. Hmmm.. flamer tank in JA? Let me think...


Re: Drivable Vehicles[message #332242] Wed, 07 May 2014 02:38 Go to previous messageGo to next message
Flugente

 
Messages:3049
Registered:April 2009
Location: Germany
Very nice :thumbsup:

anv
Would like to show vehicle portrait on its own, but in 640x480 there's not enough place for vehicle + 6 mercs :<
Hmm. So that works apart from the slot problem?

Don't know if you've yet dabbled with tanks. Not regarding the balancing issues (do we actually want tanks?), a few questions/ideas...
  • In case you've been working on tanks, how would aiming work? As tanks can face one direction but look into another. Perhaps, if this even works, have one designated driver and one designated gunner. Looking with the gunner would turn the turret (and would also provide an incentive to man tanks with more than one person).
  • The main balancing issue with tanks would be the main gun. Idea (no idea wether it fits current implementation): Let's say the tank has a main gun, in the turret that the gunner uses, and an secondary MG that the driver uses. These guns are stored in the tanks' soldier inventory. If a person enters a seat, he momentarily gets control of that (and only that) gun (move it to his hands and use tank firing anims). If we then use external feeding to feed ammo exclusively from tank inventory, we have made tank ammo a resource. Ammo for the main gun should obviously be rare. If the player has to buy every shell singlehandedly from Tony, and the tank consumes like it should, tanks might be less useful than feared.
  • Tied to that: Perhaps have a special inventory for the tank - less space than a truck, dedicated slots for ammo, extra fuel storage, dedicated gun slots.
  • Tied to that: have guns in slots be fixed (unremovable - sort of like Nails' vest). Then allow - as an repair assignment - maintenance crew to replace the guns. So, say, Dynamo would take an RPK into his hands and could replace the tanks MG with it. Only allow certain guns to be used. Have the main gun only be useable by the tank.
  • Required AI modification: increase considered threat value of player tanks tremendously. Modify AI so that it only ever uses explosive weapons against tanks. If all else fails, increase propability of AI getting RPGs tremendously exclusively if the player has tanks in this sector.


Re: Drivable Vehicles[message #332248] Wed, 07 May 2014 03:39 Go to previous messageGo to next message
Azure_Repeater

 
Messages:152
Registered:March 2014
Location: Philippines
Well during my campaings, I change the seating capacities from 6 to 8, and I play with 800x600 resolution. No slot for vehicle :<
Re: Drivable Vehicles[message #332251] Wed, 07 May 2014 09:16 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3736
Registered:July 2009
Re: Cannon:
Tanks have a .30 caliber main gun and a 90mm coax^^
You can make the shells as scarce as you want but by the time I get a tank, I can load it to the brim with rifle rounds.


Re: Drivable Vehicles[message #332252] Wed, 07 May 2014 09:40 Go to previous messageGo to next message
Gambigobilla

 
Messages:719
Registered:July 2008
I'd make a merger to create a 90mm shell using 10 9mm bullets.
Re: Drivable Vehicles[message #332253] Wed, 07 May 2014 09:46 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3736
Registered:July 2009
Bad troll is bad.


Re: Drivable Vehicles[message #332280] Wed, 07 May 2014 20:59 Go to previous messageGo to next message
tais

 
Messages:796
Registered:February 2008
Location: NL
I see Carmageddon all the way to Meduna

☆☆M☆☆
Re: Drivable Vehicles[message #332281] Wed, 07 May 2014 21:11 Go to previous messageGo to next message
rummtata

 
Messages:104
Registered:April 2011
Location: Germany
You better hope Wally is not the one driving ... :nerd:
Re: Drivable Vehicles[message #332285] Wed, 07 May 2014 23:12 Go to previous messageGo to next message
anv

 
Messages:232
Registered:March 2013
@Slax:
Durability is technically already in, specified in Vehicles.xml with tag linking to Armour index in Items.xml - van is by default linked to kevlar vest and humvee to spectra vest. Except it's unused in the code past loading it from XML! Another ToDo.

@Flugente:
Vehicle is technically a part of the squad, so why not. Except for interface size that is.

I didn't dabble with tanks. As such, they can work as any other vehicle - people entering (ok, I need one line fix for that), exiting, driving between sectors, driving in sector. Problem is exactly what you've mentioned - tank is an only creature that "rotates" with only a part of its body. If you try driving around at the current moment, only turret will rotate in the driving direction, tank's base will remain static (there are even 2 different tank bodies with only difference being rotation of its base). It looks OK for driving in NW-SE or NE-SW, but in others it looks like tank is sliding and generally meh. There are even no animation files for tank body turning around. To make tanks work properly (and visually correct) pictures of tank body rotated in those 6 extra directions would be needed. Then past a turret on top of it and change animation file depending not on tank's rotation but last direction of movement so turret and base would stay independent.

Limiting ammo of tank's weapons under player's control is a given. Perfectly tank should need crew of 3 mercs to have exact same functionality as enemy tank - one merc to drive, one shooting the cannon (possibly two, if we assume gunner/loader pair) and the third one on the mounted machine gun (machine gun being replaceable, sure, why not, machine guns could be installed on other vehicles too). Then with addition of ammo scarcity and difficulty or repair maybe, MAYBE, it would be balanced.

Another question is how player would get his hands on tank in the first place. One possibility is to render heavily damaged (<20hp, but not destroyed yet) enemy tanks unoperational, with its crew spawning around it, and making empty tank enterable by player mercs. But then of course crafty enough player could end up with entire flotilla. In mods one could just add NPC keeping tank in his barn or place empty one in enemy military base, so player could steal it.

AI tanks are blocked from moving, or most other actions for that matter. It's easy to reenable their movement, but then silly animation kinda breaks the point.


Re: Drivable Vehicles[message #332350] Fri, 09 May 2014 20:07 Go to previous messageGo to next message
anv

 
Messages:232
Registered:March 2013
Small Update #2:

- Streamlined vehicle controls - no more selecting driver and vehicle separately, switching displayed APs and other esoteric activities. To move vehicle just select its driver and you're good to go. If you click on vehicle in tactical, also its driver will be selected automatically. Besides driving car, driver can perform other actions normally.
- Vehicle's APs, health and fuel are displayed on the steering wheel - thanks to Buggler for idea. Vehicle APs are treated as a resource (so if car changes driver mid-turn, it won't go any further than it would).
https://farm3.staticflickr.com/2929/13959249119_df11722626_o.png
- Added option Tactical Interface Settings > ADD_PASSENGER_TO_ANY_SQUAD. If you order passenger to exit vehicle by clicking on the seat belt, he'll be added to new squad, so if you ordered six passengers to exit one by one, you'd end up with six new squads. With ADD_PASSENGER_TO_ANY_SQUAD = TRUE, passenger will be added to any existing squad with empty slot if possible.
- Added option Tactical Interface Settings > PASSENGER_LEAVING_SWITCH_TO_NEW_SQUAD. If you order passenger to exit vehicle by clicking on the seat belt, by default you get switched to his new squad. With PASSENGER_LEAVING_SWITCH_TO_NEW_SQUAD = FALSE you'll switch only if exiting passenger is the selected one.
- Cosmetic fix: changed display above vehicle from "*Merc's name* (VEHICLE)" to "*Merc's name* (*Vehicle's name*)" and colour from yellow to white (since mercs in vehicle are controllable and yellow is reserved for mercs on assignments).
- Fixed passengers rotation. Again.
- Fixed vehicles getting "tired" - lowered APs due to fuel below max. They can move the same as long as they have any fuel.
- Fixed unrelated bug: clicking on any empty slot in team panel would select merc with id 0.
- Fixed unrelated bug: switching to squad with less mercs would cause team panel to still show skill tooltips for mercs from previous squad on empty slots.

Patch (includes Update #1)


Re: Drivable Vehicles[message #332503] Tue, 13 May 2014 02:10 Go to previous messageGo to next message
Peal

 
Messages:250
Registered:August 2007
Location: Germany
Super Awesome Very Happy
Re: Drivable Vehicles[message #332516] Tue, 13 May 2014 14:48 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1566
Registered:March 2009
Location: Broadwurschd-City
how to apply / open the patch(es)

doesn't work 4 me
Re: Drivable Vehicles[message #332554] Tue, 13 May 2014 23:49 Go to previous messageGo to next message
Flugente

 
Messages:3049
Registered:April 2009
Location: Germany
If you don't compile exes, then the patch won't help you. No need to, anyway...

Good work! Committed in r7204 and GameDir r2033.


Re: Drivable Vehicles[message #332593] Wed, 14 May 2014 13:21 Go to previous messageGo to next message
Taro_M

 
Messages:298
Registered:November 2008
Great stuff, what I really would like to see is the ENEMY tanks, APC's and armed jeeps driving around and attacking sectors. Now that would add some new difficulty to the game.

BTW: When thinking about drive-by's I cant help but to imagine it looking like this:
http://www.youtube.com/watch?feature=player_detailpage&v=aaaFpKqUGAc#t=181

[Updated on: Wed, 14 May 2014 16:16] by Moderator

Re: Drivable Vehicles[message #332606] Wed, 14 May 2014 16:17 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1566
Registered:March 2009
Location: Broadwurschd-City
Flugente
If you don't compile exes, then the patch won't help you. No need to, anyway...

Good work! Committed in r7204 and GameDir r2033.


shure? can't find the above mentioned settings in the ini of 7205
Re: Drivable Vehicles[message #332608] Wed, 14 May 2014 18:09 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
Flugente
If you don't compile exes, then the patch won't help you. No need to, anyway...

Good work! Committed in r7204 and GameDir r2033.


did you also commit the update #1 patch, which eas posted earlier in this thread?


Re: Drivable Vehicles[message #332617] Wed, 14 May 2014 21:49 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
RoWa21
Flugente
If you don't compile exes, then the patch won't help you. No need to, anyway...

Good work! Committed in r7204 and GameDir r2033.


did you also commit the update #1 patch, which eas posted earlier in this thread?


I have seen that you have also committed update patch #1.
BTW, I fixed some INI properties from ja2_options.ini which were placed in the wrong INI section ...


Re: Drivable Vehicles[message #332620] Wed, 14 May 2014 22:12 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1566
Registered:March 2009
Location: Broadwurschd-City
where are the settings 4 vehicles in tactical?
Re: Drivable Vehicles[message #332624] Wed, 14 May 2014 23:35 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
This is the correct place in the ja2_options.ini for the new vehicle settings:

[Tactical Gameplay Settings]
- ALLOW_DRIVING_VEHICLES_IN_TACTICAL
- AP_SHARED_AMONG_PASSENGERS_AND_VEHICLE_MODE
- AP_SHARED_AMONG_PASSENGERS_AND_VEHICLE_SCALE

[Tactical Interface Settings]
- ADD_PASSENGER_TO_ANY_SQUAD
- PASSENGER_LEAVING_SWITCH_TO_NEW_SQUAD



Re: Drivable Vehicles[message #332626] Wed, 14 May 2014 23:46 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1566
Registered:March 2009
Location: Broadwurschd-City
and why is this ini NOT in Depri's installer?
Re: Drivable Vehicles[message #332627] Thu, 15 May 2014 00:17 Go to previous messageGo to previous message
Flugente

 
Messages:3049
Registered:April 2009
Location: Germany
Because you touch yourself down there.

Edit: The stuff was in the wrong location and Rowa fixed it. Which was after the SCI was made, which explains why it isn't in. You can either wait 'til next time or just copy to settings to where Rowa said.

[Updated on: Thu, 15 May 2014 00:26] by Moderator



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


Current Time: Sun Apr 23 20:51:32 EEST 2017

Total time taken to generate the page: 0.01187 seconds