|
by Redemption » Sat Aug 05, 2006 7:41 am
Type: Weapon
Weapons.dat
- Code: Select all
Rocket Launcher;//name--------------------------------------- 10;//identifier 4;//class qfbullet.png;//bullet texture 0;//bullets at one shot 0;//stop at hit 0=stop where hit, 1=don't stop 3.900000;//bullet size 0.002000;//spread 0.900000;//bullet speed 500.000000;//time until bullet disappears 600;//fire rate 2;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam 1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound -0.000000;//push target back -0.011000;//push shooter back ballistic.wav;//fire sound explode.wav;//hit sound 0.300000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; 24;//condition 6.000000;//condition parameter0 1.000000;//condition parameter1 end_wield_conditions; begin_fire_effects; 10;//effect number 8.000000;//parameter1 4.000000;//parameter2 -1.000000;//parameter3 -1.000000;//parameter4 4;//effect number 15.400000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 0.000000;//parameter4 44;//effect number -1.000000;//parameter1 1.000000;//parameter2 6.000000;//parameter3 0.000000;//parameter4 end_fire_effects; begin_hit_effects; end_hit_effects;
- Code: Select all
Rocket Explode;//name--------------------------------------- 16;//identifier 0;//class plasma.png;//bullet texture 55;//bullets at one shot 1;//stop at hit 0=stop where hit, 1=don't stop 4.500000;//bullet size 8.000000;//spread 0.800000;//bullet speed 140.000000;//time until bullet disappears 10000000;//fire rate 2;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam 1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound 0.03000;//push target back 0.000000;//push shooter back explode.wav;//fire sound claws0.wav;//hit sound 0.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; 31;//effect number -4.44000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_fire_effects; begin_hit_effects; 4;//effect number -4.02000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 26;//effect number 0.000;//parameter1 3.000000;//parameter2 16.000000;//parameter3 0.000000;//parameter4 26;//effect number 0.000;//parameter1 3.000000;//parameter2 17.000000;//parameter3 0.000000;//parameter4 26;//effect number 0.000;//parameter1 3.000000;//parameter2 18.000000;//parameter3 0.000000;//parameter4 end_hit_effects;
- Code: Select all
Take outSuicide;//name--------------------------------------- Suicide (kills when fired) [With damage] 17;//identifier 0;//class invis.png;//bullet texture 1;//bullets at one shot 1;//stop at hit 0=stop where hit, 1=don't stop 4.500000;//bullet size 0.100000;//spread 0.600000;//bullet speed 50.000000;//time until bullet disappears 10;//fire rate 2;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam 1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound 0.03000;//push target back 0.000000;//push shooter back explode.wav;//fire sound claws0.wav;//hit sound 0.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; 31;//effect number -4.44000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_fire_effects; begin_hit_effects; 4;//effect number -9.800000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_hit_effects;
creatures.dat - Code: Select all
Player rocket;//name--------------------------------------- 8;//identifier 2;//class creature_missile.png;//texture 2;//draw layer -2;//corpse item number in items.dat, -1=nothing, -2=whole corpse vanishes when dead 0;//corpse item amount 1;//attack type, 0=shooting attack, 1=close combat -1;//particle to show on radar, -1=none 0//primary AI tactic from AI_tactic.dat 0;//secondary AI tactic from AI_tactic.dat -1;//footstep particle from particles.dat 2;//die after how many seconds, 0=doesn't die -1;//eat item number from items.dat, -1=nothing 0.90000;//creature size 0.100000;//creature weight (affects pushing) 2.30000;//maximum movement speed 2.300000;//minimum movement speed 0.900000;//leg animation speed 0.020000;//turn speed 0.400000;//inertia level (acceleration/deceleration) 0;//hide when behind walls 17;//weapon number 0.000000;//weapon_x 0.000000;//weapon_y 2;//blood particle 0;//bars visible when player hovers mouse on top 1.20000;//death animation speed 1;//creature can move from area to another 1000.000000;//AI hear range 500.000000;//AI see range 4.000000;//AI see angle begin_footstep_sounds end_footstep_sounds begin_hit_sounds grunt0.wav;//sample name grunt1.wav;//sample name grunt2.wav;//sample name end_hit_sounds begin_die_sounds grunt0.wav;//sample name grunt1.wav;//sample name grunt2.wav;//sample name end_die_sounds begin_eat_block end_eat_block begin_death_block 0;//death type, 0=any death, 1=timed death, 2=killed by player begin_conditions; end_conditions; begin_effects; 24;//effect number 16.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; end_death_block begin_hit_block end_hit_block begin_timed_block end_timed_block begin_specialties ;//description 0;//number 0.000000;//parameter0 0.000000;//parameter1 105.0000;//parameter2 105.0000;//parameter3 Fire;//description 2;//number 10.000000;//parameter0 0.250000;//parameter1 1.000000;//parameter2 1.000000;//parameter3 end_specialties
Description: Rocket Launcher with splash damage.
Directions: Copy and paste into weapons/creature.dat and change identifiers.
Code Written by: Redemption.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by MageKing17 » Sun Aug 06, 2006 4:37 am
From what I can tell, that looks needlessly complicated. Couldn't it be done with two weapons, rather than three?
-

