Expired: nihilesthetics.info: Archived Here...

Talk about your new mod or map here

Moderators: jelco, bert_the_turtle

brice
level2
level2
Posts: 167
Joined: Fri Feb 23, 2007 6:04 am

Expired: nihilesthetics.info: Archived Here...

Postby brice » Wed Jun 06, 2007 5:02 pm

nihilesthetics2, your great mod info site has "recently expired". Most of the pages are still in google's cache (although the text on many pages needs to be selected in order to be visible). None of the pages show up in archive.org.

It would be a shame to lose all this info, especially if Icepick ever releases a modding update. Maybe it can be added to Icepick's TNG site in some quick and dirty fashon? Or maybe post the text of the sounds and shapes syntax and some of the other pages to a thread here for archival?

If the situation is only temporary, then just forget I said anything.

Thanks,
-brice
Last edited by brice on Thu Jun 07, 2007 12:42 am, edited 1 time in total.
nihilesthetics2
level2
level2
Posts: 101
Joined: Mon Dec 12, 2005 11:18 pm

Postby nihilesthetics2 » Thu Jun 07, 2007 12:32 am

Hi Brice,

Yes, unfortunately it seems you are right - it has expired. Apologies to everyone who still found the site useful, but I have searched in vain for a local backup of the content, to no avail. I will contact the hosting company, but realistically it seems like Nihilesthetics Modding Pages is no more.

It always amazed me that people would generate up to thousands of hits per month while visiting my site, so thanks everyone. The modding site was launched in the early days of Darwinia and I tried to dive deep into the inner workings of the game to help people create exciting mods ( I personally only ever managed a rather paltry 4 level mod based on Lemmings myself !) Thanks everyone for your help and support these last 2 years or so- TGF, StellarMatter, Xander, everyone on the ill-fated mod collaboration project, and everyone still active in the community.

And thank you for sticking with my rather self indulgent reminiscence to the end.

N2
brice
level2
level2
Posts: 167
Joined: Fri Feb 23, 2007 6:04 am

Postby brice » Thu Jun 07, 2007 12:39 am

No prob. Thanks for the quick reply! Here's a few cut and pastes from google cache. These are the three pages I found most informative. If you want to fish out other texts, just google "site:nihilesthetics.info" and click on the "cached" links. Like I said, some pages don't have their css sheets anymore, so you have to highlight the text to make it out. And none of the images are hosted anymore.

Code: Select all

Research levels

The highest level you can get to in the game through normal research is 4. However, you can start the game with research higher than that if you edit the game.txt folder. A description of what each of the tasks can do at each level is given in the table below. Where you see 4 (Max), this means that going above level 4 will break something, and you shouldnt do it. Levels with * usually mean that you can go to any level.
Task   Level   Description
Darwinian   3   Lasers
    4   Grenades
Officer   3   Follow
    4 (Max)    Absorb
Squad   *   Increase squadies in unit by 1
Laser   1-4 (Max)    Increase range with level
Grenade   1-4 (Max)    Increase range with level
Rocket   1-4 (Max)    Increase range with level
Controller   1-4 (Max)   Increase range with level
AirStrike   *   Increase invaders in unit by 1
Armour   1-4 (Max)   Increase capacity by 10 Darwinians
        Increase range with level
TaskManager   *   Increase concurrent tasks by 1
Engineer   1-4 (Max)    Increase soul capacity
    5   Engineer bridges (Thanks to Chris)


To prevent the player from running a task, remove it from the Research section. You can give it later with the GiveResearch script command. The lowest level for a research type is 1. A value of 0 gives research level 2. If you want to permanently disable a research type for the duration of the game, give it an initial value of -1.



Code: Select all

SOUNDS.TXT

The sounds.txt file is slightly unusual in that it cannot be placed in the root folder of your mod. It must be placed in the data folder within the darwinia root folder, eg c:\program files\darwinia\data\sounds.txt. This folder is not there by default so you will have to create it. The story is slightly different if you are on a Mac, as explained by Xander here

