664725335b9ef

664725335c0dd
1 Guest is here.
 

Topic: SS2 Coloured Laser Rapiers All-in-One Read 12123 times  

664725335cf41sarge945

664725335cfaa
°DML

Coloured Laser Rapiers All-in-One
A mod by Sarge945

This mod adds coloured variants of the Laser Rapier, adding Yellow, White, Red, Purple, Orange, Green and Black variants. All of the rapiers are available in-game all at once, and can show up alongside each other as well as the original Blue variants.

A glowing psi sword is also available as a standalone companion mod.

This mod is highly inspired by the original mod, and uses the assets from it.

Main Features:
  • Rapier colours are randomised in-game! No need to use individual colour versions, you can have them all at once!
  • Choose from one of two versions, Cyclable or Hackable (BETA)
    • Cyclable lets you change rapier colours freely via right click
    • Hackable lets you change rapier colours via hacking (Skill 4 required, 10 nanites per hack)
  • Rapiers will emit a glow (which will pulse slightly) in their respective colour.
  • The black version does not glow at all.
  • Compatible with SCP, SecMod and most other mods
  • When using a mod that adds rapiers to Cyborg Assassins, the rapier colours will be randomised
    • Compatible with Secmod and the Assassin Rapier module for Scary Monsters 1.03.
    • Assassins from Secmod will have the correct blue colour for their blue rapier variants, rather than the bright blue introduced in Secmod.
    • This mod by itself does not add rapiers to assassins!
  • Adjustable rarity settings in the squirrel file, including completely disabling various colours or making them more/less likely to spawn (see the docs folder for info on how to adjust this).

https://www.youtube.com/watch?v=YXeg8Isx2RY

You can discuss this mod, provide feedback, and talk about my other mods here

Changelog:
v1.05 BETA:
- Now allows rerolling!
- Now split into 2 versions: Hackable and Cyclable
   - Hackable version requires hacking the rapier in order to reroll, requires Hack 4, 10 nanites per attempt
   - Cycle version simply cycles through the available colours on right click

v1.04:
- No longer in beta! After thorough testing by multiple people, this is now ready to go!
- Removed print statements that were part of the beta version. This should pollute ss2.log a lot less.
- Slightly modified purple rapier glow to fit the rapier colour better.
- Glow brightness values are now controlled via constants at the top of the script, for easier editing by others.

v1.04 BETA 4:
- Removed Scripted Object replacements to ensure compatibility with both Secmod and SS2-RSD, since the latter replaces and changes objects via script, including rapiers.
    - Took a different approach to ensure rapiers in the maps are replaced.
- Fixed borked Black assassin rapier model

v1.04 BETA 3:
- Added DML edits to recreate all in-map rapiers in the vanilla game and SCP. Not Secmod compatible currently.

v1.04 BETA 2:
- Updated the Assassin Rapier models to use the same textures as the standard ones, rather than an identical copy.
    - The Blue variant now uses the standard BLUE.PCX and TURQ.PCX files from vanilla

v1.04 BETA:
- Completely changed the way assassin rapiers work. It should now be perfectly consistent
    - Assassins will now roll a rapier colour once, and apply it to every rapier they generate, including loot
    - Assassin rapier rarity can now be set the same way that regular rapier rarity can be

v1.03:
- Minor changes to the code for legibility, added more documentation comments in the squirrel file for people who wish to tweak the mod.
- Added Secmod assassin support.
- If assassins are forced to use a rapier colour, it will also affect rapiers they drop on death.


v1.02:
- Slightly brightened the White variant of the texture as it was too dark around the edges, making the rapier look like a thin white stick (world model only).
- Fixed extremely stupid bug introduced in v1.01 involving wrong rapier colours when transitioning levels.
- Updated assassin rapier textures to ensure consistency with the standard ones, including the overly-bright blue texture (caused by GIF palette issues in the Secmod model).
    - Assassin rapiers should now look identical to their standard counterparts
    - Load after Secmod and Scary Monsters, as they both include the same blue assassin rapier model

v1.01:
- Added support for the upcoming v1.03 version of Scary Monsters Assassin Rapiers Addon
    - Assassins will no longer hold rapiers incorrectly
    - Due to the way Scary Monsters works, the assassins generate a new Rapier every time they attack. This means the colours continually change.
        - Added a new setting to combat this, assassinForceColor at the top of the squirrel file. I personally recommend setting this to black (index 7) since it looks great on stealthy ninjas.
    - Includes a missing texture bluegrad.gif, which fixes the purple Jorge texture on blue assassin rapiers.
