Merge branch 'master' into Controls

Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
Controls
David Dormagen 2015-09-02 08:19:34 +02:00
commit ac738735b2
373 changed files with 8405 additions and 5231 deletions

View File

@ -372,6 +372,7 @@ set(OC_CLONK_SOURCES
src/lib/StdMeshLoaderBinaryChunks.h
src/lib/StdMeshLoaderBinary.cpp
src/lib/StdMeshLoaderDataStream.h
src/lib/StdMeshLoader.cpp
src/lib/StdMeshLoader.h
src/lib/StdMeshLoaderXml.cpp
src/lib/StdMeshMaterial.cpp
@ -465,10 +466,14 @@ set(OC_CLONK_SOURCES
src/platform/C4SoundLoaders.cpp
src/platform/C4SoundLoaders.h
src/platform/C4SoundIncludes.h
src/platform/C4SoundInstance.cpp
src/platform/C4SoundInstance.h
src/platform/C4SoundModifiers.cpp
src/platform/C4SoundModifiers.h
src/platform/C4SoundSystem.cpp
src/platform/C4SoundSystem.h
src/platform/C4TimeMilliseconds.cpp
src/platform/C4TimeMilliseconds.h
src/platform/C4TimeMilliseconds.h
src/platform/C4StdInProc.cpp
src/platform/C4StdInProc.h
src/platform/C4Video.cpp

View File

@ -1,14 +1,16 @@
Clonk Trademark License
'Clonk' is a registered trademark of Matthes Bender. It may be used within
software products which are using source code from the OpenClonk project
with the following limitations:
software products which are using source code or game content as made public
on the Clonk website (or derived from such) with the following limitations:
If the word 'Clonk' is used as the name of anything in your software product
then you must include the following notice in a suitable place (e.g. credits
screen): "Clonk" is a registered trademark of Matthes Bender.
screen): 'Clonk' is a registered trademark of Matthes Bender.
If the title of your software product contains the word 'Clonk' then you must
prefix the word with an added name of your choosing, e.g. 'MyClonk' or
'PortableClonk' and you must subtitle your project with the term 'An OpenClonk
project'.
PREFIX the word with an added name of your choosing, e.g. 'MyClonk' or
'PortableClonk' and you must include the trademark notice above in a suitable
place (e.g. credits screen or splash screen).
If you are making your source code or game content available to other parties
in a way which allows adaptation you must include a copy of this license along
with any other applicable licenses.

View File

@ -14,6 +14,7 @@
# This module chooses an audio provider for use in OpenClonk.
macro(__FINDAUDIO_FINDOPENAL)
set(HAVE_ALEXT FALSE)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND AND NOT(APPLE))
pkg_check_modules(OpenAL "openal>=1.13")
@ -23,6 +24,8 @@ macro(__FINDAUDIO_FINDOPENAL)
# of directories that pkg_check_modules returned, and if not, add it to
# the include path.
if (OpenAL_FOUND)
# OpenAL pkg-config data always includes alext.h
set(HAVE_ALEXT TRUE)
find_path(__findaudio_al_h NAMES al.h PATHS ${OpenAL_INCLUDE_DIRS})
if (NOT __findaudio_al_h)
find_path(__findaudio_al_h NAMES al.h PATHS ${OpenAL_INCLUDE_DIRS} PATH_SUFFIXES OpenAL AL)
@ -37,7 +40,16 @@ macro(__FINDAUDIO_FINDOPENAL)
pkg_check_modules(OggVorbis "vorbisfile>=1.3.2" "vorbis>=1.3.2" "ogg>=1.2.2")
else()
if(MSVC OR APPLE)
find_path(OpenAL_INCLUDE_DIRS al.h PATH_SUFFIXES include/AL include/OpenAL include OpenAL)
# We need OpenAL preferably with alext.h.
find_path(OpenALExt_INCLUDE_DIRS alext.h PATH_SUFFIXES include/AL include/OpenAL include OpenAL)
if(OpenALExt_INCLUDE_DIRS)
set(HAVE_ALEXT TRUE)
set(OpenAL_INCLUDE_DIRS ${OpenALExt_INCLUDE_DIRS})
else()
set(HAVE_ALEXT FALSE)
# Maybe only al.h can be found without alext.h?
find_path(OpenAL_INCLUDE_DIRS al.h PATH_SUFFIXES include/AL include/OpenAL include OpenAL)
endif()
find_path(Vorbis_INCLUDE_DIRS vorbis/codec.h vorbis/vorbisfile.h PATH_SUFFIXES include)
find_library(Ogg_LIBRARY NAMES libogg_static libogg ogg)
find_library(Vorbis_LIBRARY NAMES libvorbis_static libvorbis vorbis)
@ -92,6 +104,9 @@ else()
if(OpenAL_FOUND AND Alut_FOUND AND OggVorbis_FOUND)
# Prefer OpenAL
set(Audio_TK "OpenAL")
if (NOT HAVE_ALEXT)
message(STATUS "Warning: Found OpenAL but no extensions (alext.h). Sound modifiers will be disabled.")
endif()
elseif(SDLMixer_FOUND)
set(Audio_TK "SDL_Mixer")
elseif(FMOD_FOUND)

View File

@ -194,3 +194,6 @@
#define AUDIO_TK_FMOD 2
#define AUDIO_TK_SDL_MIXER 3
#define AUDIO_TK AUDIO_TK_${Audio_TK_UPPER}
/* Include OpenAL extensions (alext.h) for sound modifiers */
#cmakedefine HAVE_ALEXT 1

View File

@ -114,6 +114,12 @@
<li><emlink href="script/GUI.html">Script GUIs</emlink></li>
<li><emlink href="script/GetXXVal.html">Querying Game Data</emlink></li>
<li><emlink href="script/ScriptPlayers.html">Script Players</emlink></li>
<li><emlink href="script/SoundModifiers.html">Sound Modifiers</emlink></li>
<li>Libraries
<ul>
<text><emlink href="script/Shape.html">Shape</emlink></text>
</ul>
</li>
<!-- Insert Functions here -->
</ul>
</li>

View File

@ -11,13 +11,14 @@
<dl>
<dt id="TexMaptxt"><img height="16" src="../../images/icon_text.png" width="16"/>TexMap.txt</dt>
<dd>
<text>Lookup table for color indices in static and dynamic landscapes. Colors 0-127 are matched to a material-texture-reference. Colors 128-255 are matched to the same list of references only these are marked 'underground'.</text>
<text>The engine will draw materials with a higher index above those with a lower index so that, e.g. using the standard table, rough chunks of earth will overlap water which has a smooth border. Mineral resources have an even higher index so that their rough border overlaps the earth and not the other way around. This is also the reason why there might be differing numbers of total pixels of a given material drawn than you might expect just from calculating the square sizes of the unzoomed map materials.</text>
<text>Lookup table for color indices in static and dynamic landscapes. Colors 0-255 are matched to a material-texture-reference, except in Map.bmp static landscapes, where colors 0-127 are matched to a material-texture reference, and 128-255 are matched to the same list of references, except they are marked 'underground'.</text>
<text>Each line may contain one material-texture-entry in the format Index=Material-Texture. For example, 12=Earth-earth-topsoil would define color index 12 as earth material with the texture taken from a file called earth-topsoil.png.</text>
<text>The engine will draw materials in the order they are defined in the TexMap file, irrespective of assigned palette indices. Materials drawn late overwrite materials drawn early so that, e.g. using the standard table, rough chunks of earth will overlap water which has a smooth border. Mineral resources have an even higher index so that their rough border overlaps the earth and not the other way around. For this reason, there might be differing numbers of total pixels of a given material drawn than you might expect just from calculating the square sizes of the unzoomed map materials.</text>
<text>If a custom map fails with the message 'texture n undefined' you should define the specified texture in the TexMap. You should always use a paint program capable of editing indexed color palettes without modifying the palette (MS Paint is not suited for this).</text>
</dd>
<dt id="ocm"><img height="16" src="../../images/icon_material.png" width="16"/><emlink href="material/ocm.html">*.ocm</emlink></dt>
<dd>
<text>The engine will accept up to 125 material definitions at a time. OCM files a simple text files. The materials Vehicle, Tunnel, Water, Snow, Granite, Sand, and Earth must always be available.</text>
<text>The engine will accept up to 252 material definitions at a time. OCM files a simple text files. The materials Vehicle, Tunnel, Water, Snow, Granite, Sand, and Earth must always be available.</text>
</dd>
<dt id="bmp"><img height="16" src="../../images/icon_image.png" width="16"/>*.png</dt>
<dd>

View File

@ -22,6 +22,10 @@
<dd>
<text>Static landscapes are stretched by factor MapZoom defined in Scenario.txt to the size of the actual landscape in the game. The colors used in Map.bmp correspond to materials and textures as defined in <emlink href="material/index.html#TexMaptxt">TexMap.txt</emlink>.</text>
</dd>
<dt id="MapFgBg"><img height="16" src="../../images/icon_image.png" width="16"/>MapFg.bmp / MapBg.bmp</dt>
<dd>
<text>Same as Map.bmp as defined above, except that foreground and background materials can be drawn separately. In Map.bmp, color indices greater than 127 will result in underground materials. In MapFg.bmp and MapBg.bmp, all color indices up to 255 can be used, and undergroup materials are simply specified by tunnel material in the background map.</text>
</dd>
<dt id="Landscapetxt"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/MapCreatorS2.html">Landscape.txt</emlink></dt>
<dd>
<text>Advanced scenario designers can use this component to define highly complex, fully random generated dynamic landscapes. This does require certain mathematical skill and some patience, however.</text>
@ -103,11 +107,6 @@ US:Attack of the Killer Wipfs</code>
<h id="SaveGames">Additional files created for saved games or scenarios</h>
<dl>
<dt id="Landscapepng"><img height="16" src="../../images/icon_image.png" width="16"/>Landscape.png</dt>
<dd>
<text>Full size map for exact landscapes. This is mainly used in savegames to store the exact terrain including transparent materials and their texture. Exact landscapes consume an extreme amount of memory and should not be used for regularly distributed scenarios.</text>
</dd>
<dt id="MatMaptxt"><img height="16" src="../../images/icon_text.png" width="16"/>MatMap.txt</dt>
<dd>
<text>Stores the material table used in this scenario. The materials listed here are used by the exact landscape and have to be available in the loaded Material.ocg group.</text>

View File

@ -390,13 +390,18 @@ Blit({Algo=MAPALGO_Scale, OffX=Wdt/2, X=-100, Op=copy_layer});
<row>
<col>Sky</col>
<col>Sky</col>
<col>Draws a sky material. Within the map generator, explicit sky is drawn as IFT (0x80), which is converted to index zero on map drawing. That way, sky can be blitted to other layers without being transparent.</col>
<col>Draws a sky material. Within the map generator, explicit sky is drawn as index 0xff, which is converted to index zero on map drawing. That way, sky can be blitted to other layers without being transparent.</col>
</row>
<row>
<col>Transparent</col>
<col>Transparent</col>
<col>Draws with index 0.</col>
</row>
<row>
<col>FgMatTex:BgMatTex</col>
<col>Water:Tunnel-brickback</col>
<col>Draws with a specified background material. In the example, draws water which, when drained, exposes bricks instead of tunnel behind it. FgMatTex and BgMatTex can be any of the other specifications in this table, except the ones prefixed with ^. However, the specification FgMatTex:Sky is equivalent to ^FgMatTex.</col>
</row>
</table>
</text>
<h>Material-texture masks (string mask_spec)</h>
@ -421,7 +426,7 @@ Blit({Algo=MAPALGO_Scale, OffX=Wdt/2, X=-100, Op=copy_layer});
<row>
<col>Sky</col>
<col>Sky</col>
<col>True for explicit sky material (0x80) only. Not true for transaprent (0) pixels.</col>
<col>True for explicit sky material (0xff) only. Not true for transaprent (0) pixels.</col>
</row>
<row>
<col>Transparent</col>
@ -446,7 +451,7 @@ Blit({Algo=MAPALGO_Scale, OffX=Wdt/2, X=-100, Op=copy_layer});
<row>
<col>*</col>
<col>*</col>
<col>True for all materials.</col>
<col>True for all materials, including sky.</col>
</row>
<row>
<col>^Definition</col>
@ -483,10 +488,16 @@ Blit({Algo=MAPALGO_Scale, OffX=Wdt/2, X=-100, Op=copy_layer});
<text>Recreates the calling layer or map surface in the given size. All contents are deleted and the layer is filled with zeroes. Use functions Duplicate and Blit to backup and restore any old layer contents if you want to extent the map without losing its contents. Returns true on success.</text>
<text><code>proplist Duplicate(any mask_spec, array rect);</code></text>
<text>Creates a new layer with the same size and surface contents as this layer. If a rect is given, the new layer is smaller and contains only the portion included in rect. If mask_spec is given, only pixels passing the mask are set and all other pixels in the new layer are zero.</text>
<text><code>int GetDefaultBackgroundIndex(any col);</code></text>
<text>Returns the material-texture index of the default background color of the given color. It may be given either as string (mattex) or palette index.</text>
<text><code>int GetMaterialTextureIndex(string mattex);</code></text>
<text>Returns the material-texture index of the given string. Can be either "Sky", "Transparent", a material name, or a material-texture combination.</text>
<text><code>int GetPixel(int x, int y);</code></text>
<text>Gets the pixel color at the given position in this layer. If x,y is outside the layer, zero is returned.</text>
<text><code>bool SetPixel(int x, int y, any new_color);</code></text>
<text>Sets the pixel at position x,y in this layer to new_color. Color may be given as string (mattex) or palette index. Returns true on success.</text>
<text><code>int GetBackPixel(int x, int y);</code></text>
<text>Gets the pixel color of the background material at the given position in this layer. If x,y is outside the layer, zero is returned.</text>
<text><code>bool SetPixel(int x, int y, any new_fg, any new_bg);</code></text>
<text>Sets the pixel and the background pixel at position x,y in this layer to new_fg and new_bg, respectively. Color may be given as string (mattex) or palette index. Use nil to keep foreground or background unchanged. Returns true on success.</text>
<text><code>int GetPixelCount(any mask_spec, array rect);</code></text>
<text>Returns number of pixels on this layer or map within rect that fulfill mask_spec.</text>
<text><code>bool FindPosition(proplist out_pos, mask_spec, array rect, int max_tries);</code></text>

View File

@ -0,0 +1,338 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
<title>Sound modifiers</title>
<h>Sound modifiers</h>
<part>
<h>Usage</h>
<text>A number of different sound modifiers can be attached to sounds. Sound modifiers are accessed via script by passing a prop list defining them to the <funclink>Sound</funclink> script functions. Sample prop lists are already defined in the Ambience definition in Objects.ocd. If Objects.ocd is loaded, you can for example play the "Ding" sound with a reverb-effect:</text>
<code>Sound("Ding",,,,,,,Ambience.CaveModifier);</code>
<text>Custom modifiers may also be created using the prototype classes provided in the ambience object:</text>
<code>// Play "Ding" sound with an extra-long reverb modifier
long_reverb_modifier = new Ambience.SoundModifier {
Type = C4SMT_Reverb,
Reverb_Decay_Time = 10000,
};
Sound("Ding",,,,,,,long_reverb_modifier);
modifier->Release();</code>
<text>Sound modifiers are lazy-initialized, that is the filters are computed when the first sound with that effect is played. The engine also holds filters of any used modifiers attached to the used prop list in memory until released by the Release()-call provided by the ambience library, which wraps <funclink>ChangeSoundModifier</funclink> with appropriate parameters.</text>
<text>Since filter creation may cost some performance, it is recommended to create filter prop lists at round start and keep them for any effects. Please note that modifier lookup happens by prop list pointer only, not by its contents. Recreating and failing to release sound modifier prop lists therefore constitutes a memory-leak.</text>
<text>If sound modifiers are released, they are kept active until the last sound using them finishes. Note that for modifiers such as echo, this could still cut off sounds because the modifier outlasts the original sound (potentially forever for echo without decay).</text>
<text>Some existing modifiers may also be updated and updates reflected to the sounds played, even with those currently playing, by using the Update()-call such as in this example scenario script:</text>
<code>static reverb_modifier;
func Initialize()
{
// Play "Ding" sound repeatedly and modify reverb
reverb_modifier = new Ambience.SoundModifier {
Type = C4SMT_Echo,
Echo_Feedback = 1000,
};
Sound("Ding",,,,1,,,reverb_modifier);
ScheduleCall(nil, this.Timer, 30, 99999);
return true;
}
func Timer()
{
// Update effect every 30 frames
reverb_modifier.Echo_Feedback = Random(2) * 500;
reverb_modifier->Update();
return true;
}</code>
<text>Note that runtime updating does not work for the reverb modifier in the openal-soft library.</text>
<part>
<h>Global modifiers</h>
<text>Global modifiers can be set using the <funclink>SetGlobalSoundModifier</funclink> (see function documentation for example). These modifiers are applied to all sounds played in the viewport of a player or all players that do not have a modifier yet. Please note that it is not possible to combine multiple modifiers on a single sound.</text>
</part>
</part>
<part>
<h>Property reference</h>
<text>The effect is selected from the Type-property, which may have the following values:</text>
<table>
<rowh>
<col>Constant</col>
<col>Effect</col>
</rowh>
<row>
<col>C4SMT_Reverb</col>
<col>Reverb effect caused by sound bouncing off walls in enclosed spaces.</col>
</row>
<row>
<col>C4SMT_Echo</col>
<col>Sound repeat as caused by loud sounds reflected in very large spaces.</col>
</row>
<row>
<col>C4SMT_Equalizer</col>
<col>Custom amplification of up to four definable frequency bands. Note: When running with OpenAL soft, only supported with version 1.16 or above (not shipped by default).</col>
</row>
</table>
<text>Each modifier has a number of parameters. These consult to standard parameters for the OpenAL EFX library by dividing all given integer values by 1000 to yield float values.</text>
<part><h>Reverb modifier</h>
<table>
<rowh>
<col>Property</col>
<col>Type</col>
<col>Default</col>
<col>Minmum</col>
<col>Maximum</col>
<col>Remarks</col>
</rowh>
<row>
<col>Reverb_Density</col>
<col>int</col>
<col>1000</col>
<col>0</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Reverb_Diffusion</col>
<col>int</col>
<col>1000</col>
<col>0</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Reverb_Gain</col>
<col>int</col>
<col>316</col>
<col>0</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Reverb_GainHF</col>
<col>int</col>
<col>1000</col>
<col>0</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Reverb_Decay_Time</col>
<col>int</col>
<col>2910</col>
<col>100</col>
<col>20000</col>
<col></col>
</row>
<row>
<col>Reverb_Decay_HFRatio</col>
<col>int</col>
<col>1300</col>
<col>100</col>
<col>20000</col>
<col></col>
</row>
<row>
<col>Reverb_Reflections_Gain</col>
<col>int</col>
<col>500</col>
<col>0</col>
<col>3160</col>
<col></col>
</row>
<row>
<col>Reverb_Reflections_Delay</col>
<col>int</col>
<col>15</col>
<col>0</col>
<col>300</col>
<col></col>
</row>
<row>
<col>Reverb_Late_Reverb_Gain</col>
<col>int</col>
<col>706</col>
<col>0</col>
<col>10000</col>
<col></col>
</row>
<row>
<col>Reverb_Late_Reverb_Delay</col>
<col>int</col>
<col>22</col>
<col>0</col>
<col>100</col>
<col></col>
</row>
<row>
<col>Reverb_Air_Absorption_GainHF</col>
<col>int</col>
<col>994</col>
<col>892</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Reverb_Room_Rolloff_Factor</col>
<col>int</col>
<col>0</col>
<col>0</col>
<col>10000</col>
<col></col>
</row>
<row>
<col>Reverb_Decay_HFLimit</col>
<col>bool</col>
<col>true</col>
<col></col>
<col></col>
<col></col>
</row>
</table>
</part>
<part><h>Echo modifier</h>
<table>
<rowh>
<col>Property</col>
<col>Type</col>
<col>Default</col>
<col>Minmum</col>
<col>Maximum</col>
<col>Description</col>
</rowh>
<row>
<col>Echo_Delay</col>
<col>int</col>
<col>100</col>
<col>0</col>
<col>207</col>
<col>Time delay for first, centered echo.</col>
</row>
<row>
<col>Echo_LRDelay</col>
<col>int</col>
<col>100</col>
<col>0</col>
<col>404</col>
<col>Time delay for secondary, panning echo.</col>
</row>
<row>
<col>Echo_Damping</col>
<col>int</col>
<col>500</col>
<col>0</col>
<col>990</col>
<col>Amount of high-frequency damping.</col>
</row>
<row>
<col>Echo_Feedback</col>
<col>int</col>
<col>500</col>
<col>0</col>
<col>1000</col>
<col>Amount of original signal fed into the echo. A value of 1000 would lead to an infinite echo.</col>
</row>
<row>
<col>Echo_Spread</col>
<col>int</col>
<col>-1000</col>
<col>-1000</col>
<col>+1000</col>
<col>Controls the amount of panning left and right, with the sign determining if the first jump is left or right. A value of zero means no echo panning.</col>
</row>
</table>
</part>
<part><h>Equalizer modifier</h>
<table>
<rowh>
<col>Property</col>
<col>Type</col>
<col>Default</col>
<col>Minmum</col>
<col>Maximum</col>
<col>Remarks</col>
</rowh>
<row>
<col>Equalizer_Low_Gain</col>
<col>int</col>
<col>1000</col>
<col>126</col>
<col>7943</col>
<col></col>
</row>
<row>
<col>Equalizer_Low_Cutoff</col>
<col>int</col>
<col>200000</col>
<col>50000</col>
<col>800000</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid1_Gain</col>
<col>int</col>
<col>1000</col>
<col>126</col>
<col>7943</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid1_Center</col>
<col>int</col>
<col>500000</col>
<col>200000</col>
<col>3000000</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid1_Width</col>
<col>int</col>
<col>1000</col>
<col>10</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid2_Gain</col>
<col>int</col>
<col>1000</col>
<col>126</col>
<col>7943</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid2_Center</col>
<col>int</col>
<col>3000000</col>
<col>1000000</col>
<col>8000000</col>
<col></col>
</row>
<row>
<col>Equalizer_Mid2_Width</col>
<col>int</col>
<col>1000</col>
<col>10</col>
<col>1000</col>
<col></col>
</row>
<row>
<col>Equalizer_High_Gain</col>
<col>int</col>
<col>1000</col>
<col>126</col>
<col>7943</col>
<col></col>
</row>
<row>
<col>Equalizer_High_Cutoff</col>
<col>int</col>
<col>6000000</col>
<col>4000000</col>
<col>16000000</col>
<col></col>
</row>
</table>
</part>
</part>
<author>Sven2</author><date>2015-07</date>
</doc>