If you take a look at the file it seems pretty complicated, but it is actually based around a really simple structure. The makes it really easy to mod, but it also gives an insight into how the sound works in Darwinia. At the most simple level, the sounds file tells the game what sound to play when something happens. Here Im only talking about the three main values you need to worry about : the object, the event and the soundname. The object can be an entity, eg a Darwinian, or a Building, eg a Radardish. There are other object types, some of which arent really objects, but dont worry about that for now. Events are like states of an object. For example if a Darwinian dies, a death event occurs to a Darwinian object. Similarly, if a Darwinian is created, a creation event has occured to a Darwinian object. Finally there is the soundname. This is the name of the sound that is played when the event is true for an object. As an example, take a look at this excerpt from the sounds file

ENTITY Engineer
            EVENT Die
                        SOUNDNAME engineerdie

So whats happening here? Well every time an engineer dies, the game will play the engineerdie sound.

If you want to change the sound that is played for a particular event, simply change the soundname parameter. As explained later the sound can be either an actual sounds file, or can be a group of sound files.

The modding possibilities for sounds and effects ingame is very rich - every bit as good as the graphical capabilities, but because the editor does not cover sounds in any way, it is often overlooked by modders. This is a shame because adding sound can really make your mod unique, but more importantly you can really bring the player into your mod with emmersive music and effects.

As usual, Ive never spoken to anyone at IV regarding Darwinia so this may or may not be the way its supposed to work, but rather this is the way I have found to get it to work.

Syntax

( ENTITY || BUILDING || OTHER ) name
             EVENT event
                         SOUNDNAME soundname
                         SOURCETYPE sourcetype
                         POSITIONTYPE positiontype
                         INSTANCETYPE instancetype
                         LOOPTYPE looptype
                         MINDISTANCE mindistance
                         VOLUME PARAMETER parameter* update**
                         [ FREQUENCY PARAMETER parameter* update** ]
                         [ ATTACK PARAMETER parameter* update** ]
                         [ SUSTAIN PARAMETER parameter* update** ]
                         [ RELEASE PARAMETER parameter* update** ]
                         [ LOOPDELAY PARAMETER parameter* update** ]
                         [ effects*** ]
             END

[ ( ENTITY || BUILDING || OTHER ) name
             EVENT event
                         SOURCETYPE sourcetype
                         POSITIONTYPE positiontype
                         INSTANCETYPE instancetype
                         LOOPTYPE looptype
                         MINDISTANCE mindistance
                         VOLUME PARAMETER parameter* update**
                         [ FREQUENCY PARAMETER parameter* update** ]
                         [ ATTACK PARAMETER parameter* update** ]
                         [ SUSTAIN PARAMETER parameter* update** ]
                         [ RELEASE PARAMETER parameter* update** ]
                         [ LOOPDELAY PARAMETER parameter* update** ]
                         [ effects*** ]
             END ] ...

SAMPLEGROUP samplegroup
             SAMPLE sample
             [ SAMPLE sample] ...
             END

*parameter :
( TypeFixedValue value ||
TypeRangedRandom valbound1 valbound2 value3 ||
TypeLinked linkbound1 valbound1 linkbound2 valbound2 value5 link**** Location )

**Update :
( UpdateConstantly || UpdateOncePerLoop )

***Effects : See discussion below

****Link :
( HeightAboveGround || XPos || YPos || ZPos || CameraDistance || Velocity || Nothing )

Parameter Descriptions
Name, string : The identifier for the entity type, building type or other type

Event, string: The name of the event associated with the named entity. A list of entities, units, etc and there associated events can be found here


soundname, string: The name of the sound to be played. This can either be the name of a samplegroup, or the name of an ogg file in the sounds folder. Darwinia sounds are ogg files that are stored in the sounds folder. Ogg files are a compressed wav format. There are many free wav to ogg format converters on the web


sourcetype, integer : The type of sound to be played. 0 indicates a file in the sounds folder, 1 indicates a samplegroup.

positiontype, integer : The position type of the sound. Valid values are 0, 1, 2. Values higher than that seem to mimic type 0, 1 or 2. . The exact function of this parameter is not clear. Type 0 seems to indicate ambient sound. Ambient sound volume does not change with camera distance. In addition the sound will continue when you leave the level. If the sound is still playing when you enter the level again, you will hear two instances of the sound. Type 1 sound volume will fade with distance from the (x,z) coordinates of the source. Type 2 sound volume will fade with distance from the (x,y,z) coordinates of the source. Type 3 is only found applied to Sepulveda events and seems to work exactly like type 0.


