VH Mode -- the concept
Moderator: Moderators
-
- Hoth Battle Chief
- Posts: 3132
- Joined: Sun Dec 09, 2007 11:45 pm
- Projects :: No Mod project currently.
- Location: A Certain Box Canyon
Re: VH Mode -- the concept
Thanks Zerted! This would work great for a Death Star map...
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: VH Mode -- the concept
If you're going to do ZE work for the new modes, you might as well just use the vehicle repair droids, right?Teancum wrote:Regions'd work. We'll just create a yellow CTF 'aura' with a region underneath.[RDH]Zerted wrote:Should there be some way to repair the vehicles? A constant, slow health regen? Modder defined healing regions?
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: VH Mode -- the concept
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
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: VH Mode -- the concept
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.If anyone is wants to try this out, send me a message on XFire and we can test how well this works in MP.
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
)
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: VH Mode -- the concept
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.
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: VH Mode -- the concept
Because I forgot about doing it that way. I updated the post with new code and removed the info about the other way.Maveritchell wrote:I guess I'm not sure why you need to use specific spawnpoints.
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.
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: VH Mode -- the concept
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).
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
Hidden/Spoiler:
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
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: VH Mode -- the concept
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.
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.
-
- High General
- Posts: 826
- Joined: Sun Jan 21, 2007 2:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: In front of my dead PC
Re: VH Mode -- the concept
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
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: VH Mode -- the concept
Actually, this was just meant to be a ground vehicle thing -- kind of to make Star Wars: Clone Wars style gameplay.
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: VH Mode -- the concept
I had tested it with only CreateEntity(). The main weapons still didn't work.
-
- Hoth Battle Chief
- Posts: 3132
- Joined: Sun Dec 09, 2007 11:45 pm
- Projects :: No Mod project currently.
- Location: A Certain Box Canyon
Re: VH Mode -- the concept
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?
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: VH Mode -- the concept
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).
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).