BF 1942: Modding: first train made!

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: BF 1942: Modding: first train made!

Post by Swaffy »

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™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: BF 1942: Modding: first train made!

Post by Vilespring »

Swaffy 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.
Oh yeah. That looks a bit odd

"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/

Image
"I didn't steal your pizza"
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: BF 1942: Modding: first train made!

Post by Vilespring »

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! :lol: (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/

Image
"I didn't steal your pizza"
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: BF 1942: Modding: first train made!

Post by BotHunter »

Vilespring wrote:
Swaffy 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.
Oh yeah. That looks a bit odd

"Hey guys! LOOK AT ME"

......./../
..../--..._
.../...O../
../......./..........?
./......./..........O
/_...../.......... /|\
....---/............/.\
you have too much time on your hands :D
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: BF 1942: Modding: first train made!

Post by Vilespring »

BotHunter wrote:you have too much time on your hands :D
I tend to have that issue! :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: BF 1942: Modding: first train made!

Post by Swaffy »

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™
exe
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF 1942: Modding: first train made!

Post by exe »

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! :lol: (well, few things, like it is odd to drive vehicles across the tracks.)
I'm finished with it, it's now up to the individual mod devs to change what they don't like. ;)

Yes it leans a bit but that's not really a big issue imo.
exe
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF 1942: Modding: first train made!

Post by exe »

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).
  • 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) :lol:
  • Carts don't lag behind anymore when in driver position in multiplayer
  • For testing purposes I modified Stalingrad a bit more
To make it work that vehicles can pass over the rails you have to invest a bit more time on the map now, basically it's the regular Vanilla Rail with an almost Vanilla COL. Beneath that is the "guide rail COL" hidden (suffix "_drive_m1"). Only the train interacts with that (use of ApacheThunder's c_CGStaticObjects trick). Sadly I couldn't find a way to attach a second COL to an object which isn't ignored by the wheels. If you have an idea please let me know.

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. :P

Link: https://drive.google.com/file/d/0ByT8vo ... sp=sharing
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: BF 1942: Modding: first train made!

Post by Vilespring »

Ah!
I must see now! :lol:

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/

Image
"I didn't steal your pizza"
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: BF 1942: Modding: first train made!

Post by Apache Thunder »

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:

Image
(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. :P

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.
ImageImageImage
I have cameras in your head!
Post Reply