BF 1942: Modding: first train made!
Re: BF 1942: Modding: first train made!
The only problem I can think of is the locomotive's center of mass. It's too high and so it tends to lean over a lot. And I mean a lot, it wobbles left and right on the track.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: BF 1942: Modding: first train made!
Oh yeah. That looks a bit oddSwaffy wrote:The only problem I can think of is the locomotive's center of mass. It's too high and so it tends to lean over a lot. And I mean a lot, it wobbles left and right on the track.
"Hey guys! LOOK AT ME"
......./../
..../--..._
.../...O../
../......./..........?
./......./..........O
/_...../.......... /|\
....---/............/.\
Last edited by Vilespring on Thu Dec 12, 2013 3:34 am, edited 1 time in total.
A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: BF 1942: Modding: first train made!
Is there an update to the train yet? I would like to see it become better. It is hard to think of something like that getting better!
(well, few things, like it is odd to drive vehicles across the tracks.)

A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Re: BF 1942: Modding: first train made!
you have too much time on your handsVilespring wrote:Oh yeah. That looks a bit oddSwaffy wrote:The only problem I can think of is the locomotive's center of mass. It's too high and so it tends to lean over a lot. And I mean a lot, it wobbles left and right on the track.
"Hey guys! LOOK AT ME"
......./../
..../--..._
.../...O../
../......./..........?
./......./..........O
/_...../.......... /|\
....---/............/.\

Walk quietly and carry a sniper rifle
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: BF 1942: Modding: first train made!
I tend to have that issue!BotHunter wrote:you have too much time on your hands

A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Re: BF 1942: Modding: first train made!
He just has a bit of perfectionist in him, every modder/developer can use some perfectionism in them. Me ... I might be more of one than I should be.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Re: BF 1942: Modding: first train made!
I'm finished with it, it's now up to the individual mod devs to change what they don't like.Vilespring wrote:Is there an update to the train yet? I would like to see it become better. It is hard to think of something like that getting better!(well, few things, like it is odd to drive vehicles across the tracks.)

Yes it leans a bit but that's not really a big issue imo.
Re: BF 1942: Modding: first train made!
Although I said differently I decided to take a second look at the train and fixed/changed a lot of things. Everything has been tested on a dedicated server (though only with 2 ppl and for about 1/2 hour).
Because of that you have to place each rail twice (regular "_m1" + guiding rail "_drive_m1") on the map at the same exact position. To avoid errors I think it's best to do it in notepad and not in the map editor so I copied all rail positions from the staticobjects.con and replaced each one with the correct name. Doing that by hand is extremely tedious so I programmed a quick MS Word macro which does the work for me. You can see the result in the TrainGuideRails.con in the provided map.
Some may find it strange how I coded the loco driver but I advise to not change the hierarchy or you'll get a nasty surprise in multiplayer.
Link: https://drive.google.com/file/d/0ByT8vo ... sp=sharing
- Overall a lot less glitches and jitter
- Switches are usable now, change direction with A/D, a vehicle icon on the minimap indicates the chosen direction
- Carts don't lean anymore on turns
- Any vehicle can now pass over the rails
- All wheels rotate
- Added placeholder sounds (really crappy ones sorry)
- Carts don't lag behind anymore when in driver position in multiplayer
- For testing purposes I modified Stalingrad a bit more
Because of that you have to place each rail twice (regular "_m1" + guiding rail "_drive_m1") on the map at the same exact position. To avoid errors I think it's best to do it in notepad and not in the map editor so I copied all rail positions from the staticobjects.con and replaced each one with the correct name. Doing that by hand is extremely tedious so I programmed a quick MS Word macro which does the work for me. You can see the result in the TrainGuideRails.con in the provided map.
Some may find it strange how I coded the loco driver but I advise to not change the hierarchy or you'll get a nasty surprise in multiplayer.

Link: https://drive.google.com/file/d/0ByT8vo ... sp=sharing
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: BF 1942: Modding: first train made!
Ah!
I must see now!
okay, I looked at it, and it is MUCH better than the last version.
I see the vehicles running over the tracks are better, they don't take as much damage.
could you try making the invisible track out of sand bag material? sandbags don't hurt vehicles at all, no matter how fast it's going!
I must see now!

okay, I looked at it, and it is MUCH better than the last version.
I see the vehicles running over the tracks are better, they don't take as much damage.
could you try making the invisible track out of sand bag material? sandbags don't hurt vehicles at all, no matter how fast it's going!
A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: BF 1942: Modding: first train made!
Vehicle damage is simply a matter of material settings and would be quicker to change the materials for the tracks used in the mod instead of creating more objects to get around it (changing materials on collision meshes works as a server side mod too.
). Perhaps alter the materials used on the visible track portion of the tracks to use a alternate material that doesn't damage vehicles. 107 is the material used by sandbags.
Example image. I made the collision mesh see-through to show the visible track LOD. The vanilla tracks actually have a ramp as their edges. If that was not the case vehicle damage would be worse, and vehicles would get struck trying to pass over it. Vanilla tracks are already configured like this. But any new tracks or modded ones need to retain this feature for best results when it comes to vehicles trying to pass over them. You can change the material of the entire mesh, but the selected faces shown below are really all that you need to change to fix vehicle damage problems:

(thumbnail, click to enlarge)
The current material for the tracks is 8 which is one of the terrain materials. (Gravel in this case) Ground materials have considerably higher damage settings then building materials and for objects like these, I would not recommend using them. But tell that to EA.
Ground materials have materialDamage set to 30 while most buildings have it set to just 1. Sandbags is set to zero which is why it doesn't damage anything.
Just about any building material could be a suitable replacement to the ground materials used on the track meshes. I'd recommend one that uses similar projectile impact effects as the original. Sandbag material is fine, but you'll get the sand bags leaking effect if you shoot at the tracks with that material. Try something like concrete. If it still damages too much, you can either use the sandbags material or material 98 which is labeled "Iron stairs" and usually just has a metal related impact effect in the projectile damage settings. MaterialDamage is not even defined for that material so I have to assume it's also zero like sandbags.

Example image. I made the collision mesh see-through to show the visible track LOD. The vanilla tracks actually have a ramp as their edges. If that was not the case vehicle damage would be worse, and vehicles would get struck trying to pass over it. Vanilla tracks are already configured like this. But any new tracks or modded ones need to retain this feature for best results when it comes to vehicles trying to pass over them. You can change the material of the entire mesh, but the selected faces shown below are really all that you need to change to fix vehicle damage problems:

(thumbnail, click to enlarge)
The current material for the tracks is 8 which is one of the terrain materials. (Gravel in this case) Ground materials have considerably higher damage settings then building materials and for objects like these, I would not recommend using them. But tell that to EA.

Ground materials have materialDamage set to 30 while most buildings have it set to just 1. Sandbags is set to zero which is why it doesn't damage anything.

Just about any building material could be a suitable replacement to the ground materials used on the track meshes. I'd recommend one that uses similar projectile impact effects as the original. Sandbag material is fine, but you'll get the sand bags leaking effect if you shoot at the tracks with that material. Try something like concrete. If it still damages too much, you can either use the sandbags material or material 98 which is labeled "Iron stairs" and usually just has a metal related impact effect in the projectile damage settings. MaterialDamage is not even defined for that material so I have to assume it's also zero like sandbags.



I have cameras in your head!