- Fixed issues with level loading corrupting rapier glows (fixed for real in v1.02)

Credits:
IonosFear for the original mod, and for the rapier textures which I am using from those original mods. Secmod for the assassin rapier models, which I had to copy from secmod to make compatible.

Special thanks to @Deu sex for testing.

Additional Note
The new beta version comes in 2 versions - cyclable and hackable. Please use only one version

Updated versions of the old mod are also here for posterity, Their only difference from the original versions is they update the glow colours added by Secmod and SCP to match the chosen rapier colour. They have no randomisation, and work exactly the same way as the original mod. It is highly recommended that you use the All-in-One version instead. Do not use any of the individual colour versions if using the All-in-One version, it has them already included.
« Last Edit: 28. March 2024, 15:13:57 by sarge945 »
Acknowledged by: RoSoDude

664725335d34bvoodoo47

664725335d3a8
quick look at the dml;
DML1

+ObjProp -24 "LightColor" //Electro Shock
{
    "hue" 0.98 //red
}
would probably go with
DML1

ObjProp -24 "LightColor" //Electro Shock red
{
    "hue" 0.98
}
omitting the + means it will only edit the value if it exists, which is exactly what you want to do here. also, not liking the comment right next to the hue value, even though it's probably ok (and note, one extra empty line at the end of the dml, it's recommended for a reason I quite cannot remember right now). anyway, this is extreme nitpicking, but if you are getting into this, might as well acquire the proper habits as soon as possible..

664725335d486sarge945

664725335d4d4
The reason I have a comment at the end of each line is because in my master copy, I have all the different color changes in the brackets right after each other, and I just delete the invalid lines for each mod version.

I could remove the comments at the end of the hue lines, but they seem to be harmless?

I guess I could put the comment on the line above the actual hue
« Last Edit: 27. March 2022, 14:37:43 by sarge945 »

664725335d5b1sarge945

664725335d600
I have reuploaded new versions with the feedback. I don't think it makes any real difference, but it's worth being technically correct.

EDIT: I just checked, these also seem to work with Secmod's rapier glow
« Last Edit: 27. March 2022, 15:05:27 by sarge945 »

664725335d6a0voodoo47

664725335d6ee
yes, if the value is there, the dml will work. you can limit this via fingerprinting if you want.

664725335d785sarge945

664725335d7d0
I actually like that it's universally compatible, so I probably won't fingerprint.

664725335d8c8sarge945

664725335d913
Here is an additional file that will make the psi sword also glow, which I literally threw together in 5 minutes. Use at your own risk. It's been thoroughly tested, ie, I ran around in earth.mis for a few minutes after using the ubermensch command and summoning a psi amp.

I don't really like it though, I would prefer to change it to a more teal or aqua colour, but because the way dark handles colours is wack, I can't just increase the Green component.
« Last Edit: 26. July 2022, 19:46:08 by Moderator »

664725335da4bDeu sex

664725335da9b
I can finally be Mace Windu, thanks!

664725335dc25Deu sex

664725335dc74
try the green lazer rapier with those parameters (or any other color with only hue being different):

DML1

ObjProp -24 "LightColor" //Electro Shock
{
    //green
    "hue" 0.40
    "saturation" 0.9
}

+ObjProp -24 "SelfLit" //Electro Shock
{
    "" 250
}

+ObjProp -24 "SelfLitRad" //Electro Shock
{
    "" 30
}

You will need to summon the electro shock again to see the difference though.
With the red variant in dark corridors it feels like you're darth vader in that rogue one scene haha.

The idea came to me from the flashlight aug mod, where there was a SelfLitRad property, by the way in the flashlight aug script multiplying the lightRad value by 10 for the _lightObj and commenting the player glow lines makes the flashlight have a really cool fake global illumination to it, it's really cool you should try it!
« Last Edit: 04. May 2022, 09:11:40 by Deu sex »

664725335e03bsarge945

664725335e0a2
Deu sex
Are you suggesting I should update the mod? What actual changes do your suggestions make? Can you give a side-by-side comparison?