View File

@ -56,14 +56,14 @@
<desc>Y coordinate of the fourth corner. Always global.</desc>
</param>
<param>
<type>bool</type>
<name>sub</name>
<desc>If <code>true</code>, the material will be drawn as 'underground'.</desc>
<type>any</type>
<name>szBkgMat</name>
<desc>One of the symbolic constants <code>DMQ_Sky</code>, <code>DMQ_Sub</code> or <code>DMQ_Bridge</code>, or a material texture combination. Specifies the background material of the chunk drawn. If <code>DMQ_Sky</code>, the material will be drawn with sky background. If <code>DMQ_Sub</code>, the material will be drawn with the default underground material as background. If <code>DMQ_Bridge</code>, the material will be drawn only over layers of equal or lower density, and the background material remains unchanged. If this is a string, the specified material-texture combination is used as background material. The background material is the material that a pixel is replaced with when it is digged away or blasted free.</desc>
</param>
</params>
</syntax>
<desc>Draws a four-cornered polygon of the specified material and texture into the landscape.</desc>
<remark>The corners of the polygon should be specified in clockwise order and polygon boundaries should not intersect. For more complex or concave shapes you make multiple calls to this function.</remark>
<remark>The corners of the polygon should be specified in clockwise order and polygon boundaries should not intersect. For more complex or concave shapes you can make multiple calls to this function.</remark>
<examples>
<example>
<code>DrawMaterialQuad(&quot;Gold-gold&quot;, 0,0, <funclink>LandscapeWidth</funclink>()-1,0, <funclink>LandscapeWidth</funclink>()-1,<funclink>LandscapeHeight</funclink>()-1, 0,<funclink>LandscapeHeight</funclink>()-1);</code>
@ -75,4 +75,5 @@
</related>
</func>
<author>Sven2</author><date>2002-05</date>
<author>Clonk-Karl</author><date>2015-07</date>
</funcs>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetBackMaterial</title>
<category>Landscape</category>
<subcat>Material</subcat>
<version>7.0 OC</version>
<syntax>
<rtype>int</rtype>
<params>
<param>
<type>int</type>
<name>x</name>
<desc>X coordinate at which to check the background material. Offset in local calls.</desc>
</param>
<param>
<type>int</type>
<name>y</name>
<desc>Y coordinate at which to check the background material. Offset in local calls.</desc>
</param>
</params>
</syntax>
<desc>Determines the background material type at the specified position in the landscape. Returns a material index which can be used for comparison e.g. with <funclink>Material</funclink>. For sky background the function returns -1. The background material is the material that a pixel is replaced with when it is digged away or blasted free.</desc>
<remark>This functions only processes static materials - moving material pixels such as rain or snow are not evaluated.</remark>
<examples>
<example>
<code><funclink>if</funclink>(GetMaterial(0, 0) == <funclink>Material</funclink>(&quot;Water&quot;) &amp;&amp; <funclink>GetBackMaterial</funclink>(0, 0) == <funclink>Material</funclink>(&quot;Water&quot;)) <funclink>Message</funclink>(&quot;I am in a neverending stream of water!&quot;);</code>
<text>Part of a clonk script: if the clonk is swimming in water that is replaced with water when it flows away, a message is displayed.</text>
</example>
</examples>
<related>
<funclink>GetMaterial</funclink>
<funclink>Material</funclink>
<funclink>GBackSolid</funclink>
<funclink>GBackLiquid</funclink>
<funclink>InsertMaterial</funclink>
</related>
</func>
<author>Clonk-Karl</author><date>2015-07</date>
</funcs>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetBackTexture</title>
<category>Landscape</category>
<subcat>Material</subcat>
<version>7.0 OC</version>
<syntax>
<rtype>string</rtype>
<params>
<param>
<type>int</type>
<name>x</name>
<desc>X coordinate at which to check the background texture. Offset in local calls.</desc>
</param>
<param>
<type>int</type>
<name>y</name>
<desc>Y coordinate at which to check the background texture. Offset in local calls.</desc>
</param>
</params>
</syntax>
<desc>Returns the name of the texture used for the background material at the given position. The background material is the material that a pixel is replaced with when it is digged away or blasted free.</desc>
<examples>See <funclink>GetTexture</funclink>.</examples>
<related>
<funclink>GetTexture</funclink>
<funclink>GetAverageTextureColor</funclink>
</related>
</func>
<date>2015-07</date>
</funcs>

View File

@ -33,6 +33,7 @@
</examples>
<related>
<funclink>Material</funclink>
<funclink>GetBackMaterial</funclink>
<funclink>GBackSolid</funclink>
<funclink>GBackLiquid</funclink>
<funclink>InsertMaterial</funclink>

View File

@ -37,6 +37,7 @@
</example>
</examples>
<related>
<funclink>GetBackTexture</funclink>
<funclink>GetAverageTextureColor</funclink>
</related>
</func>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>SetGlobalSoundModifier</title>
<category>Effects</category>
<subcat>Sound</subcat>
<version>7.0 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>proplist</type>
<name>name</name>
<desc>Modifier to be applied to all sounds.</desc>
</param>
<param>
<type>int</type>
<name>player</name>
<desc>If non-nil: Modifier is applied to sounds played in viewports owned by this player.</desc>
<optional />
</param>
</params>
</syntax>
<desc>Sets a <emlink href="script/SoundModifiers.html">sound modifier</emlink> to be applied to all sounds played that do not have a modifier already set.</desc>
<remark>Modifier precendence from highest to lowest is:
<ul><li>Modifier given as parameter to <funclink>Sound</funclink> or <funclink>SoundAt</funclink></li>
<li>Modifier assigned to the player owning the viewport which has its center closest to the sound source</li>
<li>Global modifier (as set by SetGlobalSoundModifier(modifier, nil);)</li></ul>
Only one modifier is applied at the time. It is not possible to combine multiple modifiers.</remark>
<examples>
<example>
<code>func Timer()
{
// Is there a player?
var player = <funclink>GetPlayerByIndex</funclink>(0, C4PT_User);
if (player >= 0)
{
// Is the player controlling a clonk in a cave?
var mod = nil;
var clonk = <funclink>GetCursor</funclink>(player);
if (clonk) if (clonk-><funclink>GetMaterial</funclink>() == <funclink>Material</funclink>("Tunnel"))
{
// Controlled clonk is in a cave - do some cave sounds!
mod = Ambience.CaveModifier;
}
SetGlobalSoundModifier(mod, player);
}
}</code>
<text>Scenario timer script: When this function is called, it sets a cave reverb sound modifier whenever the clonk of the first player is in front of tunnel background.</text>
</example>
</examples>
<related><funclink>Sound</funclink>
<funclink>SoundAt</funclink>
<emlink href="script/SoundModifiers.html">Sound modifiers</emlink></related>
</func>
<author>Sven2</author><date>2015-08</date>
</funcs>

View File

@ -45,9 +45,22 @@
<desc>The further away the sound effect from the player, the more quiet it is played. By default, the sound will not be hearable anymore in a distance of 700 pixels. A custom distance can be specified here.</desc>
<optional />
</param>
<param>
<type>int</type>
<name>pitch</name>
<desc>Pitch modification between -90 and 1000. Values larger than zero let the sound play the faster and at a higher pitch. The resulting speed multiplication factor is (pitch + 100) / 100.</desc>
<optional />
</param>
<param>
<type>proplist</type>
<name>modifier</name>
<desc>Sound modifier for special effects such as reverb or echo. See <emlink href="script/SoundModifiers.html">Sound modifiers</emlink>.</desc>
<optional />
</param>
</params>
</syntax>
<desc>Plays a sound. The specified sound file has to be available in the group Sound.ocg, in the active scenario file, or in any loaded object definition. The audibility of object local sounds will depend on the position of the object relative to the visible viewports.</desc>
<remark>When a sound effect is already played in the same context (calling object or globally), it is not played again. Instead, only the volume and pitch parameters are updated. This feature can be used to adjust sound parameters live e.g. to tune the pitch of a motor sound based on its speed.</remark>
<examples>
<example>
<code><funclink>FindObject</funclink>(<funclink>Find_ID</funclink>(WindGenerator))-&gt;Sound(&quot;Fanfare&quot;, false, 50);</code>
@ -56,6 +69,7 @@
</examples>
<related><funclink>SoundAt</funclink></related>
<related><funclink>Music</funclink></related>
<related><emlink href="script/SoundModifiers.html">Sound modifiers</emlink></related>
</func>
<author>Sven2</author><date>2002-08</date>
</funcs>

View File

@ -43,11 +43,24 @@
<desc>The further away the sound effect from the player, the more quiet it is played. By default, the sound will not be hearable anymore in a distance of 700 pixels. A custom distance can be specified here.</desc>
<optional />
</param>
<param>
<type>int</type>
<name>pitch</name>
<desc>Pitch modification between -90 and 1000. Values larger than zero let the sound play the faster and at a higher pitch. The resulting speed multiplication factor is (pitch + 100) / 100.</desc>
<optional />
</param>
<param>
<type>proplist</type>
<name>modifier</name>
<desc>Sound modifier for special effects such as reverb or echo. See <emlink href="script/SoundModifiers.html">Sound modifiers</emlink>.</desc>
<optional />
</param>
</params>
</syntax>
<desc>Plays a sound at the specified position. The specified sound file has to be available in the group Sound.ocg, in the active scenario file, or in any loaded object definition.</desc>
<related><funclink>Sound</funclink></related>
<related><funclink>Music</funclink></related>
<related><emlink href="script/SoundModifiers.html">Sound modifiers</emlink></related>
</func>
<author>Sven2</author><date>2002-08</date>
</funcs>

View File

@ -46,6 +46,7 @@
<text><emlink href="script/Effects.html">Effects</emlink></text>
<text><emlink href="script/GetXXVal.html">Querying Game Data</emlink></text>
<text><emlink href="script/ScriptPlayers.html">Script Player (i.e. AI player)</emlink></text>
<text><emlink href="script/SoundModifiers.html">Sound modifiers</emlink></text>
<h id="Infos">Libraries</h>
<text><emlink href="script/Shape.html">Shape</emlink></text>
</part>

View File

@ -240,21 +240,6 @@ public func DrawConnections(connections)
/*-- Helper Functions --*/
// Draws some material inside an island.
public func DrawMaterial(string mat, proplist onto_mask, int speck_size, int ratio)
{
if (!speck_size)
speck_size = 4;
if (!ratio)
ratio = 15;
// Use random checker algorithm to draw patches of the material.
var rnd_checker = {Algo = MAPALGO_RndChecker, Ratio = ratio, Wdt = speck_size, Hgt = speck_size};
rnd_checker = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = rnd_checker};
var algo = {Algo = MAPALGO_And, Op = [onto_mask, rnd_checker]};
Draw(mat, algo);
return;
}
public func DrawVariations(string mat, int ratio, int sx, int sy)
{
var rand_algo = {Algo=MAPALGO_RndChecker, Ratio = ratio, Wdt = sx, Hgt = sy};

View File

@ -235,6 +235,10 @@ private func InitLorries()
// Objects which are only in one eighth of the lorries.
if (!Random(8))
lorry->CreateContents(IronBomb, RandomX(1, 2));
if (!Random(8))
lorry->CreateContents(Lantern, RandomX(1, 2));
if (!Random(8))
lorry->CreateContents(SmokeBomb, RandomX(1, 2));
if (!Random(8))
lorry->CreateContents(WallKit, 1);
if (!Random(8))
@ -256,6 +260,8 @@ private func InitLorries()
lorry->CreateContents(WindBag, 1);
lorry->CreateContents(GrenadeLauncher);
lorry->CreateContents(IronBomb, 4);
lorry->CreateContents(Lantern, 2);
lorry->CreateContents(SmokeBomb, 2);
}
return;
}

View File

@ -16,7 +16,7 @@ protected func Initialize()
// Mood.
SetSkyAdjust(RGBa(255, 255, 255, 127), RGB(255, 200, 150));
SetGamma(RGB(40, 35, 30), RGB(140, 135, 130), RGB(255, 250, 245));
SetGamma(109, 105, 101);
// Chests with weapons.
CreateObjectAbove(Chest, 230, 224, NO_OWNER)->MakeInvincible();

View File

@ -1,5 +0,0 @@
[DefCore]
id=Ambience
Version=6,0
Category=C4D_StaticBack | C4D_Rule
Picture=0,0,128,128

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,297 +0,0 @@
/**
Ambience
Controls sound and music depending on the environment the player is in
@author Sven2
*/
local exec_counter; // counter to distribute execution of players across frames
local last_environment; // array indexed by player number: pointer to environment the player was in last
local environments; // array of available environments for which it is checked if the player is in. sorted by priority.
// Initialization
protected func Initialize()
{
// Base environment
Environment = {
actions = [],
min_change_delay = 1,
min_initial_change_delay = 5,
AddSound = this.Env_AddSound,
AddAction = this.Env_AddAction,
SetMusic = this.Env_SetMusic
};
// Register default environments (overloadable)
this->InitializeEnvironments();
// Periodic execution of ambience events
last_environment = [];
AddTimer(this.Execute, 10);
return true;
}
func InitializeEnvironments()
{
// Register all standard environments
environments = [];
// Underwater: Clonk is swimming in water
var underwater = this.env_underwater = new Environment {};
underwater->SetMusic("underwater");
underwater.CheckPlayer = this.EnvCheck_Underwater;
AddEnvironment(underwater, 1400);
// City: Clonk is surrounded by buildings
var city = this.env_city = new Environment {};
city->SetMusic("city");
city.CheckPlayer = this.EnvCheck_City;
AddEnvironment(city, 1200);
// Lava: Lava material is nearby
var lava = this.env_lava = new Environment {};
lava->SetMusic("lava");
lava.CheckPlayer = this.EnvCheck_Lava;
lava.mat_mask = CreateArray(); // material mask for lava materials. +1 cuz sky.
lava.mat_mask[Material("Lava")+1] = true; // loop over materials and check incindiary instead? Whoever introduces the next lava type can do that...
lava.mat_mask[Material("DuroLava")+1] = true;
lava.min_change_delay = 3; // Easy to miss lava on search.
AddEnvironment(lava, 1000);
// Underground: Clonk in front of tunnel
var underground = this.env_underground = new Environment {};
underground->SetMusic("underground");
underground.CheckPlayer = this.EnvCheck_Underground;
AddEnvironment(underground, 800);
// Mountains: Overground and lots of rock around
var mountains = this.env_mountains = new Environment {};
mountains->SetMusic("mountains");
mountains.CheckPlayer = this.EnvCheck_Mountains;
mountains.mat_mask = CreateArray(); // material mask for mountain materials. +1 cuz sky.
mountains.mat_mask[Material("Rock")+1] = true;
mountains.mat_mask[Material("Granite")+1] = true;
mountains.mat_mask[Material("Ore")+1] = true;
mountains.mat_mask[Material("Gold")+1] = true;
mountains.min_change_delay = 3; // Pretty unstable condition
AddEnvironment(mountains, 600);
// Snow: It's snowing around the clonk
var snow = this.env_snow = new Environment {};
snow->SetMusic("snow");
snow.CheckPlayer = this.EnvCheck_Snow;
snow.min_change_delay = 6; // Persist a while after snowing stopped
snow.mat = Material("Snow");
AddEnvironment(snow, 400);
// Night: Sunlight blocked by planet
var night = this.env_night = new Environment {};
night->SetMusic("night");
night.CheckPlayer = this.EnvCheck_Night;
AddEnvironment(night, 200);
// Overground: Default environment
var overground = this.env_overground = new Environment {};
overground->SetMusic("overground");
overground.CheckPlayer = this.EnvCheck_Overground;
overground->AddSound("Ding", 100);
AddEnvironment(overground, 0);
return true;
}
private func Execute()
{
// Per-player execution every third timer (~.8 seconds)
var i=GetPlayerCount(C4PT_User);
exec_counter += !(i%3);
while (i--) if (!(++exec_counter % 3)) ExecutePlayer(GetPlayerByIndex(i, C4PT_User));
return true;
}
private func ExecutePlayer(int plr)
{
var cursor = GetCursor(plr);
// Determine environment the player is currently in
var environment = nil;
if (cursor)
{
var last_env = last_environment[plr];
var x = cursor->GetX(), y = cursor->GetY();
for (test_environment in environments)
{
if (environment = test_environment->CheckPlayer(cursor, x, y, test_environment == last_env))
{
// We've found a matchign environment.
// Was it a change? Then check delays first
if (test_environment != last_env)
{
if (last_env && last_env.no_change_delay)
{
// Environment should change but a delay is specified. Keep last environment for now.
--last_env.no_change_delay;
environment = last_env;
break;
}
// New environment and change delay has passed.
environment.no_change_delay = environment.min_initial_change_delay;
Log("%s environment: %s", GetPlayerName(plr), environment.music);
}
else
{
// Was no change: Reset change delays
environment.no_change_delay = Max(environment.no_change_delay, environment.min_change_delay);
}
break;
}
}
}
last_environment[plr] = environment;
if (!environment) return true;
// Music by environment
this->SetPlayList(environment.music, plr, true, 3000);
// Sounds and actions by environment
for (var action in environment.actions)
if (Random(1000) < action.chance)
cursor->Call(action.fn, action.par[0], action.par[1], action.par[2], action.par[3], action.par[4]);
return true;
}
func InitializePlayer(int plr)
{
// Newly joining players should have set playlist immediately (so they don't start playing a random song just to switch it immediately)
ExecutePlayer(plr);
return true;
}
func RemovePlayer(int plr)
{
// Ensure newly joining players don't check on another player's environment
last_environment[plr] = nil;
return true;
}
protected func Activate(int byplr)
{
MessageWindow(this.Description, byplr);
return true;
}
/* Environment functions */
func AddEnvironment(proplist new_env, priority)
{
if (GetType(priority)) new_env.Priority = priority;
this.environments[GetLength(environments)] = new_env;
SortArrayByProperty(this.environments, "Priority", true);
return true;
}
private func Env_AddSound(string snd_name, chance)
{
return Env_AddAction(Global.Sound, snd_name, chance ?? 50);
}
private func Env_AddAction(afn, par0, par1, par2, par3, par4)
{
return this.actions[GetLength(this.actions)] = { fn=afn, par=[par0, par1, par2, par3, par4] };
}
private func Env_SetMusic(string playlist)
{
this.music = playlist;
return true;
}
/* Default environment checks */
private func EnvCheck_Underwater(object cursor, int x, int y, bool is_current)
{
// Clonk should be swimming
if (cursor->GetProcedure() != "SWIM") return nil;
// For initial change, clonk should also be diving: Check for breath below 80%
// Use > instead of >= to ensure 0-breath-clonks can also get the environment
if (!is_current && cursor->GetBreath() > cursor.MaxBreath*4/5) return nil;
return this;
}
private func EnvCheck_City(object cursor, int x, int y, bool is_current)
{
// There must be buildings around the clonk
var building_count = cursor->ObjectCount(cursor->Find_AtRect(-180,-100,360,200), Find_Func("IsStructure"));
// 3 buildings to start the environment. Just 1 building to sustain it.
if (building_count < 3-2*is_current) return nil;
return this;
}
private func EnvCheck_Lava(object cursor, int x, int y, bool is_current)
{
// Check for lava pixels. First check if the last lava pixel we found is still in place.
var search_range;
if (is_current)
{
if (this.mat_mask[GetMaterial(this.last_x, this.last_y)+1])
if (Distance(this.last_x, this.last_y, x, y) < 140)
return this;
search_range = 140;
}
else
{
search_range = 70;
}
// Now search for lava in search range
var ang = Random(360);
for (; search_range >= 0; search_range -= 10)
{
ang += 200;
var x2 = x + Sin(ang, search_range);
var y2 = y + Cos(ang, search_range);
if (this.mat_mask[GetMaterial(x2, y2)+1])
{
// Lava found!
this.last_x = x2;
this.last_y = y2;
return this;
}
}
// No lava found
return nil;
}
private func EnvCheck_Underground(object cursor, int x, int y, bool is_current)
{
// Check for underground: No sky at cursor or above
if (GetMaterial(x,y)<0) return nil;
if (GetMaterial(x,y-30)<0) return nil;
if (GetMaterial(x-10,y-20)<0) return nil;
if (GetMaterial(x+10,y-20)<0) return nil;
return this;
}
private func EnvCheck_Mountains(object cursor, int x, int y, bool is_current)
{
// Check for mountains: Rock materials below
var num_rock;
for (var y2=0; y2<=45; y2+=15)
for (var x2=-75; x2<=75; x2+=15)
num_rock += this.mat_mask[GetMaterial(x+x2,y+y2)+1];
// need 15pts on first check; 5 to sustain
if (num_rock < 15-is_current*10) return nil;
return this;
}
private func EnvCheck_Snow(object cursor, int x, int y, bool is_current)
{
// Must be snowing from above
if (GetPXSCount(this.mat, x-300, y-200, 600, 300) < 20 - is_current*15) return nil;
return this;
}
private func EnvCheck_Night(object cursor, int x, int y, bool is_current)
{
// Night time.
var time = FindObject(Find_ID(Environment_Time));
if (!time || !time->IsNight()) return nil;
return this;
}
private func EnvCheck_Overground(object cursor, int x, int y, bool is_current)
{
// This is the fallback environment
return this;
}
/*-- Proplist --*/
local Name = "$Name$";
local Description = "$Description$";
local Environment;