instancetype, numeric : Unknown

looptype, integer : 0 indicates no looping of the sound sample. 1 loops the sound sample and you can use the loopdelay to delay the loop. 2 loops the sound sample with no delay. Higher values seem to loop before the sample is finished.

mindistance, numeric : The dropoff distance from entity to camera for sound volume. The lower the dropoff distance, the lower the sound volume, and vice versa.

parameter volume, numeric : Sound volume from 0 to 10.

parameter frequency, boolean : Sound frequency. 1.0 is the default frequency of the sound file. Lower frequencies make your sound file sound slower and deeper. Higher frequencies make your sound faster and high-pitched.

parameter attack, numeric : Length of the attack phase of the ADSR envelope. This describes the length of time in seconds for the sound to reach maxium volume. If attack is omiited, the attck phase is instantaneous.

parameter sustain, numeric : Sustain is the ADSR phase where a sound maintains constant volume. Normally indicated as a volume, in Darwinia it is the duration in seconds of the sustain phase. If sustain is omiited, the sound continues for its actual duration.

parameter release, numeric : Length of the release phase of the ADSR envelope. This describes the length of time in seconds for the sound to reach zero volume afterwards. If release is omitted, the release phase is instantaneous.

parameter loopdelay, numeric : For a looped sound this is the delay in seconds between the end of one loop and the start of the next. If loopdelay is omitted, there is no delay between loops.

effects, string : List of sound effects applied to the sound. Common sound effects can be applied to your sound. The sound effects are listed in the effects.txt file in darwinia root or the root folder of your mod. More information on how to apply effects can be found here


parameter TypeFixedValue : Parameters of type fixed value have a constant fixed value. For example, a volume parameter with TypeFixedValue will have a constant volume.

parameter TypeRangedRandom : Varies the value of a parameter between a max and min value. Takes three values. The first two seem to be the minimum and maximum values. The third value function is unknown, but may indicate the degree of variance. The lower the third parameter then the more the sound varies between the max and min values. This parameter is actually best used with UpdateOncePerLoop ( assuming you are looping the sound ). Use UpdateConstantly and the value can jump around so much it becomes confusing to listen to.


parameter TypeLinked : Links the value of the parameter to a variable. There are 6 values passed with this parameter. The first value is the first boundary value of the linked variable. The second value is the associated parameter boundary. The third value is the second boundary value of the linked variable. The fourth value is the associated parameter boundary. The fifth value is unknown. The sixth value is the actual linked variable.
No its not just you, it is confusing. Basically the TypeLinked is similar to the TypeRangedRandom in that is indicated a minimum and maximum value for the parameter. But what it also does is to link those boundaries to values of the linked variable. For example, you can link a maximum volume of 7 to a HeightAboveGround of 200 and a minimum volume to a HeightAboveGround of 5. So what happens to the volume of, say, a spore generator? Well, the closer it gets to the ground, the louder it gets. The associated sounds.txt entry would look as follows

VOLUME PARAMETER TypeLinked 200 7 5 10 0 HeightAboveGround UpdateConstantly

You can reverse the effect by switching values 2 and 4

VOLUME PARAMETER TypeLinked 200 10 5 7 0 HeightAboveGround UpdateConstantly



parameter update : UpdateConstantly updates variable parameter values continually. UpdateOncePerLoop updates variable parameter values only at the beginning of each loop, if applicable. Defaults to UpdateConstantly.

parameter link : One of HeightAboveGround, XPos, YPos, ZPos, Velocity, CameraDistance or Nothing. HeightAboveGround is the vertical position of the sound source. XPos, YPos and ZPos are the X, Y and Z components of the source position. Velocity is the speed of the source. CameraDistance is the distance from the source to the camera. Nothing links the parameter value to nothing, and is effectively the same as TypeFixed.

samplegroup, string : Identifies a group of indiviual ogg files.

samplegroup sample, string : The name of an individual ogg file within the samplegroup.

Notes

