A few comments on Alltaken's suggestion, and then more in the XML department.
Alltaken wrote:Code: Select all
//marks first and last sprites for rotating, computer can work out the rest
-------rotation---------
first file 0 degrees: CT001.png
last truck degrees: CT072.png
degree incriment: 5
--------------------------
What about a single file with multiple sprites?
Alltaken wrote:Code: Select all
------up/down--------
first file NW-SE 25 degrees: CTNWSE001.png
last file NW-SE -25 degrees: CTNWSE011.png
first file NE-SW 25 degrees: CTNESW001.png
last file NE-SW 25 degrees: CTNESW011.png
degree incriment: 5
------------------------
You'll need four sets there, not two, unless the vehicle is symmetrical.
If we're going for realism, I'd suggest reducing the grade range to [-10,10] degrees, or possibly smaller. Ten degrees is a 17.6% grade--enormously steep for vehicles.
There is a little redundancy between this and the 72 (or however many) flat sprites, but that can be compiled out with minimal difficulty.
Will it be possible to build things along slopes in the 4 cardinal directions as well? How about sloped curves a-la Loco?
Either of these increase the number of sloped sprites required.
If sloped curves, then we might as well just render all (num-rotations)x(num-tilts) (in this case 72x11=792) sprites and list them together.
(You are proposing pre-rendered sprites from 3D models, correct?)
I'd also suggest listing num-rotations and num-tilts, instead of degree increment, to get floating-point numbers out of the GPD.
Alltaken wrote:Code: Select all
--------custom colours-------
Fed ex: /FE
New Zealand Post: /NZP
Alltakens: /Alltaken
army: /army
-----------------------------------
Why couldn't someone just re-render all the sprites and release that?
Or did you mean that the graphics used will depend on the cargo being carried?
Alltaken wrote:Code: Select all
-----animations----------
smoking: /../shared/smoketruck
turning left: /turningL
turning right /turningR
---------------------------
Do we really need this part? I'd say that the smoking animations should be the same for all vehicles of any one type, and turning was already covered above, in those first 72 sprites.
Alltaken wrote:if its a truck with a weird joint in the middle of it
For that, we should use road trains.
Alltaken wrote:a GUI program to set all this (perhaps built right into OTTD i dunno)
This seems to me like featuritis. I'd suggest a separate program.
Alltaken wrote:but dropdown menus, and browse buttons (to select files/folders for certain sections like shadows, or files like rotated...) would be very cool.
Point and click programming. Ugghh!
Whatever floats your boat, as long as notepad is still a valid editor.
More on Action 6:
If using XML, every value with numeric data must be acceptable in two formats:
Code: Select all
<tag value=data />
---OR---
<tag>
<value>data</value>
</tag>
This way, a <parameter> tag can be inserted to modify the data if necessary, but the XML doesn't end up unnecessarily bloated if the parameter tag is not needed. This also allows modification with Var02, as follows.
Var02 and Action 3 overrides could look something like this:
Code: Select all
<graphics>
<override ID=1>
<gfxID>
<conditional>
<train position=0 count="back" />
1
</conditional>
<conditional>
<carriage_set length=1 />
2
</conditional>
<conditional>
<carriage_set position=0 count="front" />
3
</conditional>
<conditional>
<carriage_set position=0 count="back" />
<reversed />
3
</conditional>
<conditional>
<carriage_set length="4+" position=1 count="back" />
<train length=10 />
5
</conditional>
4
</gfxID>
</override>
</graphics>
We also may want to provide the following as valid:
Code: Select all
<gfxID>
<conditional ID=1>
<train position=0 count="back" />
</conditional>
<conditional ID=2>
<carriage_set length=1 />
</conditional>
<...>
</gfxID>
This approximately codes the double-decker passenger car from the USSet, when following the Sunset. For this demonstration, vehicle ID is 1 the double-decker passenger car, and the graphics IDs are: 1--the streamlined trailing car; 2--double-decker low on both sides, high in the middle; 3--low in front, high in back; 4--high all the way across; and 5--the dining car.
It is valid for the numeric values there to be postfixed with "+", indicating "at least $VALUE", postfixed with "-", indicating "at most $VALUE", or to be in the format "$MIN-$MAX". To accommodate action 6, $TYPE="$MIN-$MAX" may be exchanged for <$TYPE min=$MIN max=$MAX /> which can then be expanded as listed above. If min is omitted, it is taken to be 0; if max is omitted, it is taken to be the largest possible value. The first applicable <conditional> unit is the one to be used.
The less common tests could be implemented, for now at least, with <conditional TTDPatch=$VARIABLE value=$VALUES />
There are some problems with this system, especially when you want to check one variable for multiple values/value ranges. It would also be nice to get the Var02 tags out of the <vehicle> tag.