View File

@ -1,15 +0,0 @@
[DefCore]
id=CrystalCommunicator
Version=6,0
Category=C4D_Structure
Width=90
Height=70
Offset=-45,-35
Vertices=2
VertexX=-40,40
VertexY=34,34
VertexFriction=100,100
Mass=300
Components=Ruby=6;Amethyst=6;Metal=6;
Rotate=0
Construction=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

View File

@ -1,357 +0,0 @@
/*--
Crystal communicator
Author: Sven2
Shining structure built from gems and metal
--*/
#include Library_Structure
local top_face, base_face;
public func IsCrystalCommunicator() { return !base_face; }
/* Construction */
public func SetConstructionSiteOverlay(object site, int dir, object stick, object component_obj)
{
// Play component-specific sound for adding stuff to the site
if (component_obj && !component_obj->GetDefFragile()) component_obj->~Hit();
// Construction site graphics by provided metal
var metal_completion = site->ContentsCount(Metal) * 3 / Max(GetComponent(Metal, nil, nil, this), 1);
site->SetGraphics(["Site0", "Site1", "Site2", nil][metal_completion], CrystalCommunicator, 1, GFXOV_MODE_Base);
site->SetGraphics(nil, nil, 2);
// Add graphics of contained gems
UpdateGemOverlays(site, [1, 3, 7, 12][metal_completion]);
return true;
}
public func DoConstructionEffects(object site)
{
// Grab all gems from site
GrabContents(site);
var metal;
while (metal = FindContents(Metal)) metal->RemoveObject();
// Site is done immediately
SetCon(100);
// Create TopFace overlay
top_face = CreateObjectAbove(GetID(),0,35,GetOwner());
top_face.Plane = this.Plane + 10;
top_face->SetGraphics("TopFace");
top_face->SetAction("Attach", this);
top_face.base_face = this;
// Transfer gem overlays
this.gem_overlays = site.gem_overlays;
UpdateGemOverlays(this, 13, true);
// Construction done. Remove site.
site->RemoveObject(site);
// Start finals effect
return true;
}
/* Gem overlays */
static const CrystalCommunicator_GemsX = [ 15,440,336,221,121,298,220, 50, 14,333,129, 77],
CrystalCommunicator_GemsY = [255, 75,100, 84, 44,107, 15,130,107,153,149,106],
CrystalCommunicator_GemsZ = [ 5, 3, 4, 0, 4, 0, 5, 2, 3, 1, 1, 4],
CrystalCommunicator_GemCount = 12;
private func UpdateGemOverlays(object obj, int max_overlays, bool refresh_existing)
{
// Add overlays for any gems that have not yet been added
var gem_overlay_index = 3;
if (!obj.gem_overlays) obj.gem_overlays = [];
var n_overlays = GetLength(obj.gem_overlays);
var i;
// Remove overlays of gems that have left
for (i=0; i<n_overlays; ++i)
if (!obj.gem_overlays[i] || obj.gem_overlays[i]->Contained() != obj)
{
obj->SetGraphics(nil, nil, gem_overlay_index+i);
if (obj.top_face) obj.top_face->SetGraphics(nil, nil, gem_overlay_index+i);
obj.gem_overlays[i] = nil;
}
// Add new overlays
for (var gem in FindObjects(Find_Container(obj), Find_Func("GetGemColor")))
{
// Already displayed?
i = GetIndexOf(obj.gem_overlays, gem);
if (i>=0)
{
if (!refresh_existing) continue;
}
else
{
// Find a spot for this gem
i = GetIndexOf(obj.gem_overlays, nil);
if (i<0) i=n_overlays;
// No free space?
if (i == max_overlays) if (refresh_existing) continue; else break;
}
// Add overlay
var gem_gfx = gem.graphics_index;
if (gem_gfx) gem_gfx = Format("%d", gem_gfx+1); else gem_gfx = nil;
var x = CrystalCommunicator_GemsX[i];
var y = CrystalCommunicator_GemsY[i];
var z = CrystalCommunicator_GemsZ[i];
var size = z*100+500;
var off_y;
if (obj == this) off_y = 35000; else off_y = 70000;
var gem_target;
if (obj.top_face && z>=3) gem_target = obj.top_face; else gem_target = obj;
gem_target->SetGraphics(gem_gfx, gem->GetID(), gem_overlay_index+i, GFXOV_MODE_Base);
gem_target->SetObjDrawTransform(size,0,x*200-45000, 0,size,y*200-off_y, gem_overlay_index+i);
if (z<3) gem_target->SetClrModulation(0xffb0b0b0, gem_overlay_index+i);
// Remember in list
obj.gem_overlays[i] = gem;
n_overlays = GetLength(obj.gem_overlays);
}
// Make sure a glitter effect is there
if (!GetEffect("IntGemGlitter", obj)) AddEffect("IntGemGlitter", obj, 1, 12, nil, CrystalCommunicator);
return true;
}
private func FxIntGemGlitterTimer(target)
{
// Glitter at random gem position
if (Random(2))
{
var i = Random(12), gem;
if (gem = target.gem_overlays[i])
{
var x = CrystalCommunicator_GemsX[i]/5 - 45;
var y = CrystalCommunicator_GemsY[i]/5 - 35;
if (target->GetID() == ConstructionSite) y -= 35;
var size = CrystalCommunicator_GemsZ[i]*4 + 10;
var sparkle_fx = GetEffect("Sparkle", gem);
sparkle_fx.Size = PV_KeyFrames(1, 0, 0, 500, size, 1000, 0); // modifying value directly in gem, assuming gem won't leave this structure any more
if (sparkle_fx && sparkle_fx.particles)
target->CreateParticle("MagicRing", x, y, 0, 0, size, sparkle_fx.particles, 1);
}
}
}
/* End sequence */
local ruby_particle, amethyst_particle, beam_particles, gem_particles;
local flash_particle, small_flash_particle, large_flash_particle;
local time;
local send_code, next_send_time, send_code_pos;
public func StartCommunication()
{
// forward to main object
if (base_face) return base_face->StartCommunication();
// Init particles
// Gem particles
beam_particles = CreateArray(CrystalCommunicator_GemCount);
gem_particles = CreateArray(CrystalCommunicator_GemCount);
ruby_particle = new Particles_MagicRing() { R = 0xff, G = 0x00, B = 0x30 };
amethyst_particle = new Particles_MagicRing() { R = 0xa0, G = 0x00, B = 0xff };
for (var i=0; i<CrystalCommunicator_GemCount; ++i)
{
var base;
if (this.gem_overlays && this.gem_overlays[i])
{
if (this.gem_overlays[i]->GetID() == Ruby) base = ruby_particle; else base = amethyst_particle;
}
else
{
if (i%2) base = ruby_particle; else base = amethyst_particle;
}
gem_particles[i] = base;
var x = CrystalCommunicator_GemsX[i]/5 - 45;
beam_particles[i] = CreateCirclingParticle(base, 100, 20, Abs(x), x>0);
}
// Central flash particles
flash_particle = {
Size = PV_KeyFrames(0, 0, 0, 500, 60, 1000, 0),
R = PV_KeyFrames(0, 750, 255, 1000, 0),
G = PV_KeyFrames(0, 300, 255, 1000, 0),
B = PV_KeyFrames(0, 300, 255, 500, 0),
Rotation = PV_Random(0, 360),
Alpha = PV_KeyFrames(0, 0, 255, 750, 100, 1000, 0),
BlitMode = GFX_BLIT_Additive,
Attach = ATTACH_Front | ATTACH_MoveRelative,
};
large_flash_particle = {
Size = PV_KeyFrames(0, 0, 0, 500, 200, 1000, 0),
R = PV_KeyFrames(0, 750, 255, 1000, 0),
G = PV_KeyFrames(0, 300, 255, 1000, 0),
B = PV_KeyFrames(0, 300, 255, 500, 0),
Rotation = PV_Random(0, 360),
Alpha = PV_KeyFrames(0, 0, 255, 750, 100, 1000, 0),
BlitMode = GFX_BLIT_Additive,
Attach = ATTACH_Front | ATTACH_MoveRelative,
};
// Gem flash particle
small_flash_particle = {
Size = PV_KeyFrames(0, 0, 0, 500, 20, 1000, 0),
R = PV_KeyFrames(0, 750, 255, 1000, 0),
G = PV_KeyFrames(0, 300, 255, 1000, 0),
B = PV_KeyFrames(0, 300, 255, 500, 0),
Rotation = PV_Random(0, 360),
Alpha = PV_KeyFrames(0, 0, 255, 750, 100, 1000, 0),
BlitMode = GFX_BLIT_Additive,
Attach = ATTACH_Front | ATTACH_MoveRelative,
};
// Run effects
Sound("CrystalCommCharge");
time = 0;
AddTimer(this.PreActivity, 5);
}
private func PreActivity()
{
// Warmup effects
var i,x,y,z;
for (i=0; i<CrystalCommunicator_GemCount; ++i)
{
x = CrystalCommunicator_GemsX[i]/5 - 45;
y = CrystalCommunicator_GemsY[i]/5 - 35;
z = CrystalCommunicator_GemsZ[i];
var gem_target;
if (top_face && z>=3) gem_target = top_face; else gem_target = this;
if (time < 20 || !Random(3))
{
if (!(time % 5)) gem_target->CreateParticle("StarFlash", x,y, 0,0, 60+Random(10), small_flash_particle, 1);
}
else
gem_target->CreateParticle("StarFlash", x, y, -x, -y, 10, small_flash_particle, 10);
}
if (time == 20) Sound("CrystalCommBoost");
if (time > 50)
{
RemoveTimer(this.PreActivity);
time = 0;
CreateParticle("StarFlash", PV_Random(-12, +12), PV_Random(-12, +12), PV_Random(-10, +10),PV_Random(-10, +10), PV_Random(20, 100), large_flash_particle, 10);
Sound("CrystalCommWumm");
SetAction("Active");
AddTimer(this.Activity, 1);
}
++time;
}
public func StopCommunication()
{
// forward to main object
if (base_face) return base_face->StopCommunication();
// Stop activities
RemoveTimer(this.PreActivity);
RemoveTimer(this.Activity);
SetAction("Idle");
time = 0;
return true;
}
private func Activity()
{
// Send codes
if (send_code)
{
if (next_send_time == time)
{
var send_char = GetChar(send_code, send_code_pos++);
if (!send_char)
{
// All sent.
send_code = nil;
}
else
{
// Next char to send
if (send_char == GetChar("."))
{
Sound("CrystalCommToneA");
next_send_time = time + 13;
}
else
{
Sound("CrystalCommToneB");
next_send_time = time + 27;
}
}
}
if (next_send_time - time > 10)
{
// During tone: Effects
CreateParticle("StarFlash", PV_Random(-3, +3), 0, 0,-30, 500, flash_particle, 1);
}
}
// Effects
// Circulate through gems
var i = time % CrystalCommunicator_GemCount;
var x = CrystalCommunicator_GemsX[i]/5 - 45, y = CrystalCommunicator_GemsY[i]/5 - 35, z = CrystalCommunicator_GemsZ[i];
var gem_target;
if (top_face && z>=3) gem_target = top_face; else gem_target = this;
// Create ring moving upwards
if (Abs(x) > 5) CreateParticle("MagicRing", x, y, 0, -Min(time/20,10), 2000, beam_particles[i], 1);
// Create flash at gem
gem_target->CreateParticle("StarFlash", x, y, 0, 0, 20+Random(10), gem_particles[i], 1);
// Create central flash
if (!(time % 5)) CreateParticle("StarFlash", PV_Random(-6, +6), PV_Random(-6, +6), 0,0, 20+Random(10), flash_particle, 1);
++time;
}
private func CreateCirclingParticle(proplist prototype, int frames_per_cycle, int num_cycles, int rad, bool start_backmove)
{
var a = (rad * 10000000) / (2429 * frames_per_cycle * frames_per_cycle);
var ang0 = (!!start_backmove) * 180;
var particle = {
Prototype = prototype,
Size = PV_Sin(PV_Linear( ang0, 360*num_cycles),5,8),
ForceX = PV_Sin(PV_Linear( ang0+90, ang0+90+360*num_cycles), a, 0),
ForceY = 0,
Attach = ATTACH_Front | ATTACH_MoveRelative,
};
return particle;
}
public func SendCode(string code)
{
send_code = code;
next_send_time = time;
send_code_pos = 0;
return true;
}
/* Definition data */
public func Definition(proplist def)
{
}
local ActMap = {
Attach = {
Prototype = Action,
Name = "Attach",
Procedure = DFA_ATTACH,
Directions = 1,
FacetBase = 1,
Length = 1,
Delay = 0,
NextAction = "Hold"
},
Active = {
Prototype = Action,
Name = "Active",
Procedure = DFA_NONE,
Directions = 1,
FacetBase = 1,
Delay = 0,
Length = 1,
NextAction = "Active",
Sound = "CrystalCommActive",
},
};
local Collectible = false;
local Name = "$Name$";
local Description = "$Description$";
local Touchable = 0;
local Plane = 280;

View File

@ -1,2 +0,0 @@
Name=Kristallkommunikator
Description=Gerät zur Langstreckenkommunikation

View File

@ -1,2 +0,0 @@
Name=Crystal communicator
Description=Device for long range communication.

View File

@ -1,5 +0,0 @@
[DefCore]
id=Goal_BuildCrystalCommunicator
Version=6,0
Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,61 +0,0 @@
/*--
Build crystal communicator
Author: Sven2
Player must build the crystal communicator
--*/
#include Library_Goal
/*-- Goal interface --*/
// The goal is fulfilled if the communicator has been built
public func IsFulfilled()
{
return ObjectCount(Find_ID(CrystalCommunicator));
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnfulfilled$";
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{
// If goal message open -> hide it.
if (GetEffect("GoalMessage", this))
{
CustomMessage("", nil, plr, nil, nil, nil, nil, nil, MSG_HCenter);
RemoveEffect("GoalMessage", this);
return;
}
// Otherwise open a new message.
AddEffect("GoalMessage", this, 100, 0, this);
var message;
if (IsFulfilled())
{
message = "@$MsgGoalFulfilled$";
}
else
{
message = "@$MsgGoalUnfulfilled$";
}
CustomMessage(message, nil, plr, 0, 16 + 64, 0xffffff, GUI_MenuDeco, this, MSG_HCenter);
return;
}
protected func FxGoalMessageStart() {}
//public func GetShortDescription(int plr) { return ""; }
/*-- Proplist --*/
local Name = "$Name$";

View File

@ -1,5 +0,0 @@
Name=Kristallkommunikator bauen
#Goal window
MsgGoalFulfilled=Glückwunsch; der Kristallkommunikator steht.
MsgGoalUnfulfilled=Bringe das nötige Baumaterial zur Baustelle des Kristallkommunikator!

View File

@ -1,5 +0,0 @@
Name=Build crystal communicator
#Goal window
MsgGoalFulfilled=Congratulations, the crystal communicator is done.
MsgGoalUnfulfilled=Find the missing components and bring them to the crystal communicator construction site!

View File

@ -1,275 +0,0 @@
/**
Blue lake
Dynamic map with a big lake containing islands of material
Plus lava basins with gems at the bottom
Parts adapted from Gem Grabbers by Maikel
@authors Sven2
*/
#include Library_Map
// zoomed coordinates for scenario script
static main_island_x, main_island_y;
static goal_platform_x, goal_platform_y;
// set after intro to force map creation
static g_intro_done;
// Called be the engine: draw the complete map here.
public func InitializeMap(proplist map)
{
if (!g_intro_done && !SCEN_TEST) return true;
Resize(300,400);
this.sea_y = 50;
this.ground_y = 350;
this.map_zoom = 7;
main_island_x = this.Wdt/2 * this.map_zoom;
main_island_y = this.sea_y * this.map_zoom;
Draw("Water", nil, [0,this.sea_y,this.Wdt,this.Hgt]);
DrawMainIsland(80);
DrawGround();
// Regular resource islands
DrawSecondaryIslands(3, 15, [["Ore", 50], ["Coal", 40]], true);
DrawSecondaryIslands(10, 6, [["Firestone", 70]], false);
DrawSecondaryIslands(3, 8, [["Gold", 40]], true);
// Amethyst islands
var i=0, imod=Random(2);
while (i<3 || GetPixelCount("Amethyst")<15)
{
DrawSecondaryIsland(8, [["Amethyst", 70]], true, [0, this.Wdt-70][(i+imod)%2], 70, this.sea_y+50);
++i;
}
FixLiquidBorders("Earth");
// Ensure that left and right side are always open because they're used for water refill
Draw("Sky", nil, [0,0,1,this.sea_y]);
Draw("Sky", nil, [this.Wdt-1,0,1,this.sea_y]);
Draw("Water", nil, [0,this.sea_y,1,70]);
Draw("Water", nil, [this.Wdt-1,this.sea_y,1,70]);
// Top level of water has sky background
Draw("^Water", Duplicate("Water"), [0,this.sea_y,this.Wdt,11]);
// Return true to tell the engine a map has been successfully created.
return true;
}
// Draws the main island with all basic resources
private func DrawMainIsland(int size)
{
// Shape of the main island. Shape taken from Gem Grabbers.
var island_algo = {Algo = MAPALGO_Polygon};
var x = this.Wdt / 2;
var y = this.sea_y;
island_algo.X = [x-size/3, x-size/2, x-size/3, x-size/6, x+size/6, x+size/3, x+size/2, x+size/3];
island_algo.Y = [y-size/6, y, y+size/3, y+size/6, y+size/6, y+size/3, y, y-size/6];
// Draw the earth patch of the island.
island_algo = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = island_algo};
var island = CreateLayer();
island->Draw("Earth", island_algo);
// Draw goal platform shape
while (island->GetPixel(x,y)) ++x; // Find right side of island at sea level
var platform_algo = {Algo = MAPALGO_Polygon};
platform_algo.X = [x-5,x+14,x+14,x+7,x ,x-5];
platform_algo.Y = [y ,y ,y+ 1,y+2,y+4,y ];
island->Draw("Earth", platform_algo);
// Preserve drawn island shape for border algorithms
var island_shape = island->Duplicate();
// Overlay a set of materials inside the island.
DrawIslandMat("Earth-earth_dry", island, 4, 30, true);
DrawIslandMat("Earth-earth_midSoil", island, 3, 30, true);
DrawIslandMat("Tunnel", island, 3, 10, true);
//DrawIslandMat("Water", island, 4, 8);
//DrawIslandMat("Gold", island, 3, 6);
DrawIslandMat("Ore", island, 6, 18, true);
DrawIslandMat("Coal", island, 6, 18, true);
DrawIslandMat("Firestone", island, 6, 12, true);
// Draw a top border out of sand and top soil.
var sand_border = {Algo = MAPALGO_And, Op = [{Algo = MAPALGO_Border, Op = island_shape, Top = [-1,2]}, {Algo = MAPALGO_RndChecker, Ratio = 50, Wdt = 4, Hgt = 3}]};
var topsoil_border = {Algo = MAPALGO_And, Op = [{Algo = MAPALGO_Border, Op = island_shape, Top = [-1,3]}, {Algo = MAPALGO_RndChecker, Ratio = 40, Wdt = 4, Hgt = 2}]};
island->Draw("Sand", sand_border);
island->Draw("Earth-earth_topSoil", topsoil_border);
// Draw a bottom border out of granite and rock.
var granite_border = {Algo = MAPALGO_Border, Op = island_shape, Bottom = [-4,3]};
island->Draw("Granite", granite_border);
var rock_border = {Algo = MAPALGO_RndChecker, Ratio = 20, Wdt = 2, Hgt = 2};
island->Draw("Rock", {Algo = MAPALGO_And, Op = [granite_border, rock_border]});
island->Draw("Rock-rock_cracked", {Algo = MAPALGO_And, Op = [granite_border, rock_border]});
// Draw goal platform
island->Draw("Sky", nil, [x,y-10,14,10]);
island->Draw("Brick", nil, [x,y,14,2]);
goal_platform_x = (x+7)*this.map_zoom;
goal_platform_y = y *this.map_zoom;
// Draw island onto main map
Blit(island);
return true;
}
// Draws multiple underwater resource islands
private func DrawSecondaryIslands(int n, ...)
{
for (var i=0; i<n; ++i) DrawSecondaryIsland(...);
return true;
}
// Draws underwater resource island
private func DrawSecondaryIsland(int size, array materials, bool has_border, int xmin, int xwdt, int ymin)
{
// Find a free spot underwater
var x,y;
var border = size; // left and right border
if (!xwdt) xwdt = this.Wdt;
if (!ymin) ymin = this.sea_y;
var i_tries = 200;
while (i_tries--)
{
var x = Random(xwdt - border*2) + border + xmin;
var y = Random(this.ground_y - ymin - size) + ymin + size/2;
if (GetPixelCount("Solid", [x-size,y-size,size,size])) continue;
break;
}
// Shape of the resource island
var island_algo = {Algo = MAPALGO_Ellipsis, X=x, Y=y, Wdt=size, Hgt=size};
island_algo = {Algo = MAPALGO_Turbulence, Amplitude = [20,5], Iterations = 3, Op = island_algo};
var island = CreateLayer();
island->Draw("Earth", island_algo);
var island_shape = island->Duplicate();
DrawIslandMat("Earth-earth_dry", island, 4, 30);
DrawIslandMat("Earth-earth_midSoil", island, 3, 30);
// Overlay a set of materials inside the island.
for (var mat in materials)
{
DrawIslandMat(mat[0], island, 3, mat[1], has_border);
}
// Draw a border out of granite and rock.
if (has_border)
{
var island_shape = island->Duplicate();
var granite_border = {Algo = MAPALGO_Border, Op = island_shape, Top = [-2,2]};
island->Draw("Granite", granite_border);
var rock_border = {Algo = MAPALGO_RndChecker, Ratio = 20, Wdt = 2, Hgt = 2};
island->Draw("Rock", {Algo = MAPALGO_And, Op = [granite_border, rock_border]});
island->Draw("Rock-rock_cracked", {Algo = MAPALGO_And, Op = [granite_border, rock_border]});
}
// Draw island onto main map
Blit(island);
return true;
}
private func DrawGround()
{
// Bottom of the sea
var ground_algo = { Algo = MAPALGO_Rect, X=-100, Y=this.ground_y, Wdt=this.Wdt+200, Hgt=this.Hgt-this.ground_y+1000 };
ground_algo = {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = [10,100], Scale = 20, Op = ground_algo };
var ground2_algo = { Algo = MAPALGO_Rect, X=-100, Y=this.Hgt-10, Wdt=this.Wdt+200, Hgt=this.Hgt-this.ground_y+1000 };
ground2_algo = {Algo = MAPALGO_Turbulence, Iterations = 2, Amplitude = 10, Scale = 30, Op = ground2_algo };
var ground = CreateLayer();
// Ensure lots of earth
while (true)
{
ground->Draw("Earth", ground_algo);
ground->Draw("Granite", ground2_algo);
if (ground->GetPixelCount("Earth") > 10000) break;
}
ground->Draw("DuroLava", {Algo=MAPALGO_Turbulence, Amplitude=10, Scale=20, Iterations=3, Op={Algo=MAPALGO_And, Op=[ground->Duplicate("Granite"), {Algo = MAPALGO_RndChecker, Ratio=50, Wdt=30, Hgt=2}]}});
// Granite/Rock top border
ground->Draw("Granite", {Algo = MAPALGO_Turbulence, Amplitude = 5, Iterations = 1, Op = {Algo = MAPALGO_Border, Op = ground->Duplicate(), Top= [-2,2]}});
ground->Draw("Rock", {Algo=MAPALGO_And, Op=[ground->Duplicate("Granite"), {Algo = MAPALGO_RndChecker, Ratio = 40, Wdt = 2, Hgt = 2}]});
// Alterations in earth material
DrawIslandMat("Earth-earth_dry", ground, 12, 60, false);
DrawIslandMat("Earth-earth_midSoil", ground, 8, 60, false);
// Gem spots
var gem_spots = CreateLayer();
var earth_mats = CreateMatTexMask("Earth");
var i=0;
while (i<3 || gem_spots->GetPixelCount("Ruby") < 15)
{
var gem_mat = "Ruby";
// Find an earth spot
var pos = {X=Random(this.Wdt), Y=this.Hgt/2+Random(this.Hgt/2)};
ground->FindPosition(pos, "Earth");
// Find center of this earth area
var x=pos.X, y=pos.Y;
var x0=x-1, x1=x+1, y0=y-1, y1=y+1;
while (earth_mats[ground->GetPixel(x,y0)]) --y0;
while (earth_mats[ground->GetPixel(x,y1)]) ++y1;
y=Min((y0+y1)/2, this.Hgt-6);
while (earth_mats[ground->GetPixel(x0,y)]) --x0;
while (earth_mats[ground->GetPixel(x1,y)]) ++x1;
x=(x0+x1)/2;
var size = 9;
// Lava basin here
var lava_algo = {Algo = MAPALGO_Ellipsis, X=x, Y=y, Wdt=size, Hgt=size};
lava_algo = {Algo = MAPALGO_Turbulence, Amplitude = 5, Iterations = 5, Op = lava_algo};
gem_spots->Draw("DuroLava", lava_algo);
// Gems at bottom center
y += 2;
size = 3;
var gem_algo = {Algo = MAPALGO_Ellipsis, X=x, Y=y, Wdt=size, Hgt=size};
gem_algo = {Algo = MAPALGO_Turbulence, Amplitude = 3, Iterations = 1, Op = gem_algo};
gem_spots->Draw(gem_mat, gem_algo);
// Draw to map
ground->Blit(gem_spots);
++i;
}
// Lava basins surrounded by granite
ground->Draw("Rock", {Algo=MAPALGO_And, Op=[{Algo=MAPALGO_Not, Op=gem_spots}, {Algo = MAPALGO_Turbulence, Amplitude = 5, Iterations = 5, Op = {Algo = MAPALGO_Border, Op = gem_spots, Wdt=-4}}]});
ground->Draw("Granite", {Algo = MAPALGO_Border, Op = gem_spots, Wdt=-1});
// Lots of rocks
DrawIslandMat("Rock-rock_cracked", ground, 2, 20, false);
DrawIslandMat("Rock", ground, 2, 20, false);
// And some lava
DrawIslandMat("DuroLava", ground, 2, 20, false);
// Other materials (rare)
DrawIslandMat("Ore", ground, 12, 8, false);
DrawIslandMat("Coal", ground, 12, 8, false);
DrawIslandMat("Gold", ground, 12, 8, false);
DrawIslandMat("Firestone", ground, 12, 8, false);
Blit(ground);
return true;
}
// Draws some material inside an island.
private func DrawIslandMat(string mat, proplist onto_mask, int speck_size, int ratio, has_border)
{
if (!speck_size)
speck_size = 3;
if (!ratio)
ratio = 20;
// Use random checker algorithm to draw patches of the material.
var rnd_checker = {Algo = MAPALGO_RndChecker, Ratio = ratio, Wdt = speck_size, Hgt = speck_size};
rnd_checker = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = rnd_checker};
var algo;
if (has_border)
{
var mask_border = {Algo = MAPALGO_Border, Op = onto_mask, Wdt = 3};
algo = {Algo = MAPALGO_And, Op = [{Algo = MAPALGO_Xor, Op = [onto_mask->Duplicate("Earth"), mask_border]}, rnd_checker]};
}
else
{
algo = {Algo = MAPALGO_And, Op = [onto_mask->Duplicate("Earth"), rnd_checker]};
}
onto_mask->Draw(mat, algo);
return true;
}

