[MOD] (Alpha 7) Mining&Co.: Security enforcement (V1.5 12-11-2014)

Started by Rikiki, October 17, 2014, 06:46:46 PM

Previous topic - Next topic

What should be modified to balance the high precision lasgun?

Reduce range (45 -> 40 like a m-24).
9 (16.7%)
Reduce range and increase damage
14 (25.9%)
This weapon is awesome and should not be modified! (kidding) ;-)
30 (55.6%)
Other (please specify how)
1 (1.9%)

Total Members Voted: 54

eatKenny

Quote from: Rikiki on October 27, 2014, 01:17:42 PM
Oh yeah, I had to make some choices to simplify the code and those kind of projectiles are not supprted for the turrets.
It may change in the future but I am not a fan of the turrets packs so... maybe not... :(

If you are not a coder, sorry but I have no time to implement this for now. :-\ If you can modify C# code, then go into the source and look for all pawn references. You must then test each time if it is a turret building and a pawn before getting the right variable (firingPawn.equipment.Primary...).

Sorry, but I have really too few time and I must concentrate my efforts on things I have in mind for now. Let's hope another "touch-to-everything" modder might want to help you though... :D

initially i was planning making a energy-weapon turret with normal projectiles with some fancy texture(like every other energy weapon), and then i see your damn laser beam and i can't get over with it because it's looks so damn good.

i still hope you can make it if it's not a lot of work, i know nothing about c sharp apart from the name ::), and it seems odd asking others to modify your code. i think i might firstly go back to normal projectile and wait up.


skullywag

The projectile doesmt care if it was fired by a pawn. It just cares about position launched from what it does in the air and what it does on impact. So if you add a "turretgun" and set this as projectile it should work fine. I havent looked at the code though but if OP has followed tue patterns define by the core game I see no reason this wouldnt work.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Rikiki

The standard laser projectile can be used by turrets (I believe, not tested).
The problem is with the custom warmup laser projectiles which I only designed for pawns. :(

Buuut.... okay, okay I will look into it to adapt it for turrets too when I got some time. ::)

Wex

Ok. A couple of things about using lasers IRL.
Fog messes up with any light projected, so lasers, can't really shoot in fog; unless they are CO2 lasers, which are invisible (good luck in seeing what you're shooting at).
Water (as in rain) deflect laser for the same reason of fog, so reduced range and damage should be taken in account. Shooting into a lake would reduce the range to a couple of meters.
"You are not entitled to your opinion. You are entitled to your informed opinion. No one is entitled to be ignorant."
    Harlan Ellison

Rikiki

You are right about IRL lasers but, hey!, this is a "sci-fi western" game, so let's imagine (choose the answer you prefer ;D):
- those lasers are really, really powerfull and can vaporize fog and rain on the way 8)
- we are on a rim world with exotic plants and animals AND exotic atmosphere (:o)
...out of ideas... and getting angry (joking!) >:(
- do you really care about laser weapon efficiency when you crashed on a planet and are fending against tribals and heartless deep-space pirates?!? ::)

On the other (more technical) hand, during a fog/rain event, the weather effect is already taken into account by the core mechanics to compute the overhaul accuracy.


Summoned

Quote from: Rikiki on October 17, 2014, 06:46:46 PM
To the last men!


To be honest, I'm not sure it's good advertisement for a weapons dealer to show two of their users dead on the ground and all the enemies still alive. :P

eatKenny

Quote from: Rikiki on October 28, 2014, 06:51:47 AM
The standard laser projectile can be used by turrets (I believe, not tested).
The problem is with the custom warmup laser projectiles which I only designed for pawns. :(

Buuut.... okay, okay I will look into it to adapt it for turrets too when I got some time. ::)

oh nice, looking forward to it ::)

PS: i've tested it, the standard laser projectile from "LaserRifle" didn't work on a turret either.

eatKenny

test update: when i set <preFiringDuration> and <postFiringDuration> to 0 like below, or delete the whole LaserProjectile parameters section, it works but not drawing the laser beam.

<!-- Projectile_Laser.ThingDef_LaserProjectile parameters -->
    <preFiringInitialIntensity>0</preFiringInitialIntensity>
    <preFiringFinalIntensity>1</preFiringFinalIntensity>
    <postFiringInitialIntensity>1</postFiringInitialIntensity>
    <postFiringFinalIntensity>0</postFiringFinalIntensity>
   
    <preFiringDuration>0</preFiringDuration>
    <postFiringDuration>0</postFiringDuration>

Rikiki

You must look into the source code if you want to make it work. ;)
Just removing those parameters completely breaks the custom laser mechanics. :( So no warmup and no beam...

I will detail the used mechanics when I have some free time.
Here is the simplified mechanics:


Step 1: warmup projectile (if any):
o from tick = 0 to preFiringDuration =>
   - begins warmup custom animation (depends on the selected projectile thingClass. Heavy lasgun uses Projectile_Laser.Projectile_HeavyLasgun, High precision lasgun uses Projectile_Laser.Projectile_HighPrecisionLasgun)
   - caster pawn is in aim(=wait) stance.
o when tick = preFiringDuration =>
   - ends warmup custom animation

Step 2: ticksBetweenBurstShots:
o from tick = 0 to tick = ticksBetweenBurstShots => just wait

Step 3 : actual projectile:
o from tick = 0 to preFiringDuration =>
   - draw the beam with intensity ramping from preFiringInitialIntensity to preFiringFinalIntensity
o when tick = preFiringDuration => actual shot (apply the damage at destination)
o from tick = preFiringDuration + 1 to postFiringDuration=>
   - draw the beam with intensity ramping from postFiringInitialIntensity to postFiringFinalIntensity


I hope it's clear enough. If not, just wait for some proper graphs and pictures... :D

sanya02

Where are the rest? In the last version it worked!

[attachment deleted by admin: too old]

Rikiki

Look at the tech tree and you will see you just need some more researches to unlock laser weapons.

sanya02

I have STUDIED ALL!     
in the previous version was all good!

sanya02

All files (Mining & Co.)

[attachment deleted by admin: too old]

sanya02


Rikiki

Again, stop spamming for nothing! >:(
This is a free creation, I don't owe you any fast answer!

Then don't use the "Finish all research" debug tool, it breaks the mod "specialAction" mechanic.
Works fine for me and everyone else if you just follow the tech tree without debug tool.


[attachment deleted by admin: too old]