specifying height change methods for units This is an example how to specify the way in which a unit may change its height: HeightChangeMethodNum = 3 HeightChangeMethod0 { movecost = 25 heightdelta = 1 dist = 2 startheight = ground_level canattack = false } HeightChangeMethod0 HeightChangeMethod1 { movecost = 0 heightdelta = 1 dist = 0 startheight = low_level_flight canattack = true } HeightChangeMethod1 HeightChangeMethod2 { movecost = 10 heightdelta = -2 dist = 0 startheight = medium_level_flight canattack = false } HeightChangeMethod2 This example shows a unit that can take off from ground to low_level_flight traveling 2 fields, then ascend further to medium_level_flight by raising on the field that it is standing on. From medium_level_flight it can land directly to ground_level. HeightChangeMethodNum defaults to 0, so if you don't specify it, a unit will not be able to change its height. One HeightChangeMethod can work from different levels of height: HeightChangeMethod0 { movecost = 15 heightdelta = 1 dist = 2 startheight = ground_level medium_level_flight canattack = false } HeightChangeMethod0 It must not happen that there are several methods to change a units height in the same direction. The following example is NOT valid: HeightChangeMethod0 { movecost = 15 heightdelta = 1 dist = 2 startheight = ground_level medium_level_flight canattack = false } HeightChangeMethod0 HeightChangeMethod1 { movecost = 15 heightdelta = 1 dist = 0 startheight = medium_level_flight canattack = false } HeightChangeMethod1 because the unit would have two HeightChangeMethods for ascending from medium_level_flight. It is of course perfectly legal to have one method for ascending from medium_level_flight and another one for descending from medium_level_flight. You should avoid giving a height change method a lower movecost than dist*10. If the unit could travel two fields by changing its height and use only 15 movement points, the path finding algorithm would travel by constantly changing the unit's height because that is the shortest way (shorter even than bee-line) to move from one field to another. There is one exception: if the unit is changing from one height where it is really slow to another where it is significantly faster, it can be ok. Just check out if the movement algorithm makes unnecessary height changes. If it does, increase the movement cost of the height change operation. Last change: Wed, 2003-02-19 7:29 | ||
Defining Packages Since version 2.3.76.2 ASC supports the formal definition of Packages. The package is defined in an .asctxt file. Example: package { Name = MyPackage Description = This is the package containing the MyCoolUnitset. Website: www.MyCool.stuff A package has a version number, description and dependencies. This information is embedded in savegames and .ascpbm files and is checked when such a file is loaded. If a package is missing on the computer where a .ascpbm file is opened, the package description will be displayed. That's why it is recommended to have an URL in the package description where to obtain the package. The self-dependency (MyPackage depending on MyPackage) serves to ensure that the users opening an .ascpbm have a well defined version of the package. In this example, if a users tries to open an .ascpbm file but he has only MyPackage version 1.2 installed, he will be presented a message telling him to obtain version 1.3 of MyPackage. ASC automatically detects which packages are used by a given map and only embedd them into files. In order to detect which package the artifacts of a map belong to, it is essential that the package file is located in the same .ascdat file as the artifacts. Unlike other .asctxt files, it is not possible to have the package description in the asc directory as an independant file. It must be packaged into an .ascdat file! ASC offers a menu entry Debug/show packages used by map with which you can check from which packages the artifacts on a map are from. This is the information that will be embedded in file when they are saved. Last change: Sun, 2009-11-01 13:08 | ||
Translating ASC maps For many years, ASC has only supported a single language. The program itself was in English, while maps where either English or German. With version 2.3.74.2 , ASC now supports internationalization for maps. Identifying languageASC uses the same system for naming languages as the LANG environment variable. en_US is US-English de_DE is german, and so on. Translating MapsMessage events usually store their message directly in the event (so called 'Immediate Message Event'). This text is stored inside the .map file and then (while playing) inside the .sav file. Getting the .map or the .sav file is all you need to play that game. The messages that are stored directly in the file have a given language. All map creators should specify the language that they type their messages in into the appropriate field of the Map Properties. To translate a message, you first need to get hold of the message texts as raw text formats. Start the map editor, load the map, goto File/Preference and activate Save event message seperately. When you now save the map, a seperate file will be created. The tut000.map has as default language de_DE . When saving, a file tut000.map.de_DE will be created, containing all the message. If you now want to create an english translation, rename the file tut000.map.de_DE to tut000.map.en_US and translate its content. When you setup ASC to use the language en_US (either in game options or ASC detects that automatically) and you load tut000.map , ASC will look for tut000.map.en_US, find it and load the translated messages. All further savegames of that map will now have the english messages, regardless if you switch to another language will playing this map.
Last change: Thu, 2013-06-13 18:50 | ||
Specifying Unit- and Building production capabilities Both units and buildings can produce units internally (that is, as cargo). Additionally, units can also construct units externally (that is, on a field next to the producing unit). Internal productionFeatures = Vehicle_Production Construction { VehiclesInternally = 1-3;7 } Construction This defines a factory with production lines for the VehicleTypes with id 1, 2, 3 and 7. If you want to prevent the option to add or remove production lines of the factory, add NoProductionCustomization to Features. The production cost is specified in the produced unit's definition. But the factory can modify the production cost by specifying a production efficiency: Features = Vehicle_Production Construction { VehiclesInternally = 1-3;7 ProductionEfficiency = [ 1.5 0 0 0 1.5 0 0 0 1.5 ] } Construction This example make production 50% more expansive in this factory. If you want to produce inside a unit that doesn't have any energy supply, you can use this method to convert to different resources: ProductionEfficiency = [ 0 0 2 0 1 0 0 0 1 ]In this example, no energy is used for production, but for each energy unit specified as production cost, the factory will use 2 units of fuel. External productionFeatures = construct_vehicles Construction { Vehicles = 17 } Construction Related thingsYou can add the Produce_Units_that_cannot_leave tag to the features of the factory, which results that you can produce units that will not be able to directly leave the factory. This allows for example an orbiting mothership to produce tanks, which can only be moved out by putting them into a landing craft. Ammo_Production is another feature that is highly useful for factories, to avoid the hassle of manually supplying the newly produced units with ammo.
Last change: Thu, 2008-01-10 10:57 | ||
Formatting texts Many texts in ASC can be formatted, for example ingame-messages, unit description, messages from Events and many others. The formatting is done by inserting tags into the text. The following tags are available:
There are also some more tags being evaluated to render old legacy texts, so you may find them in existing texts, but since they should not be used for new one they are not listed here.
Last change: Sun, 2007-01-14 2:15 | ||
BuildingType and VehicleType functions in ASC2 The abilities of units and buildings have been merged in ASC2. This means, that most functions are available both for units and buildings, unit can for example setup production lines and produce units, or do research! ASC1 had the following ASCTXT entries:
These can still be used for compatibility reasons, but to use the new features of ASC2, these entries must be removed and replaced by
You can EITHER use the old tags ("Functions", "Abilities") or the new tags ("Features"), but you can't mix them! Available tags are: "Training_Facility", "Vehicle_Production", "Ammo_Production", "Repair_Facility", "Recycling", "Research", "Sonar", "satelliteview", "mineview", "Wind_Power_Plant", "Solar_Power_Plant", "Matter_Converter", "Mining_Station", "Produce_Units_that_cannot_leave", "ResourceSink", "ExternalEnergyTransfer", "ExternalMaterialTransfer", "ExternalFuelTransfer", "ExternalAmmoTransfer", "ExternalRepair", "NoObjectChaining", // only for buildings and has only optical effects. Prevents hidden buildings from being detected by looking at nearby roads / pipelines / ... "Selfdestruct_at_conquer", "paratrooper", "mine_layer", "cruiserlanding", "conquer_buildings", "move_after_attack", "construct_vehicles", "construct_specific_buildings", "icebreaker", "no_midair_refuel", "leaves_tracks", "automatic_resource_searching", "no_reactionfire", "self_repairing", "Kamikaze_only", "immune_to_mines", "jam_only_own_field", "MoveDuringReactionFire", "onlyTransMove" , "AutoHarvestObjects", "NoProductionCustomization", "ManualSelfDestruct" You can also check the definitive list of tags in the source code
Last change: Sun, 2008-01-06 5:41 | ||
creating terrain types TerrainTypes are defined through .ASCTXT files, just like most other data used in ASC. Here are two examples .ASCTXT terrain files. Example1:
Example2: TerrainType { Name = SomeName ID = 12346 Weather = dry much_snow dry { UseGFXpics = false Picture = filename.png DefenseBonus = 0 AttackBonus = 0 BasicJamming = 0 MoveMalus = 11 TerrainProperties = Lowland Track_possible } dry much_snow { UseGFXpics = false Picture = filename_snow.png DefenseBonus = 0 AttackBonus = 0 BasicJamming = 0 MoveMalus = 13 TerrainProperties = Lowland Track_possible } much_snow } TerrainType Values for Weather: Weather = { "dry", "light_rain", "heavy_rain", "few_snow", "much_snow", "snow_and_ice" }; Last change: Tue, 2005-02-08 11:54 | ||
Gimp Anleitung
Transparenzen mit Gimp 2.x
Die Dateierweiterung muss hier unbedingt .png lauten (9). Auf diesem Wege werden die Transparenzen mit gespeichert. Der nachfolgende Dialog zeigt noch Informationen über Kompression u.ä. die uns jetzt aber mal nicht interessieren sollten. Last change: Sun, 2005-01-23 8:30 | ||
Defining the user interface The graphical user interface (GUI) of ASC consists of two kinds of objects: windows and panels. A window has exclusive control over the input devices, while a Panel can be open while the player plays on the map. PanelsThe panels are composed of widgets, which are defined in .ascgui files. These files have the syntax of .asctxt files, but don't support the kind of inheritance used for example for vehicle types. Their content is also not cached, but parsed every time a panel is opened, which allows to edit the .ascgui files in a running ASC session and see the results by closing and reopening the panel.
As you can see, Widgets can be nested arbitrarily. The widget CHILD inherits its properties from PARENT. A child can not be larger than the parent on the screen, it's not possible to make a widget that overlaps the border of its parent. General Widget Properties
The following properties are inherited through all widgets. If a property is not specified, the property's value of the widget's parent is used. Because of this inheritance, you often don't need to specify properties at all for a widget.
Widget TypesImage
StaticTextDisplays text which is defined right in the .ascgui file.
TextOutputDisplays text which will be provided by ASC. This widget is only useful together with appropriate program code inside ASC.
BarGraphSimilar to an Area, but its fill ranges from 0% to 100% from left to right. This widget is only useful together with appropriate program code inside ASC.
You can define different colors for different ranges: colors= 3 color0 { color = 0x009c00 fraction = 1 } color0 color1 { color = 0xfff000 fraction = 0.3 } color1 color2 { color = 0xd6000f fraction = 0.1 } color2 SpecialDisplayThis widget is only useful together with appropriate program code inside ASC. It is used to display non-standard things like the small map or the wind direction arrow.
AreaDisplays rectangular border in 3D style
ListBoxDisplays box where the user can select items from a list. The items can not be specified in the .ascgui file, but can only be provided programmatically by ASC
SpecialInputThis widget is only useful together with appropriate program code inside ASC. A SpecialInput widget is used to start actions when the user clicks on it. Since this widget itself is invisible, it must be used together with some visible widget.
DummyThis widget does nothing and is used to structure other widgets. Example (also demonstrates unnamed widgets by specifying "widgetNum = 3" instead of "childWidgets = Name1 Name2 Name3"): widget0 { x = 10 y = 10 width = 20 height = 44 type = Dummy By using the Dummy widget, you can group the 3 TextOutput widgets. You can now change their font settings with a single entry. And since the coordinate are relative, you can move the whole column around and change their width by just changing the coordinates of the dummy widget. MultiLineTextDisplays a bigger amount of text. If the text doesn't fit into the widgets, a vertical scrollbar will be displayed for scrolling the text.
ScrollAreaRepresents a area in which other widgets can be placed. If the widget coordinates don't fit into ScrollArea, ScrollBars are displayed for scrolling in ScrollArea.ButtonA simple button which can be pushed
RadioButtonA RadioButton which can be selected or not. All RadioButtons of a parent widget act as a RadioButton group, so that only one of the RadioButtons can be selected at one. If you want more than one RadioButton group, put them into different dummy widgets.
CheckBoxA simple checkbox.
LineEditA single-line text input field
SliderA simple button which can be pushed
PlainA simple, uniformly colored area
General Advice
Last change: Mon, 2009-06-01 10:44 | ||
Building functions The following building functions are available:
Last change: Sun, 2004-12-05 13:57 | ||
creating unit, building and object graphics When creating your own units graphics the file graphic templates/hexfield.pcx should be used as a template, for buildings graphic templates/building_raster.pcx. These files are located in the editor package of ASC. The unit should fit into the hexagon. ASC will not crash if the unit is larger, but you might get ugly graphical artifacts and the units will overlap.
32 Bit graphics32 bit graphics in PNG format with 8 bit alpha channel is the recommended graphics format for ASC2 and later. For changing the colors of units and buildings, the following colors are reserved (R/G/B): 1/0/0 2/0/0 : : 255/0/0 255/1/1 255/2/2 : : 255/254/254 These pure red colors will be exchanged to the colors of the owner of a building or unit. If you need a red that is not changed, just increase the blue or greed component by one, which is nearly indistinguishable from the original color. 8 Bit graphicsThe colors 16 - 23 (red colortone) will be shifted depending on the player who owns the vehicle. For the second player these colors will be shifted to 24 - 31 and so on. The color #255 is transparent so fill the remaining hexagon with this color when finished.
Last change: Sat, 2006-12-09 5:51 | ||
Importieren von Battle-Isle-Karten (Linux) Importieren von Battle-Isle-Karten über Karteneditor Voraussetzungen: Natürlich sollte, da die Karten gezippt geliefert werden, auch unzip (>=5.41), ark oä. vorhanden sein. Diese Dateien nach ~/.asc kopieren. Anschließend soviele BI-Karten besorgen, wie man will; die Zip-Archive ebenfalls nach ~/.asc kopieren und dort entpacken. Sodann den Karteneditor starten, Menü erscheint bei Druck auf [Alt] oder durch Berühren des oberen Randes mit der Maus - eine gewisse Wartezeit, bis eine Leerkarte erscheint, ist normal. Viel Spaß! Last change: Fri, 2003-09-19 5:38 | ||
Specifying which terrain can be accessed by units, objects and buildings A field has a number of terrain properties. See the source for a list of all properties. The terrain properties of a field are the properties of the terraintype and all objects on that field. A unit / building / object has 4 variables for specifying when the field is accessible and when not:
Last change: Wed, 2003-04-02 12:45 | ||
Semantics of ASCTXT files The syntax of ASCTXT files is documented in Article 33. ASCTXT files support inheritance: vehicletype { name = tank ID = 10 armor = 500 view = 40 jamming = 5 ... } vehicletype This defines two units, a "tank" (which must have all definitions that are required for a vehicletype, indicated by the dots), and a "heavy tank" which is derived from "tank". The "heavy tank" inherits all properties of its parent unit except Name, ID, and Armor. Modifying propertiesProperties can not only be replaced, they can be modified too: vehicletype { name = super heavy tank ID = 12 parent = 10 armor += 220 } vehicletype The "super heavy tank" will have an armor of 720. Another operator is *= which multiplies a variable: vehicletype { name = mega tank ID = 13 parent = 12 armor *= 1.2 } vehicletype The "mega tank" inherits from "super heavy tank" and has 1.2 times the armor, which is 864. Abstract parentsvehicletype { name = A1 ID = 20 view = 10 abstract = true } vehicletype You will never find the unit A1 in ASC nor the mapeditor, because A1 is NOT a unit. It is an abstract base class which only provides data to derived units. If you derive all ships from A1, you can easily modify the view of all ships just by modifying A1. If you decide after some testing that your ships should have a 10% increase in view, just modify A1 to have a view of 11. Multiple inheritancevehicletype { name = trooper ID = 30 view = 20 ... } vehicletype The "reconnaissance trooper" inherits from two base classes. The first one has precedence over the second one. This results in the "reconnaissance trooper" having all properties of the basic trooper except view, which is defined in the "binocular package". Defining aliasTerrainType { dry { Picture = grass.pcx ... } dry much_snow { Picture = snow.pcx ... } much_snow snow_and_ice { Picture -> TerrainType.much_snow.picture ... } ... } TerrainType This terrain will use the same picture for snow_and_ice as for much_snow. It is necessary that you specify the fully qualified property name, include the TerrainType. prefix ! The alias can reference ANY property: TerrainType { grass_image = grass.pcx water_image = water.pcx mud_image = mud1.pcx another_mud_image = mud2.pcx snow_image = snow.pcx abstract = true id = 100 } TerrainType The alias-all operatorWhile the alias operator -> operates only on a single property, the alias-all operator ->* operates on a group of properties:TerrainType { dry { Picture = grass.pcx ... } dry much_snow { Picture = snow.pcx movemalus = 15 TerrainProperties = deep_snow track_possible ... } much_snow snow_and_ice ->* TerrainType.much_snow ... } TerrainType This all properties of the much_snow group will be copied into the snow_and_ice group. Existing properties will not be replaced, as is shown in this example: vehicletype { name = weapon definitions ID = 100 abstract = true big_ground_to_ground_missile { Type = ground_missile shootable shotFrom = ground_level MaxRange = 42 MinRange = 18 Punch@MaxRange = 60 Punch@MinRange = 70 ... } ground_to_ground_missile small_ground_to_ground_missile { Type = ground_missile shootable shotFrom = ground_level MaxRange = 10 MinRange = 10 Punch@MaxRange = 40 Punch@MinRange = 50 ... } small_ground_to_ground_missile } vehicletype This unit has two weapon systems. The first one has all properties of the big_ground_to_ground_missile defined in the abstract weapon definition. The second one is based on the small_ground_to_ground_missile , but uses a different MaxRange: 20 instead of 10.
Last change: Tue, 2003-04-01 9:37 | ||
Defining Unit Sets You can group several vehicles together to form a unitset. In the mapeditor, you can enable and disable unitsets to make the selection of units easier. You can also define transformations that replace all units on a map by others. This is useful if you want to play a map with a different unit set than the one that is originally used by the map. To define a unit set, you must create a unitset definition file, which is a plain text file with the extension .set . I suggest that you put all vehicles together with this unitset definition file into a single data container. Here is an example for a unitset definition file:
The first line must always be #V2#. This is to tell ASC that this is the second revision of the unitset definition file format. It is still possible to use the files with the old format, but if you create a new one use this new format. Each of the following lines starts with a keyword, which must be UPPERCASE, an equals sign and some data. The order in which the properties are defined is not relevant.
Last change: Mon, 2004-08-02 14:46 | ||
specifying unit sounds A unit has three events which play sounds: movement, firing weapon and destruction. ASC has two methods for specifying these unit sounds. Individual SoundsHere is an example of a unit having individual sounds: vehicletype { ... MovementSound = someFile.wav KillSound = scream.wav Weapons { Weapon0 { Sound = shoot.wav ... } weapon0 ... } Weapons } vehicletype
Generic SoundsIt is possible to have define the sounds for whole groups of units. This is done in the file sounds.asctxt A simple example is: shoot.cruisemissile.files = weapon00.wav This causes the file weapon00.wav to be played when a cruise missile is fired. It is possible to define more than one sound file:
shoot.cannon.files = weapon07.wav weapon07b.wav If a cannon is fired, weapon07.wav will be played. But some units may specify that their cannon should play weapon07b.wav . This is done by adding Sound = very_big_cannon to the weapon definition. The Sound is the same entry as the one where a filename for an individual sound is specified. The distinction between fileName and soundLabels is done by looking for a dot (.) in the entry. If there is a dot, the entry is treated as filename; if there is no dot, it's a label. These alternative sounds can also be specified for unit movement ( MovementSound = sound_label in vehicletype ) and the kill sounds ( KillSound = sound_label in vehicletype ). Since ASC 2.0 it is possible to have a special beginning sound, which is useful for unit movement: move.light_aircraft.files = enginestart.wav:move_jet.wav First the enginestart.wav will be played, once this is finished the sound move_jet.wav will be played and looped until the unit movement is finished. Also new in ASC 2.0 is the usage of height specific sounds. The level of height on which the unit started its movement will be used for the whole movement operation. Just use these names as labels for unit sounds: "deep_submerged", "submerged", "floating", "ground_level", "low_level_flight", "medium_level_flight", "high_level_flight", "orbit" .
Sound FormatsIn ASC2 the sound files can be in many different formats, with WAV, MP3, OGG and FLAC being the most common ones. The usage of OGG is strongly recommended, as it is as space efficient as MP3, but works on all systems, which MP3 does not (some Linux distributions don't come with an MP3 decoder by default to avoid its license fees). Last change: Mon, 2006-08-14 5:38 | ||
Setting up music To change the music that ASC plays, place a file music1.asctxt in your primary ASC directory and specifiy the files there. ASC can play MP3, OGG, Midi and various tracker formats like MOD, S3M and others. The default file looks like this: playlist { Name = Not used at the moment tracks = music/*.mp3 } playlist If you also want to play MOD files for example (located in the music directory), change the file into playlist { Name = Not used at the moment tracks = music/*.mp3 music/*.mod } playlist ASC uses the SMPEG library for playing MP3 files, which apparently can not decode MP3 files with variable bitrate. Last change: Thu, 2003-05-08 12:56 | ||
Specifying the transportation/storage abilities of buildings and units The term 'container' refers to both buildings and units and will be used throughout this article, which both behave absolutely identical. The term 'unit' always refers to the unit that is going to be transfered into or out of a container. This is an example of the Transportation Variables: Transportation { MaxLoadableUnits = 32 MaxLoadableUnitSize = 200 MaxLoadableMass = 1000000 CategoriesNOT = light_aircraft medium_aircraft EntranceSystemNum = 2 EntranceSystem0 { Mode = In Out Docking UnitHeightAbs = ground_level UnitHeightRel = -100 ContainerHeight = ground_level CategoriesNOT = DockingHeightAbs = ground_level DockingHeightRel = -100 } EntranceSystem0 EntranceSystem1 { Mode = Out ContatinerHeight = low_level_flight UnitHeightAbs = ground_level RequireUnitFunction = paratrooper CategoriesNOT = DisableAttack = true MoveCost = 12 } EntranceSystem1 } Transportation If there is no transportation group, the container can not carry any units.
Last change: Thu, 2004-10-28 12:50 | ||
Bedeutung der AI-Parameter im Karteneditor Diese AI-Parameter sind noch nicht so 100% ausgereift. Das sind die Variablen, mit denen die KI intern die Einheiten verwaltet. In welchem Maße die KI auf manuelle Vorgaben dieser Werte reagiert muss ich selbst noch ausprobieren.... Da können also möglicherweise noch Bugs sein. Aber in dem Maße, in dem die Campaign Fortschritte macht, werde ich diesen Bereich auch testen, auftretende Fehler beheben und evt. ein paar Funktionen erweitern. Task sind kurzfristige Aufgaben, Jobs sind Lebensaufgaben. Wenn die KI einen Panzer auf mit einem Algol auftanken will und dafür mit dem Algol 3 Felder zum Panzer fahren muss, dann ist "Supply" der Job und "move" der Task. Move ist eigentlich der einzige sinnvolle Task, den man im Karteneditor vorgeben kann. Zielkoordinaten werden für task move ausgewertet. X/Y ist klar, Z ist die Höhe ( 0 .. 7 ), NWID ist die interne Einheitenidentifikation. Damit kann man erreichen, dass die eine Einheit immer in Richtung einer anderen Einheit fährt, auch wenn letztere sich bewegt. Die NWID lässt sich im Karteneditor bei Info/TerrainInformation unter "Vehicle Information / Internal Identification" anzeigen. Jobs: Build wird noch nicht benutzt Recon: Die Einheit wird ausschließlich zum Spähen / Stören eingesetzt Guard: Bewachen. Ob das jetzt schon funktioniert weiß ich nicht, ich werde es aber demnächst zum laufen bringen, weil für die Campaign benötigt. Details dann. Value / Added Value. Jede Einheit wird von der KI hinsichtlich ihrer Gefährlichkeit bewertet. Mit Value kann man diese Bewertung überschreiben. Eigentlich nie notwendig. AddedValue schon eher: Stell Dir vor, in einer Mission gehts darum, den Oberkommandieren in einem Auto spazierenzufahren. Die Einheit darf nicht abgeschossen werden. Wird nun bei Added Value bei dieser ein hoher Werte eingetragen , wird nun aber die KI versuchen, genau diese Einheit anzugreifen. In ASC kann man mit F8 die KI-Informationen anzeigen lassen (eine Funktion, die für die Allgemeinheit eher uninteressant ist, deshalb undokumentiert). Dort kann man den Value sehen. Added-Value sollte mit dieser Größenordnung korrespondieren. Die KI Parameter beziehen sich immer auf einen Spieler. Falls auf einer Karte mehrere KI-Spieler sind arbeiten die vollkommen unabhängig voneinander. Falls nur eine KI auf der Karte ist und die blau ist, müssen die AI-Parameter für Spieler 1 ( = blau) eingestellt werden. Im Beispiel mit dem Oberkommandieren: Wenn der in einem roten Auto sitzt, aber von der blauen KI angegriffen werden soll, muss auch hier der AddedValue bei den Ai-Parametern für Spieler 1 stehen. So, ich hoffe mal, einen ersten Überblick vermitteln zu können... Last change: Sun, 2003-02-09 15:12 | ||
Using map transformation The mapeditor has the abilitiy to run map transformations. These can be used to exchange objects and terrain. Map transformation tables have the syntax of normal .ASCTXT files, but have a different name: .ASCMAPXLAT . All .ASCTXT files are loaded at program start so it is not possible to alter the data while the program is running. But the map transformation files are reloaded each time you run a transformation. The syntax of a map transformation file is:
Last change: Sat, 2011-02-05 10:36 | ||
Tricks zum Erstellen von Gebäude- und Fahrzeuggrafiken ASC verwendet die Palette. die im Bild ascpalette.gif dargestellt ist. Wie mat sieht, existieren dort zwei rote Farbverläufe sowie noch ein weiterer, einzelner Rotton. Für die Eigentümer-Markierung der Gebäude werden die Farben des ersten Farbverlaufs entsprechend verschoben, also durch die Farben des blauen verlaufs für den zweiten Spieler, dem gelben Verlauf für den 3. Spieler usw. ersetzt. Die Spielermarkierung muß ausschließlich diese Farben des ersten rot-Verlaufs verwenden. Wenn mat nun ein Truecolor-Gebäude hat und das auf diese Palette konvertierst, schert sich das Bildbearbeitungsprogramm einen Dreck darum, von welcher Position es jetzt die Rottöne nimmt. Es nimmt ein paar aus dem ersten Verlauf, ein paar aus dem zweiten Verlauf, mit dem Ergebnis, daß beim blauen Spieler immer noch rote Pixel drin sind (nämlich die, die eine Farbe aus dem zweiten Rotverlauf haben). Um nun ein Gebäude erfolgreich so zu konvertieren, daß es mit den Rottönen passt, muß man die Palette modifizieren, wie im Bild asc-building-palette.gif dargestellt. Alle Rottöne außer dem ersten Verlauf wurden eliminiert. Jetzt bleibt dem Bildbearbeitungsprogramm nichts anderes übrig, als diese und nur diese Rottöne zu verwenden. Die beiden GIF-Bilder dienen ausschließlich der Demonstration, welche Palette die im detail enthalten weiß ich nicht, auf jeden Fall nicht die ASC-Palette (sind schließlich Screenshots). Hier ist auch noch ein Gebäude, das nun diese modifizierte Palette auch tatsächlich verwendet. ASC ist es folkommen egal, welche Palette jetzt genau in der PCX-Datei vorhanden ist. Es nimmt bei 8-Bit Bilder prinzipiell seine eigene an, es ist also kein Problem, PCX-Bilder mit der modifizierten Palette einzubinden.
Last change: Sat, 2003-02-01 9:20 | ||
Definition des Vernetzungsverhaltens von Objekten
BorderFür Objekttypen gibt es einen neuen Eintrag namens "NetBehaviour". Dieser kann keine, eine oder mehrerer der folgenden Schlüsselworte beinhalten:
Bedeutung sollte bei den meisten Fällen klar sein. AutoBorder ist z.B. für Straßen und Schienen, die in möglichst grader Linie in den Kartenrand laufen sollen. NetToBorder ist für Wald, der sich flächig mit dem Rand verbinden soll. Der alte Eintrag "NoSelfChaining" wird zwar nachwievor ausgewertet, wenn er vorhanden ist. Aber beim Neuerstellen oder editieren existierender Objekte sollte wenn möglich auf das neue System umgestellt werden.. Nets of objectsSome objects like roads or pipelines connect automatically to each other to form a net instead of staying as independent graphics. Such an object must have 64 different graphics. If it is symetrically the number can be reduced by flipping the picture to 24 different images.But the object must contain all 64 images. The position of each is determined by the sides that connect to another object. Each side has a number: These number are than added. This picture for example has to be used on position 1 + 4 + 16 = 21 . Note that the first picture is #0 and the last #63 .
Last change: Sat, 2004-05-29 15:03 | ||
creating item selection filters for the mapeditor Items like VehicleTypes, ObjectTypes, BuildingTypes and TerrainTypes can be selected through lists in the mapeditor. To make selection easier, you can restrict the displaying of these items through filters, for example to display only VehicleTypes that belong to a certain UnitSet. These filters are defined by .ASCTXT files and have the following form: itemfilter { Vehicles = 0 1 2 3 4 Buildings = 0-4 Objects = 2000-4999 5000-5005 Terrain = name = This is the name of the filter activated = true } itemfilter An activated filter will inhibit the selectability of the items it covers. The activated variable specifies the status of the filter after the editor has been started. Last change: Sat, 2003-02-01 8:46 | ||
creating building graphics The following template can be used for designing buildings:
This is the maximum size that a building can have in ASC. The coordinates of the fields have to be entered in the building definition file. If the building is constructed in several stages, you have to specify one image for each construction stage. These images have to be in the same file, but at different coordinates. The first image is at coordinates x=0/y=0 (just like above image), the second image starts at x=500/y=0 ; the third one at x=1000/y=0 and so on. If a building is destroyed, it can leave rubble objects behind. This is done by adding: RubbleObjects = true Rubble { A1 = 123 A2 = 234 [...] } to the building definition file. For each field of the building specify its coordinate and the ID of the object that will appear when the building is destroyed. These objects are just ordinary objects.
Last change: Thu, 2010-06-03 20:43 | ||
syntax of .ASCTXT files Many of the data ASC uses is stored in .ASCTXT files. These are simple text files which you edit with any decent text editor. Since some of the existing files may have unix line ending convention, the standard Windows editor Notepad is not a good choice (you can try it, but if you see garbage you know what's wrong...). UltraEdit is a nice editor, but it is shareware. Related links:
All ASCTXT have the following syntax: TypeName { ... } TypeName Typename is for example VehicleType, BuildingType, ObjectType or others. In the TypeName block can be assignments and comments: VehicleType { name = trooper ; this is a comment } VechicleType An Assignment can cover more than one line, this is useful for long texts: VehicleType { description = [ This is a long description. It covers several lines, and ends with a square bracket ] } VechicleType The assignments are often grouped in blocks: VehicleType { Tank { Energy = 0 Material = 0 fuel = 1610 } Tank } VechicleType You could also write: VehicleType { Tank.Energy = 0 Tank.Material = 0 Tank.fuel = 1610 } VechicleType which is exactly the same, but the first variant is usually easier to read.
Last change: Wed, 2003-04-02 11:41 | ||
terrain properties The following terrain properties are sorted by their carrying capacity:
If a terrain should be inaccessible to all units (except airplanes), just don't set any bit. Last change: Wed, 2003-04-02 11:52 | ||
parametrise Resource capabilitiies of buildings in editors For a introduction to resource management, see Article 22 BI Resource ModeThe amount of resources that is produced every turn has to be set in the map editor when designing the map and is not affected by anything else. Any building can produce any amount of resources. The maximum storage capacity is defined in the building type file and should usually be extremely high, to be practically infinite.
ASC Resource ModeThe ASC Resource Mode is much more complex. There is no global pool for any resource. Every transfer between buildings has to be done with pipelines. There are several different building functions that are resource related, which are defined for the building type:
It is not possible to combine several of these functions in one building type. Solar power plants produce resources without consuming any other, usually (but not necessarily) energy. The amount of produced resources is the maxplus setting of the building multiplied with a factor for the weather. This factor is 100% for clear weather, 50% for rain, 25% for heavy rain, 75% for snow and 37.5% for much snow. Wind power plants produce resources without consuming any other, usually (but not necessarily) energy. The amount of produced resources is the maxplus setting of the building multiplied with the power of the wind. At the max wind power of 255 it produces 100% of energy. Mining stations extract resources from the ground around their entrance, field-by-field. Since only material and fuel can be stored in the ground only these can be extracted. With increasing distance from the entrance the amount of extracted resources per turn gets less and less. The bars on the left side of the mineral resources page in the buildings window shows this. The maximum distance to extract resources from is 10 fields. Mining stations sometimes consume other resources in order to operate. The resources they consume is set in the mapeditor in the plus field as negative values. If this resource is unavailable, the station cannot fulfill its task. If the resource is available, but you want to conserve it, you can adjust resource consumption in the mining dialog. Of course, setting lower rate of consumption results in reduced output. The efficiency ( = resources_stored * 1024 / extracted_resources ) is specified there also. The higher the efficiency, the less resources are extracted from the ground to produce a given output. Default value for effeciency should be 1024. You can find some additional notes about mining stations at the end of this text. Matter converters use one kind of resources to produce another. You can build quite a variety of different converters. Power plants consume fuel to produce energy, a fusion power plant could use material for this. A refinery could convert material to fuel. It is also possible to produce two resources out of one, or vice versa cosume two resources to produce one. Like mining stations the resources that are beeing produced are defined by using positive values in the various plus fields, while resources that are consumed are identified by negative values. The maxplus field of the building type defines the upper limits. In the mapeditor the limits for the buildings may be decreased by settings the maxplus fields there. The plus field defines the initial production rate which can be changed in the game on the appropriate page of the building window.
Notes on miningThe relative amount of resources that is still in the ground is displayed in the right graph of the "mineral resources" page in the mining station. If every field of the ring that has a given distance contains the maximum possible resources, the bars have maximum height. Since there are more fields at a far distance, the absolute amount of resources in the greater distances is usually much greater. This is indicated by the single lines which display the absolute amount of resources. Note that the bars and the lines are differently scaled. You can search mineral resources with some units, the radius for the search is specified in the vehicle type. There are two functions a unit can have: "drill for mineral resources manually" and "search for mineral resources automatically". The mining stations can see the mineral resources to and at their current mining position too. In the mapeditor the pull-down menu Global / Toggle Resource View toggles the way in which resources are displayed on the map:
ASC internalsThe following variables exist to describe the resource system. Unless otherwise noted they all contain fields for each of the three resources: energy, material and fuel.Building type(defined in .asctxt file) Building instance (set by mapeditor): Each field on the map: The map itself Last change: Mon, 2003-01-27 14:04 | ||
Richtlinien für die Campaign-Entwicklung Die Karten der Campaign sollen zusammenhängend sein. Dies sei am Beispiel Karte2 + 3 beschrieben: In Karte zwei erobert man ein Hauptquartier am rechten Rand der Karte mit einigen Gebäuden drumherum. In Level 3 ist genau dieses HQ mit den gleichen Gebäuden, Objekten und Bodentypen am linken Rand wiederzufinden. Dies erreicht man am einfachsten dadurch, dass man sich die vorherige Karte in den Editor einläd, diese mit "Resize Map" entsprechend abschneidet und am anderen Ende erweitert. Es gibt bis auf weiteres nur zwei Parteien: Der menschliche Spieler Rot sowie der Gegner Blau. Das Spiel sollte schließlich Amerikaner-Kompatibel sein: Es gibt nur Gut und Böse. Und der Spieler ist natürlich per Definitionem der Gute. Die Hauptvorstoßrichtung ist am Anfang von Westen nach Osten. Natürlich kann davon in Grenzen abgewichen werden, mal einen Abstecher nach Süden oder so; aber eine Umkehrung der Vorstoßrichtung sollte gut begründet werden können. Natürlich kann sich diese Vorstoßrichtung im Laufe der Campaign ändern, insbesondere wenn man auf einer anderen Insel / Kontinent gelandet ist. Aber wichtig ist, dass der Spieler ein Gefühl für einen "Vorstoß" erhält und die Karten nicht kreuz und quer gehen. Für die Wahrung eines einheitlichen Aussehens bitte für Grafik und Objekte soweit möglich die ASC2 Grafik nutzen, nicht die Grafiken aus der ASC.GFX. Letztere lassen sich durch Anwählen des "GFX graphic system" Filters ausblenden. Die Entwicklung einer neuen Campaign-Karte sollte, solange ich die Planung mache, in mehreren Schritten erfolgen, nach denen eine Rückmeldung mit den anderen an der Campaign-Entwicklung beteiligten Personen stattfindet: Der jeweils aktuelle Stand der Karten ist HIER verzeichnet: Beim Erstellen neuer Karten bitte darauf achten, dass die aktuelle Version der vorhergehenden Karte als Anschluß-Karte genutzt wird! Einzelne ASC-Funktionen und Elemente werden der Reihe nach in der Campaign eingeführt und anschließend verwendet. Jede Karte sollte irgendetwas neues gegenüber den vorhergehenden Karten bieten. Noch nicht verwendete Features:
Zur Generierung von Namen, z.B. für Missions-Briefings oder Gebäude, kann der Fantasy Name Generator verwendet werden.
Last change: Sun, 2003-06-22 16:39 | ||
Objekttypen: Wertebereich für Feldmodifikatoren Zur Veränderung der Werte Attackbonus, Defensebonus und Jamming gibt je zwei Variablen: *_abs und *_plus. *_abs ersetzen den borhanden Wert, *_plus modifizeren ihn. Wenn *_plus verwendet wird muss *_abs = -1 sein. Alle Werte werden zum Nenner 8 angegeben. Ein Defensebonus von 8 hat also die gleiche Wirkung wie eine Verdoppelung der Panzerung. Bei *_plus sind negative uneingeschränkt möglich. Jamming_abs darf (abgesehen vom Sonderfall -1) keine negativen Werte annehmen, was auch keinen Sinn machen würde. Bei Attack/DefenseBonus sind negative Werte erlaubt, wobei -1 der bereits erwähnte Sonderfall ist. Sinnvolle negative Werte sind also -2 bis -7 . Kleinere Werte als -7 sind nicht erlaubt und machen auch keinen Sinn, da dadurch die Angriffs- bzw. Verteidigungswerte <= 0 würden. Ein DefenseBonus von -6 hat die Gleichung Wirkung wie eine Reduzierung der Panzerung um 75%. Last change: Sun, 2003-01-26 8:30 | ||
how to decompress the data files The ASC data containers (*.CON) are compressed archives which can be decompressed with a tool that comes with ASC. The Windows-Version is called DEMOUNT.EXE and is part of the editor package, the unix version is called asc_demount and is compiled and installed together with ASC itself. If you are familiar working on the command line, you just need to know that when you run demount datafile.con it extracts all files to the current directory. For Windows users who are not familiar with working on the command line, here's are the steps to extract a data file:
If you get an error message that a DLL file (for example SDL.DLL) could not be found, you can either:
Last change: Thu, 2003-07-24 3:55 |