View File

@ -1,57 +0,0 @@
[Head]
Title=DeepSeaMining
Icon=31
Version=6,0
Difficulty=30
MissionAccess=S2Crash
[Definitions]
Definition1=Objects.ocd
[Game]
Rules=Rule_TeamAccount=1;Rule_BuyAtFlagpole=1;Rule_BaseRespawn=1;
Goals=Goal_BuildCrystalCommunicator=1;
ValueOverloads=Ruby=10;Amethyst=10
[Player1]
Wealth=25
Crew=Clonk=2
Knowledge=Flagpole=1;Foundry=1;WindGenerator=1;SteamEngine=1;Compensator=1;Sawmill=1;ChemicalLab=1;Elevator=1;Pump=1;ToolsWorkshop=1;Basement=1;WallKit=1;GoldBar=1;Loam=1;Metal=1;Axe=1;Barrel=1;Bucket=1;Dynamite=1;Hammer=1;JarOfWinds=1;Pickaxe=1;Pipe=1;Shovel=1;TeleGlove=1;DynamiteBox=1;Lorry=1;
BaseMaterial=Clonk=25;Bread=25;
BaseProduction=Clonk=25;Bread=25;
[Player2]
Wealth=25
Crew=Clonk=2
Knowledge=Flagpole=1;Foundry=1;WindGenerator=1;SteamEngine=1;Compensator=1;Sawmill=1;ChemicalLab=1;Elevator=1;Pump=1;ToolsWorkshop=1;Basement=1;WallKit=1;GoldBar=1;Loam=1;Metal=1;Axe=1;Barrel=1;Bucket=1;Dynamite=1;Hammer=1;JarOfWinds=1;Pickaxe=1;Pipe=1;Shovel=1;TeleGlove=1;DynamiteBox=1;Lorry=1;
BaseMaterial=Clonk=25;Bread=25;
BaseProduction=Clonk=25;Bread=25;
[Player3]
Wealth=25
Crew=Clonk=2
Knowledge=Flagpole=1;Foundry=1;WindGenerator=1;SteamEngine=1;Compensator=1;Sawmill=1;ChemicalLab=1;Elevator=1;Pump=1;ToolsWorkshop=1;Basement=1;WallKit=1;GoldBar=1;Loam=1;Metal=1;Axe=1;Barrel=1;Bucket=1;Dynamite=1;Hammer=1;JarOfWinds=1;Pickaxe=1;Pipe=1;Shovel=1;TeleGlove=1;DynamiteBox=1;Lorry=1;
BaseMaterial=Clonk=25;Bread=25;
BaseProduction=Clonk=25;Bread=25;
[Player4]
Wealth=25
Crew=Clonk=2
Knowledge=Flagpole=1;Foundry=1;WindGenerator=1;SteamEngine=1;Compensator=1;Sawmill=1;ChemicalLab=1;Elevator=1;Pump=1;ToolsWorkshop=1;Basement=1;WallKit=1;GoldBar=1;Loam=1;Metal=1;Axe=1;Barrel=1;Bucket=1;Dynamite=1;Hammer=1;JarOfWinds=1;Pickaxe=1;Pipe=1;Shovel=1;TeleGlove=1;DynamiteBox=1;Lorry=1;
BaseMaterial=Clonk=25;Bread=25;
BaseProduction=Clonk=25;Bread=25;
[Landscape]
Sky=Clouds2
TopOpen=1
BottomOpen=0
AutoScanSideOpen=1
MapWidth=300
MapHeight=400
MapZoom=7
[Weather]
Climate=0
StartSeason=0
YearSpeed=0
Wind=0,100,-100,100

View File

