Author Topic: Chrisbot6's Support_Trains (BETA!)  (Read 16020 times)


Chrisbot6's Trains


Description
The trains mod is about trains - special types of vehicles that follow rail guides. Many of these vehicles are ridable, and have engines - but some are not. They can be used in a ridiculous amount of ways, from roller coasters to monorails. Aside from loops, banks and corkscrews, anything is possible.

Videos
http://www.youtube.com/watch?v=3RsRg6iEQOY&feature=youtu.be
http://www.youtube.com/watch?v=B-DPQrJa-d8 (Old)
http://www.youtube.com/watch?v=nJLsO9RBfsI (Old)
http://www.youtube.com/watch?v=7WTt-Ux38ms (Old)

In-Game Usage
The mod itself is a core - it doesn't add any trains to the game. Trains are downloaded seperately as Train_ mods, and need Support_TrainsBeta to run. Once you've installed that stuff, however, you can set up a train by:
1. Placing a straight track guide (Don't start on a corner)
2. Placing a vehicle spawn on top and spawning any train.

If you hear a clank, your train has snapped to the rail and is now ready! If the train ever comes off the track afterwards you can respawn the vehicle and it will relocate itself. If a train is wonky on a track for some reason, or has veered far to the side, you can type /centertrain.

If you don't mind your train making impossible 90 degree turns in a phemtosecond, feel free to use sharp turns. Otherwise, other rotation bricks are provided. Stardard turns turn the train 45 degrees, which looks good with fast trains, and alternatively wide turns turn the train 22.5 degrees. Very wide turns turn the train 11.25 degrees. If you do the maths, you can work out how many you need to turn a train.

Filler rails can be used if you don't have space for a straight piece, and in corners. A train will simply run forward over them in whatever direction it's facing. Intersections are meant for use where two straight tracks cross, though in code they are basically just large filler rails.

To Control Trains:
Set your shiny new "Train Control" key binds to whatever you wish. Players who do not have the mod can use the /trainmode command.

You can also use the "TrainMode" event to do this. (If you do not want your train to be controllable by the ways above, use the "setTrainLocked" event)



Modding
Custom Trains must be bot vehicles. To add one to the mod, add these vars to your datablock:
Trainmod_isTrain - Must be true
Trainmod_engine - Set to true to allow the engine to be started and stopped
Trainmod_enginePower - Engine's power. Set according to your datablock.
Trainmod_engineMax - Your train's max engine speed. Set according to your datablock.
Trainmod_drag - Your train's engine drag. Set according to your datablock.
Trainmod_brakes - Whether your train has brakes or not.
Trainmod_startData - Your train's start sound datablock (in quotes)
Trainmod_runData - Your train's constant rev sound datablock (in quotes)
Trainmod_idleData - Your train's constant idle sound datablock (in quotes)
Trainmod_hornData - Your train's horn sound datablock (in quotes)
Trainmod_stopData - Your train's stop sound datablock (in quotes)
Trainmod_maxSpeed - The highest allowed speed of your train

That's it. If you can't figure out how to make a bot vehicle yourself, you will never be able to do it. (Hint: Look at the horse's code)

For animations, add the following .DSQs to your model:
Go Forward - run
Go Backward - back
Train Tilting - look
Static - root



Download(s)
Go to the topic in Add-Ons, dummy. This entire topic is from back in July 2013.
« Last Edit: November 30, 2013, 12:51:49 PM by chrisbot6 »

on a scale of zero to yes this is absolutely fantastic

Im gona rate this on a scale of 1 to 10    999999999999999/10

2 days and only 2 replies.

Obviously everyone's too busy with go-karts and weapon packs to care about trains.



Obviously everyone's too busy with go-karts and weapon packs to care about trains.
someone should do a video with a train being boarded by go carts in a desert with a bunch of crazy weapons

I'm working on some turntable bricks. Turn up at my server and you can try them out.

Uploading a new version.

Updates:
Code: [Select]
- Added turntables
- Fixed boosters
- Optimized corners

2 days and only 2 replies.

Obviously everyone's too busy with go-karts and weapon packs to care about trains.
I'm too busy using your freaking awesome trains.

I'm too busy using your freaking awesome trains.
I stand corrected :cookieMonster:


Updating.
Code: [Select]
- Added Kalphiter's old box train
- Fixed train coloring
- Added horn sound capability
- Added idle sound capability
- Changed custom train adding system (SEE OP)

Also, I've added some videos to the OP so you guys can see what this is all about.

Awesome!

I would love to see something like an automated subway, using stationbricks where the train stops for some seconds!

- Wide Turn bricks may not function correctly and sometimes send the train spinning into oblivion
They only MIGHT not work right? 

On a more upbuilding note, this is freaking fantastical and magic. 

I shall implement this into my crpg!

[edit]

Would you consider combining this with the buildable vehicles mod?  That would be awesome.

[edit]

Just tried it out.  Took me a bit to figure it out, but I got it.  The trains seem unaligned to me.
« Last Edit: July 14, 2013, 08:43:31 PM by Gen. Hothauser »

I shall implement this into my crpg!

[edit]

Would you consider combining this with the buildable vehicles mod?  That would be awesome.

[edit]

Just tried it out.  Took me a bit to figure it out, but I got it.  The trains seem unaligned to me.
Combining buildable vehicles with this might be possible

the trains have wheeledvehicle models, i need new ones