MageKing17
- Moderator
-
- Posts: 1919
- Joined: Thu Jul 08, 2004 10:25 pm
-
by Redemption » Sun Aug 06, 2006 5:00 am
All the weapons are needed.
The first drops the rocket creature.
The second is the rockets explosion.
The third makes the rocket explode close to the enemy.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by MageKing17 » Wed Aug 16, 2006 7:21 pm
Redemption wrote:All the weapons are needed.
The first drops the rocket creature. The second is the rockets explosion. The third makes the rocket explode close to the enemy.
The second and third can be combined into one.
-

MageKing17
- Moderator
-
- Posts: 1919
- Joined: Thu Jul 08, 2004 10:25 pm
-
by Redemption » Thu Aug 17, 2006 8:17 am
Yes, but then the rocket would explode farther away from the enemy, causing less damage.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by MageKing17 » Thu Aug 17, 2006 5:48 pm
No, it wouldn't. Look, I'm telling you, you only need two weapons, because that's all anyone else ever needed to do a moving projectile.
-

MageKing17
- Moderator
-
- Posts: 1919
- Joined: Thu Jul 08, 2004 10:25 pm
-
by Redemption » Fri Aug 18, 2006 8:24 am
It would cause much less damage because the 'Take out suicide" Causes increased damage when it hits and 'Rocket explode" works the same way as the shotgun, the closer you are the more bullets you take, causing less damage.
Oh, and for my next installment I need a way to create a small delay between executing one effect and the next. There is another way I could do this but it would cause a lot of clutter in the script.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by Redemption » Thu Sep 28, 2006 8:34 am
It's been too long, so I'm going to do this.
The script might be very long & cluttered but I think thats the way it has to be.
It's gonna be a weapon by the way.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by Redemption » Fri Sep 29, 2006 12:47 pm
Type: Weapon
The Weapons:
In weapons.dat:
- Code: Select all
Sword;//name--------------------------------------- De Sword 37;//identifier 8;//class particle.png;//bullet texture 1;//bullets at one shot 0;//stop at hit 0=stop where hit, 1=don't stop 1.00000;//bullet size 0.00000;//spread 1.00000;//bullet speed 0.000000;//time until bullet disappears 700;//fire rate 0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound -0.0000;//push target back 0.000000;//push shooter back claws0.wav;//fire sound claws0_hit.wav;//hit sound 0.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; 29;//effect number 38.0000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_fire_effects; begin_hit_effects; end_hit_effects; Sword hit;//name--------------------------------------- De Sword's Hit attack 38;//identifier 6;//class particle.png;//bullet texture 1;//bullets at one shot 1;//stop at hit 0=stop where hit, 1=don't stop 1.00000;//bullet size 0.00000;//spread 1.00000;//bullet speed 30.000000;//time until bullet disappears 10;//fire rate 0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound -0.0000;//push target back 0.000000;//push shooter back claws0.wav;//fire sound claws0_hit.wav;//hit sound 0.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; end_fire_effects; begin_hit_effects; 4;//effect number -2.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_hit_effects;
Now for the Swordentifier: In bars.dat: - Code: Select all
Swordentifier;//name 11;//identifier 0;//bar type, 0=normal, 1=show body temperature, 2=show number of items parameter0, 3=show wielded weapon ammo, 4=show armor, 5=show carry weight, 6=show seconds from game start 0;//parameter0 1;//visible (only applicable for player's bars) 0;//visible on enemies 1;//show number 0;//anchor point (0=left top, 1=right top, 2=left bottom, 3=right bottom) 1;//location x, pixels from anchor point 1;//location y, pixels from anchor point bar.png;//bar picture none;//background picture 0;//background picture x offset 0;//background picture y offset 0;//background picture width 0;//background picture height 12;//height 10;//length in pixels for maximum (negative = bar increases to left) 1.0;//red color component for minimum 0.0;//green color component for minimum 0.0;//blue color component for minimum 0.1;//red color component for maximum 0.0;//green color component for maximum 0.0;//blue color component for maximum
So you have the bar: In player_races.dat: - Code: Select all
Sword bar;//description 5;//specialty 0;//difficulty level none;//message 11.000000;//parameter0 0.000000;//parameter1 5.000000;//parameter2 0.000000;//parameter3
And for the actual effect: In scripts.dat: - Code: Select all
Sword;//name 38;//identifier 0;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 3;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 5;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 25;//use condition number 11.000000;//use condition parameter0 1.000000;//use condition parameter1 end_conditions; begin_effects; 17;//effect number 5.000000;//parameter1 0.000000;//parameter2 11.000000;//parameter3 0.000000;//parameter4 24;//effect number 38.000000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 0.550000;//parameter4 end_effects; Drain Swordentifier;//name 39;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 60;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; end_conditions; begin_effects; 44;//effect number -1.000000;//parameter1 1.000000;//parameter2 11.000000;//parameter3 0.000000;//parameter4 end_effects; Sword swing 2;//name 40;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 3;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 38;//use condition number 11.000000;//use condition parameter0 4.000000;//use condition parameter1 end_conditions; begin_effects; 24;//effect number 38.000000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 0.300000;//parameter4 end_effects; Sword swing 3;//name 41;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 3;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 38;//use condition number 11.000000;//use condition parameter0 3.000000;//use condition parameter1 end_conditions; begin_effects; 24;//effect number 38.000000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 0.000000;//parameter4 end_effects; Sword swing 4;//name 42;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 3;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 38;//use condition number 11.000000;//use condition parameter0 -2.000000;//use condition parameter1 end_conditions; begin_effects; 24;//effect number 38.000000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 0.200000;//parameter4 end_effects; Sword swing 5;//name 43;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 3;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 38;//use condition number 11.000000;//use condition parameter0 1.000000;//use condition parameter1 end_conditions; begin_effects; 24;//effect number 38.000000;//parameter1 1.000000;//parameter2 3.000000;//parameter3 -0.400000;//parameter4 end_effects;
This is code for a sword type weapon (or anything melee), it makes a sweeping action that can be slowed down or sped up by changing the - Code: Select all
60;//run every n milliseconds
In Drain swordentifier to a higher/lower number.
Directions: copy & paste into the specified .dat files.
Code written by: Me.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by Redemption » Fri Oct 13, 2006 4:47 am
Type: Simple Injury System
bars.dat
These are the two bars you need to add.
- Code: Select all
Blood;//name 13;//identifier 0;//bar type, 0=normal, 1=show body temperature, 2=show number of items parameter0, 3=show wielded weapon ammo, 4=show armor, 5=show carry weight, 6=show seconds from game start 0;//parameter0 1;//visible (only applicable for player's bars) 0;//visible on enemies 0;//show number 3;//anchor point (0=left top, 1=right top, 2=left bottom, 3=right bottom) -250;//location x, pixels from anchor point -35;//location y, pixels from anchor point gore.png;//bar picture none;//background picture 0;//background picture x offset 0;//background picture y offset 0;//background picture width 0;//background picture height 0.7;//height -200;//length in pixels for maximum (negative = bar increases to left) 1.5;//red color component for minimum 0;//green color component for minimum 0;//blue color component for minimum 1.5;//red color component for maximum 0;//green color component for maximum 0;//blue color component for maximum Is injured;//name 14;//identifier 0;//bar type, 0=normal, 1=show body temperature, 2=show number of items parameter0, 3=show wielded weapon ammo, 4=show armor, 5=show carry weight, 6=show seconds from game start 0;//parameter0 1;//visible (only applicable for player's bars) 1;//visible on enemies 1;//show number 3;//anchor point (0=left top, 1=right top, 2=left bottom, 3=right bottom) -250;//location x, pixels from anchor point -80;//location y, pixels from anchor point bar.png;//bar picture none;//background picture 0;//background picture x offset 0;//background picture y offset 0;//background picture width 0;//background picture height 1;//height -200;//length in pixels for maximum (negative = bar increases to left) 1;//red color component for minimum 1;//green color component for minimum 0;//blue color component for minimum 1;//red color component for maximum 0;//green color component for maximum 1;//blue color component for maximum
player_races.dat - Code: Select all
Natural Healing;//description // So you don't bleed forever 7;//specialty -1;//difficulty level none;//message 14;//parameter0 0.01;//parameter1 14;//parameter2 -0.8;//parameter3 Natural Healing HARD;//description 7;//specialty 2;//difficulty level none;//message 14;//parameter0 0.01;//parameter1 14;//parameter2 -0.5;//parameter3 Bleed With minor injury;//Lowers from the Blood bar when injured 7;//specialty 0;//difficulty level You are Bleeding;//message 14;//parameter0 0.25;//parameter1 13;//parameter2 -5;//parameter3 Bleed With minorish injury;// Lowers from the Blood bar when injured 7;//specialty 0;//difficulty level none;//message 14;//parameter0 0.38;//parameter1 13;//parameter2 -3;//parameter3 // Bleed With Average injury;//description 7;//specialty 0;//difficulty level You are Bleeding something fierce;//message 14;//parameter0 0.55;//parameter1 13;//parameter2 -5;//parameter3 // Lowers from the Blood bar when injured Bleed With Major injury;//description 7;//specialty 0;//difficulty level You need more blood;//message 14;//parameter0 0.75;//parameter1 13;//parameter2 -5;//parameter3 // Lowers from the Blood bar when injured Bleed With Major injury;//description 7;//specialty 0;//difficulty level You need medical attention!;//message 14;//parameter0 0.8;//parameter1 13;//parameter2 -5;//parameter3 // Lowers from the Blood bar when injured Blood bar;//description 5;//specialty 0;//difficulty level none;//message 13.000000;//parameter0 0.000000;//parameter1 100.000000;//parameter2 100.000000;//parameter3 //Has Blood Bar Is Injured bar;//description 5;//specialty 0;//difficulty level none;//message 14.000000;//parameter0 0.000000;//parameter1 20.000000;//parameter2 // Has injury bar 0.000000;//parameter3
scripts.dat - Code: Select all
Restore blood to 0;//name // prevents negative numbers 44;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 6;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 25;//use condition number 13.000000;//use condition parameter0 0.000000;//use condition parameter1 end_conditions; begin_effects; 17;//effect number 0.000000;//parameter1 1.000000;//parameter2 13.000000;//parameter3 0.000000;//parameter4 end_effects; Restore blood;//name //Restores your blood 45;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 80;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 25;//use condition number 14.000000;//use condition parameter0 0.200000;//use condition parameter1 end_conditions; begin_effects; 44;//effect number 0.300000;//parameter1 1.000000;//parameter2 13.000000;//parameter3 0.000000;//parameter4 end_effects; Additional Health Drainage While Heavily injured;//Directly affects health when injured 50% 46;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 180;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 24;//use condition number 14.000000;//use condition parameter0 10.0000;//use condition parameter1 24;//use condition number 0.000000;//use condition parameter0 15.0000;//use condition parameter1 end_conditions; begin_effects; 44;//effect number -0.300000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Health Drainage While Bleeding;//Explains itself 48;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 20;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 25;//use condition number 13.000000;//use condition parameter0 1.0000;//use condition parameter1 24;//use condition number 0.000000;//use condition parameter0 14.0000;//use condition parameter1 end_conditions; begin_effects; 44;//effect number -0.034000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Health Drainage While Bleeding in HARD mode;//name 49;//identifier 1;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 120;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 25;//use condition number 13.000000;//use condition parameter0 1.0000;//use condition parameter1 12;//use condition number 2.000000;//use condition parameter0 2.0000;//use condition parameter1 24;//use condition number 0.000000;//use condition parameter0 14.0000;//use condition parameter1 end_conditions; begin_effects; 44;//effect number -0.003000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects;
And under hit effects for enemy weapons: - Code: Select all
4;//effect number 2.000000;//parameter1 // Change this to alter how injured you get when shot 1.000000;//parameter2 14.000000;//parameter3 0.000000;//parameter4
Directions: Copy & Paste into .dat files and change idetifiers.
This is a basic injury system, you bleed when injured and take health damage while heavily bleeding.
Explanation of how it works: Whenever the player is shot the injury bar will increase and will slowly drain over time. When the injury bar is greater than 5 the blood bar will decrease. The blood bar will drain faster as the injury bar gets higher. If the blood bar reaches zero the player's health will start to decrease. Additionally, if the injury bar is greater than 10 the player will take direct health damage. The player will not lose health while under 14, avoiding annoying deaths.
Code Written by: noitpmedeR
Last edited by Redemption on Fri Oct 13, 2006 7:50 am, edited 3 times in total.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by roburky » Fri Oct 13, 2006 7:18 am
These scripts could do with a bit more annotation on them. It's difficult haveing to go and look up every value and parameter myself to see what it does.
-
roburky
-
- Posts: 106
- Joined: Sun Feb 01, 2004 4:10 pm
by Redemption » Fri Oct 13, 2006 7:30 am
Alright.
*edits*
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by Redemption » Sat Oct 14, 2006 4:46 am
Type: Weapon
Weapons.dat
- Code: Select all
Pistol;//name--------------------------------------- 0;//identifier Right hand gun Identifier 0;//class bullet0.png;//bullet texture 1;//bullets at one shot 0;//stop at hit 0=stop where hit, 1=don't stop 1.000000;//bullet size 0.020000;//spread 2.200000;//bullet speed 900.000000;//time until bullet disappears 400;//fire rate 2;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound 0.000000;//push target back 0.000100;//push shooter back ballistic.wav;//fire sound claws0_hit.wav;//hit sound 1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; 27;//effect number 2.000000;//parameter1 50.000000;//parameter2 0.700000;//parameter3 0.850000;//parameter4 26;//effect number 2.000000;//parameter1 5.000000;//parameter2 0.00000;//parameter3 0.0000;//parameter4 end_fire_effects; begin_hit_effects; 4;//effect number -8.10000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_hit_effects; Both Pistols;//name--------------------------------------- 43;//identifier Left hand gun identifier 10;//class bullet0.png;//bullet texture 1;//bullets at one shot 0;//stop at hit 0=stop where hit, 1=don't stop 1.000000;//bullet size 0.075000;//spread 2.200000;//bullet speed 900.000000;//time until bullet disappears 400;//fire rate 2;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue 0;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat none;//hit effect sound 0.000000;//push target back 0.000100;//push shooter back ballistic.wav;//fire sound claws0_hit.wav;//hit sound 1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon begin_wield_conditions; end_wield_conditions; begin_fire_effects; 27;//effect number 2.000000;//parameter1 50.000000;//parameter2 0.700000;//parameter3 0.850000;//parameter4 26;//effect number 2.000000;//parameter1 5.000000;//parameter2 0.00000;//parameter3 0.0000;//parameter4 end_fire_effects; begin_hit_effects; 4;//effect number -8.10000;//parameter1 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_hit_effects;
Bars.dat - Code: Select all
Right Pistol fire Rate;//name 15;//identifier Bar identifier 0;//bar type, 0=normal, 1=show body temperature, 2=show number of items parameter0, 3=show wielded weapon ammo, 4=show armor, 5=show carry weight, 6=show seconds from game start 0;//parameter0 0;//visible (only applicable for player's bars) 1;//visible on enemies 1;//show number 3;//anchor point (0=left top, 1=right top, 2=left bottom, 3=right bottom) -250;//location x, pixels from anchor point -100;//location y, pixels from anchor point bar.png;//bar picture none;//background picture 0;//background picture x offset 0;//background picture y offset 0;//background picture width 0;//background picture height 1;//height -200;//length in pixels for maximum (negative = bar increases to left) 1;//red color component for minimum 1;//green color component for minimum 0;//blue color component for minimum 1;//red color component for maximum 0;//green color component for maximum 1;//blue color component for maximum
Scripts.dat - Code: Select all
Second pistol Shooting script;//name 51;//identifier Script Identifier 0;//run without calling (set to 0 if you use the script for example as a wield script) 0;//call position, 0=player location, 1=mouse location 0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature 40;//run every n milliseconds ;//message 0;//message type, 0=quick message, 1=journal none;//sound, none for nothing 0;//delay script for n seconds after conditions met 0;//disabled after first use, 0=no, 1=yes begin_conditions; 37;//use condition number 1.000000;//use condition parameter0 0.0000;//use condition parameter1 25;//use condition number 15.000000;//use condition parameter0 10.0000;//use condition parameter1 end_conditions; begin_effects; 66;//effect number 0.000;//parameter1 1.000000;//parameter2 15.000000;//parameter3 0.000000;//parameter4 44;//effect number 400.000;//parameter1 1.000000;//parameter2 15.000000;//parameter3 0.000000;//parameter4 end_effects;
player_races.dat - Code: Select all
Right Pistol bar;//description 5;//specialty 0;//difficulty level none;//message 15.000000;//parameter0 Bar identifier 0.000000;//parameter1 40.000000;//parameter2 0.000000;//parameter3 Decrease Right Pistol fire rate bar;//description 7;//specialty 0;//difficulty level none;//message 15;//parameter0 Bar identifier 0.0;//parameter1 15;//parameter2 Bar identifier -40;//parameter3
Items.dat - Code: Select all
Pistol;//name--------------------------------------- 41;//identifier 0;//item class 0.000000;//weight Standard issue pistol;//short description none;//first pick up text 0.400000;//size on map 1;//show on radar 0=does not show, 1=show on scanner, 2=show even without scanner 20;//particle to shown on radar 1;//visible in inventory 0=no (can only be used via quick keys), 1=yes qpistol.png;//texture name 51;//wielded script,-1=nothing, only applicable for wieldable items //Script Identifier -1;//wielded item disabling script, -1=nothing, this script is only checked for conditions while the item is wielded, if the conditions prove false, the item is unwielded 1;//show help text for conditions begin_wield_slots; 0;//wield slot number 1;//wield slot number end_wield_slots; begin_effects_block; Pistol Loaded;//event text nope;//event failure text use.wav;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes U;//use key -1;//quick key begin_conditions; end_conditions; begin_effects; 9;//effect number 43.000000;//parameter1 Left hand Pistol Identifier 0.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; end_effects_block; begin_combinations; end_combinations;
Description: This is code for dual pistols that fire independently of each other, Left click fires the left gun and right click fires the right gun.
Instructions: Copy & Paste into .dat files and change identifiers at the specified places.
Code written by: Redemption
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
by roburky » Sat Oct 14, 2006 10:16 am
So how does it work? Is the right hand pistol not an equipped weapon, but fired through a script?
-
roburky
-
- Posts: 106
- Joined: Sun Feb 01, 2004 4:10 pm
by Redemption » Sun Oct 15, 2006 4:21 am
It's pretty simple.
The pistol item has a wielded script that fires the right hand gun, this script has two conditions. The first condition is that the right mouse button is pressed, and that the fire rate bar is less than 10. If both conditions are met it fires the right hand pistol and increases the fire rate bar. This bar is lowered by player_races.dat so that it gets less than 10, allowing you to fire it again. The left hand pistol is simply a wielded weapon.
-

Redemption
-
- Posts: 311
- Joined: Mon Apr 10, 2006 9:12 am
Return to Notrium Modding
Who is online
Users browsing this forum: No registered users and 1 guest
|
|