Variable List

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Variable List

Post by kaminari »

[INDEX OF THIS TOPIC]
In order to make easier to find, I've renamed this topic and made an index through it.

The complete Variable List
Experiments with Industries


[Original post]

I would like to modify a little bit my industries and I'm wondering how to make a farm to produce grain and livestock at the same time. I've modified it adding this:

Code: Select all

<useobject desc="produces[0]" class="8">GRAIN   </useobject>
<useobject desc="produces[1]" class="8">LIVESTCK</useobject>
But this is what I get. The farm is only producing Grain:

Image

By other hand, if I modify an industry ,i.e. a factory to recieve STEEL and LIVESTOCK and to produce GOODS and FOOD, is there any way to get GOODS ONLY IF I deliver STEEL and FOOD ONLY IF I deliver LIVESTOCK?

Thanks for your help.
Last edited by kaminari on 08 May 2006 09:41, edited 3 times in total.
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

as seen in the screenshot, the industry produces both..

i think it's a matter of trains. when you have a train with trailers which can carry both and drive there 2 times.. i think then there would be both waiting.

oh ok. sorry for my very bad english ATM. dont know how to describe whats in my head :oops:
i did all models/renderings/textures myself. no conversions.

seelenquell.pytalhost.com has been reactivated from 16/07/28 till 18/05/31.. now it´s deactivated. at least there..
new URL is: http://seelenquell.125mb.com
User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Post by kaminari »

I'm affraid this is not working. I've put "wait for full load livestock" orders to that train but's not working :( Any ideas?

Image
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

drive 2 times there.. first time the production starts AFAIK. second time there's a chance that both are waiting at the station. don't "full load" them first time..
i did all models/renderings/textures myself. no conversions.

seelenquell.pytalhost.com has been reactivated from 16/07/28 till 18/05/31.. now it´s deactivated. at least there..
new URL is: http://seelenquell.125mb.com
User avatar
Sebastian Styrnol
Engineer
Engineer
Posts: 94
Joined: 17 Feb 2006 07:55
Location: Oldenburg, Germany
Contact:

Post by Sebastian Styrnol »

Great Idea!
Cheers, Sebastian

Being Both Avid Rail and Plane Fan!!!

Image Image
User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Post by kaminari »

More tests... seems like there is a "Initial Production quantity" bit somewere. I fastfowarded the game and the graphics for livestock is constantly at zero.

Any idea? Thanks
User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Post by kaminari »