So that covers the how the sounds.txt file is structured. So what kind of change the music and effects in the game. Well, you may have a;ready started playing around with some of the above parameters and have created some fun effects, but in your mod, you really need to have a plan of what you are tyrying to acheive ri make best use of the sound modding capabilities.

One really easy thing to do is to change the volume of the sound. This lets you pick out your own sounds above the general hubbub. The volume of the sound that is heard is determined by the Volume parameter and the MinDistance parameter. For the best effect try lowering the volume parameter and increasing the MinDistance. This will make your sound more prominent and, by reducing the volume parameter, means that the sound will not drown everything else out as you get closer to the source.

Aother easy effect is to change the attack and decay parameters. Some sounds and samples benefit from having a short ramp up to full volume by adding a short attack phase. If your sounds seem displaced or dont fit into the scene, try adding an attack phase of between 0.25 and 0.75 seconds. Note that the whole sample has to last at least that long or there is no point. Also note that some samples may already have an attack phase as part of the sample itself and it wont work to add another one on top. The decay parameter can be used to similar effect if your sound seems to stop to abruptly. Another effect is to have longer attack and decay phases for some samples. This works best for ambient sounds that can fade-in or out over 2, 3 or more seconds and can really add atmosphere. It is often a good idea to add these phases to fast or hectic tunes, unless you do want an abrupt start or stop point. It all depends on the effect you are tryint to achieve.

Changing the frequency is very effective, especially if you give it a range or link it to a game variable. Samples like lasers and mechanical sounds benefit well from giving them a range. You dont have to change the frequency that much. I find that for best results a range between 0.75 and 1.25 is fine. Frequency changes linked to HeightAboveGround also work well, increasing the frequency as the entity gets closer to the ground.

Looping is essential if you want to add your own music. You dont want to have to ship a couple of 5 Mb music samples along with your mod. You wont get any thanks for that. Instead include music samples of less than a minute and loop them. You will have to spend some time creating your sample to get it to loop seamlessly, but Im going to cover that in the next tutorial (under construction). Looping can also be effective for sounds made by entities and buildings. I tend to use this for create events so that the sound continues to play while the entity is alive. Its a good idea when doing this to add a loopdelay so the entity sound isnt constantly playing.

I could go on, and there are so many possibilities I havnt even thought of yet, but Ive got to stop or Ill be here all day. As you may have picked up on, I love the way the sound was programmed in Darwinia. Its is very very configurable, and yet based on a really simple layout. It would be a real shame not to take advantage of this in your own mods.


SOUNDS.TXT on Mac

The data for the game is contained in the application package. Right-click (or control-click) on Darwinia.app . A contextual menu should appear. Click on "Show Package Contents". A new window should pop up, with one folder (Contents) and three data files (langage.dat, main.dat, and sounds.dat)*. In this new window, create a new folder called 'data' and put your sounds in there. That should work. If it does not, change 'sounds.dat' to 'sounds.rar' and use UnRarX to extract it. This should create a folder called data, and sub-folders that contain important sound stuff. Replace the appropriate files**.

xander

* The three data files are all, in reality, .rar files, and you could have fun by extracting them and playing around with Darwinia.
** When you replace files, make sure you have a backup, because you could easily break Darwina. For a long time, I had two copies of the application package on my computer -- on for messing with, the other for playing. That became unnecessary for me after 1.2 came out, as strings_default.txt was made to work properly, but it sounds like this may be the solution for you.



FROM THE LEMMINGS README:
Extract the Lemmings folder to your mods root directory. To get the sounds and music, you have create a folder called data in your darwinia root directory and move the sounds.txt file there. So, the sounds.txt file must be moved to <darwinia_root>/data/sounds.txt. If you have any errors messages with other mods, just remove the data folder. Sounds.txt is the only mod config file that you cannot put in your mod directory, it has to go in data. I suppose its a bug with the game.



Code: Select all

SHAPE FILES

It is very possible to get your own models into Darwinia, and if you do, it gives your mods a touch of class. Most of the buildings and units you see in the game are meshes that are described in Darwinia's shp files. You can find all the shp files in the shapes folder in main.dat. You can also put a shapes folder in the root of your mod folder and Darwinia will use those shape files before the default ones in data/shapes ( from main.dat ).

