Rail Car


EN: Just the car and tank on rails, totally broken, probably unbalanced. Currently the rail car still uses the original car sprite, planning to make it have appropriate wheels for rails. Doesn't include a working turret, as this requires some additional implementations, which I haven't added yet. If you want to support me on getting the turret working as a compound locomotive, you can join efforts on GitHub and/or GitLab. Alternatively, if you understand how compound locomotives are made, you might wanna create your own library mod for that, which i would welcome too! DE: Wie Auto und Panzer, jetzt aber auf Schienen! Total gestört und wahrscheinlich unbalanziert. Momentan benutzt das Schienen Auto leicht modifizierte Auto Sprites, Ich plane in einer späteren Veröffentlichung es vernüftige Räder für die Schienen zu geben. Die Geschütze funktionieren nicht, da es Implementierung benötigt, die Ich noch nicht programmiert habe. Du kannst auf GitHub und GitLab zum Projekt beitragen.

Content
4 years ago
0.18
11
Trains

i Interesting Mod

4 years ago

This is not stupid, but a pretty interesting mod skill/idea!

Let me introduce myself first. I am the author of Schall Armoured Train.
Actually, I wanted to introduce "drasines" to my mod. I wanted to do it for a looooong time, as what I have written on the "Planned Features" part. (Since mod creation, which was 1.5 years ago.) Yet I do not have the time to work on it.

Armoured drasines: Like in the history, these are tanks fitted with railroad wheels. They can be used independently to patrol the railroads. Another use would be jointed together as "fast reactionary" battle train, or attached to artillery train as "guards". However, no guns are supported to locomotives or wagons currently, so this role would better be filled by armoured locomotives with defense/gun pods installed.

The most challenging thing to me if about the graphics part. At that time, I was trying to apply the vanilla tank sprite sheets (without making) into the locomotive prototype, but has no success. And I am not talented in graphics to prepare my own sprite sheets for that.

So finding out your mod is a very nice surprise to me, telling me that applying car-type sprite sheets on locomotive-type is possible!
Can you share some of your experience on how it is done?
If you are willing to share your experience, here are some specific questions I want to know:
1/ Do you think it is applicable to tank?
2/ Is it possible not having to prepare your sprite sheets, but just loading vanilla car/tank sprite sheets directly? (This is a concern, because sprite sheets are somewhat large in file size. Some users may not like too large mod files.)
3/ Are you interested in contributing a part to my mod? If so, I want you to prepare the graphics part. I will take control of the balancing properties (in order to balance with my other armoured locomotives, tanks, and all their tiers...) Your work will not be forgotten, as your work will be mentioned in the (above-linked) mod page.
4/ If you do not have the time nor interest, it is still fine though.

4 years ago
(updated 4 years ago)

Hey Schall, yeah I know your mod, playing with it.

To your questions:
1/ Its applicable to everything afaik, if the image files are in a manner that makes them compatible. The only problem is that you cant have the turret and the tank in the same entity. Solution could be something like cargo ships does, in other words, having two train part that act as one from the outside. Suprisingly, you dont have to add the wheels layer, its entirely optional. Even the lights are optional, but you can safely copy the light of the car type, since the lights are the same class type.

2/ The problem with car and tank is that their graphics use animations instead of pictures. Which completely messes with how smooth the movement looks like. The car is even worse, cause it textures havent been worked on for a long time, so that the files have different lines count, which makes it impossible to directly load them into the layer, as the line count must be equal, so that some adjustment was necessary. Additionaly, the direction_count of all parts of the layer must be the same. So some asset adding might be necessary, to have that part working.

3/ I think the tank might be easier, since from the first looks. The tanks graphics arent as messed up as the cars. I would be happy to prepare the base for the draisine tank, but i can not do more than some image manipulation magic, hoping that it looks good.

4/ I do have interest. This mod was actually planned being part of Punkedtorio as the rail car that is used in Dishonored.

If you have further questions you are welcome to ask :) .

4 years ago
(updated 4 years ago)

Thanks for your quick response, and your interest to be part of the mod.

Alright, so this smartly concludes why it is non-trivial work (and why I had no success). Sprite sheets have to be made and animations definition (like part of your entity.rail-car.lua) have to be adjusted for that. I will rely on you to do so for the tanks.

I will handle the rest to turn it to a proper mod. (As it require sprite sheets into the mod file, I guess I will put the armoured drasines into a separate mod.)

Yes, I know the locomotive type does not allow actually gun (according to my previous modding attempt). So I planned to work around this by introducing some dedicated draisine-only gun pods (if you know my other mod) for putting into the grids, as their main guns. So graphically I still want the turret layer there.

A small request though. Is it possible to apply the vanilla train wheels (with tank turret and chassis layers)? From some online photos, those historic engineers seems to do that to their armoured draisines. Would be nice if the graphics can match the fact.