@ -1,300 +0,0 @@
/**
Deep Sea Mining
Mine gems buried deeply below the ocean.
@authors Sven2
*/
// set in Map.c
static main_island_x, main_island_y;
static goal_platform_x, goal_platform_y;
static const SCEN_TEST = true;
static g_is_initialized, g_is_in_intro, g_intro_done, npc_tuesday, g_tuesday_pos;
protected func PostIntroInitialize()
{
// Construction site on goal platform
var goal_site = CreateObjectAbove(ConstructionSite, goal_platform_x+10, goal_platform_y+3);
goal_site->Set(CrystalCommunicator);
goal_site->MakeUncancellable();
if (SCEN_TEST)
{
for (var i=0; i<6; ++i)
{
goal_site->CreateObjectAbove(Metal,-20);
goal_site->CreateObjectAbove(Ruby,0);
goal_site->CreateObjectAbove(Amethyst,20);
}
goal_site->CreateContents(Metal,6);
goal_site->CreateContents(Ruby,6);
goal_site->CreateContents(Amethyst,5);
}
// Initialize different parts of the scenario.
InitEnvironment();
InitVegetation();
InitAnimals();
InitMainIsland();
// NPC
g_tuesday_pos = FindMainIslandPosition(0, 100, true);
npc_tuesday = CreateObjectAbove(Clonk, g_tuesday_pos[0]+20, g_tuesday_pos[1]-10);
npc_tuesday->SetDir(DIR_Left);
npc_tuesday->SetColor(0x804000);
npc_tuesday->SetName("$Tuesday$");
return true;
}
func DoInit(int first_player)
{
if (!SCEN_TEST)
StartSequence("Intro", 0, GetCrew(first_player));
else
{
PostIntroInitialize();
g_intro_done = true;
}
return true;
}
protected func InitializePlayer(int plr)
{
// intro has its own initialization
if (g_is_in_intro) return true;
// Harsh zoom range
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_LimitMax);
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_Direct);
SetPlayerViewLock(plr, true);
// Intro
if (!g_is_initialized) g_is_initialized = DoInit(plr);
if (!g_intro_done) return true;
// Position and materials
var i, crew;
for (i = 0; crew = GetCrew(plr, i); ++i)
{
var pos = FindMainIslandPosition();
crew->SetPosition(pos[0], pos[1] - 11);
crew->CreateContents(Shovel);
if (SCEN_TEST)
{
var cs = FindObject(Find_ID(ConstructionSite));
crew->SetPosition(cs->GetX(), cs->GetY()-20);
}
}
// Claim ownership of unowned structures
for (var structure in FindObjects(Find_Or(Find_Category(C4D_Structure), Find_Func("IsFlagpole")), Find_Owner(NO_OWNER)))
structure->SetOwner(plr);
return;
}
// Initializes environment and disasters.
private func InitEnvironment()
{
// Water refill from sides
var initial_water_level = 0;
while (GetMaterial(0,initial_water_level) != Material("Water")) ++initial_water_level;
ScheduleCall(nil, this.EnsureWaterLevel, 20, 999999999, initial_water_level);
// Set a certain parallax.
SetSkyParallax(0, 20, 20);
// Ambience sounds
CreateObjectAbove(Ambience);
// No disasters for now
//Meteor->SetChance(5); Cloud->SetLightning(16);
return;
}
// Ensures that the sea doesn't disappear
func EnsureWaterLevel(int level, bool no_recursion)
{
var water_mat = Material("Water");
if (GetMaterial(0,level) != water_mat) CastPXS("Water", 100, 20, 0,level, 90, 10);
if (GetMaterial(LandscapeWidth()-1,level) != water_mat) CastPXS("Water", 100, 20, LandscapeWidth()-1,level, 270, 10);
// Extra insertion at a lower level so it's not easy to block off
if (!no_recursion && !Random(3)) EnsureWaterLevel(level + 50 + Random(450), true);
return true;
}
private func InitVegetation()
{
// Grass on starting island.
PlaceGrass(85);
// Place some cocont trees all around the main island
for (var i = 0; i < 10 + Random(8); i++)
PlaceVegetation(Tree_Coconut, 0, 0, LandscapeWidth(), LandscapeHeight(), 1000 * (61 + Random(40)));
// Create an effect to make sure there will always grow some new trees.
ScheduleCall(nil, this.EnsureTrees, 100, 999999999);
// Some objects in the earth.
PlaceObjects(Rock, 10 + Random(10),"Earth");
PlaceObjects(Firestone, 35 + Random(5), "Earth");
PlaceObjects(Loam, 25 + Random(5), "Earth");
// Underwater vegetation
Seaweed->Place(20);
Coral->Place(30);
return;
}
// Ensures that there will always grow some trees on the main island.
func EnsureTrees()
{
var wdt = LandscapeWidth();
var hgt = LandscapeHeight();
// Place a tree if there are less than eight trees, with increasing likelihood for lower amounts of trees.
var nr_trees = ObjectCount(Find_Func("IsTree"), Find_Func("IsStanding"));
if (Random(9) >= nr_trees)
if (!Random(20))
PlaceVegetation(Tree_Coconut, main_island_x - 300, main_island_y - 200, 600, 400, 3);
return true;
}
private func InitAnimals()
{
// Place fish in upper ocean area (there tend to be small basins below, where lots of fish could get stuck)
var fish_area = GetFishArea();
Fish->Place(50, fish_area);
Piranha->Place(25, fish_area);
ScheduleCall(nil, this.EnsureAnimals, 237, 999999999);
return true;
}
private func GetFishArea() { return Shape->Rectangle(50, main_island_y, LandscapeWidth() - 100, LandscapeHeight()/2 - main_island_y); }
private func EnsureAnimals()
{
if (ObjectCount(Find_ID(Fish), Find_Not(Find_Action("Dead"))) < 50) DoFishSpawn(Fish);
if (ObjectCount(Find_ID(Piranha), Find_Not(Find_Action("Dead"))) < 25) DoFishSpawn(Piranha);
return true;
}
private func DoFishSpawn(fish_type)
{
// Try placement away from Clonks. If a Clonk was nearby, just remove it immediately.
var fish = fish_type->Place(1, GetFishArea());
if (fish)
if (fish->FindObject(fish->Find_Distance(300), Find_ID(Clonk), Find_OCF(OCF_Alive)))
fish->RemoveObject();
return fish;
}
// Initializes the main island according to the material specification.
private func InitMainIsland()
{
var amount = 3;
var pos;
// Always start with a lorry filled with: hammer(x2), axe(x2), wood(x6) and metal(x4).
var lorry_pos = FindMainIslandPosition(0, 80);
var lorry = CreateObjectAbove(Lorry, lorry_pos[0], lorry_pos[1] - 8);
lorry->CreateContents(Hammer, 2);
lorry->CreateContents(Axe, 2);
lorry->CreateContents(Wood, 6);
lorry->CreateContents(Metal, 4);
// If more material is specified, create a small settlement: flag(x2) and windmill.
// Also fill lorry a bit more with: pickaxe(x1), dynamite(x4), wood(x4), metal(x2).
if (amount >= 2)
{
pos = FindMainIslandPosition(-120, 20);
CreateObjectAbove(Flagpole, pos[0]-7, pos[1]);
var rfp = CreateObjectAbove(Flagpole, pos[0]+7, pos[1]);
rfp->SetNeutral(true);
pos = FindMainIslandPosition(120, 20);
CreateObjectAbove(Flagpole, pos[0], pos[1]);
pos = FindMainIslandPosition(nil, nil, true);
CreateObjectAbove(WindGenerator, pos[0], pos[1]);
lorry->CreateContents(Wood, 4);
lorry->CreateContents(Metal, 2);
lorry->CreateContents(Pickaxe, 1);
lorry->CreateContents(Dynamite, 4);
}
// If still more material is specified, create a larger settlement: sawmill, chemical lab, tools workshop.
// Also fill lorry a bit more with: Barrel (x1), Bucket(x1), Loam(x4), DynamiteBox(x2).
if (amount >= 3)
{
pos = FindMainIslandPosition(nil, nil, true);
CreateObjectAbove(Sawmill, pos[0], pos[1]);
pos = FindMainIslandPosition(nil, nil, true);
CreateObjectAbove(ChemicalLab, pos[0], pos[1]);
pos = FindMainIslandPosition(nil, nil, true);
CreateObjectAbove(ToolsWorkshop, pos[0], pos[1]);
lorry->CreateContents(Barrel, 1);
lorry->CreateContents(Bucket, 1);
lorry->CreateContents(Loam, 4);
lorry->CreateContents(DynamiteBox, 1);
lorry->CreateContents(WallKit, 4);
//lorry->CreateContents(Boompack, 1);
}
return;
}
// Tries to find a position on the main island.
private func FindMainIslandPosition(int xpos, int sep, bool no_struct)
{
if (xpos == nil)
xpos = 0;
if (sep == nil)
sep = 250;
for (var i = 0; i < 100; i++)
{
var x = main_island_x + xpos + Random(sep*2+1)-sep;
var y = main_island_y / 2 - 220;
while (!GBackSolid(x, y) && y < LandscapeHeight()*3/4)
y++;
if (GetMaterial(x,y) == Material("Brick")) continue; // not on goal platform
if (!no_struct || !FindObject(Find_Or(Find_Category(C4D_Structure), Find_Func("IsFlagpole"), Find_ID(WindGenerator)), Find_Distance(60, x, y)))
break;
}
return [x, y];
}
/* Outro */
// Goal fulfilled
public func OnGoalsFulfilled()
{
SetNextMission("Missions.ocf/TreasureHunt.ocs");
GainScenarioAchievement("Done");
GainMissionAccess("S2Sea");
StartSequence("Outro", 0);
// Return true to force goal rule to not call GameOver() yet
return true;
}
// Intro helper
global func Particles_Smoke(...)
{
var p = inherited(...);
if (g_intro_sky_moving)
{
p.ForceX = -300;
p.DampingX = 800;
}
return p;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -1,5 +0,0 @@
[Landscape]
BottomOpen=0
TopOpen=1
MapZoom=20,0,5,20
Sky=Clouds2

View File

@ -1 +0,0 @@
Tuesday=Dienstag

View File

@ -1 +0,0 @@
Tuesday=Tuesday

View File

@ -1,48 +0,0 @@
// NPC Tuesday: Sits on the island and does nothing
// (except giving some hints)
#appendto Dialogue
func Dlg_Tuesday_1(object clonk)
{
MessageBox("$Tuesday1$", clonk, dlg_target);
return true;
}
func Dlg_Tuesday_2(object clonk)
{
var options = [["$TuesdayQCommunicator$", "Dlg_Tuesday_Communicator"], ["$TuesdayQGems$", "Dlg_Tuesday_Gems"], ["$TuesdayQFish$", "Dlg_Tuesday_Fish"], ["$TuesdayQWater$", "Dlg_Tuesday_Water"], ["$TuesdayQBye$", "StopDialogue()"]];
MessageBox("", clonk, clonk, nil, false, options);
SetDialogueProgress(1);
return true;
}
func Dlg_Tuesday_Communicator(object clonk, q)
{
SetDialogueProgress(2);
return MessageBox("$TuesdayACommunicator$", clonk);
}
func Dlg_Tuesday_Gems(object clonk, q)
{
SetDialogueProgress(2);
return MessageBox("$TuesdayAGems$", clonk);
}
func Dlg_Tuesday_Fish(object clonk, q)
{
SetDialogueProgress(2);
return MessageBox("$TuesdayAFish$", clonk);
}
func Dlg_Tuesday_Water(object clonk, q)
{
SetDialogueProgress(10);
return MessageBox("$TuesdayAWater$", clonk);
}
func Dlg_Tuesday_10(object clonk)
{
SetDialogueProgress(2);
return MessageBox("$TuesdayAWater2$", clonk);
}

View File

@ -1,2 +0,0 @@
#appendto Ruby
func IsValuable(){}

View File

@ -1,271 +0,0 @@
#appendto Sequence
static g_intro_sky_moving;
static npc_tuesday;
func Intro_Start()
{
// Intro starts high up in the clouds
LoadScenarioSection("Intro");
SetPlayList("skyisland", NO_OWNER, true);
SetWind(-100);
SetSkyParallax(0, 20, 20, -10, 0);
this.plane = CreateObjectAbove(Plane, 500, 200);
this.plane->SetColor(0xa04000);
this.pilot = CreateObjectAbove(Clonk, 100, 100, NO_OWNER);
this.pilot->MakeInvincible();
this.pilot->MakeNonFlammable();
this.pilot->SetSkin(2);
this.pilot->Enter(this.plane);
this.pilot->SetAction("Walk");
this.pilot->SetName("Pyrit");
this.pilot->SetColor(0xff0000);
this.pilot->SetDir(DIR_Left);
this.pilot->SetObjectLayer(this.pilot);
this.plane.FxIntPlaneTimer = this.Intro_PlaneTimer;
RemoveEffect("IntPlane", this.plane);
AddEffect("IntPlane",this.plane,1,1,this.plane);
this.plane->FaceRight();
this.plane->StartInstantFlight(90, 0);
g_intro_sky_moving = true;
SetViewTarget(this.plane);
return ScheduleNext(100, 1);
}
func Intro_PlaneTimer(...)
{
// Plane flight overload: Just move sky and have plane do turbulent movement during initial part of intro
var rv = Call(Plane.FxIntPlaneTimer, ...);
if (g_intro_sky_moving)
{
if (!Random(4)) this.rdir = BoundBy((80+Random(21)-GetR())/5,-1,1);
SetXDir(); SetYDir(GetR()*2-GetY()+Random(5),10);
}
return rv;
}
func Intro_JoinPlayer(int plr)
{
if (g_intro_done) return false; // too late for join - just join on island
for(var index = 0, crew; crew = GetCrew(plr, index); ++index) crew->Enter(this);
return true;
}
func Intro_1()
{
MessageBoxAll("$Intro1$", GetHero(), true); // y clouds?
return ScheduleNext(200);
}
func Intro_2()
{
MessageBoxAll("$Intro2$", this.pilot, true); // cuz u told me
return ScheduleNext(300);
}
func Intro_3()
{
MessageBoxAll("$Intro3$", GetHero(), true); // 2 turbulent
return ScheduleNext(200);
}
func Intro_4()
{
MessageBoxAll("$Intro4$", this.pilot, true); // cuz condensation
return ScheduleNext(380);
}
func Intro_5()
{
MessageBoxAll("$Intro5$", GetHero(), true); // go lower now
return ScheduleNext(300);
}
func Intro_6()
{
MessageBoxAll("$Intro6$", this.pilot, true); // fuk u
return ScheduleNext(450);
}
func Intro_7()
{
MessageBoxAll("$Intro7$", this.pilot, true); // u fly
return ScheduleNext(200);
}
func Intro_8()
{
MessageBoxAll("$Intro8$", GetHero(), true); // ...
return ScheduleNext(100);
}
func Intro_9()
{
MessageBoxAll("$Intro9$", GetHero(), true); // ok
return ScheduleNext(150);
}
func Intro_10()
{
g_intro_sky_moving = false;
this.plane.rdir = 0;
this.plane->StartInstantFlight(this.plane->GetR(), 15);
MessageBoxAll("$Intro10$", GetHero(), true); // aaaah
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
{
plr = GetPlayerByIndex(i, C4PT_User);
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
{
crew->Exit();
crew->SetPosition(this.plane->GetX()+10, this.plane->GetY());
crew->SetAction("Tumble");
if (!index) SetPlrView(plr, crew);
}
}
SetViewTarget();
return ScheduleNext(200, 11);
}
func Intro_11()
{
g_intro_done = true;
LoadScenarioSection("main");
SetWind(0);
SetSkyParallax(0, 20, 20, 0, 0);
GameCall("PostIntroInitialize");
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
{
plr = GetPlayerByIndex(i, C4PT_User);
GameCall("InitializePlayer", plr);
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
{
crew->SetPosition(g_tuesday_pos[0],-100);
crew->SetXDir(-10); crew->SetYDir(-30);
if (!index) SetPlrView(plr, crew);
}
}
return ScheduleNext(200, 20);
}
func Intro_20()
{
MessageBoxAll("$Intro20$", GetHero(), true); // ouch
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
{
plr = GetPlayerByIndex(i, C4PT_User);
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
{
crew->SetCommand("MoveTo", nil, g_tuesday_pos[0]-15+Random(20), g_tuesday_pos[1]);
}
}
return ScheduleNext(300);
}
func Intro_21()
{
Dialogue->SetSpeakerDirs(npc_tuesday, GetHero());
MessageBoxAll("$Intro21$", npc_tuesday, true); // hi friend
return ScheduleNext(300);
}
func Intro_22()
{
MessageBoxAll("$Intro22$", GetHero(), true); // where is plane?
return ScheduleNext(300);
}
func Intro_23()
{
MessageBoxAll("$Intro23$", npc_tuesday, true); // 2 cloudy 4 plane
return ScheduleNext(350);
}
func Intro_24()
{
MessageBoxAll("$Intro24$", GetHero(), true); // but i need plane
return ScheduleNext(250);
}
func Intro_25()
{
MessageBoxAll("$Intro25$", npc_tuesday, true); // u stay here
return ScheduleNext(300);
}
func Intro_26()
{
MessageBoxAll("$Intro26$", GetHero(), true); // make fire?
return ScheduleNext(300);
}
func Intro_27()
{
MessageBoxAll("$Intro27$", npc_tuesday, true); // fire sux
return ScheduleNext(400);
}
func Intro_28()
{
MessageBoxAll("$Intro28$", npc_tuesday, true); // use communicator
return ScheduleNext(300);
}
func Intro_29()
{
MessageBoxAll("$Intro29$", GetHero(), true); // ok. where?
return ScheduleNext(250);
}
func Intro_30()
{
MessageBoxAll("$Intro30$", npc_tuesday, true); // not built yet
return ScheduleNext(450);
}
func Intro_31()
{
MessageBoxAll("$Intro31$", npc_tuesday, true); // go east and finish it with metal+gems
return ScheduleNext(400);
}
func Intro_32()
{
MessageBoxAll("$Intro32$", GetHero(), true); // where gems?
return ScheduleNext(250);
}
func Intro_33()
{
MessageBoxAll("$Intro33$", npc_tuesday, true); // fish say gems in sea
return ScheduleNext(400);
}
func Intro_34()
{
MessageBoxAll("$Intro34$", GetHero(), true); // fish talk?
return ScheduleNext(150);
}
func Intro_35()
{
MessageBoxAll("$Intro35$", npc_tuesday, true); // coconut talk!
return ScheduleNext(200);
}
func Intro_36()
{
MessageBoxAll("$Intro36$", GetHero(), true); // ok...
return ScheduleNext(150);
}
func Intro_37()
{
npc_tuesday->SetDialogue("Tuesday", true);
return Stop();
}

View File

@ -1,106 +0,0 @@
#appendto Sequence
func Outro_Start()
{
this.communicator = FindObject(Find_Func("IsCrystalCommunicator"));
if (!this.communicator) return false; // what?
this.hero = this.communicator->FindObject(Find_ID(Clonk), Find_OCF(OCF_Alive), this.communicator->Sort_Distance());
SetViewTarget(this.communicator);
// Outro
ScheduleCall(nil, this.Outro_Fade2Darkness, 15, 32, {});
Dialogue->MessageBoxAll("$Outro1$", this.hero, true); // ok turn it on
return ScheduleNext(100);
}
func Outro_1()
{
this.communicator->StartCommunication(); // 250 frames
return ScheduleNext(650);
}
func Outro_2()
{
Dialogue->MessageBoxAll("$Outro2$", this.hero, true); // let's see if it works
return ScheduleNext(50);
}
func Outro_3()
{
this.communicator->SendCode("...---..."); // 159 frames
return ScheduleNext(200);
}
func Outro_4()
{
this.communicator->StopCommunication();
MessageBoxAll("$Outro3$", this.hero, true); // i wonder if anyone has heard us
this.plane = CreateObjectAbove(Plane, 100, main_island_y-100);
this.plane->SetContactDensity(85); // only collision with brick for proper landing
this.pilot = CreateObjectAbove(Clonk, 100, 100);
this.pilot->MakeInvincible();
this.pilot->SetSkin(2);
this.pilot->Enter(this.plane);
this.pilot->SetAction("Walk");
this.pilot->SetName("Pyrit");
this.pilot->SetColor(0xff0000);
this.pilot->SetDir(DIR_Right);
this.plane->FaceRight();
this.plane->StartInstantFlight(90, 15);
return ScheduleNext(5);
}
func Outro_5()
{
// Wait for plane to arrive
if (this.plane->GetX() < this.communicator->GetX() - 200) return ScheduleSame(5);
// Plane in range! Ensure players see it.
SetPlayerZoomByViewRange(NO_OWNER, 500, 350, PLRZOOM_Direct | PLRZOOM_LimitMax);
MessageBoxAll("$Outro4$", this.pilot, true); // hey, our friends!
return ScheduleNext(100);
}
func Outro_6()
{
MessageBoxAll("$Outro5$", this.hero, true); // we're saved!
this.plane->StartInstantFlight(245, 15);
this.plane->SetContactDensity(C4M_Solid);
return ScheduleNext(60);
}
func Outro_7()
{
this.plane->StartInstantFlight(280, 5);
return ScheduleNext(15);
}
func Outro_8()
{
this.plane->CancelFlight();
return ScheduleNext(40);
}
func Outro_9()
{
this.pilot->Exit();
MessageBoxAll("$Outro6$", this.pilot, true); // hop on everyone!
return ScheduleNext(100);
}
func Outro_10()
{
this.plane->FaceRight();
return ScheduleNext(100);
}
func Outro_11()
{
Sound("Fanfare");
return GameOver();
}
func Outro_Fade2Darkness(proplist v)
{
v.t += 8;
var fade_val = Max(0xff-v.t);
SetSkyAdjust(RGB(fade_val,fade_val,fade_val));
}

View File

@ -1,48 +0,0 @@
Intro1=Pyrit, warum müssen wir in den Wolken fliegen?
Intro2=Du sagtest, wir sollen höher fliegen, nachdem wir fast im Vulkan gelandet waren.
Intro3=Es ist schrecklich turbulent hier.
Intro4=Das liegt daran, dass die Kondensation des Wassers in den Wolken Wärme freisetzt, die die Luft weiter aufsteigen lässt.
Intro5=Danke für den Vortrag. Können wir nun bitte tiefer fliegen?
Intro6=Erst ist es zu turbulent wenn ich tief fliege. Nun ist es zu turbulent wenn ich hoch fliege.
Intro7=Warum steuerst du das Flugzeug nicht einfach selber?
Intro8=...
Intro9=Okay. Wir tauschen Plätze!
Intro10=Aaaah
Intro20=Autsch.
Intro21=Oh. Ein Freund ist vom Himmel gefallen. Hallo Freund! Mein Name ist Dienstag.
Intro22=Verdammt. Hast du unser Flugzeug gesehen? Ich bin versehentlich raus gefallen.
Intro23=Der Himmel ist hier stets bewölkt. Wir sehen kein Flugzeug und kein Flugzeug sieht uns.
Intro24=Ugh. Aber Pyrit muss uns irgendwie finden.
Intro25=Was auf der Insel strandet bleibt auf der Insel. Genau wie ich.
Intro26=Könnten wir nicht ein Feuer machen oder so?
Intro27=Feuer? Das wird nicht helfen. Kokosnussholz brennt schlecht und das Feuer würde durch die Wolken eh keiner sehen.
Intro28=Aber...wir könnten meinen <c ffff00>Kristallkommunikator</c> benutzen!
Intro29=Klingt gut. Wo steht der?
Intro30=Ich bin glücklich auf meiner Insel. Warum sollte ich ein Kommunikationsgerät bauen? Ich habe die Pläne fertig, aber mich nie bemüht es auch zu bauen.
Intro31=Die Baustelle und die Pläne befinden sich am Östlichen Ende dieser Insel. Du brauchst nur etwas Metall und ein paar Edelsteine.
Intro32=Metall klingt einfach. Aber wo finde ich Edelsteine?
Intro33=Die Fische sprechen manchmal über glitzernde Edelsteine tief unten im Meer. Vielleicht kannst du die abbauen?
Intro34=Fische sprechen mit dir?
Intro35=Wenn du nur zuhörst, sprechen sogar die Kokosnüsse!
Intro36=Okay...ich schaue mal nach der Baustelle.
Tuesday1=Hallo, Freund. Wie kann ich dir helfen?
TuesdayQCommunicator=Wie benutze ich den Kommunikator?
TuesdayACommunicator=Bringe einfach das nötige Material zur Baustelle. Es wird automatisch funktionieren, wenn du es fertig stellst.
TuesdayQGems=Wo finde ich Edelsteine?
TuesdayAGems=Tauche ins Meer hinein. Die größten Schätze lagern tief unten und sind schwer erreichbar.
TuesdayQFish=Kannst du die Fische weg schicken?
TuesdayAFish=Ich bin nur ein Zuhörer. Ich belaste die freien Geschöpfe dieser Welt nicht mit unnötigen Verboten.
TuesdayQWater=Das wasser ist zu Tief. Wie komme ich an die Edelsteine?
TuesdayAWater=Du könntest probieren, Wandbausätze{{WallKit}} in der Werkzeughütte{{ToolsWorkshop}} zu bauen. Wandbausätze können benutzt werden, um stabile Wände auch unter Wasser zu errichten. Diese schützen dich vor den Fischen und schaffen Raum zum Atmen.
TuesdayAWater2=Mit Wandbausätzen und einer Pumpe solltest du die Edelsteine erreichen können.
TuesdayQBye=Tschüss.
Outro1=Die Maschine ist fertig. Ob sie wohl funktioniert?
Outro2=Das sieht gut aus. Ich sende ein Notsignal...
Outro3=Hoffentlich hat uns jemand gehört.
Outro4=Hey, sind das nicht unsere gestrandeten Freunde?
Outro5=Hurra, wir sind gerettet!
Outro6=Alles einsteigen! Wir fliegen zum Goldenen Berg.

View File

@ -1,47 +0,0 @@
Intro1=Pyrit, why do we have to fly in the clouds?
Intro2=You told me to fly higher after we almost crashed into the volcano.
Intro3=It's horribly turbulent in here.
Intro4=That's because water condensation in the cloud frees up energy which heats up the air.
Intro5=Thanks for the lecture. Now can we please fly lower again?
Intro6=First it's too turbulent when i fly low over the volcano and now it's too turbulent when i fly up high in the clouds.
Intro7=Why don't you just steer the plane yourself?
Intro8=...
Intro9=Alright. Let's swap places.
Intro10=Aaaah
Intro20=Ouch.
Intro21=Oh, a friend has fallen from the sky. Hello friend! My name is Tuesday.
Intro22=Damn. Have you seen our airplane? I accidentally dropped out of it.
Intro23=The sky is always cloudy here. We won't see any planes and planes won't see us.
Intro24=Ugh. But i need Pyrit to find me somehow.
Intro25=What lands on the island stays on the island. Just like me.
Intro26=Isn't there any way we could make a fire or something?
Intro27=Fire? That will do no good. Coconut wood doesn't burn well and it won't be seen through the clouds.
Intro28=But...we could use my <c ffff00>crystal communicator</c>!
Intro29=Sounds good. Where is it?
Intro30=I'm happy on this island. Why should i build a communication device? I've made plans but I haven't bothered to finish building it.
Intro31=The site and plans how to finish it are at the eastern end of this island. It just needs some metal and some gems.
Intro32=Metal sounds easy enough? Where can I find the gems?
Intro33=The fish sometimes talk about gem reserves deep below the ocean ground. Maybe you can mine those?
Intro34=Fish talk to you?
Intro35=If you listen carefully, even coconuts talk!
Intro36=Okay...i'll see if i can finish this construction.
Tuesday1=Hello, friend. How can I help you?
TuesdayQCommunicator=How do I use the communicator?
TuesdayACommunicator=Just bring the necessery materials to the construction site. It should work automatically when completed.
TuesdayQGems=Where can I find gems?
TuesdayAGems=Try to dive underground.
TuesdayQFish=Can you tell the fish to go away?
TuesdayAFish=I'm a listener. I do not force restraints onto the free creatures of this world.
TuesdayQWater=The water is too deep. How can I reach the gems?
TuesdayAWater=You could try and build wall kits{{WallKit}} in the tools workshop{{ToolsWorkshop}}. Wall kits can be used to construct stable walls under water protect you from fish and give some room to breath.
TuesdayAWater2=Using wall kits and a pump, you might be able to solve your problems.
TuesdayQBye=Bye
Outro1=The machine is done! I wonder whether it works.
Outro2=Looks good. Let's send a rescue signal...
Outro3=I wonder if anyone has heard us.
Outro4=Hey, isn't that our stranded friends?
Outro5=Hooray, we're saved!
Outro6=Hop on everyone, we're heading for the Golden Mountain!

View File

@ -1,2 +0,0 @@
DE:AmbienceTest: Tiefseemine
US:AmbienceTest: Deep sea mining

View File

@ -7,6 +7,8 @@ uniform sampler2D ambientTex;
uniform mat3x2 ambientTransform;
uniform float ambientBrightness;
#endif
//uniform float cullMode; // 0 if backface culling is enabled, 1 if it is disabled
// Already declared in LightShader.glsl
slice(texture+6)
{
@ -33,6 +35,6 @@ slice(light+1)
#else
// For objects, ambient brightness is coming from the front
vec3 ambientDir = vec3(0.0, 0.0, 1.0);
light = mix(light, max(dot(normal, ambientDir), 0.0), ambient);
light = mix(light, max(max(dot(normal, ambientDir), 0.0), cullMode * max(dot(-normal, ambientDir), 0.0)), ambient);
#endif
}

View File

@ -0,0 +1,7 @@
// Gamma uniforms
uniform vec3 gamma;
slice(finish+10) {
color = vec4(pow(color.rgb, gamma), color.a);
}

View File

@ -19,7 +19,7 @@ uniform float cullMode; // 0 if backface culling is enabled, 1 if it is disabled
//#define LIGHT_DEBUG_PINK
// At what point of light intensity we set the "darkness" point. This
// is to compensate for the fact that the engine "smooths" the light
// is to compensate for the fact that the engine "smoothes" the light
// and therefore will often never arrive at 0 light intensity.
const float lightDarknessLevel = 8.0 / 256.0;
@ -31,14 +31,14 @@ slice(texture+5)
vec2 lightDirCoord = lightCoord.st;
vec4 lightPx = texture2D(lightTex, lightDirCoord);
float lightBright = max(0.0, lightPx.x-lightDarknessLevel);
float lightBright = max(0.0, lightPx.a-lightDarknessLevel);
vec3 lightDir = extend_normal(vec2(1.0, 1.0) - lightPx.yz * 3.0);
// Query light color texture (part of the light texture)
vec2 lightColorCoord = lightCoord.st - vec2(0.0, 0.5); // subtract offset for the color texture
vec4 lightColor = texture2D(lightTex, lightColorCoord.st);
#ifdef LIGHT_DEBUG_COLOR
lightBright = 0.5;
lightDir = vec3(0.0, 0.0, 1.0);
@ -56,9 +56,9 @@ slice(texture+5)
slice(light)
{
float light = 2.0 * lightBright * max(max(dot(normal, lightDir), 0.0), cullMode * max(dot(vec3(-normal.xy, normal.z), lightDir), 0.0));
float light = 2.0 * lightBright * max(max(dot(normal, lightDir), 0.0), cullMode * max(dot(-normal, lightDir), 0.0));
#ifdef HAVE_2PX
float light2 = 2.0 * lightBright * max(max(dot(normal2, lightDir), 0.0), cullMode * max(dot(vec3(-normal2.xy, normal2.z), lightDir), 0.0));
float light2 = 2.0 * lightBright * max(max(dot(normal2, lightDir), 0.0), cullMode * max(dot(-normal2, lightDir), 0.0));
#endif
}
@ -85,7 +85,7 @@ slice(finish+5)
#ifdef HAVE_LIGHT
float lightYDir = lightPx.b - 1.0/3.0;
float lightXDir = lightPx.g - 1.0/3.0;
float lightStrength = lightPx.r;
float lightStrength = lightPx.a;
color =
vec4(lightStrength * vec3(1.0-1.5*(max(0.0, lightYDir) + max(0.0,lightXDir)),
1.0-1.5*(max(0.0, lightYDir) + max(0.0,-lightXDir)),

View File

@ -15,11 +15,7 @@
// Default Vertex Shader for mesh-based objects.
// Input uniforms, if OC_WA_LOW_MAX_VERTEX_UNIFORM_COMPONENTS is NOT defined:
// bones: array of 4x3 bone transformation matrices.
// Input uniforms, if OC_WA_LOW_MAX_VERTEX_UNIFORM_COMPONENTS is defined:
// bones: array of 3x4 transposed bone transformation matrices.
// Input uniforms:
// Input vertex attributes:
// oc_BoneWeights0 and oc_BoneWeight1: vectors of bone influence weights.
@ -34,15 +30,11 @@
// inside the bone matrix array that contains the identity matrix, with a bone
// weight of 1.0.
#define MAX_BONE_COUNT 80
#define MAX_BONE_COUNT 64
varying vec3 normalDir;
#ifndef OC_WA_LOW_MAX_VERTEX_UNIFORM_COMPONENTS
uniform mat4x3 bones[MAX_BONE_COUNT];
#else
uniform mat3x4 bones[MAX_BONE_COUNT];
#endif
uniform mat4 bones[MAX_BONE_COUNT];
// For more performance, this should be set by the engine, and this shader
// should be compiled three times: with BONE_COUNT set to 0, 4, and 8,
@ -57,17 +49,10 @@ attribute vec4 oc_BoneIndices1;
attribute vec4 oc_BoneWeights1;
#endif
#ifndef OC_WA_LOW_MAX_VERTEX_UNIFORM_COMPONENTS
vec4 merge_bone(vec4 vertex, vec4 original, mat4x3 bone, float weight)
vec4 merge_bone(vec4 vertex, vec4 original, mat4 bone, float weight)
{
return (mat4(bone) * original) * weight + vertex;
return (bone * original) * weight + vertex;
}
#else
vec4 merge_bone(vec4 vertex, vec4 original, mat3x4 bone, float weight)
{
return (mat4(transpose(bone)) * original) * weight + vertex;
}
#endif
slice(position)
{

View File

@ -0,0 +1,5 @@
[Material]
Name=HalfVehicle
Density=100
Friction=100
KeepSinglePixels=1

View File

@ -2,6 +2,8 @@
func InitializeObjects()
{
CreateObject(Ambience);
CreateObject(Grass, 555, 550);
CreateObjectAbove(Grass, 533, 550);
CreateObjectAbove(Grass, 1306, 706);

View File

@ -33,6 +33,7 @@ protected func PostIntroInitialize()
}
// Initialize different parts of the scenario.
CreateObject(Ambience);
InitEnvironment();
InitVegetation();
InitAnimals();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1,123 +1,100 @@
/* Automatically created objects file */
static g_chemical, g_cabin, g_sawmill, g_workshop, g_flagpole, g_windmill, npc_newton, npc_lara, npc_lisa, npc_woody, npc_rocky, npc_mave, npc_pyrit, npc_clonko, npc_matthi, npc_dora;
static g_chemical, g_cabin, g_sawmill, g_workshop, g_windmill, g_flagpole, npc_newton, npc_lara, npc_lisa, npc_woody, npc_rocky, npc_mave, npc_pyrit, npc_clonko, npc_matthi, npc_dora;
func InitializeObjects()
{
var Rule_BaseRespawn01 = CreateObject(Rule_BaseRespawn, 0, 0);
Rule_BaseRespawn01->SetInventoryTransfer(true);
Rule_BaseRespawn01->SetFreeCrew(true);
CreateObject(Ambience);
CreateObjectAbove(Grass, 1121, 429);
CreateObjectAbove(Grass, 1185, 444);
var Rule_BaseRespawn001 = CreateObject(Rule_BaseRespawn);
Rule_BaseRespawn001->SetInventoryTransfer(true);
Rule_BaseRespawn001->SetFreeCrew(true);
CreateObject(Rule_NoPowerNeed, 0, 0);
CreateObject(Rule_NoPowerNeed);
CreateObject(Rule_TeamAccount, 0, 0);
CreateObject(Rule_TeamAccount);
CreateObjectAbove(EnvPack_Scarecrow, 1218, 440);
CreateObjectAbove(EnvPack_Guidepost, 835, 369);
CreateObjectAbove(EnvPack_TreeTrunks, 808, 368);
CreateObject(EnvPack_TreeTrunks, 808, 368);
CreateObjectAbove(SproutBerryBush, 1154, 445);
var Branch0012 = CreateObjectAbove(Branch, 1509, 664);
Branch0012->SetR(-26);
Branch0012->SetPosition(1509, 657);
var Branch001 = CreateObject(Branch, 1509, 657);
Branch001->SetR(-26);
CreateObjectAbove(Trunk, 1194, 454);
CreateObjectAbove(Tree_Coconut, 1487, 669);
var Tree_Coniferous0018 = CreateObjectAbove(Tree_Coniferous, 1068, 408);
Tree_Coniferous0018->SetR(6);
Tree_Coniferous0018->SetPosition(1068, 363);
var Tree_Coniferous0022 = CreateObjectAbove(Tree_Coniferous, 1032, 403);
Tree_Coniferous0022->SetR(-8);
Tree_Coniferous0022->SetPosition(1032, 358);
var Tree_Coniferous001 = CreateObject(Tree_Coniferous, 1068, 363);
Tree_Coniferous001->SetR(6);
CreateObjectAbove(Tree_Coniferous, 1371, 576);
CreateObjectAbove(Tree_Coniferous, 1258, 470);
CreateObjectAbove(Tree_Coniferous, 1085, 429);
CreateObjectAbove(Tree_Coniferous, 1155, 441);
var Tree_Coniferous0042 = CreateObjectAbove(Tree_Coniferous, 1302, 503);
Tree_Coniferous0042->SetR(30);
Tree_Coniferous0042->SetPosition(1302, 464);
var Tree_Coniferous0046 = CreateObjectAbove(Tree_Coniferous, 1328, 541);
Tree_Coniferous0046->SetR(20);
Tree_Coniferous0046->SetPosition(1328, 499);
var Tree_Coniferous002 = CreateObject(Tree_Coniferous, 1302, 464);
Tree_Coniferous002->SetR(30);
CreateObjectAbove(Tree_Coniferous, 1219, 441);
CreateObjectAbove(EnvPack_Guidepost, 2054, 521);
CreateObjectAbove(Tree_Coniferous, 2107, 520);
CreateObjectAbove(Tree_Coniferous, 2421, 612);
CreateObjectAbove(Tree_Coniferous, 2569, 576);
CreateObjectAbove(Trunk, 2631, 589);
CreateObjectAbove(SproutBerryBush, 2599, 590);
CreateObjectAbove(SproutBerryBush, 2521, 582);
CreateObjectAbove(SproutBerryBush, 3332, 653);
CreateObject(SproutBerryBush, 3332, 645);
CreateObjectAbove(SproutBerryBush, 2674, 593);
var Branch0084 = CreateObjectAbove(Branch, 2335, 607);
Branch0084->SetR(21);
Branch0084->SetPosition(2335, 600);
var Branch002 = CreateObject(Branch, 2335, 600);
Branch002->SetR(21);
CreateObjectAbove(BigRock, 3273, 609);
var LargeCaveMushroom0086 = CreateObjectAbove(LargeCaveMushroom, 2877, 1342);
LargeCaveMushroom0086->SetClrModulation(0xffe1dde0);
var LargeCaveMushroom0090 = CreateObjectAbove(LargeCaveMushroom, 3101, 1371);
LargeCaveMushroom0090->SetClrModulation(0xffdde4da);
var LargeCaveMushroom0094 = CreateObjectAbove(LargeCaveMushroom, 2971, 1339);
LargeCaveMushroom0094->SetClrModulation(0xffe0eef5);
var LargeCaveMushroom0098 = CreateObjectAbove(LargeCaveMushroom, 2793, 1261);
LargeCaveMushroom0098->SetClrModulation(0xffdcd2ed);
var LargeCaveMushroom001 = CreateObjectAbove(LargeCaveMushroom, 2877, 1342);
LargeCaveMushroom001->SetClrModulation(0xffe1dde0);
var LargeCaveMushroom002 = CreateObjectAbove(LargeCaveMushroom, 3101, 1371);
LargeCaveMushroom002->SetClrModulation(0xffdde4da);
var LargeCaveMushroom003 = CreateObjectAbove(LargeCaveMushroom, 2971, 1339);
LargeCaveMushroom003->SetClrModulation(0xffe0eef5);
var LargeCaveMushroom004 = CreateObjectAbove(LargeCaveMushroom, 2793, 1261);
LargeCaveMushroom004->SetClrModulation(0xffdcd2ed);
CreateObjectAbove(Tree_Coconut, 1822, 679);
CreateObjectAbove(Tree_Coniferous2, 2567, 583);
CreateObjectAbove(Tree_Coniferous2, 2107, 528);
var Tree_Coniferous2001 = CreateObject(Tree_Coniferous2, 1328, 499);
Tree_Coniferous2001->SetR(20);
CreateObjectAbove(Tree_Coniferous2, 1157, 449);
var Basement0123 = CreateObjectAbove(Basement, 2720, 615);
Basement0123->SetCategory(C4D_StaticBack);
var Basement0122 = CreateObjectAbove(Basement, 2897, 603);
Basement0122->SetCategory(C4D_StaticBack);
var Basement0121 = CreateObjectAbove(Basement, 2935, 604);
Basement0121->SetCategory(C4D_StaticBack);
var Basement0120 = CreateObjectAbove(Basement, 2967, 604);
Basement0120->SetCategory(C4D_StaticBack);
var Basement0119 = CreateObjectAbove(Basement, 3019, 622);
Basement0119->SetCategory(C4D_StaticBack);
var Basement0118 = CreateObjectAbove(Basement, 3061, 624);
Basement0118->SetCategory(C4D_StaticBack);
var Basement0117 = CreateObjectAbove(Basement, 3171, 607);
Basement0117->SetCategory(C4D_StaticBack);
var Basement0116 = CreateObjectAbove(Basement, 3205, 608);
Basement0116->SetCategory(C4D_StaticBack);
var Basement0115 = CreateObjectAbove(Basement, 3230, 609);
Basement0115->SetCategory(C4D_StaticBack);
var Basement0114 = CreateObjectAbove(Basement, 2837, 616);
Basement0114->SetCategory(C4D_StaticBack);
var Basement0113 = CreateObjectAbove(Basement, 2796, 617);
Basement0113->SetCategory(C4D_StaticBack);
var Basement0112 = CreateObjectAbove(Basement, 2758, 616);
Basement0112->SetCategory(C4D_StaticBack);
var Basement0111 = CreateObjectAbove(Basement, 581, 374);
Basement0111->SetCategory(C4D_StaticBack);
var Basement0110 = CreateObjectAbove(Basement, 733, 373);
Basement0110->SetCategory(C4D_StaticBack);
var Basement0109 = CreateObjectAbove(Basement, 618, 374);
Basement0109->SetCategory(C4D_StaticBack);
var Basement0108 = CreateObjectAbove(Basement, 93, 395);
Basement0108->SetCategory(C4D_StaticBack);
var Basement0107 = CreateObjectAbove(Basement, 464, 372);
Basement0107->SetCategory(C4D_StaticBack);
var Basement0106 = CreateObjectAbove(Basement, 758, 374);
Basement0106->SetCategory(C4D_StaticBack);
CreateObjectAbove(Tree_Coniferous, 1102, 432);
var Foundry0124 = CreateObjectAbove(Foundry, 944, 782);
var Foundry0127 = CreateObjectAbove(Foundry, 2958, 596);
var Tree_Coniferous2002 = CreateObject(Tree_Coniferous2, 1032, 358);
Tree_Coniferous2002->SetR(-8);
CreateObjectAbove(Tree_Coniferous3, 2359, 624);
CreateObjectAbove(Tree_Coniferous3, 2424, 609);
CreateObject(Basement, 758, 370);
CreateObject(Basement, 464, 368);
CreateObject(Basement, 93, 391);
CreateObject(Basement, 618, 370);
CreateObject(Basement, 733, 369);
CreateObject(Basement, 581, 370);
CreateObject(Basement, 2758, 612);
CreateObject(Basement, 2796, 613);
CreateObject(Basement, 2837, 612);
CreateObject(Basement, 3233, 603);
CreateObject(Basement, 3205, 604);
CreateObject(Basement, 3171, 603);
CreateObject(Basement, 3061, 620);
CreateObject(Basement, 3019, 618);
CreateObject(Basement, 2967, 600);
CreateObject(Basement, 2935, 600);
CreateObject(Basement, 2897, 599);
CreateObject(Basement, 2720, 611);
var Foundry002 = CreateObjectAbove(Foundry, 944, 782);
var Foundry001 = CreateObjectAbove(Foundry, 2958, 596);
g_chemical = CreateObjectAbove(ChemicalLab, 734, 365);
g_chemical.StaticSaveVar = "g_chemical";
@ -132,7 +109,7 @@ func InitializeObjects()
g_workshop = CreateObjectAbove(ToolsWorkshop, 609, 365);
g_workshop.StaticSaveVar = "g_workshop";
var ToolsWorkshop0139 = CreateObjectAbove(ToolsWorkshop, 2905, 595);
var ToolsWorkshop001 = CreateObjectAbove(ToolsWorkshop, 2905, 595);
CreateObjectAbove(Castle_ConstructionSite, 281, 343);
@ -140,41 +117,42 @@ func InitializeObjects()
CreateObjectAbove(InventorsLab, 3212, 599);
var Shipyard0146 = CreateObjectAbove(Shipyard, 2763, 608);
var Shipyard001 = CreateObjectAbove(Shipyard, 2763, 608);
CreateObjectAbove(Loom, 3080, 616);
var StoneDoor0150 = CreateObjectAbove(StoneDoor, 540, 1263);
StoneDoor0150->SetComDir(COMD_Down);
var StoneDoor001 = CreateObject(StoneDoor, 540, 1244);
StoneDoor001->SetComDir(COMD_Down);
var SpinWheel0151 = CreateObjectAbove(SpinWheel, 571, 1263);
SpinWheel0151->SetStoneDoor(StoneDoor0150);
var WindGenerator0269 = CreateObjectAbove(WindGenerator, 3163, 599);
WindGenerator0269->SetCategory(C4D_StaticBack);
g_flagpole = CreateObjectAbove(Flagpole, 502, 369);
g_flagpole->SetNeutral(true);
g_flagpole.StaticSaveVar = "g_flagpole";
var SpinWheel001 = CreateObjectAbove(SpinWheel, 571, 1263);
SpinWheel001->SetStoneDoor(StoneDoor001);
g_windmill = CreateObjectAbove(Windmill, 665, 351);
g_windmill->SetCategory(C4D_StaticBack);
g_windmill.StaticSaveVar = "g_windmill";
var Elevator0361 = CreateObjectAbove(Elevator, 76, 387);
Elevator0361->SetDir(DIR_Right);
Elevator0361->CreateShaft(530);
Elevator0361->SetCasePosition(905);
g_flagpole = CreateObjectAbove(Flagpole, 502, 369);
g_flagpole.StaticSaveVar = "g_flagpole";
g_flagpole->SetNeutral(true);
var Lorry0369 = CreateObjectAbove(Lorry, 25, 779);
Lorry0369->SetR(11);
Lorry0369->SetPosition(25, 771);
var Lorry0371 = CreateObjectAbove(Lorry, 3188, 598);
CreateObjectAbove(WindGenerator, 3163, 599);
var Catapult0373 = CreateObjectAbove(Catapult, 2795, 608);
Catapult0373->SetRDir(4);
Catapult0373->SetObjectLayer(Catapult0373);
var Elevator001 = CreateObjectAbove(Elevator, 76, 387);
Elevator001->SetDir(DIR_Right);
Elevator001->CreateShaft(530);
Elevator001->SetCasePosition(905);
var Elevator002 = CreateObjectAbove(Elevator, 985, 782);
Elevator002->CreateShaft(30);
Elevator002->SetCasePosition(800);
var Lorry001 = CreateObject(Lorry, 25, 771);
Lorry001->SetR(11);
var Lorry002 = CreateObject(Lorry, 3188, 591);
Lorry002->SetR(6);
Lorry002->SetRDir(7);
var Catapult001 = CreateObjectAbove(Catapult, 2795, 608);
Catapult001->SetRDir(-5);
Catapult001->SetObjectLayer(Catapult001);
npc_newton = CreateObjectAbove(Clonk, 226, 321);
npc_newton->SetColor(0xffff);
npc_newton->SetName("Newton");
@ -242,249 +220,211 @@ func InitializeObjects()
npc_dora->SetObjectLayer(npc_dora);
npc_dora->SetSkin(3);
CreateObjectAbove(Fish, 1923, 729);
CreateObjectAbove(Fish, 1924, 746);
CreateObjectAbove(Fish, 1889, 728);
CreateObjectAbove(Fish, 1879, 726);
npc_dora->SetDialogue("Dora",true);
var Mosquito001 = CreateObjectAbove(Mosquito, 2292, 514);
Mosquito001->SetXDir(-6);
Mosquito001->SetCommand("Call", Mosquito001, nil, 0, nil, "MissionComplete");
var Pickaxe0478 = npc_rocky->CreateContents(Pickaxe);
var Sickle001 = npc_matthi->CreateContents(Sickle);
npc_rocky->SetDialogue("Rocky",true);
npc_matthi->SetDialogue("Matthi",true);
var Axe0473 = npc_woody->CreateContents(Axe);
npc_woody->SetDialogue("Woody",true);
npc_lisa->SetDialogue("Lisa",true);
npc_lara->SetDialogue("Lara",true);
var Hammer0462 = npc_newton->CreateContents(Hammer);
npc_newton->SetDialogue("Newton",true);
var Bucket0460 = npc_mave->CreateContents(Bucket);
npc_mave->SetDialogue("Mave",false);
var Hammer0455 = npc_pyrit->CreateContents(Hammer);
var Hammer0454 = npc_pyrit->CreateContents(Hammer);
npc_pyrit->SetDialogue("Pyrit",true);
var Hammer0451 = npc_clonko->CreateContents(Hammer);
var Hammer001 = npc_clonko->CreateContents(Hammer);
npc_clonko->SetDialogue("Clonko",true);
var Sickle0448 = npc_matthi->CreateContents(Sickle);
var Hammer002 = npc_pyrit->CreateContents(Hammer);
var Hammer003 = npc_pyrit->CreateContents(Hammer);
npc_matthi->SetDialogue("Matthi",true);
npc_pyrit->SetDialogue("Pyrit",true);
var Bucket001 = npc_mave->CreateContents(Bucket);
npc_mave->SetDialogue("Mave",false);
var Hammer004 = npc_newton->CreateContents(Hammer);
npc_newton->SetDialogue("Newton",true);
npc_lara->SetDialogue("Lara",true);
npc_lisa->SetDialogue("Lisa",true);
var Axe001 = npc_woody->CreateContents(Axe);
npc_woody->SetDialogue("Woody",true);
var Pickaxe001 = npc_rocky->CreateContents(Pickaxe);
npc_rocky->SetDialogue("Rocky",true);
npc_dora->SetDialogue("Dora",true);
CreateObjectAbove(Skull, 1566, 703);
CreateObjectAbove(Skull, 3124, 1378);
CreateObjectAbove(Rock, 685, 594);
CreateObjectAbove(Rock, 793, 488);
CreateObjectAbove(Rock, 1244, 515);
CreateObjectAbove(Rock, 1480, 735);
CreateObjectAbove(Rock, 794, 895);
CreateObjectAbove(Rock, 311, 447);
CreateObjectAbove(Rock, 1243, 792);
CreateObjectAbove(Rock, 1231, 737);
CreateObjectAbove(Rock, 563, 922);
CreateObjectAbove(Rock, 1219, 1088);
CreateObjectAbove(Rock, 428, 1319);
CreateObjectAbove(Rock, 2100, 951);
CreateObjectAbove(Rock, 1922, 1161);
CreateObjectAbove(Rock, 2277, 968);
CreateObjectAbove(Rock, 2405, 696);
CreateObjectAbove(Rock, 2893, 989);
CreateObjectAbove(Rock, 3131, 689);
CreateObjectAbove(Rock, 3266, 1379);
CreateObject(Rock, 685, 593);
CreateObject(Rock, 793, 487);
CreateObject(Rock, 1244, 514);
CreateObject(Rock, 1480, 734);
CreateObject(Rock, 794, 894);
CreateObject(Rock, 311, 446);
CreateObject(Rock, 1243, 791);
CreateObject(Rock, 1231, 736);
CreateObject(Rock, 563, 921);
CreateObject(Rock, 1219, 1087);
CreateObject(Rock, 428, 1318);
CreateObject(Rock, 2100, 950);
CreateObject(Rock, 1922, 1160);
CreateObject(Rock, 2277, 967);
CreateObject(Rock, 2405, 695);
CreateObject(Rock, 2893, 988);
CreateObject(Rock, 3131, 688);
CreateObject(Rock, 3266, 1378);
CreateObjectAbove(Ore, 2226, 943);
Foundry0127->CreateContents(Ore);
Foundry0127->CreateContents(Ore);
Foundry0127->CreateContents(Ore);
Foundry001->CreateContents(Ore, 3);
CreateObjectAbove(Loam, 1030, 449);
CreateObjectAbove(Loam, 1122, 920);
CreateObjectAbove(Loam, 1492, 804);
CreateObjectAbove(Loam, 935, 1132);
CreateObjectAbove(Loam, 456, 1004);
CreateObjectAbove(Loam, 2315, 632);
CreateObjectAbove(Loam, 2582, 790);
CreateObjectAbove(Loam, 3056, 725);
CreateObjectAbove(Loam, 3235, 792);
CreateObjectAbove(Loam, 3167, 949);
CreateObjectAbove(Loam, 2630, 1052);
CreateObjectAbove(Loam, 3238, 1150);
CreateObjectAbove(Loam, 2734, 1245);
CreateObjectAbove(Loam, 3003, 1345);
Foundry0124->CreateContents(Loam);
Foundry0124->CreateContents(Loam);
CreateObjectAbove(Loam, 951, 1333);
CreateObject(Loam, 1030, 446);
CreateObject(Loam, 1122, 917);
CreateObject(Loam, 1492, 801);
CreateObjectAbove(Loam, 926, 1166);
CreateObject(Loam, 456, 1001);
CreateObject(Loam, 2315, 629);
CreateObject(Loam, 2582, 787);
CreateObject(Loam, 3056, 722);
CreateObject(Loam, 3235, 789);
CreateObject(Loam, 3167, 946);
CreateObject(Loam, 2630, 1049);
CreateObject(Loam, 3238, 1147);
CreateObject(Loam, 2734, 1242);
CreateObject(Loam, 3003, 1342);
Foundry002->CreateContents(Loam, 2);
CreateObject(Loam, 951, 1330);
CreateObjectAbove(Loam, 970, 1355);
CreateObjectAbove(Loam, 952, 1364);
CreateObjectAbove(Loam, 808, 1336);
CreateObjectAbove(Loam, 737, 1322);
CreateObjectAbove(Loam, 652, 1280);
CreateObjectAbove(Loam, 797, 1391);
CreateObjectAbove(Loam, 1021, 1339);
CreateObjectAbove(Loam, 952, 1399);
CreateObject(Loam, 808, 1333);
CreateObject(Loam, 737, 1319);
CreateObject(Loam, 652, 1277);
CreateObject(Loam, 797, 1388);
CreateObjectAbove(Loam, 1012, 1391);
CreateObjectAbove(Loam, 492, 1263);
CreateObjectAbove(Loam, 504, 1263);
CreateObjectAbove(Loam, 500, 1263);
CreateObjectAbove(Metal, 2217, 942);
ToolsWorkshop0139->CreateContents(Metal);
ToolsWorkshop0139->CreateContents(Metal);
ToolsWorkshop0139->CreateContents(Metal);
Shipyard0146->CreateContents(Metal);
Shipyard0146->CreateContents(Metal);
Shipyard0146->CreateContents(Metal);
Shipyard0146->CreateContents(Metal);
Lorry0371->CreateContents(Metal);
Lorry0371->CreateContents(Metal);
ToolsWorkshop001->CreateContents(Metal, 3);
Shipyard001->CreateContents(Metal, 4);
Lorry002->CreateContents(Metal, 2);
CreateObjectAbove(Moss, 1529, 681);
CreateObject(Moss, 1529, 680);
ToolsWorkshop0139->CreateContents(Wood);
ToolsWorkshop0139->CreateContents(Wood);
ToolsWorkshop0139->CreateContents(Wood);
Shipyard0146->CreateContents(Wood);
Shipyard0146->CreateContents(Wood);
Shipyard0146->CreateContents(Wood);
Shipyard0146->CreateContents(Wood);
ToolsWorkshop001->CreateContents(Wood, 3);
Shipyard001->CreateContents(Wood, 4);
var Crate0548 = CreateObjectAbove(Crate, 2836, 607);
ToolsWorkshop001->CreateContents(Pickaxe, 2);
var Hammer0549 = Crate0548->CreateContents(Hammer);
Hammer0549->SetR(50);
ToolsWorkshop0139->CreateContents(Hammer);
ToolsWorkshop0139->CreateContents(Hammer);
Lorry001->CreateContents(Axe, 3);
Foundry0124->CreateContents(Bucket);
Foundry0124->CreateContents(Bucket);
Foundry0124->CreateContents(Bucket);
var Crate001 = CreateObjectAbove(Crate, 2836, 607);
Crate001->CreateContents(Hammer);
ToolsWorkshop001->CreateContents(Hammer, 2);
Foundry002->CreateContents(Bucket, 3);
CreateObjectAbove(Bucket, 435, 1271);
Lorry0369->CreateContents(Axe);
Lorry0369->CreateContents(Axe);
Lorry0369->CreateContents(Axe);
ToolsWorkshop0139->CreateContents(Pickaxe);
ToolsWorkshop0139->CreateContents(Pickaxe);
CreateObjectAbove(Crate, 2849, 607);
CreateObjectAbove(Crate, 444, 1271);
CreateObjectAbove(Crate, 473, 1263);
CreateObjectAbove(Crate, 403, 1271);
var Barrel0560 = Foundry0124->CreateContents(Barrel);
Barrel0560->SetColor(0xff000000);
Barrel0560->AddRestoreMode(Foundry0124);
var Barrel0562 = Foundry0124->CreateContents(Barrel);
Barrel0562->SetColor(0xff000000);
Barrel0562->AddRestoreMode(Foundry0124);
var Barrel0564 = CreateObjectAbove(Barrel, 484, 367);
Barrel0564->SetR(23);
Barrel0564->SetColor(0xff000000);
Barrel0564->SetObjectLayer(Barrel0564);
Barrel0564->SetPosition(484, 361);
var Barrel0566 = CreateObjectAbove(Barrel, 648, 351);
Barrel0566->SetR(-22);
Barrel0566->SetColor(0xff000000);
Barrel0566->SetObjectLayer(Barrel0566);
Barrel0566->SetPosition(648, 345);
var Barrel0568 = CreateObjectAbove(Barrel, 244, 321);
Barrel0568->SetColor(0xff000000);
Barrel0568->SetObjectLayer(Barrel0568);
var Barrel0570 = CreateObjectAbove(Barrel, 396, 343);
Barrel0570->SetColor(0xff000000);
Barrel0570->SetObjectLayer(Barrel0570);
var Barrel001 = Foundry002->CreateContents(Barrel);
Barrel001->AddRestoreMode(Foundry002, 944, 757);
Barrel001->SetColor(0xff000000);
var Barrel002 = Foundry002->CreateContents(Barrel);
Barrel002->AddRestoreMode(Foundry002, 944, 757);
Barrel002->SetColor(0xff000000);
var Barrel003 = CreateObject(Barrel, 484, 361);
Barrel003->SetR(23);
Barrel003->SetColor(0xff000000);
Barrel003->SetObjectLayer(Barrel003);
var Barrel004 = CreateObject(Barrel, 648, 345);
Barrel004->SetR(-22);
Barrel004->SetColor(0xff000000);
Barrel004->SetObjectLayer(Barrel004);
var Barrel005 = CreateObjectAbove(Barrel, 244, 321);
Barrel005->SetColor(0xff000000);
Barrel005->SetObjectLayer(Barrel005);
var Barrel006 = CreateObjectAbove(Barrel, 396, 343);
Barrel006->SetColor(0xff000000);
Barrel006->SetObjectLayer(Barrel006);
CreateObjectAbove(Mushroom, 1192, 448);
CreateObjectAbove(Mushroom, 1170, 440);
CreateObjectAbove(Mushroom, 1170, 439);
CreateObjectAbove(Mushroom, 1492, 663);
CreateObjectAbove(Mushroom, 1131, 436);
CreateObjectAbove(Mushroom, 1523, 675);
CreateObjectAbove(Mushroom, 1163, 440);
CreateObjectAbove(Mushroom, 1131, 434);
CreateObjectAbove(Mushroom, 1523, 674);
CreateObjectAbove(Mushroom, 1163, 438);
CreateObjectAbove(Mushroom, 1070, 414);
CreateObjectAbove(Mushroom, 1010, 399);
CreateObjectAbove(Mushroom, 960, 400);
CreateObjectAbove(Mushroom, 1175, 440);
CreateObjectAbove(Mushroom, 1120, 432);
CreateObjectAbove(Mushroom, 989, 400);
CreateObjectAbove(Mushroom, 968, 400);
CreateObjectAbove(Mushroom, 1013, 400);
CreateObjectAbove(Mushroom, 1496, 664);
CreateObjectAbove(Mushroom, 1088, 424);
CreateObjectAbove(Mushroom, 989, 398);
CreateObjectAbove(Mushroom, 968, 398);
CreateObjectAbove(Mushroom, 1013, 399);
CreateObjectAbove(Mushroom, 1496, 662);
CreateObjectAbove(Mushroom, 1088, 423);
CreateObjectAbove(Mushroom, 1545, 696);
CreateObjectAbove(Mushroom, 1223, 440);
CreateObjectAbove(Mushroom, 1223, 438);
CreateObjectAbove(Mushroom, 943, 399);
CreateObjectAbove(Mushroom, 1006, 400);
CreateObjectAbove(Mushroom, 1006, 399);
var Seaweed0652 = CreateObjectAbove(Seaweed, 1952, 903);
Seaweed0652->SetPhase(26);
var Seaweed0655 = CreateObjectAbove(Seaweed, 2013, 911);
Seaweed0655->SetPhase(1);
var Seaweed0658 = CreateObjectAbove(Seaweed, 1903, 887);
Seaweed0658->SetPhase(57);
var Seaweed0661 = CreateObjectAbove(Seaweed, 1983, 911);
Seaweed0661->SetPhase(35);
var Seaweed0664 = CreateObjectAbove(Seaweed, 2207, 942);
Seaweed0664->SetPhase(29);
var Seaweed0667 = CreateObjectAbove(Seaweed, 2127, 895);
Seaweed0667->SetPhase(44);
var Seaweed0670 = CreateObjectAbove(Seaweed, 2227, 943);
Seaweed0670->SetPhase(29);
var Seaweed0673 = CreateObjectAbove(Seaweed, 2191, 927);
Seaweed0673->SetPhase(29);
var Seaweed0676 = CreateObjectAbove(Seaweed, 2232, 943);
Seaweed0676->SetPhase(66);
var Seaweed0679 = CreateObjectAbove(Seaweed, 2269, 927);
Seaweed0679->SetPhase(66);
var Seaweed0682 = CreateObjectAbove(Seaweed, 2249, 935);
Seaweed0682->SetPhase(66);
CreateObjectAbove(Seaweed, 1952, 903);
CreateObjectAbove(Seaweed, 2013, 911);
CreateObjectAbove(Seaweed, 1903, 887);
CreateObjectAbove(Seaweed, 1983, 911);
CreateObjectAbove(Seaweed, 2207, 942);
CreateObjectAbove(Seaweed, 2127, 895);
CreateObjectAbove(Seaweed, 2227, 943);
CreateObjectAbove(Seaweed, 2191, 927);
CreateObjectAbove(Seaweed, 2232, 943);
CreateObjectAbove(Seaweed, 2269, 927);
CreateObjectAbove(Seaweed, 2249, 935);
CreateObjectAbove(DynamiteBox, 2844, 607);
CreateObjectAbove(DynamiteBox, 452, 1271);
var DynamiteBox0687 = CreateObjectAbove(DynamiteBox, 430, 1271);
DynamiteBox0687->SetR(10);
DynamiteBox0687->SetPosition(430, 1269);
var DynamiteBox001 = CreateObject(DynamiteBox, 430, 1269);
DynamiteBox001->SetR(10);
var MetalBarrel0688 = CreateObjectAbove(MetalBarrel, 395, 1271);
MetalBarrel0688->SetColor(0xff000000);
var MetalBarrel0690 = CreateObjectAbove(MetalBarrel, 421, 1271);
MetalBarrel0690->SetR(-104);
MetalBarrel0690->SetColor(0xff000000);
MetalBarrel0690->SetPosition(421, 1268);
var MetalBarrel0692 = CreateObjectAbove(MetalBarrel, 411, 1271);
MetalBarrel0692->SetColor(0xff000000);
var MetalBarrel0694 = CreateObjectAbove(MetalBarrel, 385, 1271);
MetalBarrel0694->SetColor(0xff000000);
var MetalBarrel001 = CreateObjectAbove(MetalBarrel, 395, 1271);
MetalBarrel001->SetColor(0xff000000);
var MetalBarrel002 = CreateObject(MetalBarrel, 421, 1268);
MetalBarrel002->SetR(-104);
MetalBarrel002->SetColor(0xff000000);
var MetalBarrel003 = CreateObjectAbove(MetalBarrel, 411, 1271);
MetalBarrel003->SetColor(0xff000000);
var MetalBarrel004 = CreateObjectAbove(MetalBarrel, 385, 1271);
MetalBarrel004->SetColor(0xff000000);
var PowderKeg0696 = CreateObjectAbove(PowderKeg, 378, 1271);
PowderKeg0696->SetR(99);
PowderKeg0696->SetPosition(378, 1268);
var WindBag0698 = CreateObjectAbove(WindBag, 382, 1271);
WindBag0698->SetR(-29);
WindBag0698->SetPosition(382, 1268);
CreateObjectAbove(Firestone, 1272, 962);
CreateObjectAbove(Firestone, 1763, 901);
CreateObjectAbove(Firestone, 1415, 709);
CreateObjectAbove(Firestone, 772, 622);
CreateObjectAbove(Firestone, 1196, 494);
CreateObjectAbove(Firestone, 345, 693);
Lorry0371->CreateContents(Firestone);
Lorry0371->CreateContents(Firestone);
CreateObjectAbove(Firestone, 2460, 1367);
CreateObjectAbove(Firestone, 2893, 672);
CreateObjectAbove(Firestone, 2998, 960);
CreateObjectAbove(Firestone, 3266, 1173);
CreateObjectAbove(Firestone, 2653, 1130);
CreateObjectAbove(Firestone, 2410, 1166);
CreateObjectAbove(Firestone, 2853, 1379);
var PowderKeg001 = CreateObject(PowderKeg, 378, 1268);
PowderKeg001->SetR(99);
var WindBag001 = CreateObject(WindBag, 382, 1268);
WindBag001->SetR(-29);
CreateObject(Firestone, 1272, 961);
CreateObject(Firestone, 1763, 900);
CreateObject(Firestone, 1415, 708);
CreateObject(Firestone, 772, 621);
CreateObject(Firestone, 1196, 493);
CreateObject(Firestone, 345, 692);
Lorry002->CreateContents(Firestone, 2);
CreateObject(Firestone, 2460, 1366);
CreateObject(Firestone, 2893, 671);
CreateObject(Firestone, 2998, 959);
CreateObject(Firestone, 3266, 1172);
CreateObject(Firestone, 2653, 1129);
CreateObject(Firestone, 2410, 1165);
CreateObject(Firestone, 2853, 1378);
return true;
}

View File

@ -13,16 +13,16 @@ Goals=Goal_Raid=1
Rules=Rule_TeamAccount=1;Rule_NoPowerNeed=1;Rule_BaseRespawn=1;
[Player1]
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1;WallKit=1
[Player2]
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1;WallKit=1
[Player3]
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1;WallKit=1
[Player4]
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1
Knowledge=Foundry=1;ToolsWorkshop=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;ChemicalLab=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;Barrel=1;Dynamite=1;DynamiteBox=1;Loam=1;Bucket=1;GoldBar=1;Metal=1;Pipe=1;WallKit=1
[Landscape]
Sky=Clouds2

View File

@ -21,7 +21,8 @@ static g_is_initialized, // intro started
g_mave_oil_spoken, // got the key offer from Mave
g_got_maves_key, // got the key from Mave
g_dora_spoken, // got rumour about oil lake from Clonko
g_clonko_spoken; // got rumour about oil lake from Dora
g_clonko_spoken, // got rumour about oil lake from Dora
g_oil_delivered; // oil delivered, all done!
func Initialize()
{
@ -94,7 +95,8 @@ func JoinPlayer(int plr, object crew, bool no_placement)
func StartAttackSequence(object chopping_clonk)
{
return StartSequence("AttackSequence", 0, chopping_clonk);
if (!chopping_clonk) chopping_clonk = GetCursor(GetPlayerByIndex());
return StartSequence("Attack", 0, chopping_clonk);
}
@ -102,7 +104,8 @@ func StartAttackSequence(object chopping_clonk)
func OnPlaneLoaded(object plane, object oil)
{
if (!plane || !oil) return false; // disappeared in that one frame?
if (!plane || !oil || g_oil_delivered) return false; // disappeared in that one frame?
g_oil_delivered = true;
oil->Enter(plane);
g_goal->SetStageDone();
g_goal->SetFulfilled();

View File

@ -40,13 +40,15 @@ func Dlg_Mave_6(object clonk)
func Dlg_Mave_7(object clonk)
{
MessageBox("$Mave7$", clonk, clonk); // how?
var options = [["$Mave7$", "Dlg_Mave_Loam"], ["$Mave12$", "Dlg_Mave_Elev"], ["$MaveBye$", "StopDialogue()"]];
MessageBox("", clonk, clonk, nil, false, options); // how cross lake? where elevator?
return true;
}
func Dlg_Mave_8(object clonk)
func Dlg_Mave_Loam(object clonk)
{
MessageBox("$Mave8$", clonk, dlg_target); // build loam
SetDialogueProgress(9);
return true;
}
@ -66,7 +68,15 @@ func Dlg_Mave_11(object clonk)
{
MessageBox("$Mave11$", clonk, dlg_target); // tools in foundry
StopDialogue();
SetDialogueProgress(9);
SetDialogueProgress(7);
return true;
}
func Dlg_Mave_Elev(object clonk)
{
MessageBox("$Mave13$", clonk, dlg_target); // the elevator leads to the oil chamber
StopDialogue();
SetDialogueProgress(7);
return true;
}
@ -112,43 +122,49 @@ func Dlg_Mave_105(object clonk)
func Dlg_Mave_106(object clonk)
{
MessageBox("$Mave106$", clonk, dlg_target); // u need key
MessageBox("$Mave106$", clonk, dlg_target); // chamber is down the shaft
return true;
}
func Dlg_Mave_107(object clonk)
{
MessageBox("$Mave107$", clonk, clonk); // k key plz
MessageBox("$Mave107$", clonk, dlg_target); // u need key
return true;
}
func Dlg_Mave_108(object clonk)
{
MessageBox("$Mave108$", clonk, dlg_target); // i give key 4 gold bar
g_mave_oil_spoken = true; // this updates Pyrit's dialogue - but not enough to warrant a new attention marker
MessageBox("$Mave108$", clonk, clonk); // k key plz
return true;
}
func Dlg_Mave_109(object clonk)
{
MessageBox("$Mave109$", clonk, dlg_target); // i give key 4 gold bar
g_mave_oil_spoken = true; // this updates Pyrit's dialogue - but not enough to warrant a new attention marker
return true;
}
func Dlg_Mave_110(object clonk)
{
// gold bar found?
var gold_bar = clonk->FindContents(GoldBar);
if (!gold_bar) gold_bar = FindObject(Find_AtRect(-30,-30,60,60), Find_ID(GoldBar));
if (gold_bar) return Dlg_Mave_200(clonk, gold_bar);
// not found yet
MessageBox("$Mave109$", clonk, clonk); // where is gold?
return true;
}
func Dlg_Mave_110(object clonk)
{
MessageBox("$Mave110$", clonk, dlg_target); // no idea
MessageBox("$Mave110$", clonk, clonk); // where is gold?
return true;
}
func Dlg_Mave_111(object clonk)
{
MessageBox("$Mave111$", clonk, dlg_target); // bring nuggets 2 foundry 4 gold bar
MessageBox("$Mave111$", clonk, dlg_target); // no idea
return true;
}
func Dlg_Mave_112(object clonk)
{
MessageBox("$Mave112$", clonk, dlg_target); // bring nuggets 2 foundry 4 gold bar
SetBroadcast(false);
StopDialogue();
SetDialogueProgress(109);
@ -161,6 +177,7 @@ func Dlg_Mave_111(object clonk)
func Dlg_Mave_200(object clonk, object gold_bar)
{
gold_bar->RemoveObject();
g_allow_gold_sale = true;
SetBroadcast(true);
MessageBox("$Mave200$", clonk, clonk); // here is gold bar
SetDialogueProgress(201);

View File

@ -98,6 +98,7 @@ func Dlg_Pyrit_15(object clonk)
MessageBox("$Pyrit15$", clonk, dlg_target); // take con plans for plane
g_pyrit_spoken = true;
g_goal->SetStagePlane();
AddTimer(this.CheckOilAtPlane, 10);
SetBroadcast(false);
StopDialogue();
SetDialogueProgress(16);
@ -110,6 +111,19 @@ func Dlg_Pyrit_15(object clonk)
return true;
}
// called every 10 frames after plane+oil task has been given
func CheckOilAtPlane()
{
var barrel;
for (var plane in FindObjects(Find_ID(Plane)))
if (barrel = plane->FindObject(plane->Find_AtRect(-30,-10,60,20), Find_ID(MetalBarrel)))
{
RemoveTimer(Scenario.CheckOilAtPlane);
ScheduleCall(nil, Global.GameCall, 1,1, "OnPlaneLoaded", plane, barrel);
}
return true;
}
func Dlg_Pyrit_16(object clonk)
{
// ask how to build plane unless it has been built
@ -179,7 +193,7 @@ static const Pyrit_Hammer_SwingTime = 40;
func Dlg_Pyrit_Init(object clonk)
{
// Pyit has a red hat!
clonk->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(0,5500));
clonk->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
// Clonk moves slowly.
clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
clonk.ActMap.Walk.Speed /= 3;

View File

@ -1,3 +1,6 @@
#appendto Nugget
#appendto GoldBar
func IsValuable(){}
static g_allow_gold_sale;
func IsValuable() { return g_allow_gold_sale; }

View File

@ -29,7 +29,7 @@ func Attack_1()
pilot->SetColor(0xff101010);
pilot->SetDir(DIR_Left);
//plane->FaceLeft();
plane->StartInstantFlight(270, 15);
plane->StartInstantFlight(260, 15);
plane->SetXDir(-15);
plane->MakeInvincible();
this.planes[i] = plane;
@ -64,8 +64,9 @@ func Attack_5()
MessageBoxAll("$Attack3$", npc_lara, true); // oh god!
for (var i=0; i<3; ++i)
{
this.planes[i]->StartInstantFlight(280, 15);
this.planes[i]->StartInstantFlight(270, 15);
this.planes[i]->SetXDir(-15);
this.planes[i]->SetYDir(0);
}
SetViewTarget(g_flagpole);
// NPCs go nuts

View File

@ -28,9 +28,9 @@ Newton100=Hey %s! Hast du den Angriff überstanden?
Newton101=Bestens. Ich konnte das Spektakel in aller Ruhe aus dem Wald beobachten.
Newton102=Wir werden Monate brauchen, um alles wieder aufzubauen. Und in der Zeit sind wir ihren Angriffen schutzlos ausgesetzt.
Newton103=Wer sind denn die Angreifer?
Newton104=Das sind die Schergen von \"König\" Hörx. Wir haben uns geweigert, unfaire Tribute abzuführen und nun wollen sie an uns ein Exempel statuieren.
Newton105=Wieso \"König\"?
Newton106=Er hat eine Krone auf dem Kopf. Na und? Wir haben ihn nicht gewählt. Wir werden niemals einen Herrscher anerkennen, der keine demokratische Legitimation hat!
Newton104=Das sind die Schergen von König Hörx. Wir haben uns geweigert, unfaire Tribute abzuführen und nun wollen sie an uns ein Exempel statuieren.
Newton105=Aber er ist unser König, oder?
Newton106=Er hat eine Krone auf dem Kopf. Na und? Wir haben ihn nicht gewählt. Wir werden niemals einen Herrscher anerkennen, der uns nur tyrannisiert!
Newton107=Okay. Aber was wollt ihr nun tun?
Newton108=Nichts. Es ist hoffnungslos. Wir werden alle sterben. Es sei denn...
Newton109=...?
@ -49,9 +49,9 @@ Newton121=Viel Glück! Du wirst es brauchen.
Newton200=Newton, ich habe ein Flugzeug für den Gegenschlag auf Hörx. Aber leider keinen Treibstoff.
Newton200a=Newton, ich habe die Pläne für ein Flugzeug für den Gegenschlag auf Hörx. Aber leider keinen Treibstoff.
Newton201=Sehr gut, %s. Du brauchst Öl? Das ist in der Tat ein Problem. Hörx hat den Privatbesitz von Öl unter Strafe gestellt.
Newton201=Sehr gut, %s. Du brauchst Öl? Das ist in der Tat ein Problem. Hörx hat den Besitz von Öl unter Strafe gestellt.
Newton202=Natürlich haben wir uns nicht daran gehalten. Aber für unsere Verteidigung und den Burgenbau mussten wir alles verkaufen.
Newton203=Hier im Dorf ist nichts mehr. Frag mal Mave in der Höhle. Der hamstert vielleicht noch etwas.
Newton203=Hier im Dorf ist nichts mehr. Aber wir haben noch Öl in der Höhle unter diesem Dorf. Frag mal Mave, neben dem Hochofen. Der passt auf den Schlüssel auf.
Lara1=Wir brauchen mehr Holz. Dann schaffen wir heute vor der Dunkelheit noch das äußere Gerüst.
@ -115,24 +115,28 @@ Mave8=Du könntest meinen Hochofen nutzen, um Lehm zu bauen.
Mave9=Wie funktioniert das mit dem Lehm?
Mave10=Oh, das ist ganz einfach: Fülle einen Eimer{{Bucket}} mit Erde und ein Fass{{Barrel}} mit Wasser, lege beides in den Hochofen und starte die Lehmproduktion.
Mave11=Die Werkzeuge im Hochofen kannst du benutzen.
Mave12=Wohin führt der Fahrstuhlschacht?
Mave13=Das ist der Fahrstuhl zur Kammer mit unseren Ölreserven. Leider ist der Weg von einem Vulkan geflutet. Hm. Vielleicht könnte man das Wasser aus dem See benutzen, um die Lava abzukühlen.
MaveBye=Tschüss.
Mave100=Hi Mave. Weißt du, wo ich Öl finden könnte?
Mave101=Oh, Öl. Du weißt, dass wir auf Dekret des Königs keine privaten Vorräte haben dürfen?
Mave101=Oh, Öl. Du weißt, dass wir auf Dekret des Königs keine Vorräte haben dürfen?
Mave102=Es ist wichtig. Ich will den König töten.
Mave103=Das klingt nach einem noblen Plan. Vielleicht kann ich dir helfen...
Mave104=Ja, bitte!
Mave105=Nicht so hastig. Es gibt da eine geheime Kammer. Sie ist inzwischen tief unter diesen Lavaseen begraben. Aber die Wände sind aus purem Granit. Also denke ich, dass die Höhle noch intakt ist.
Mave106=Um die Kammer zu betreten, brauchst du einen Schlüssel.
Mave107=Okay. Gib Schlüssel bitte.
Mave108=Ich verkaufe ihn dir für einen Goldbarren.
Mave109=Wo finde ich Gold?
Mave110=Wenn ich das wüsste, wäre ich selber mit der Spitzhacke losgezogen. Normalerweise liegen die Goldadern irgendwo im Untergrund.
Mave111=Wenn du Nuggets gefunden hast, kannst du sie bei mir im Hochofen zu einem Barren schmelzen.
Mave105=Nicht so hastig. Es gibt am unteren Ende dieses Fahrstuhlschachtes einen Weg, der zu einer Kammer führt. Sie ist inzwischen tief unter diesen Lavaseen begraben.
Mave106=Aber die Wände sind aus purem Granit. Also denke ich, dass die Höhle noch intakt ist.
Mave107=Um die Kammer zu betreten, brauchst du einen Schlüssel.
Mave108=Okay. Gib Schlüssel bitte.
Mave109=Ich verkaufe ihn dir für einen Goldbarren.
Mave110=Wo finde ich Gold?
Mave111=Wenn ich das wüsste, wäre ich selber mit der Spitzhacke losgezogen. Normalerweise liegen die Goldadern irgendwo im Untergrund.
Mave112=Wenn du Nuggets gefunden hast, kannst du sie bei mir im Hochofen zu einem Barren schmelzen.
Mave200=Hier ist dein Goldbarren.
Mave201=Es war mir eine Ehre, mit dir Geschäfte zu machen. Hier ist dein Schlüssel.
Mave202=Wo finde ich die versteckte Kammer?
Mave203=Sie ist tief unter den Lavaseen begraben. Vielleicht kannst du das Wasser aus dem See benutzen, um die Lava abzukühlen?
Mave202=Wo finde ich die Kammer?
Mave203=Sie ist am unteren Ende dieses Fahrstuhles, tief unter den Lavaseen begraben. Vielleicht kannst du das Wasser aus dem See benutzen, um die Lava abzukühlen?
Pyrit1=Hi, bist du Pyrit?

View File

@ -28,9 +28,9 @@ Newton100=Hey %s! Did you survive the attacks?
Newton101=Yes. As you can see. I was able to watch the disaster from the forest.
Newton102=It will take us months to rebuild everything. In the meantime, we'll be defenseless against their attacks.
Newton103=Who are the attackers?
Newton104=It's the henchmen of \"king\" Harx. We've refused to pay unfair tributes to him. Now they want to set an example on us.
Newton105=Why \"king\"?
Newton106=He's got a crown on his head. So what? We haven't voted for him. We will never acknowledge a monarch that has no democratic legitimation!
Newton104=It's the henchmen of king Harx. We've refused to pay unfair tributes to him. Now they want to set an example on us.
Newton105=But he is our king, isn't he?
Newton106=He's got a crown on his head. So what? We haven't voted for him. We will never acknowledge a monarch who only oppresses us!
Newton107=Okay. What will you do now?
Newton108=Nothing. It's hopeless. We will all die. Except if...
Newton109=...?
@ -49,9 +49,9 @@ Newton121=Good luck! You will need it.
Newton200=Newton, I've built a plane for the counter-attack on Harx. But I don't have any fuel yet.
Newton200a=Newton, I've got plans for a plane for the counter-attack on Harx. But I don't have any fuel yet.
Newton201=Very good, %s. So you need oil? That is a problem indeed. Harx has outlawed private possession of oil.
Newton201=Very good, %s. So you need oil? That is a problem indeed. Harx has outlawed possession of oil.
Newton202=We don't care for his silly rules of course. But we needed to sell our oil to fund the defense and construction of the castle.
Newton203=We've got nothing left here in the village. But you could ask Mave down in the cave. He likes to have spare stockings of things.
Newton203=We've got nothing left here in the village. But we have oil a hidden chamber in the cave below this village. You could ask Mave down in the cave beside the foundry for the key.
Lara1=We need more wood, so we can at least finish the scaffolds before nightfall.
@ -115,24 +115,28 @@ Mave8=You could use my foundry to build some loam.
Mave9=How do I build loam?
Mave10=Oh, that is easy: Fill a bucket{{Bucket}} with earth and fill a barrel{{Barrel}} with water. Then put both into the foundry and produce loam.
Mave11=You can find the necessary tools in my foundry.
Mave12=Where does this elevator shaft lead?
Mave13=This elevator leads to the chamber with our oil reserves. Unfortunately, the path got flooded by the volcano. Maybe water from the lake can be used to extinguish the lava?
MaveBye=Bye.
Mave100=Hi Mave. Do you have an idea where to find oil?
Mave101=Oh, oil. You know we're not supposed to own private reserves, right?
Mave101=Oh, oil. You know we're not supposed to own reserves, right?
Mave102=It's very important! I'm trying to kill the king.
Mave103=That sounds like a noble plan. Maybe I could help you...
Mave104=Yes, please!
Mave105=Not so hasty. I've got a secret chamber. It's buried below these lava lakes but the walls are of solid granite so I think it should still be intact.
Mave106=To enter it, you need a key.
Mave107=Okay. Give key please.
Mave108=I'll sell it to you for one gold bar.
Mave109=Where can I find gold?
Mave110=If I knew that, I would mine it myself. Typically it's somewhere underground.
Mave111=When you have found gold nuggets, you can use my foundry to melt them to a shiny bar.
Mave105=Not so hasty. Down this elevator shaft there's a path that leads to a chamber. It's buried below these lava lakes now.
Mave106=But the walls are of solid granite so I think it should still be intact.
Mave107=To enter it, you need a key.
Mave108=Okay. Give key please.
Mave109=I'll sell it to you for one gold bar.
Mave110=Where can I find gold?
Mave111=If I knew that, I would mine it myself. Typically it's somewhere underground.
Mave112=When you have found gold nuggets, you can use my foundry to melt them to a shiny bar.
Mave200=Here is your gold bar.
Mave201=Glad to make business with you. Here is your key.
Mave202=Where can I find the hidden chamber?
Mave203=It's buried below the lava lakes. Maybe you can use water to cool the lava?
Mave202=Where can I find the oil chamber?
Mave203=It's down this elevator, buried below the lava lakes. Maybe you can use water to cool the lava?
Pyrit1=Hi, are you Pyrit?

View File

@ -0,0 +1,4 @@
[DefCore]
id=AltMat_Coniferous
Version=7,0
Category=1

View File

@ -1,4 +1,4 @@
material Soniferous
material Coniferous_AltMat
{
receive_shadows on
technique
@ -7,6 +7,7 @@ material Soniferous
{
cull_hardware none
scene_blend alpha_blend
depth_check off
ambient 1.000000 1.000000 1.000000 1.000000
diffuse 1.000000 1.000000 1.000000 1.000000
@ -15,7 +16,7 @@ material Soniferous
texture_unit
{
texture Soniferous.png
texture coniferous2.png
tex_address_mode wrap
filtering trilinear
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@ -6,70 +6,70 @@ func InitializeObjects()
CreateObject(Rule_BuyAtFlagpole, 50, 50);
CreateObjectAbove(Tree_SmallConiferous, 962, 839);
CreateObjectAbove(Tree_SmallConiferous, 774, 951);
CreateObjectAbove(Tree_Coniferous, 962, 839);
CreateObjectAbove(Tree_Coniferous2, 774, 951);
CreateObjectAbove(Tree_SmallConiferous, 46, 441);
var Tree_SmallConiferous0015 = CreateObjectAbove(Tree_SmallConiferous, 320, 312);
Tree_SmallConiferous0015->SetR(-30);
Tree_SmallConiferous0015->SetPosition(320, 293);
var Tree_SmallConiferous0019 = CreateObjectAbove(Tree_SmallConiferous, 422, 887);
Tree_SmallConiferous0019->SetClrModulation(0xffb0b080);
var Tree_SmallConiferous0023 = CreateObjectAbove(Tree_SmallConiferous, 373, 920);
Tree_SmallConiferous0023->SetClrModulation(0xff808080);
var Tree_SmallConiferous0027 = CreateObjectAbove(Tree_SmallConiferous, 72, 744);
Tree_SmallConiferous0027->SetClrModulation(0xff808080);
CreateObjectAbove(Tree_SmallConiferous, 974, 327);
CreateObjectAbove(Tree_SmallConiferous, 1003, 326);
CreateObjectAbove(Tree_SmallConiferous, 550, 107);
CreateObjectAbove(Tree_SmallConiferous, 632, 128);
var Tree_SmallConiferous0047 = CreateObjectAbove(Tree_SmallConiferous, 129, 409);
Tree_SmallConiferous0047->SetR(-5);
Tree_SmallConiferous0047->SetClrModulation(0xffd49d68);
Tree_SmallConiferous0047->SetPosition(129, 387);
CreateObjectAbove(Tree_SmallConiferous, 78, 440);
var Tree_SmallConiferous0055 = CreateObjectAbove(Tree_SmallConiferous, 182, 408);
Tree_SmallConiferous0055->SetR(-2);
Tree_SmallConiferous0055->SetClrModulation(0xffca999c);
Tree_SmallConiferous0055->SetPosition(182, 386);
var Tree_SmallConiferous0059 = CreateObjectAbove(Tree_SmallConiferous, 200, 408);
Tree_SmallConiferous0059->SetR(8);
Tree_SmallConiferous0059->SetClrModulation(0xfff7e5ee);
Tree_SmallConiferous0059->SetPosition(200, 386);
CreateObjectAbove(Tree_SmallConiferous, 23, 452);
var Tree_SmallConiferous0067 = CreateObjectAbove(Tree_SmallConiferous, 110, 410);
Tree_SmallConiferous0067->SetR(1);
Tree_SmallConiferous0067->SetClrModulation(0xffe9e2b0);
Tree_SmallConiferous0067->SetPosition(110, 388);
var Tree_SmallConiferous0071 = CreateObjectAbove(Tree_SmallConiferous, 167, 408);
Tree_SmallConiferous0071->SetR(-4);
Tree_SmallConiferous0071->SetClrModulation(0xffedfa82);
Tree_SmallConiferous0071->SetPosition(167, 386);
var Tree_SmallConiferous0075 = CreateObjectAbove(Tree_SmallConiferous, 93, 430);
Tree_SmallConiferous0075->SetR(-10);
Tree_SmallConiferous0075->SetClrModulation(0xffedf4c6);
Tree_SmallConiferous0075->SetPosition(93, 408);
var Tree_SmallConiferous0079 = CreateObjectAbove(Tree_SmallConiferous, 36, 446);
Tree_SmallConiferous0079->SetR(-2);
Tree_SmallConiferous0079->SetClrModulation(0xffca90cd);
Tree_SmallConiferous0079->SetPosition(36, 424);
var Tree_SmallConiferous0083 = CreateObjectAbove(Tree_SmallConiferous, 151, 406);
Tree_SmallConiferous0083->SetR(-3);
Tree_SmallConiferous0083->SetClrModulation(0xffd8d7e0);
Tree_SmallConiferous0083->SetPosition(151, 384);
var Tree_SmallConiferous0087 = CreateObjectAbove(Tree_SmallConiferous, 159, 407);
Tree_SmallConiferous0087->SetClrModulation(0xffd1e168);
var Tree_SmallConiferous0091 = CreateObjectAbove(Tree_SmallConiferous, 60, 440);
Tree_SmallConiferous0091->SetR(-10);
Tree_SmallConiferous0091->SetClrModulation(0xffd8c49d);
Tree_SmallConiferous0091->SetPosition(60, 418);
var Tree_SmallConiferous0095 = CreateObjectAbove(Tree_SmallConiferous, 355, 313);
Tree_SmallConiferous0095->SetR(10);
Tree_SmallConiferous0095->SetPosition(355, 291);
CreateObjectAbove(Tree_SmallConiferous, 132, 726);
var Tree_SmallConiferous0103 = CreateObjectAbove(Tree_SmallConiferous, 487, 805);
Tree_SmallConiferous0103->SetR(-30);
Tree_SmallConiferous0103->SetPosition(487, 786);
CreateObjectAbove(Tree_Coniferous, 46, 441);
var Tree_Coniferous0015 = CreateObjectAbove(Tree_Coniferous2, 320, 312);
Tree_Coniferous0015->SetR(-30);
Tree_Coniferous0015->SetPosition(320, 293);
var Tree_Coniferous0019 = CreateObjectAbove(Tree_Coniferous, 422, 887);
Tree_Coniferous0019->SetClrModulation(0xffb0b080);
var Tree_Coniferous0023 = CreateObjectAbove(Tree_Coniferous2, 373, 920);
Tree_Coniferous0023->SetClrModulation(0xff808080);
var Tree_Coniferous0027 = CreateObjectAbove(Tree_Coniferous, 72, 744);
Tree_Coniferous0027->SetClrModulation(0xff808080);
CreateObjectAbove(Tree_Coniferous, 974, 327);
CreateObjectAbove(Tree_Coniferous2, 1003, 326);
CreateObjectAbove(Tree_Coniferous2, 550, 107);
CreateObjectAbove(Tree_Coniferous, 632, 128);
var Tree_Coniferous0047 = CreateObjectAbove(Tree_Coniferous2, 129, 409);
Tree_Coniferous0047->SetR(-5);
Tree_Coniferous0047->SetClrModulation(0xffd49d68);
Tree_Coniferous0047->SetPosition(129, 387);
CreateObjectAbove(Tree_Coniferous, 78, 440);
var Tree_Coniferous0055 = CreateObjectAbove(Tree_Coniferous, 182, 408);
Tree_Coniferous0055->SetR(-2);
Tree_Coniferous0055->SetClrModulation(0xffca999c);
Tree_Coniferous0055->SetPosition(182, 386);
var Tree_Coniferous0059 = CreateObjectAbove(Tree_Coniferous2, 200, 408);
Tree_Coniferous0059->SetR(8);
Tree_Coniferous0059->SetClrModulation(0xfff7e5ee);
Tree_Coniferous0059->SetPosition(200, 386);
CreateObjectAbove(Tree_Coniferous, 23, 452);
var Tree_Coniferous0067 = CreateObjectAbove(Tree_Coniferous, 110, 410);
Tree_Coniferous0067->SetR(1);
Tree_Coniferous0067->SetClrModulation(0xffe9e2b0);
Tree_Coniferous0067->SetPosition(110, 388);
var Tree_Coniferous0071 = CreateObjectAbove(Tree_Coniferous2, 167, 408);
Tree_Coniferous0071->SetR(-4);
Tree_Coniferous0071->SetClrModulation(0xffedfa82);
Tree_Coniferous0071->SetPosition(167, 386);
var Tree_Coniferous0075 = CreateObjectAbove(Tree_Coniferous2, 93, 430);
Tree_Coniferous0075->SetR(-10);
Tree_Coniferous0075->SetClrModulation(0xffedf4c6);
Tree_Coniferous0075->SetPosition(93, 408);
var Tree_Coniferous0079 = CreateObjectAbove(Tree_Coniferous, 36, 446);
Tree_Coniferous0079->SetR(-2);
Tree_Coniferous0079->SetClrModulation(0xffca90cd);
Tree_Coniferous0079->SetPosition(36, 424);
var Tree_Coniferous0083 = CreateObjectAbove(Tree_Coniferous2, 151, 406);
Tree_Coniferous0083->SetR(-3);
Tree_Coniferous0083->SetClrModulation(0xffd8d7e0);
Tree_Coniferous0083->SetPosition(151, 384);
var Tree_Coniferous0087 = CreateObjectAbove(Tree_Coniferous, 159, 407);
Tree_Coniferous0087->SetClrModulation(0xffd1e168);
var Tree_Coniferous0091 = CreateObjectAbove(Tree_Coniferous2, 60, 440);
Tree_Coniferous0091->SetR(-10);
Tree_Coniferous0091->SetClrModulation(0xffd8c49d);
Tree_Coniferous0091->SetPosition(60, 418);
var Tree_Coniferous0095 = CreateObjectAbove(Tree_Coniferous, 355, 313);
Tree_Coniferous0095->SetR(10);
Tree_Coniferous0095->SetPosition(355, 291);
CreateObjectAbove(Tree_Coniferous, 132, 726);
var Tree_Coniferous0103 = CreateObjectAbove(Tree_Coniferous2, 487, 805);
Tree_Coniferous0103->SetR(-30);
Tree_Coniferous0103->SetPosition(487, 786);
var Chest0107 = CreateObjectAbove(Chest, 164, 903);
Chest0107->SetClrModulation(0xd0ffffff);

View File

@ -1,18 +0,0 @@
[DefCore]
id=Tree_SmallConiferous
Version=6,0
Category=C4D_StaticBack
Width=30
Height=55
Offset=-15,-27
Vertices=9
VertexX=0,0,0,0,0,0,0,0,0
VertexY=22,15,10,5,0,-5,-10,-15,-22
VertexCNAT=8,16,16,16,16,16,16,16,4
VertexFriction=50,50,25,25,25,25,50,50,50
Components=Wood=8
Mass=80
StretchGrowth=1
Oversize=1
Float=1
Rotate=1

View File

@ -1,33 +0,0 @@
/*-- Small Coniferous Tree --*/
#include Library_Plant
#include Library_Tree
private func SeedChance() { return 500; }
private func SeedArea() { return 400; }
private func SeedAmount() { return 12; }
func Construction()
{
StartGrowth(5);
inherited(...);
}
private func Initialize()
{
SetProperty("MeshTransformation", Trans_Mul(Trans_Scale(500,500,500), Trans_Rotate(RandomX(0,359),0,1,0)));
}
public func ChopDown()
{
// Remove the bottom vertex
SetVertex(0, VTX_Y, 0, 1);
RemoveVertex(0);
_inherited(...);
}
local Name = "$Name$";
local Touchable = 0;
local BlastIncinerate = 1;
local ContactIncinerate = 3;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@ -0,0 +1,10 @@
/* Coniferous alternate material */
// High up in the skies, coniferous trees look a little different
#appendto Tree_Coniferous
func Construction(...)
{
SetMeshMaterial("Coniferous_AltMat");
return _inherited(...);
}

View File

@ -0,0 +1,33 @@
/* Small Trees */
// Trees stay small (50% growth) but still yield a lot of wood.
#appendto Library_Tree
// Initially placed trees are smaller
func Initialize(...)
{
SetCon(GetCon() / 2);
return _inherited(...);
}
// Stop growth at 50%
func FxIntGrowthTimer(object obj, effect, ...)
{
if (obj->OnFire() || obj->GetCon() >= 50) return FX_Execute_Kill;
return inherited(obj, effect, ...);
}
// Yield 1-2 extra wood
func Split2Components(...)
{
CreateObject(Wood);
if (GetCon() > 25) CreateObject(Wood);
return inherited(...);
}
func GetComponent(comp_id)
{
var result = inherited(comp_id, ...);
if (comp_id == Wood) result += 1 + (GetCon() > 25);
return result;
}

File diff suppressed because it is too large Load Diff

View File

@ -31,8 +31,8 @@ func Intro_Init(object flagpole)
this.pilot->SetObjectLayer(this.pilot);
// Pyit has a red hat!
this.pilot->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(0,5500));
this.pilot->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
// Dialogue object also used as helper container for clonks
this.dialogue = this.pilot->SetDialogue("Pyrit");
this.dialogue->SetInteraction(false);

View File

@ -2,7 +2,7 @@ PlaneNoOil=Das Flugzeug braucht noch Treibstoff. Ich muss irgendwo
Intro1=Autsch. Pyrit!
Intro2=Wie kann der Treibstoff leer sein? Du sagtest doch, ein Fass Öl bringt uns locker an unser Ziel und zurück!
Intro3=Dachte ich auch. Aber da wusste ich noch nicht, dass ich drei Tage über dem Ozean kreisen und auf einer einsamen Insel suchen müsste.
Intro3=Dachte ich auch. Aber da wusste ich noch nicht, dass ich drei Tage über dem Ozean kreisen und nach einer einsamen Insel suchen müsste.
Intro4=Das ist alles deine Schuld. Ich sags ja nur.
Intro5=Was können wir nun tun?
Intro6=Ich schlage vor du suchst neues Öl und ich repariere derweil das Flugzeug.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
material Chippie
{
receive_shadows on
technique
{
pass
{
ambient 1.0 1.0 1.0 1.0
diffuse 1.0 1.0 1.0 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.0 0.0 0.0 1.0
texture_unit
{
texture chippie.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More