The quickest way to change the way a building or unit looks is to modify an existing shp file. However, this limits you to minor changes in position, orientation or scale, and you will find that if you try to make major changes by manipulating the shape file by hand, you will probably break it. To get your own unique models into the game, you will have to model them in a 3D modelling package and then convert them. I have written a simple perl script that will convert 3D Studio Max ASE files to Darwina shape files, but if you prefer another modelling package you can write your own conversion script if you feel up to it. I will go into the convertion process later, but first, lets have a look at the structure of the shape files and how you can make some simple modifications by hand.

Syntax

Fragment : fragment
             ParentName : ( SceneRoot || fragment )
             Up : x y z
             Front : x y z
             Pos : x y z
             Positions : positions
                          PosId : x y z
                          [ PosId : x y z ] ...
             Normals : normals
                          NormId : x y z
                          [ NormId : x y z ] ...
             Colours : colours
                          ColourId : R G B
                          [ ColourId : R G B ] ...
             Vertices : vertices
                          VertId : posId ColourId
                          [ VertId : posId ColourId ] ...
             (Triangles : triangles
                          posId posId PosId
                          [ posId posId PosId ] ...
             ||
             Strips : strips
                          Strip : stripId
                                       Material : [ GunMetal ]
                                       Verts : verts
                                       vertId [ vertId ] ...
                          [ Strip : stripId
                                       Material : [ GunMetal ]
                                       Verts : verts
                                       vertId [ vertId ] ... ] ...
            )
[ Fragment : fragment ... ] ...
[ Marker : marker
             ParentName : ( SceneRoot || fragment )
             Depth : depth
             Up : x y z
             Front : x y z
             Pos : x y z
MarkerEnd ] ...

Parameter Descriptions
Fragment, string : Each shape file can include several fragments. The fragment name is used to uniquely identify a fragment.

ParentName, string : The parent fragment. Sceneroot indicates the fragment has no parent. Fragment and ParentName work together to create a tree of parts. Sceneroot is always at the top of the tree, and a ParentName of sceneroot indicates the position and orientation is relative to the unit or buildings position on the map. If the ParentName is the name of another fragment, then the position and orientation is relative to the parent fragment. For example, if the parent fragment has a y ( vertical ) position offset of 10 and the child fragment also had an offset of 10, the effective offset of the child frgmant would be y + 20 from SceneRoot.


Up x y z, float / Front x y z, float : The Up and front parameters work together to indicate the fragments orientation. They each have x, y and z assignments. The exact workings of these two parameters are obscured behind the particular matrix transformations used ingame. However, you can manipulate these values by following the orientation tutorial here


Pos x y z, float : Pos indicates the relative x, y and z offsets of the fragments position ( not to be confused with individual positions ).

Positions, integer : The number of positions in the fragment mesh. Positions are effectively vertices, and the number of positions and vertices should be identical.

Position PosId , integer / Position x y z, float : Each position has a unique id and x y z offset. A position is like a point on the fragment mesh that has an x, y and z offset from the objects centre ( this doesnt have to be the exact centre, it is an arbitrary centrepoint chosen when modelling ) . You can scale a fragment by manipulating the positions ( Only staticshape objects can be directly scaled in the mission/map files ). If you double all the x, y and z offset parameters for each vertex, you will have scaled your model by a factor of two. You will only be able to do this by hand for a really simple shape, but it is easy to write a script that will do it for you. Here is a perl script that takes a shape file and a scale value as parameters and outputs a new scaled version of the shape file : scaleshp_pl.txt. You can also apply this technique to a single axis, i.e. doubling only the x offset for each position will make your fragment look 'fat'.


Normals normID , integer / Normals x y z, float : Each normal has a unique id and x y z value indicating the normalised (length 1) normal for a particular face. The number of normals should equal the number of triangles. All default shapes have zero normals. Normals are only effective when smooth shading is enabled. DFPatch switches on smooth shading


Colours colourId, integer / Colours R G B, integers: Each colour is assigned a unique id and RGB value.

Vertices vertId , integer : Each vertex is assigned a position Id and colour. Vertices are effectively positions, and the number of positions and vertices should be identical ( although this is not a requirement, there is no reason why the two would be different ).