I might consider updating it

Also, unrelated, that chromatic aberration on the HUD makes me want to commit war crimes, but to each their own I guess.
« Last Edit: 04. May 2022, 14:17:46 by sarge945 »

664725335e2bcDeu sex

664725335e30f
haha the CA is just a reshade shader I can toggle on or off, I like it precisely because it's horrible, it's like the grunt R grade implant surgery wasn't completely finished and Polito just wanted to get the guy ready as soon as possible with little care nor consideration, and the implants for augmented vision/reality aren't completely tuned or something, feels very corporate greed and roleplay in the setting haha.

As for the rapier, try it for yourself really, it's easy to change, you just have to summon a new rapier to see the change though.
I can take screenshots but it won't convey the benefits of the changes as well.

Hold on for the update though, I might have something pretty cool in the works...

EDIT: yep, try this one out for the red rapier:

DML1

ObjProp -24 "LightColor" //Electro Shock
{
    //red
    "hue" 0.98
    "saturation" 0.9
}

+ObjProp -24 "SelfLitRad" //Electro Shock
{
    "" 30
}

+ObjProp -24 "AnimLight" //Electro Shock
{
    "Mode" "slide smoothly"
    "min brightness" 320
    "max brightness" 400
    "millisecs to brighten" 1400
    "millisecs to dim" 1000
    "Dynamic Light" true
}

of course you'll need to summon a new one with summon_obj electro shock
other more brighter natural colors like green might need slightly less min and max brightness, 260 and 300 seems better for green, 160 and 280 for the vanilla blue.

as RoSoDude stated to me, the SelfLitRad and AnimLight properies can be their own thing though, it's independant to color so updating the mod is probably not mandatory to have this effect, unless you really dig it of course
« Last Edit: 09. May 2022, 08:58:01 by Deu sex »

664725335e3d1Deu sex

664725335e41f
Damn, I'm not sure why but by just playing the game, when you stumble on a new rapier it doesn't have the new radius and all, it only works by invoking it, not sure why :( (apparently it needs editing the objects in the levels directly)
« Last Edit: 06. May 2022, 03:36:52 by Deu sex »

664725335e4d2sarge945

664725335e521
Did you install the mod after entering those decks for the first time?

Editing the original items shouldn't be too bad, there's only a handful in the game
« Last Edit: 06. May 2022, 07:12:48 by sarge945 »

664725335e693Deu sex

664725335e6e8
I installed the mod before starting an entire new game. Also the color change works, your mod works, it's just my modification that doesn't, but it does work on laser rapiers that I can find on cyborg assassins with the assassins rapier minimod hehe

also for the psi sword try those!

//Add Dynamic Light
+ObjProp "PsiSword" "SelfLitRad"
{
   "" 30
}

+ObjProp "PsiSword" "LightColor"
{
   "hue" 0.66
   "saturation" 0.80
}

+ObjProp "PsiSword" "AnimLight"
{
    "Mode" "slide smoothly"
    "min brightness" 120
    "max brightness" 150
    "millisecs to brighten" 700
    "millisecs to dim" 500
    "Dynamic Light" true
}
« Last Edit: 07. May 2022, 03:43:17 by Deu sex »

664725335e7a3sarge945

664725335e7ef
I still don't understand why it wouldn't work for pre-placed rapiers. Maybe someone like @voodoo47 knows?

664725335e9fdDeu sex

664725335ea4f
sarge945
RoSoDude mentionned to me that it was something along the lines of object properties being binded in the map data or something. Or maybe it's just SCP secret sauce.

664725335eb18sarge945

664725335eb87
well maybe the best way to do it is to strip the dynamic light properties from the base object, create a new MetaProperty, and apply it dynamically to the base object as well as every instance in every map.

664725335ecb2voodoo47

664725335ed04
some props are inherited from the archetypes by the concretes, other ones are not. dynamic light is not, that means a small bit of NVscripting is required to "deploy" the prop onto existing concretes upon level start. lemme get the code for you;

Code: [Select]
//drop SelfLit onto rapiers already placed in levels
ObjProp -24 "Scripts"
{
"Script 0" NVRemovePropertyTrap
}
+ObjProp -24 "ObjList"
{
"" NVRemovePropertyTrapOn="BeginScript"; NVRemovePropertyTrapProp="SelfLit"; NVRemovePropertyTrapReAdd=1; NVRemovePropertyTrapCount=1;
}
AnimLight and LightColor should get inherited. //just noticed, any reason you are using SelfLitRad instead of SelfLit?
« Last Edit: 09. May 2022, 08:39:57 by voodoo47 »

664725335ee3aDeu sex

664725335ee87
I'm using SelfLitRad to change the radius because I was unable to change it both with just SelfLit (no radius property) or with AnimLight (which has a radius property but doesn't seem to work with DynamicLight set to true).