Due the imposibility to access to the wiki to get the variable list, and after searching for much, I re-publish the original Variable:List from wiki (I LOVE GOOGLE'S CACHE SOOOOOO MUCH :P ) Any contribution in order to complete the following table are welcome!

Variable:List
From LocoWiki

Table of contents
1 All Known Variables
1.1 Common
1.2 Class 00 - Interface
1.3 Class 02 - Currencies
1.4 Class 05 - Water
1.5 Class 06 - Ground
1.6 Class 08 - Cargo types
1.7 Class 09 - Fences
1.8 Class 0A - Signals
1.9 Class 0B - Crossings
1.10 Class 0C - Street Lights
1.11 Class 0D - Tunnel Entrances
1.12 Class 0E - Bridges
1.13 Class 0F - Train Stations
1.14 Class 10 - Track mods
1.15 Class 11 - Tracks
1.16 Class 12 - Road stations
1.17 Class 13 - Road mods
1.18 Class 14 - Roads
1.19 Class 15 - Airports
1.20 Class 16 - Docks
1.21 Class 17 - Vehicles
1.22 Class 18 - Trees
1.23 Class 1A - Climates
1.24 Class 1B - Hill Shapes
1.25 Class 1C - Buildings
1.26 Class 1E - Industries
1.27 Class 20 - Companies

All Known Variables

Common

Code: Select all

auxdata[range] - Unknown 
basecostfact/buildcostfact - The cost of a bridge/track 
costfact - Purchase cost factor (final cost = basecost[costind]*costfact) 
costind - Purchase cost index (index into a table of base costs), lower means higher final costs 
trackpieces - What trackpieces this track, trackmod, roadmod or train station has 
description - The description of the object in various languages 
designed - Year object is designed, 0 if available from the begining 
numaux01 - number of entries in aux_0 and aux_1 
numaux02ent - number of aux_2 array entries 
numaux03ent - number of aux_3 array entries 
numaux04ent - number of aux_4 array entries 
numaux05ent - number of aux_5 array entries 
nummods - Number of mods required (vehicles) or buildable (for track) 
obsolete - Year object becomes obsolete, 65535 if never 
roadpieces - Same as trackpieces but ONLY has smallcurve, tightcurve, normalslope, steelslope and reverse (for tram), and only for roads, and road stations 
salecostfact/sellcostfact - sale/sell cost factor of bridge/track (final cost = basecost[costind]*salecostfact) 
sprite(range) - Inividual sprites 
stringtable(range) - A range of strings, mainly used for descriptions of objects 
trackmod(array) - Array of trackmods required for vehicle to run, or trackmods available in the case of tracks/roads
Class 00 - Interface

Code: Select all

field_0[6] - Game Object Tooltip - first line: Object name. 
field_0[7] - Game Object Tooltip - next lines: Object data/Action info. 
field_0[8] - UI Tooltip (button info) 
field_0[9] - Action popups, "Can't build/remove ...", "Screenshot saved ...". 
field_0[10] - Win-Tabs: Player Items - Build New Vehicles, Vehicles, Stations, Player Status, Messages. 
field_0[11] - Win-Top - most non-player related windows. 
field_0[12] - Win-Tab: Map Objects - Towns, Industries, Scenario Editor - Object Selection. 
field_0[13] - Win-Tab: Player Construction - Build- Tracks/Roads, Docks/Airport. 
field_0[14] - Win-Tab: Map Construction - Construction -land, Scenario-Generator/Challenge. 
field_0[15] - Win-Tab - Overview Map. 
field_0[16] - Win-Tab: General - Options, About. 
field_0[18] - main buttons 1: File, Sound. 
field_0[19] - main buttons 2: Zoom, Rotate, View. 
field_0[20] - main buttons 3: Construction-Land, Tracks, Roads, Docks/Airport, Build Vehicles. 
field_0[21] - main buttons 4: Vehicles, Stations, Towns, Industries. 
field_0[22] - main buttons 5: Player Status, Performance. 
field_0[23] - main buttons 6: Time, Messages, Map. 
Values: 
•	Palette-numbers 0-30, those are the 31 internal used color gradient sets. 
•	Other values are excepted but have no real use, and can give strange side effects. 
•	Value/order of palette sets -> player-status color-picker(LR/UD) 
Linked to PlayerColor 1: 
•	(Win-top) Player Items & Player Construction. 
Not Editable: 
•	Scenario Editor: [Back to Previous] & [Forward to Next] navigation buttons. 
•	Intro screen: Big green buttons. 
•	Warning message windows: "Are you sure ...", "Vehicle can't ...", etc. 
•	File windows: Load, Save, New game. 
•	Two player connection window.


Class 02 - Currencies

Code: Select all

shiftnum - How many times to multiply pound value by 2 
zeroes - How many zeros after pound value
Class 05 - Water

Code: Select all

Its as high as the Water-Level set in the map/scenario editor and absolutely flat in the beginning. 
field_0[2] = "2" (might be default water level) 
field_0[4] = "102" (might be ingame level changing price)


Class 06 - Ground

Class 08 - Cargo types

Code: Select all

decay1days - Duration of first decay rate 
decay1rate - First decay rate 
decay2rate - Second decay rate 
flags 
bit_2 - Unknown 
refitoption - Does refitting a vehicle allow it to carry this cargo type? 
paymentfactor - Payment factor 
paymentind - Payment index 
peakdays - Days at which payment remains at maximum 
unitweight - Weight per unit in 1/256 tons 
Class 09 - Fences

Code: Select all

Field_0[6] is always "15" 
Field_8 is "2" or "5" (might set the height in 1/16 units) 
Field_9 is always "8" 

Class 0A - Signals

Code: Select all

field_0[2] - country signal built style + ? 
0 - build signal on left side of track (british style) 
1 - build signal on right side of track (american/european style) 
2 - ? 
4 - ? 
field_0[5] - number of signal frames (4,7,10) -> signal states (2,3,4), frames = (states*3)-2 
input value seems to be fixed, other values where not accepted (locomotion loading lockup) 
signals have 8 directional images per frame group.


Class 0B - Crossings

Class 0C - Street Lights

Code: Select all

year[array] - The year the street lights get build 

Class 0D - Tunnel Entrances

Class 0E - Bridges

Code: Select all

disabledtrackcfg - Decides what types of corners and slopes the bridge can be used for 
heightcostfact - Cost factor for bridge height 
maxheight - Maximum height for the bridge, in feet 
maxspeed - Maximum speed for the bridge, in mph 
noroof - Does the bridge have a roof? (?) 
pillarspacing - The space between the bridge pillars 
spanlength - Length of a bridge element, the BrickBridge has 1, the Steel Arch 2, the Steel Girder 2, the WoodBridge 1, the Suspension 4 parts to have one complete bow. 
field_9 - The space between the bridge columns (153 Steel Arch, 153 Steel Girder, 2550 Brick, 24 Suspension, 255 Wood Bridge )


Class 0F - Train Stations

Code: Select all

auxdata[range] - positions of cargo icons on stations 
field_0[12] - Bit 0, use company colored transparency effect (like Passenger Terminus) 
auxdata: train stations (TRSTATx) (32 arrays * 57 fields) 
•	positions of cargo/passenger on train stations, probably same use in road stations (RDSTATx/RDSTATLx) 
•	the arrays are grouped in sets of 4, every set covers one direction (rail build-direction), 
•	1 array per station tile. 
•	station cargo arrays are linked to the on-screen orientation of the track build-directions.
aux_0[0,1,2,3] = BottomLeft -> TopRight (45')
aux_0[4,5,6,7] = TopLeft -> BottomRight (135')
aux_0[8,9,10,11] = TopRight -> BottomLeft (225')
aux_0[12,13,14,15] = LowerRight -> UpperLeft (315')
aux_0[16;31] = not sure, probably reserved for diagonal(map) stations (trains only) 
•	every array contains ofset values for one station/tile
array fields are grouped in sets of 4 fields, (57-1)/4=14 icons per station
aux_x[0] = general icon height offset for that array (screen +Y ofset)
aux_x[+1,+2] = X + Y offset for cargo(non passenger) icon (ofset is map orientated)
aux_x[+3,+4] = X + Y offset for passenger icon (offset is map orientated)


Class 10 - Track mods

Code: Select all

isoverhead - 1 for catenary like look, 0 for extra rail-like look 

Class 11 - Tracks

Code: Select all

trackst.dat and trackng.dat (the object tree for *.dat object files seems to start here, for a lot of objects being linked to in it and those link to their subobjects...) 
displayoffset - Vertical offset of vehicles in list windows (e.g. train list, new vehicle list, ...) 
bridge[array] - Array of bridges compatible for the track 
curvespeed - Speed of vehicles in curves of track (not mph) 
numbridges - Amount of bridge objects for the track 
numsignals - Amount of signal objects for the track 
numstations - Amount of stations objects for track 
signal[array] - Array of signals available for the track 
station[array] - Array of station objects for track 
stationtrackpieces - What trackpieces supports a station 
tunnel - Tunnel object for track 
tunnelcostfact - Tunnel cost factor (final cost = basecost[costind]*tunnelcostfact) 
field_3[array] - [0] has something to do with disallowing junctions


Class 12 - Road stations

Code: Select all

Field_B[0] - Describes the function of the road station, per below.
##   Cargo      Where Built        Vehicles
--   -----      -----------        ---------
0     All        Any straight      (B)us, (T)rucks
1     All        Any straight      B,T
2     Passenger  Any straight      B,T, Trams**
3     Passenger  Any straight      B
4     Freight    Any straight      T
5     Freight    Any straight      T
6     X* 
7     X*
8     All        Ends of roads     B,T
9     All        Ends of roads     B,T
10    Passenger  Ends of roads     B
11    Passenger  Ends of roads     B
12    Freight    Ends of roads     T
13    Freight    Ends of roads     T
14    X*
15    X*
* These values cause non-fatal crashes when loading scenario
** Possibly related to field_29 of trams?
Class 13 - Road mods

Class 14 - Roads

Code: Select all

Field_B[0&1] - Maximum speed (16-Bit) 
Field_B[2] - Unknown; Is "1" in general and not set in ROADRGH or ROADTRAM 
Field_B[7] - bitmask: 
Bit_0 - Is one way road 
Bit_1 - Appears in build-tracks menu (rather than build-roads) - used for trams, might trigger other things aswell 
Bit_2 - Road-like intersections; Vehicles can turn in any direction 
Bit_3 - Vehicle with the anytrack flag set can run on this road. Has other effects aswell, and Locomotion crashes if you change this for a road and load a savegame with it. 
Bit_4 - Unknown; Used by all roads 
Bit_5 - Unknown; Not used by original roads 
Bit_6 - Vehicles can overtake one another. When not set, Terminus stations become impossible. Vehicles still change side after turning if Bit_3 is set. 
Bit_7 - Unknown; Used by all roads 
Field_B[8] - bitmask: 
Bit_0 - Can have street lights 
Field_15[7] - numstations; Amount of stations objects for road 
numstations - Unknown/Unused 
Field_1E[6] - bitmask, sprites related: 
Bit_0 - Three tiles are overlaid (tram track - rail, sleepers and ballast) 
Bit_1 - Has a direction (ROADUS1); Twice as many sprites. 
Field_1E[7] - nummods 
Field_29[0] - Unknown; Only used by ROADTRAM and set to "2" 
Field_29[5] - Precedence; Roads with higher numbers take precedence over lower roads, that means cities may upgrade the latter with the former. Cities only build roads with Field_B[7]:Bit_3 set.


Class 15 - Airports

Code: Select all

allowedplanetypes - What plane types are allowed to land
numspritesets - Number of sprite sets (sets of four sprites not counting the UI icon) included in the file
numtiles - Number of tile definitions
2x2tiles - Bit mask of tiles that are 2x2 (note, bit numbers are in hex!)
minx, miny, maxx, maxy - Extent of airport grid
numnodes - Number of nodes (vertices) in aircraft movement pattern
numedges - Number of edges connecting nodes in aircraft movement pattern
field_B6 - Bit mask of edges from entrance node to terminals (see Aircraft Movement Graph) 
spriteheight (auxdata) - defines height of all spritesets 
height[array] - Height of the spritesets 
spriteanimframes (auxdata) - number of animation frames of the spritesets 
frames[array] - Number of frames, must be same for all frames of an animation 
tile[array] (auxdata) - tile definitions for airport Layout 
spriteset[array] - list of spritesets to use on this tile 
layout (auxdata) - place tiles for airport Layout
node[array] - node definitions for Aircraft Movement Graph
edge[array] - edge definitions for Aircraft Movement Graph 

Class 16 - Docks

Class 17 - Vehicles

Code: Select all

Alphabetical list of all vehicles (*.dat file names) 
colourtype - Which colour set to use if e.g. passenger vehicles have different colours 
cargo - The cargo the vehicle can carry 
class - What does it run on, 0=rail, 1=road, 2=air, 3=water 
compatible[array] - Array of all compatible objects 
field_0[16] - The ID of the cargo, used in vehicles 
field_10E - Position of the Smoke or Steam (value sets height). 
field_4 - Number of carriages on the vehicle 
type - Controls in which tab the vehicle is when you want to buy it 
0 - Trains 
1 - Busses 
2 - Trucks 
3 - Trams 
4 - Planes 
5 - Ships 
field_24 
length - Distance of the first pivot point from the start of the vehicle. For buses, trucks and trams this is the center of rotation, for trains it's the position of the front bogie. Unknown (0) for ships and planes. 
field_1 - Distance of the rear bogie from the end of the vehicle. 
field_2 - Index of the front bogie (255 for no bogie) 
field_3 - Index of the rear bogie 
field_5 - Effect position (spark, exhaust plume, etc.) 
spriteind - Index of the sprites (0-3 + [128 if reversed]) 
field_B4[0] - Number of animation frames for bogie #0 or the shadow (planes) 
field_B4[1] - Flags Array for bogie sprite #0 (see sprites(array)) or the shadow (planes) 
field_B4[18] - Number of animation frames for bogie #1 
field_B4[19] - Flags Array for bogie sprite #1 
flags - Various flags that define the vehicles behaviour. 
numcompat - Number of compatible objects, 0 if compatible with all 
power - Amount of power the vehicle generates, in horsepower (doesn't seem to have any effect on planes or ships) 
rackspeed - Top speed while on rack rail, or landing/holding pattern speed for planes 
reliability - Reliability of the vehicle, higher values allow a longer operating lifetime 
runcostfact - Running cost factor (final cost = basecost[runcostind]*runcostfact) 
runcostind - Running cost index (index into a table of base costs), lower means higher final costs 
speed - Top speed, in mph 
sprites(array) - Sprite properties 
tracktype - Track object required for the vehicle to run 
visfxtype - How to draw the visual effect 'visualeffect' 
visualeffect - The object used as visualeffect 
wakefxtype - How to draw the wake effect 'wakeeffect' (doesn't exist in locotool 0.2) 
field_113 - Distance of the two propeller screws for the wake effect 
weight - Weight of the vehicle, in tons 
startsndtype - Defines how the driving sound is played and how field_11A[0-63(?)] works. 
startsnd - The sound the vehicle makes while driving 
field_11A[0-63(?)] - Describes the driving noise 
numsnd - Number of start sound effects (the kinds are set in the required object list) 
soundeffect[array] - Array of start soundeffects of the vehicle 

Class 18 - Trees

Code: Select all

height - Height of the tree in 1/16th height units 
field_4[2] - Number of tree viewpoint images (rotations) [1,2,4]. n1 
field_4[3] - Number of tree size images (growth) [1...8]. n1 
field_4[4] - (Bit-0) Tree has double season set - used for snow graphics (should realistically only go on coniferous trees) 
field_4[56] – (Bit-flag) Tree states, seasons + dying 
Bit 0 – Autum 
Bit 1 – Winter 
Bit 2 – Spring 
Bit 3 – Summer (default) 
Bit 4 – Dying 
Bit 5/7 - (not used/ignored) 
n1) locked/protected/other values disable object.


Class 1A - Climates

Code: Select all

firstseason - The season that the year starts with, [0,1,2,3]. n1
seasonlength[array] - Number of days in the four seasons.
seasonlength[0] <- first season, set by firstseason. 
seasonlength[3] -> after this one, its firstseason again until end of year. 
field_7[0] - Low snow level, starts at begin of Winter season. n2
field_7[1] - High snow level, starts at begin of Spring season. n2 
n1) locked/protected/other values disable object.
n2) High >= Low, or object will be disabled. 
Notes: 
•	seasons: Autum(0) Winter(1) Spring(2) Summer(3), 3 -> Australia/Southern hemisphere climates. 
•	snow traveling speed: 4 days per map level. 
•	field_7 value = (Level - 1) x 4 Where level is counting up from the lowest ground level (lowest ground is 0)


Class 1B - Hill Shapes

Code: Select all

field_0[2] - number of hill height maps 
field_0[3] - number of mountain height maps 
Notes: 
•	Last image is UI-icon for object-selection(SE) 
•	hill shapes will become a selectable option in object-selection(SE), if hill-dat files > 1 
•	max HF-image size 255x255. (ok, 256x256, but thats with some extra ribble effect) 
•	field_0[12] - bit 1 ... looks buggy to.


Class 1C - Buildings

Code: Select all

cargo[array] - The cargo object it produces/accepts 
flags 
bit_0 = 1 Use 2x2 tile size 
bit_1 = 1 Include under "Miscellaneous Buildings" 
ishq Is company headquarters building 
clearcostfact - Cost factor to clear the building 
numproduce[array] - Amount of first and second cargo produced. Maximum value of 255 = approx. 12 units/mo. Exceeding 255 is converted to mod[256], so increasing this number beyond 255 does not seem to help. Also, numproduce[0] is the amount added to the city population. 
numaccept[array] - Units of 1/8 cargo acceptance for the four cargo types 
useobject desc="cargo[array]" class="8"> - First two array elements are types of cargo generated. All four types are accepted. 

aux_0, num=XX XX=Number of .pngs / 4 
<unknown name="field_0[0]" size="1">1</unknown> not sure what this value means, but seems to increase in order of height? 

aux_1 
<unknown name="field_0[X]" size="1">1</unknown> same as aux_0, except increments of x are 2x the aux_0 values, and the value is always 1 

aux_2[X] X=Number of different appearences for this building 
<unknown name="field_0[1]" size="1">1</unknown> value is the number of png tile to use for level 0, as defined in aux_0 
<unknown name="field_0[2]" size="1">2</unknown> value is the number of png tile to use for level 1, as defined in aux_1 
one entry for every storey of building height 

Class 1E - Industries

Code: Select all

firstyear - First year it can appear 
lastyear - Last year it can appear 
field_0[188] - Minimum number of buildings within industry area 
costind - Index of foundingpricetable 
costfactor1 - How much costs a founding (must be more then 17 or loco.exe will crash) 
flags 
bit_8 - Industry can only be built on water (Oil Rig) 
bit_10 - Industry can be founded by user 
needall - If it needs all cargo types to produce 
canincreaseproduction - If it can increase production 
candecreaseproduction - If it can decrease production 
produces[array] - The cargo object it produces 
accepts[array] - The cargo object it accepts 
fence[array] - The fence object to be placed around the industry 

numaux4ent = number of different building base tiles available 
aux4 = groups of buildings/ 1, 23, 45, 56, etc. ************ Unverified 
aux5 = range is aux4 variables, some sort of selection of aux4 to randomize industry appearence? ****** Unverified


Class 20 - Companies

Code: Select all

spritesets - Bits 0..8 indicate to use those sprites, two each 
intelligence - Intelligence 
aggressiveness - Aggressiveness 
competitiveness - Competitiveness 
Retrieved from "http://wiki.locomotiondepot.net/index.php/Variable:List"
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

OMG why i hadn't this idea.. thank you!
i did all models/renderings/textures myself. no conversions.

seelenquell.pytalhost.com has been reactivated from 16/07/28 till 18/05/31.. now it´s deactivated. at least there..
new URL is: http://seelenquell.125mb.com
User avatar
MjD
Tycoon
Tycoon
Posts: 1608
Joined: 07 May 2005 20:37
Location: www.amitrains.co.uk
Contact:

Post by MjD »

If anyone wants i can scan the printout of the variables and upload the 11 pages??

I have the printout of the original wiki, and so will be easier to read
::::: WIP -- British Rail Set [BRS] for Locomotion with IA, andel, matloughe, Barry and Jonnie :::::
Image
Researcher for the TTDP BRSet Team. Which is here.
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

i am very interested..
i did all models/renderings/textures myself. no conversions.

seelenquell.pytalhost.com has been reactivated from 16/07/28 till 18/05/31.. now it´s deactivated. at least there..
new URL is: http://seelenquell.125mb.com
User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Post by kaminari »

ME TOOOOO!!!!! :D
User avatar
G-TANK-G
Chief Executive
Chief Executive
Posts: 739
Joined: 07 Apr 2005 22:55
Location: England, UK (home)

Post by G-TANK-G »

11 pages??

i think you should a seperate topic, then someone stickys it
User avatar
MjD
Tycoon
Tycoon
Posts: 1608
Joined: 07 May 2005 20:37
Location: www.amitrains.co.uk
Contact:

Post by MjD »

G-TANK-G wrote:11 pages??

i think you should a seperate topic, then someone stickys it
I'm scanning all 11 pages then going to make one pdf files, or just make a zip with all the pages in the .zip file.

If anyone is interested pm me, i'll get it uploaded to the AMI site as soon as i can upload to it.
::::: WIP -- British Rail Set [BRS] for Locomotion with IA, andel, matloughe, Barry and Jonnie :::::
Image
Researcher for the TTDP BRSet Team. Which is here.
User avatar
G-TANK-G
Chief Executive
Chief Executive
Posts: 739
Joined: 07 Apr 2005 22:55
Location: England, UK (home)

Post by G-TANK-G »

now... as this is an understanding the .DAT files and about industrial problems... i 'd thought i'd tell you about my problem.

the thing is... the cargo type and industry works... however... i've coded a random industry as a dummy industry to test if the cargo types work... then i code it to it's own industry then take off the dummy from the Objdat file... the gold works when i do that... but my gold bars wont... the thing is... i'll need the dummy to make the cargo type work... also to make the dummy needs to be selected at the object selectings on the scenario editor for the cargotype to be selected too (if that makes sence)

i've attached shots of the problem to give an image what im on about.

i know that it's to do with the coding... but with what, the industry or the cargotype?

hope you can help, and also i hope it helps with the understanding of the .DAT's for people who are (or might be in the future) in the same problem i'm having at the moment.
Attachments
without it's dummy
without it's dummy
withOUT-dummy.png (21.42 KiB) Viewed 8072 times
with the dummy industry
with the dummy industry
WITH-dummy ind..png (36.36 KiB) Viewed 8073 times
Metromaster
Traffic Manager
Traffic Manager
Posts: 251
Joined: 18 Jun 2005 13:49
Location: New York, N.Y.

Post by Metromaster »

WOW! This is great info, Kaminari. Thanks for sharing it.
Take a look at the trains, planes, buses, trams and ships at
http://www.YouTube.com/user/metromaster2010
User avatar
Chrill
Moderator
Moderator
Posts: 16075
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: Understanding the DAT files

Post by Chrill »

kaminari wrote:

Code: Select all

<useobject desc="produces[0]" class="8">GRAIN   </useobject>
<useobject desc="produces[1]" class="8">LIVESTCK</useobject>
I´m not sure about this one.. The LIVESTCK isn´t the same class ( 8 ) as GRAIN. Compare with a livestock making industry and see. Not sure if it´s the problem though

EDIT: Sorry, they are same category
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
User avatar
kaminari
Engineer
Engineer
Posts: 72
Joined: 02 May 2006 11:14
Location: Barcelona, Spain
Contact:

Post by kaminari »

That's what I've discovered by the moment with my experiments with industries in Lomo:

1. As we all know accepts and produces are defined by:

Code: Select all

<useobject desc="produces[0]" class="255">        </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="255">        </useobject>
<useobject desc="accepts[1]" class="255">        </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
This wouldn't produce even accept nothing since no CARGOTYPE is defined.

2. A simply producing industry goes like this:

Code: Select all

<useobject desc="produces[0]" class="8">COAL    </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="255">        </useobject>
<useobject desc="accepts[1]" class="255">        </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
This tells the industry to produce COAL like the COAL.DAT defines.

3. The oposite exemple, a recieve-only industry:

Code: Select all

<useobject desc="produces[0]" class="255">        </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="8">COAL    </useobject>
<useobject desc="accepts[1]" class="255">        </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
This tells the industry to accepts COAL like the Coal Power Station do.

4. One step foward, an industry that produces as it recieves cargo:

Code: Select all

<useobject desc="produces[0]" class="8">GOODS  </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="8">OIL     </useobject>
<useobject desc="accepts[1]" class="255">        </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
This tells the industry TO PRODUCE AS YOU BRING oil to it. As far as I know you NEED to deploy X units of the accepting cargotype to PRODUCE Y units of producing cargotype (many times X=Y)

5.1. The original Steelmill works like this:

Code: Select all

<bitmask name="flags" size="4">
	...
	<bit name="needall">1</bit>
	...
</bitmask>

...

<useobject desc="produces[0]" class="8">STEEL   </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="8">COAL    </useobject>
<useobject desc="accepts[1]" class="8">IRONORE </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
In this case Steelmill produces steel IF AND ONLY IF you bring coal and iron ore at the same proportion, so to produce X tons of steel you need X tons of coal AND X tons of iron ore.

5.2. If you unflag NEEDALL:

Code: Select all

<bit name="needall">1</bit>
Then the Steelmill produces steel IF AND ONLY IF you bring coal OR iron ore either, but as far as I know it will NEVER produce steel without bringing the demanding cargo types.

6.1. If you take as template the original FARM, COAL MINE or similar "Production Only" industry and you edit it to beheave like a STEELMILL:

Code: Select all

<bitmask name="flags" size="4">
	...
	<bit name="needall">1</bit>
	...
</bitmask>

...

<useobject desc="produces[0]" class="8">STEEL   </useobject>
<useobject desc="produces[1]" class="255">        </useobject>
<useobject desc="accepts[0]" class="8">COAL    </useobject>
<useobject desc="accepts[1]" class="8">IRONORE </useobject>
<useobject desc="accepts[2]" class="255">        </useobject>
It beheaves DIFERENT as expected. The "FARM" is ALWAYS producing Steel and when you bring coal AND Iron ore the steel production is increased by the minimum quantity you bring.

6.2. If you unflag NEEDALL:

Code: Select all

<bit name="needall">1</bit>
Then the "FARM" is ALWAYS producing steel and even you bring coal OR iron ore the produccion is increased.
Last edited by kaminari on 06 May 2006 14:47, edited 1 time in total.
Image

¡New URL!

More info in this treat
User avatar
Illegal_Alien
Tycoon
Tycoon
Posts: 7824
Joined: 29 Sep 2004 20:07
Location: Kingdom of Far Far Away
Contact:

Post by Illegal_Alien »

You need a separate .dat file for your new cargo type:

Code: Select all

 <?xml version="1.0" encoding="ISO-8859-1"?>
<object class="0x88" subclass="0x11827C" name="GOODS   "><chunk compression="1">
	<variable name="unitweight" size="2">128</variable>
	<unknown name="field_4[0]" size="1">112</unknown>
	<variable name="id" size="1">8</variable>
	<bitmask name="flags" size="1">
		<bit name="refitoption">1</bit>
		<bit name="bit_2">1</bit>
	</bitmask>
	<unknown name="field_13[0]" size="1">1</unknown>
	<unknown name="field_13[1]" size="1">4</unknown>
	<variable name="peakdays" size="1">10</variable>
	<variable name="decay1days" size="1">30</variable>
	<variable name="decay1rate" size="2">128</variable>
	<variable name="decay2rate" size="2">256</variable>
	<variable name="paymentfactor" size="2">78</variable>
	<variable name="paymentind" size="1">10</variable>
	<unknown name="field_1E" size="1">25</unknown>
	<description num="0" language="0">Goods</description>
	<description num="0" language="1">Goods</description>
	<description num="0" language="2">Marchandises</description>
	<description num="0" language="3">Waren</description>
	<description num="0" language="4">Mercancías</description>
	<description num="0" language="5">Merci</description>
	<description num="0" language="9">ÿ¹°ÿǰ</description>
	<description num="0" language="11">ÿ³fÿª«</description>
	<description num="1" language="0">crates of goods</description>
	<description num="1" language="1">crates of goods</description>
	<description num="1" language="2">caisses de marchandises</description>
	<description num="1" language="3">Warenkisten</description>
	<description num="1" language="4">cajas de mercancías</description>
	<description num="1" language="5">casse di merci</description>
	<description num="1" language="9">ÿ»óÿÀÚÿÀÇ ÿ¹°ÿǰ</description>
	<description num="1" language="11">ÿ½cÿ³fÿª«</description>
	<description num="2" language="0">{ crate of Goods</description>
	<description num="2" language="1">{ crate of Goods</description>
	<description num="2" language="2">{ caisse de marchandises</description>
	<description num="2" language="3">{ Warenkiste</description>
	<description num="2" language="4">{ caja de mercancías</description>
	<description num="2" language="5">{ cassa di merci</description>
	<description num="2" language="9">{ ÿ»óÿÀÚÿÀÇ ÿ¹°ÿǰ</description>
	<description num="2" language="11">{ÿ½cÿ³fÿª«</description>
	<description num="3" language="0">{ crates of Goods</description>
	<description num="3" language="1">{ crates of Goods</description>
	<description num="3" language="2">{ caisses de marchandises</description>
	<description num="3" language="3">{ Warenkisten</description>
	<description num="3" language="4">{ cajas de mercancías</description>
	<description num="3" language="5">{ casse di merci</description>
	<description num="3" language="9">{ ÿ»óÿÀÚÿÀÇ ÿ¹°ÿǰ</description>
	<description num="3" language="11">{ÿ½cÿ³fÿª«</description>
	<sprite id="0" xofs="0" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">0</bit>
		<bit name="copy">0</bit>
		<pngfile>K:\\Program Files\\Atari\\Locomotion\\ObjData\\GOODS\\000.png</pngfile>
	</sprite>
	<sprite id="1" xofs="-3" yofs="-8">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<pngfile>K:\\Program Files\\Atari\\Locomotion\\ObjData\\GOODS\\001.png</pngfile>
	</sprite>
	<sprite id="2" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="3" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="4" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="5" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="6" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="7" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
	<sprite id="8" xofs="5" yofs="1">
		<bit name="hasdata">1</bit>
		<bit name="chunked">1</bit>
		<bit name="copy">0</bit>
		<stub>255</stub>
	</sprite>
</chunk></object>
Is the one of the Goods type, and these 2 pictures are reffered too:
Attachments
001.png
001.png (939 Bytes) Viewed 7977 times
000.png
000.png (935 Bytes) Viewed 7978 times
:: Looking for the Locomotion section? Scroll down on the forum index or click here. :: See all releases in Locomotion section? Clicky here! :: Click here for the best tool ever! :: .datCrawler try it! ::
Following roadmap for releases: Whats a roadmap?
Releases of LocoTrains can be found by checking the posts of: LocoTrains - Goold old AMI Trains member of the first hour.
I have Private Messaging disabled, because of the stupid questions i get in my PM box.
Want to talk to me? Get on the #tycoon and #locomotion channel on OFTC thingy. :: Evolution of men: Loosing more braincells, everytime you post...
User avatar
Samo
Route Supervisor
Route Supervisor
Posts: 415
Joined: 30 Apr 2005 01:02
Location: New York
Contact:

Post by Samo »

what do u use to open up th dat files to edit in the first place? do u convert it to xml with the vehicle creator?
User avatar
chevyrider
Tycoon
Tycoon
Posts: 3285
Joined: 16 Sep 2004 09:52
Location: Amersfoort The Netherlands

Post by chevyrider »

Samo wrote:what do u use to open up th dat files to edit in the first place? do u convert it to xml with the vehicle creator?
Locotool:
http://www.tt-forums.net/viewtopic.php?p=353780#353780
-
-
39 years experience with trains and still driving.
-
-
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 15 guests