VH Mode -- the concept

Discuss and catch up on anything related to the SWBF1 Conversion Pack

Moderator: Moderators

Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: VH Mode -- the concept

Post by Grev »

Thanks Zerted! This would work great for a Death Star map...
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: VH Mode -- the concept

Post by Maveritchell »

Teancum wrote:
[RDH]Zerted wrote:Should there be some way to repair the vehicles? A constant, slow health regen? Modder defined healing regions?
Regions'd work. We'll just create a yellow CTF 'aura' with a region underneath.
If you're going to do ZE work for the new modes, you might as well just use the vehicle repair droids, right?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: VH Mode -- the concept

Post by Teancum »

Hmm, regions will be trouble as I don't have the source files for the maps anymore, plus I can't put them on shipped maps. Let's just do regeneration
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: VH Mode -- the concept

Post by [RDH]Zerted »

Ummm, I don't see an OnCharacterExitVehicle event...

I forgot, some unit can auto-heal the vehicles they are in. I think it would be best to just leave healing up to the units.

This is going a little faster than I expected. I'd say I'm 75% done already. Of course those last couble % are normally a killer...

For those that want it, heres basic code for putting a player in a vehicle at spawn. I haven't tested this online yet.

Code: Select all

    vhSpawn = OnCharacterSpawn(
    	function(player)
			--get the point to place the vehicle
		  	local unit = GetCharacterUnit( player )
			local point = GetEntityMatrix( unit )
			local vh_name = "vehicle_"..player

			--if this player's vehicle does not exist, create it
			if not IsObjectAlive(vh_name) then
				--create a vehicle
				CreateEntity("all_hover_combatspeeder", point, vh_name)
			end

			--attempt to put the player in his vehicle
			EnterVehicle(player, vh_name)
    	end
    )
If anyone is wants to try this out, send me a message on XFire and we can test how well this works in MP.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: VH Mode -- the concept

Post by Maveritchell »

Can't you just get the entitymatrix of the player and create the vehicle at that location? I guess I'm not sure why you need to use specific spawnpoints.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: VH Mode -- the concept

Post by [RDH]Zerted »

Maveritchell wrote:I guess I'm not sure why you need to use specific spawnpoints.
Because I forgot about doing it that way. I updated the post with new code and removed the info about the other way.

The best benfit I can think of for directly using path nodes is that you could bypass a node thats too close to a wall in an existing map. Of course, cutting out the path nodes removes the hardest step for the modder and takes out over half the game mode code. Take into account the vehicle wall jumping, and the extra possible vehicle glitches don't increase that much.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: VH Mode -- the concept

Post by [RDH]Zerted »

Like I said, the last couble % are normally a killer. As far as I can tell, when you create a vehicle using CreateEntity(), that vehicle's first seat weapons don't work (it would be nice is someone else can confirm this too).
Hidden/Spoiler:
[code]--when a unit spawns, create a vehicle
local VH_eventSpawn = OnCharacterSpawn(
function(player)
local unit = GetCharacterUnit( player )
local point = GetEntityMatrix( unit )
CreateEntity("all_hover_combatspeeder", point, "vehicle_name")
end
)[/code]
How do you want the mode to handle that?
1) Create new vehicles without first seat weapons (keep in mind that the mode is only designed to allow one player per vehicle. That could be changed...). I think the mode will be much harder if you can't move and shoot at the same time. Flying vehicles will be worse than land ones. It would still be possible to VH mode to any map no matter if you have its source or not.
2) Use vehicle spawns. Vehicles spawned at vehicle spawns fire normally, but players won't be able to be instantly put into a vehicle when that player spawns. Instead, when a vehicle spawns, it would look for a player not in a vehicle and grab that player. This also limits adding VH mode to only those maps with known vehicle spawns.
3) Use vehicle spawns, but never destroy a vehicle. Damageing a vehicle would cause that vehicle to slow down. When the player repairs the vehicle, it goes back to full speed. This causes players to only wait around once for a vehicle, compared to every time they die.
4) Drop the mode
5) Some other idea I haven't thought of
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: VH Mode -- the concept

Post by Teancum »

Is it possible that it's an issue with initialization? Like if we put in a sleep command for ~3-4 seconds after creating the vehicle and then force the player in, what would that do?

I guess the easiest way to figure that out is just to make a CreateEntity() script to see if it's an initialization error, or if CreateEntity() creates bad vehicles.
XxDepredationxX
High General
High General
Posts: 826
Joined: Sun Jan 21, 2007 2:37 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: In front of my dead PC

Re: VH Mode -- the concept

Post by XxDepredationxX »

VH mode eh, interesting. It will sure make droid space battles real again, it still bugs me till today that the vulture droid must be piloted by a battle droid than piloting itself. Well if this mod is successful, it'll probably turn Battlefront II to what it's supposed to truly be with the final conv pack and 1.2/1.3 unofficial patch
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: VH Mode -- the concept

Post by Teancum »

Actually, this was just meant to be a ground vehicle thing -- kind of to make Star Wars: Clone Wars style gameplay.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: VH Mode -- the concept

Post by [RDH]Zerted »

I had tested it with only CreateEntity(). The main weapons still didn't work.
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: VH Mode -- the concept

Post by Grev »

I havent been able to understand the Mav- Zerted- Tean conversation here, but couldn't this have something to do with forceing AI into a vehicle? Would it be possible to do the sanme to a unit?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: VH Mode -- the concept

Post by [RDH]Zerted »

Yeah, basically forcing a player/bot into a vehicle is easy and creating new entities (such as vehicles) is easy. However, when you create a new vehicle (remember this is creating it through the lua, not using a vehicle spawn point) the vehicle's weapons don't work. This wouldn't be that big of a deal in Race mode, but in Vehicle mode, theres not much to do if you can't shoot.

I haven't scrapped anything, just a new quarter started for me at school and I have been extremely busy since then (only have had time to watch this single topic). I still fully intend to finish all my open projects. I've thought of creating new vehicle spawn points instead of the actual vehicles, but I haven't tried it yet and I don't expect it to work (but it might).
Post Reply