Triangles, integer : Triangles describe each of the faces of the fragment mesh. Each triangle described by three vertices, indicating the three corners of the triangle. You can set the number of triangles ( or the number of verts if the shp file has strip parameters ) to zero. This will make your building invisible. Why would you do that ? Well, you can overlay staticshapes over invisible building, giving the impression that each instance of that building in a location has a different shape ( Leave your building markers visible for best effect ). Note that staticshapes, being static, will mean your building will not animate, so this trick is not much good for buildings like radardishes, unless you are clever with your staticshape design. You may also want to hide certain building from the player to enhance gameplay.


Strips stripId, integer : Assigns each strip a unique stripId. Strips are an alternative method of rendering as opposed to triangles. To be honest, Im not sure quite how they work, but I suspect the define a series of triangles in a strip rather than a number of faces. Triangle strips are a particular rendering method in opengl and it seems reasonable that this is what is being defined here


Strips Material, string : Either blank or GunMetal. Im not sure what this material parameter actually does. There have been some reports that it is to do with collision detection, but I dont think that is the case. Im not sure it actually does anything.


Verts vertId, integer : Each strip is defined by a number of vertex ids.

Marker, string : Each shape file can include several markers. The marker name is used to uniquely identify a marker.

Marker Depth, integer : The depth parameter is always 1 greater than the position of the parent fragment in the fragment tree. For example, if the ParentName for a marker is sceneroot, the Depth will be 1. If the ParentName for a marker is the name of a fragment, the Depth will be 2, assuming that fragment in turn has a ParentName of sceneroot, of higher, if the ParentName of the parent fragment is the name of another fragment. Confused ? You may think that the depth parameter is redundant because its value is implied by the ParentName of the marker, and you would be right. However, you do have to supply the correct Depth parameter or the game will probably crash.




Notes

So, now you know a bit about the shp files, what can you do to change the shapes? Probably the simplest thing to do is to change the colour. You can simply change the RGB value for any of the colours in the colour section. If the colour has a value of 255 0 0, you can tell that any vertex assigned that colour will appear red in the game ( RGB value of 255 0 0 gives red ). To change all red vertices to blue, you would change the RGB values of that colour to 0 0 255 ( RGB value of 0 0 255 gives blue ). But before you go adding wierd and wonderful palletes to your shapes, note that Darwinia uses flat shading, and if you have two adjacent vertices with very different colours, the resulting effect will look clumsy.

Another easy way to change a shape is by altering the Up/Front/Pos parameters. By changing the x, y and z values, you can turn a vertical fragment to a horizontal fragment, for example. Try changing the Up parameter from 0 1 0 to 0.707 0.707 0. The shape will move 45 degrees around the z axis. Changing the Front Parameter from 0 0 1 to 0 0.707 0.707 will rotate the shape 45 degrees around the x axis. Note these parameters are like vectors and have a value of between -1 and 1, representing a full 360 degree turn. Changing position is probably best constrained to the y axis. That way you can make shapes float above the ground, or give the impression they are embedded in the ground. There is nothing to stop you changing the x and z axes, but you probably wont notice much difference.

There are other ways to alter the shp file manually. One easy thing to do is to remove whole fragments of even add whole fragments from another shp file. Unfortunatley, some units and building require certain fragments ( and markers ) to be there, so if the game crashes after you remove a fragment, you will need to restore it to the shp file.
User avatar
trickfred
level5
level5
Posts: 1691
Joined: Sat Jul 24, 2004 5:01 am
Location: The Great White North, Eh?
Contact:

Postby trickfred » Fri Jun 08, 2007 8:24 am

Bwahaha!

I have backups of the whole site, to reference it when I was a crazy modding fool. ;D

Nihil, let me know what you want done with the data (complete with pics). I can always host it on stellarmatter (it would be an excuse to update it).
nihilesthetics2
level2
level2
Posts: 101
Joined: Mon Dec 12, 2005 11:18 pm

Postby nihilesthetics2 » Sat Jun 09, 2007 9:36 am

Thanks trickfred. Please do host it on your site if you have the space.

Update it or edit it as you see fit. Im happy with however you want to maintain it or just keep it static - whichever is best for you.

Cheers,

N2

Return to “Mod Projects”

Who is online

Users browsing this forum: No registered users and 10 guests