I took your script many thanks, I can't verify that it works by entering the level for the first time, but loading a save at recreation deck and going back to engineering to the place were the rapier was, sadly no change to radius or brightness and no anim light, this is how it looks now:

Code: [Select]
//drop SelfLit onto rapiers already placed in levels
ObjProp -24 "Scripts"
{
"Script 0" NVRemovePropertyTrap
}
+ObjProp -24 "ObjList"
{
"" NVRemovePropertyTrapOn="BeginScript"; NVRemovePropertyTrapProp="SelfLit"; NVRemovePropertyTrapReAdd=1; NVRemovePropertyTrapCount=1;
}

+ObjProp -24 "SelfLitRad" //Electro Shock
{
    "" 30
}

+ObjProp -24 "AnimLight" //Electro Shock
{
    "Mode" "slide smoothly"
    "min brightness" 160
    "max brightness" 180
    "millisecs to brighten" 1400
    "millisecs to dim" 1000
    "Dynamic Light" true
}
« Last Edit: 09. May 2022, 09:15:40 by Deu sex »

664725335f155sarge945

664725335f1bc
some props are inherited from the archetypes by the concretes, other ones are not. dynamic light is not, that means a small bit of NVscripting is required to "deploy" the prop onto existing concretes upon level start. lemme get the code for you;

Code: [Select]
//drop SelfLit onto rapiers already placed in levels
ObjProp -24 "Scripts"
{
"Script 0" NVRemovePropertyTrap
}
+ObjProp -24 "ObjList"
{
"" NVRemovePropertyTrapOn="BeginScript"; NVRemovePropertyTrapProp="SelfLit"; NVRemovePropertyTrapReAdd=1; NVRemovePropertyTrapCount=1;
}
AnimLight and LightColor should get inherited. //just noticed, any reason you are using SelfLitRad instead of SelfLit?

Thank you for the magic runewords to make the mod work. You truly are a holy scholar of the righteous path!

Actually seriously though, could I use something similar for my camera mod?
« Last Edit: 09. May 2022, 09:51:54 by sarge945 »

664725335f2afvoodoo47

664725335f301
I have to admit I'm not quite sure which radius is set by SelfLitRad, but giving an object a dynamic light is done by giving it SelfLit, and setting its value which is the radius. AnimLight is only necessary if you need additional effects, like flickering.

SCP already does dynamic light rapiers, so all you have to do is check, and do that, no need to reinvent the wheel.

664725335f3beDeu sex

664725335f40a
Yeah I'm using AnimLight because I wanted to give the rapier a subtle and slow but still visible wave of energy, and since AnimLight with dynamiclight set to true already has it's own dynamic light, I figured I just delete the SelfLit property. However I still needed SelfLitRad to extend the radius of the AnimLight

664725335f66aGuyFawkesGaming

664725335f6bf
Deu sex Think you can do one for SCP vanilla blue rapiers? Additional effects are always fun to try out, but I don't really need colors.

664725335f8c4Deu sex

664725335f915
GuyFawkesGaming
Take a colored one, remove the icon sprite, remove the self lit property in the script and replace it by :

Code: [Select]
+ObjProp -24 "SelfLitRad" //Electro Shock
{
    "" 30
}

+ObjProp -24 "AnimLight" //Electro Shock
{
    "Mode" "slide smoothly"
    "min brightness" 160
    "max brightness" 180
    "millisecs to brighten" 1400
    "millisecs to dim" 1000
    "Dynamic Light" true
}

That's exactly what I did :) you will need to invoke a new one though.

Also sorry voodoo the script you gave to me doesn't seem to help :/

Your name:
This box must be left blank:

A familiar passcode with 3 digits:
1 Guest is here.
Lights go out, walls come tumbling down
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664725335fa2d