[Mod Request] Fireworks Mod
- 0xABCDEF
- Militia Lieutenant
- Posts: 124
- Joined: Thu May 19, 2016 12:58 am
- Location: Was destroyed by a Phobos-class dreadnought in the Eridani system
I had the idea of implementing various missiles with firework-like effects for a US Independence Day themed mod. These missiles would have randomly colored explosions, fragments, and particles in order to imitate the various fireworks I see on the 4th of July. However, I do not have much experience with EffectType.
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki
primaryColor and secondaryColor can be set within the <GetParameters> event of some effects. Value might be in string form, and might need to concatenate strings. "#" <red hexadecimal value from 0-255, or 00-ff> <green hexadecimal value> <blue hexadecimal value>.
You may need some way to convert normal decimal values to hexadecimal.
I made some fireworks style weapons for Drake Technologies Alpha and Item Pack 912 years ago before I phased them out, but some of the code I used is still present.
Just simply picking random colors results in a pastel-like rainbow colors. You may want to select color based on a timestamp or some other criteria. Or it could be something fixed, simple, but bulky like having multiple <Fragments> that are the same except for color.
You may need some way to convert normal decimal values to hexadecimal.
I made some fireworks style weapons for Drake Technologies Alpha and Item Pack 912 years ago before I phased them out, but some of the code I used is still present.
Just simply picking random colors results in a pastel-like rainbow colors. You may want to select color based on a timestamp or some other criteria. Or it could be something fixed, simple, but bulky like having multiple <Fragments> that are the same except for color.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
And hopefully I can help out here tooPM wrote: ↑Wed Jul 05, 2017 6:00 pmprimaryColor and secondaryColor can be set within the <GetParameters> event of some effects. Value might be in string form, and might need to concatenate strings. "#" <red hexadecimal value from 0-255, or 00-ff> <green hexadecimal value> <blue hexadecimal value>.
You may need some way to convert normal decimal values to hexadecimal.
I made some fireworks style weapons for Drake Technologies Alpha and Item Pack 912 years ago before I phased them out, but some of the code I used is still present.
Just simply picking random colors results in a pastel-like rainbow colors. You may want to select color based on a timestamp or some other criteria. Or it could be something fixed, simple, but bulky like having multiple <Fragments> that are the same except for color.
170 colors ( found in Shipyards)
http://forums.kronosaur.com/viewtopic.php?f=5&t=7665
Examples :
you will notice that you can set color / colors , opacity of those colors
configuration of shot, muzzle flash :
type of style : Plain, jagged, flare, spray, cloud, etc....
Code: Select all
<Effect>
<Particle
style= "plain"
minWidth= "3"
maxWidth= "6"
primaryColor= "0xfc, 0xe8, 0x87"
secondaryColor= "0x85, 0x0c, 0x0f"
/>
</Effect>
Code: Select all
<Weapon
type= "missile"
repeating= "4"
damage= "ion:1d8"
fireRate= "15"
missileSpeed= "100"
lifetime= "60"
interaction= "0"
powerUse= "650"
sound= "&snLaserCannon;"
>
<Effect>
<Ray
style= "jagged"
shape= "tapered"
length= "108"
primaryColor= "#00d5ff"
secondaryColor= "#006b80"
>
<Events>
<GetParameters>
(block (
(damageHP (@ gData 'damageHP))
)
{
width: (mathScale damageHP 10 140 20 40 50)
intensity: 60
}
)
</GetParameters>
</Events>
</Ray>
<ParticleComet
particleCount= "200"
primaryColor= "#00d5ff"
>
<Events>
<GetParameters>
(block (
(damageHP (@ gData 'damageHP))
)
{
particleCount: (mathScale damageHP 10 140 100 300 50)
length: 72 ;(mathScale damageHP 10 140 60 220 50)
width: 15
}
)
</GetParameters>
</Events>
</ParticleComet>
</Effect>
</Weapon>
Code: Select all
<Weapon
type= "missile"
repeating= "4"
damage= "positron:2d8"
fireRate= "20"
missileSpeed= "90"
lifetime= "34"
interaction= "0"
powerUse= "3500"
sound= "&snLaserCannon;"
>
<Effect>
<Shape
directional= "true"
scaleLength= "72"
scaleWidth= "6"
scaleLengthInc= "3"
color= "0x00, 0x80, 0x80"
opacity= "140"
>
<Point x="0" y="0"/>
<Point x="-35" y="50"/>
<Point x="-100" y="0"/>
<Point x="-35" y="-50"/>
</Shape>
<Shape
directional= "true"
scaleLength= "72"
scaleWidth= "4"
scaleLengthInc= "3"
color= "0x00, 0x80, 0x80"
opacity= "255"
>
<Point x="0" y="0"/>
<Point x="-35" y="50"/>
<Point x="-100" y="0"/>
<Point x="-35" y="-50"/>
</Shape>
<Shape
directional= "true"
scaleLength= "64"
scaleWidth= "3"
scaleLengthInc= "3"
color= "0x00, 0x80, 0x80"
opacity= "255"
>
<Point x="0" y="0"/>
<Point x="-25" y="50"/>
<Point x="-100" y="0"/>
<Point x="-25" y="-50"/>
</Shape>
</Effect>
</Weapon>
Flying Irresponsibly In Eridani......
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
I've been playing with <GetParameters> and effects for a while.
I do have random colored weapons, rainbow weapons and a number of supporting functions in WE6 such as:
- RGB to HSL converter.
- dec to hex to dec (taken from alterecco's DSF, and fixed because it has a bug)
- function that converts '(0xAA 0xBB 0xCC) to "#AABBCC" color formats
- colornamer function with over 1000 names of colors. (converted to transLisp from a javascript function)
I do have random colored weapons, rainbow weapons and a number of supporting functions in WE6 such as:
- RGB to HSL converter.
- dec to hex to dec (taken from alterecco's DSF, and fixed because it has a bug)
- function that converts '(0xAA 0xBB 0xCC) to "#AABBCC" color formats
- colornamer function with over 1000 names of colors. (converted to transLisp from a javascript function)