- UID
- 311
- UCC
-
- 声望
-
- 好评
-
- 贡献
-
- 最后登录
- 1970-1-1
|
Modding glossary / U4 _7 e! D" y$ L t6 O9 s1 ~ C
By Jan Langermann 5 P, ^5 b5 r5 P0 B. r! A
(DSO Moodding Forum/ Admin)# h, m' C* ? l) ~2 p4 p7 c
1 B! W/ b9 G8 Y- OThis thread is a growing collection of all important terms relevant for modding and scripting. Italicized words are crossreference and explained elsewhere in the list.
# w5 b# z# X" i5 L. N7 h8 \5 e- A
- B
- C
- Camera Lib : Collection of helper functions concerning in-game cameras.
- Coordinates : Within a star system, DSO always uses the same coordinate system:$ q# N" \1 [2 S8 G+ B
The tradestation is at position (0,0,0) and the hypergate is at position (0,0,10000). Most of the action will happen along this path.
/ R3 z8 }5 m2 P% iAlignment is following:
" G0 a. z; @! U+ c/ ^, \6 ~Assume you are the tradestation and looking at the hypergate.
n: t! g. a0 b" A, F8 ^- X is right
7 _, j) G1 R: k: e1 {1 Y/ h- Y is upwards4 D) C: n2 z6 N! k
- Z is towards the hypergate
- D
- DSO : A short for Darkstar One. Another popular one is "DS1".
- E
- F
- File Extensions
- .lua file : LUA is the scripting language we use in DSO. All missions are scripted using LUA. See Lua.org for lua basic tutorials and here for a reference of available commands.
- .bin file : Binary file. This file has been processed so that it is not human-readable anymore. DSO reads them during startup. If it cannot find a .bin file then the associated .ini files are opened and coverted into .bin format. Lua files also get converted into .bin format. The resulting file is the missions.bin.
- .ini file : Initialization files. They are human-readable. Use a text editor to edit them. They are usually kept within .cpr files
- .cpr file : A compressed (archive) file. Can be opened using various decompression utilities.
- .dds file : Direct Draw Surface format. An image format used in DSO for textures and in screens. To make use of them, use either the DirectX Texture tool coming with the DirectX SDK or a plugin for the graphics program of your taste.
, z( W, e: @. A& `; B& A8 m9 X/ E3 WHave a look at those sites:
. ?- X* B) _3 J! ~9 ~' W9 \: WMSDN: DXTech - Microsofts DirectX Texture Tool (included in the DirectX SDK)" @* C* s" Z/ g. P" t w! S
MSDN: DDS FileFormat (technical article)* k9 U% Z& \1 R1 P
MSDN: Using Compressed Textures (technical article)
% E5 J$ z- H7 J: M/ B* c/ {7 UDevIL - OpenSource image library, supporting .dds
r; l( l0 p8 E( ]/ @NVidia Texture Tools
' d' N; I" `+ Z: K. j# hNVidia .dds - Photoshop PlugIn for .dds7 Z4 k$ J' N! W* \2 E# M) [5 e
3DSMax Plugins
+ p3 S* ~0 e+ j5 S( eATI Compressonator - .dss file : Our savegame format. Each modification will contain an own set of savegames to avoid confusion. Savegames can be hacked but not modded. We do not provide support for hacked savegames .
- G
- global.res : A resource file. Contains the strings used by DSO.
- H
- I
- INI-Files:
- Upgrades.ini : Contains information about upgrades for the ship.
- StarSystem.ini : Contains information about every star system in the game.
# i# n: C5 k) c4 W2 X6 i4 c2 CExample:- ?( H( X# p; r2 ?
Code:
- o' e) n V5 q f" p- [System000] ;
4 I2 e9 ^# K" b8 f - Artefakt = 0 ; > 0, if there is an artifact inside the system
! }* k8 y8 _# n. `3 z - Bedroht = 0 ; > 0, if occupied by pirates
( S$ f8 x, d# s' @4 R, Z T - Bürger = 3.600000 ; population, counted in billions
! }; u4 B) y7 B* @' ^ - Cluster = 0 ; index of the cluster this system belongs to
, K/ i6 m2 ?3 P; _ - EnergyLevel = 0 ; determines the type of energy particles floating around
8 ^2 B6 y# U. h# o. [ - Faction = 1 ; pirate system( B" c' D# k6 a. b
- Function_X1 = 0 ; X1 value
# S7 ~' z E3 h - Function_X2 = 3 ; X2 value' X0 S4 D+ S/ m0 R# N& p
- Function_X3 = 5 ; X3 value
7 G2 e S* G/ u7 l: D1 Y4 b - Function_Y = 0 ; minimal level( s3 t" B* F- [- W
- NachbarRegel = 10 - 10 ; system becomes visible as soon as one of these systems is entered1 o4 W7 `! K1 n
- Piratengang = 65535 ; index of pirate gang
0 {3 u2 S9 P- B8 q - Planeten = 2 ; number of planets in system* v9 M/ r, E+ s0 M; Y- W! h' y/ l/ h
- PosX = 4.500000 ; x position on map; c& M' _7 |" K
- PosY = 17.799999 ; y position on map2 t. p' |7 e4 V: P h2 ? k
- Produktion1 = 0 ; coal hydrates
Y5 }% I: X/ W" y: j - Produktion2 = 1 ; proteins7 [' j6 M$ r& d+ ]1 m
- Produktion3 = 3 ; plants
2 i4 }8 h) b& l - Produktion4 = 12 ; pharma
; C" K3 E# T6 r: A. `; R* Q - Produktion5 = 23 ; drugs
- P o. n. {" f4 e2 I2 K - Produktionsfaktor = 0.920000 ; production factor& i" r1 o, X/ v: ^$ \5 H
- Regierung = 3 ; government5 w2 o# Z3 j D1 y7 e, r
- Sichtbarkeitstyp = 2 ; visibility type (2=made visible by neighbor)5 x- c- Z) s# p, m6 r
- StarLightId = 3 ; star light index (3=anarchy)6 Y0 O: ~5 |" ?! C1 ~$ {/ e! M
- UniqueItem = 0 ; > 0, if an unique item is present
复制代码 2 `0 w- `5 n4 l# O: l
7 X3 d$ p# s+ _7 G
- planets.ini : Contains info about all fixed space objects (called "planets" here) in ALL star system.' o. f' b9 U4 o6 U" W4 h2 q' O) I
Code:$ s$ |4 P/ F. W) [. x, r
- [Globals] ;
. Y9 `+ \3 k' x0 x# W6 _ - Planetenanzahl = 5969 ; Number of planets in the whole ini file. May be greater but NOT smaller than the actual count!
2 ^ d2 V) F6 O X5 V; i C - Sternenanzahl = 403 ; Number of star systems that this ini file has stored planets for. Again, must be at least the actual count!
1 ^0 ^9 W3 x2 g: A - [Planet000_000] ; First index: star system index, second index: planet index within star system) }. h5 W$ u0 k' a3 v
- Model = 3 ; Id of the 3D model to show for this orbiter
9 f6 K0 M4 n- n* m, J4 \! J - Orbitart = Sonne ; orbiter type ("Sonne" = "Sun")
- o) l9 L/ }1 X* \' y! N - Position = 464831.531250 / 1936431.875000 / 499874.875000 ; X, Y and Z Position in meters. i3 u7 t A8 H% g5 W' r+ L
- Radius = 20000.000000 ; Radius in meters
$ S+ u4 t6 q$ Q7 s7 {' R+ g+ ~+ y5 j! R - RotationSteps = 0 ; Timesteps needed for a complete rotation about its axis j" S. {0 J8 x& s
- SystemId = 0 ; Index of star system this belongs to
; N5 ?( d1 b. C/ N | - UmlaufSteps = 0 ; Timesteps for one complete circulation around the central orbiter
复制代码
% g- h; a8 T5 {6 p, W1 W(This planet is the central orbiter, so the timesteps are 0 each) - darkstarmod.ini : Contains info about the particular DSO mod. One file is needed inside every mod's subdirectory inside the "Customization" directory. Contains two parameters:0 q- m* k$ [; @1 ~0 ]
Code:
6 V* b5 M7 d$ _3 {7 I% U- [darkstarmod]8 O g1 @8 f/ h- D5 w# @
- mod_name = Modding Tutorial ; name of the modification
5 m% |' ~9 ^8 v9 [1 o - mod_desc = Simple modding example ; a brief(!) description
复制代码 . E% L0 H; H9 h# D7 n7 q- d
$ O! a% A+ n6 c# n
- J
- K
- L
- M
- Model : 3D objects created by a 3D program.
- Mission : Missions are scripted, not programmed. Thus they can be altered or created without having to recompile the game executable. This makes modding possible. Missions appear at different places in the game. There are terminal missions, missions started by the storyline, missions starting in free space and missions that are always active. More details will follow.
- Mission Lib : Collection of helper functions not contained in any of the other scripting namespaces.
- N
- O
- P
- Q
- R
- S
- Script : Missions are scripted using the scripting language LUA. The original retail scripts are converted into the file missions.bin. Sources to them are not public.
- script event : Also know as trigger. Scripts can react to certain events like destroyed ships, the player entering a system or a timer running down.
- script function : Scripts can call various functions to interact with the world. Examples are creating wings of ships, giving wings new orders or starting voice messages or cameras.
- scripting namespaces : Hard-wired code collections available for scripting use. Each does contain a number of useful scripting functions. The namespaces are: math, lua, NStarSystem, NPlayer, NWing, NShip, NGroupAi, NCamera, NComm, NMission, NScript, NWaypoint, NObject, NContainer, NTerminal, NNPC, NGUI, NSound, NVector, NDebug. "math" and "lua" are original lua code collections. More details to follow.
- stringId : A name for a string that is used by the program instead of the text itself. StringId's are placeholders.
- T
- Texture : Textures are images applied to a polygon or complete 3D Model. in DSO they are in .dds format.
- U
- user_strings.xml : Contains additional strings used by a DSO modification. This is human-readable and can be edited by worksheet programs like MS Excel. Needs to be converted into .res format before it can be used. Use the Ascaron delivered tool XML2ResConverter.exe to do so.
- user_strings.res : A resource file. Contains additional strings used by a DSO modification. Is already converted and ready for use.
- V
- W
- Wing : A logical group of ships. Contains a wingleader and wingmen. You can only assign orders to the whole group. In DSO all ships are also in a wing, even if there is just one ship inside.
- Wingleader : Part of a wing. Each wing will have exactly one wingleader. If the wingleader is destroyed, you can rely on the wing having been eliminated.
- Waypoints : Wings may be ordered to fly to certain positions in space. These are called waypoints. Waypoints are space objects that will trigger a script event if the player or a certain ship comes close enough. They have a position and a given radius. See also coordinates.
- X
- XML2ResConverter.exe: A tool to convert a user_string.xml to a user_strings.res. It needs to check the global.res to avoid overriding stringId's from the original game content.
- Y
- Z
Still work in progress!
4 y. D) U+ ~+ t! `% w, r) DRequest a topic and we will try to fill the gaps.
! n. a+ t5 a0 W( V& F9 R: E__________________4 v9 v- x/ \9 C$ u
Customer Support
" N3 T' [. U9 q7 {: e' ~* GMission Scripting Darkstar One
% F3 e6 P3 U: D. X& A2 b5 Ssupport form 4 b& `8 [+ A7 N
2 V# g) i: v4 v0 f* h! v--------------------------------------------------------------------------------
- `: O _4 x; ~ g: [9 y ELast edited by CelAthor : 18.09.2006 at 10:19.6 c0 ~; ^3 E. q% [% W1 ]: h
/ W. z- J: ]. U[ 本帖最后由 白衣 于 2007-6-17 19:14 编辑 ] |
|