Difference between revisions of "Action0"

From GRFSpecs
Jump to navigationJump to search
 
Line 4: Line 4:
 
=Action 0=
 
=Action 0=
   
  +
새로운 그래픽 특성에 관한 속성을 정의합니다
Defining new graphics feature properties
 
   
 
-=What does it do?=-
 
-=What does it do?=-
   
  +
Action 0은 자동차, 역사, 다리, 집 등과 같은 특성들의 속성을 변경하는 [[TTDAlter]]와 유사합니다.
Action 0 is similar to [[TTDAlter]] in that it changes the feature properties of 'features', i.e. vehicles, stations, bridges, houses and more.  That means that you can change properties like:
 
*vehicle introduction date
 
*top speed
 
*wagon capacity
 
   
  +
이는 다음과 같은 속성을 변경할 수 있다는 것과 같습니다 :
and many more.
 
  +
* 차량 등장 연도
  +
* 최대 속도
  +
* 수하물 적재량
  +
  +
이외 다른 것들
   
 
-=Format=-
 
-=Format=-
   
  +
Action 0의 형식은 다음과 같습니다 :
The data for Action 0 looks as follows:
 
   
<pre>-+&lt;Sprite-number&gt; * &lt;Length&gt; 00 &lt;Feature&gt; &lt;Num-props&gt; &lt;Num-info&gt; &lt;Id&gt; (&lt;Property &lt;New-info&gt;)...+-</pre>
+
<pre>-+&lt;스프라이트 번호&gt; * &lt;길이&gt; 00 &lt;특성&gt; &lt;프랍 개수&gt; &lt;정보 개수&gt; &lt;ID&gt; (&lt;속성 &lt;새 정보&gt;)...+-</pre>
   
  +
아래의 내용은 각 용어에 대한 요약입니다 :
Here is a short overview of what every term means:
 
   
 
||'''Element'''|[[GRFActionsDetailed|'''Size''']]|'''Description'''
 
||'''Element'''|[[GRFActionsDetailed|'''Size''']]|'''Description'''

Revision as of 13:11, 23 February 2008

Defining new graphics feature properties

Action 0

새로운 그래픽 특성에 관한 속성을 정의합니다

-=What does it do?=-

Action 0은 자동차, 역사, 다리, 집 등과 같은 특성들의 속성을 변경하는 TTDAlter와 유사합니다.

이는 다음과 같은 속성을 변경할 수 있다는 것과 같습니다 :

  • 차량 등장 연도
  • 최대 속도
  • 수하물 적재량

이외 다른 것들

-=Format=-

Action 0의 형식은 다음과 같습니다 :

-+<스프라이트 번호> * <길이> 00 <특성> <프랍 개수> <정보 개수> <ID> (<속성 <새 정보>)...+-

아래의 내용은 각 용어에 대한 요약입니다 :

||Element|Size|Description

<-+Sprite-number+-> |dec|A sequential sprite number

<-+Length+-> |dec|The total number of bytes in the action

-+00+- |B|Action type.  In this case, 00

<-+Feature+-> |B|Which type of feature you would like to change

<-+Num-props+-> |B|How many properties you would like to change per vehicle or station

<-+Num-info+-> |B|How many vehicles/stations you would like to change

<-+Id+-> |B*|The ID of the first vehicle/station to change

<-+Property+-> |B|What property to change for each vehicle/station

<-+New-info+-> |V|The new value of the property||

You can put an Action 0 anywhere after Action 8 in the GRF file.

The <Id> is an extended byte since 2.0.1 alpha 61, to support the definition of >255 sound effects.

-=Filling in the terms=-

Sprite-number

Action 0 can appear anywhere in the GRF file, so set it to the sprite number you are currently at.

Length

The total number of bytes in Action 0.  Start counting from <-+Action+->, the bit that sets the pseudo-sprite to act as the specified action.

Action

The type of action this pseudo-sprites defines. It should be 00 here because we want this pseudo-sprite to act as Action 0.

Feature

This sets the type of feature that you wish to change. Set it to:

00 for trains

01 for road vehicles

02 for ships

03 for planes

04 for stations

05 for canals

06 for bridges

07 for houses (see defaults)

08 for global variables

09 for industry tiles (see defaults)

0A for industries (see defaults)

0B for cargos (see defaults)

0C for sound effects

0D for airports (No official properties)

0E for signals (Action 0 is not valid for this feature)

0F for newobjects

Note that the above list is the master list for all actions where not stated otherwise.

Num-props

This is the number of properties that you wish to change per vehicle or station.  Note: even if you wish to set the same properties to the same value for different vehicles then you must still repeat the properties and their values for each vehicle.

Num-info

Simply the number of vehicles that you will change using this action 0.

Id

The Vehicle ID of the first vehicle or station to change.  If num-info is greater than one, this vehicle/station and the following vehicles/stations will be changed.

Property

The number of the property that will be changed.  This and the New-info section are repeated as many times as there are properties to set; in total, there are <num-props> property bytes.

See relevant sub-section (links at the bottom) for more details.

New-info

The new information that will replace the previous information for the specified property.  This is a variable size; dependent upon the property. Each property byte is followed by <num-info> new-info sections.

The appropriate \b, \w, and \d escape sequences can be quite useful for most <new-info>s. See the discussion of escape sequences for further information.

-=Features and properties=-

Each feature has its own very specific properties.  These are explained in detail in the pages listed below:

{toc}

You will also find the minimum GRF version (in Action 8) that supports this property, or alternatively if the property was introduced between version changes, the patch version number that you can check with Action 7.

-=Example=-

For examples please see the action 0 entries for each feature.