EDIT:
In German, a motorized "Panzerjägerwagen" somewhat resembles an armoured drasine. There are many more photos (like here by using this as search word.)

4 years ago

In response to the train wheels. You wost likely wont see much of them, i can still try tho to get them onto it, but probably not via the wheel layer

4 years ago
(updated 4 years ago)

When I played with the prototype properties, the game will somewhat add the train wheels itself (at 0.16.times). Properties wheels and tie_distance has something to do with that. So perhaps do not need to work from scratch.

And now I remembered something I did not succeed in... I tried to adjust the length of the drasine to make it exactly 3 or 4 tiles long (by tuning connection_distance and joint_distance), but the trailing wagons are always not aligned to tiles.
Do you know how these two properties work?

4 years ago

connection_distance is that space between two wagons in which they need to be to connect. joint is the point from where the connection distance is calculated, its on the wiki: https://wiki.factorio.com/Prototype/RollingStock

4 years ago

I know this Wiki page, but I am not sure how they exactly work...
See my separate thread, bug #2 may be related to these.

4 years ago

ok, armoured-draisine is now in https://github.com/Zetabite/rail-car/tree/testing

4 years ago

Great! Such a wonderful work!
Armoured draisine is working beautifully.
I will make a new mod using your graphics and code (with credits to you, of course) when I have time.

PS1: I prefer to have the turret layers (as I will allow dedicated gun pods for them).
It is not a problem, as I can add them easily myself.

PS2: Too bad the vanilla sprite sheets of cars and tanks have wheels/tracks in the same layer as chassis. Would be too much effort to separate/remove them. So I guess just let it go.

4 years ago
(updated 4 years ago)

Oh, please dont add it yet, there is still a bit to go, the turret namely.
Also dont worry about the wheels, for the tank i can just remove the chain via GIMP and edit in the joint graphics of the wheels, etc..
PS 1: The wheel layer of the locomotive isnt animated and as that, you can just aswell use any other layer, it just has some nice functionality if your train part is much longer, but for that short cart, it wouldnt even make sense to use it

4 years ago

OK, I will put it on hold then. Animated wheels would be a welcomed addition.
No need for you to rush either. (I have other mods update to attend to anyway.)

I have appended the code of turret layers (of vanilla tank) to the end of animations, and it worked for me. Yet of course it is always pointing forward, nothing can be done to the locomotive type entity.

4 years ago

The wheels wont be animated, but they would fit more to the locomotive type of wheels.
Also, you cannot just add something to the layers, cause there is animation and pictures as their own type of graphical representation. animation uses RotatedAnimation which can be animated and pictures RotatedSprite which cant be animated. The turret animation will need to go into a separate wagon, that will look as one with engine from the outside, i recommend checking out cargo ships and its site, as it explains how the ships work. The tank will be locomotive, aka the engine, while the turret while use ArtilleryWagon.

4 years ago

I appended the vanilla "tank-turret", "tank-turret-mask", "tank-turret-shadow" layers to the end of pictures.layers (not animation though), and the graphics look fine. (Prototype/Locomotive does not support animations anyway.)
Does not need to be animated as there are nothing to animate anyway.

The trick of using the turret of artillery-wagon does NOT work (at least from my experience in 0.17). The guns of artillery-wagon do auto-fire as artillery gun only. I tried to put a tank cannon on it, but the game does not let me manual fire it.
So forget about it, it is (now) impossible to fire a gun when driving on a locomotive type entity.
What you mentioned resembles making some "compound entity": one entity being the locomotive part, other entity for the manual gun fire part. (Like what I do for my pickup tower.) But then it still work DIFFERENT from tanks: not driving and firing by the same user at the same time. And it involves non-trivial scripting, which I do not even want to bother with.
So sticking to my current plan: pure data stage definitions of locomotives with dedicated gun pods for their grids. No extra control stage scripting needed.

4 years ago
(updated 4 years ago)

Then you are welcome to use the script as is, I will try to achieve the artillery-wagon version.

4 years ago

Ok, this release contains the tank with better wheels, still looks wonky, but it is a step forward.

4 years ago

Do you know about this mod?
https://mods.factorio.com/mod/VehicleWagon2

4 years ago
(updated 4 years ago)

Yeah I do, what about it?

4 years ago

Hello, I have finally implemented armoured draisine into my mod.
With a slight change to your code, I found that I can just reuse the vanilla tank sprite sheets (so no need to include your sprite sheets). Therefore, I have just added it to "Schall Armoured Train" as a new option.
Thanks for your code again. It is important in teaching me how to adapt animations to pictures definitions.

4 years ago

Yeah, the textures in my mod are different now, as they dont contain the wheels of the tank, but use the ones of the locomotive

4 years ago

I saw you trying that.
The vanilla train wheels were too long for the tank, so not looking nice enough.

4 years ago

yeah, well, maybe someone gets a better texture for the armoured draisine, but it aint going to be me, i suck at making models

New response