Faction Diversity Mod - Noob learning the hard way

Everything about mods can be found here.

Moderator: Morax

Re: Faction Diversity Mod - Noob learning the hard way

Postby vongratz » 13 Nov 2016, 23:28

But the final result is COOOOL !!!! :D
User avatar
vongratz
Avatar-of-War
 
Posts: 192
Joined: 08 May 2012, 15:03
Has liked: 165 times
Been liked: 9 times

Re: Faction Diversity Mod - Noob learning the hard way

Postby Dudekahedron » 15 Nov 2016, 03:17

vongratz wrote:But the final result is COOOOL !!!! :D

Love the support haha

Added a new unit and its making me way more happy than it should...
Curse; the ... RADIOACTIVE WALL SEGMENT!!! :o :shock: :twisted:
Check out my mod (in development): /viewtopic.php?f=41&t=13326
User avatar
Dudekahedron
Avatar-of-War
 
Posts: 118
Joined: 10 Apr 2016, 22:01
Has liked: 42 times
Been liked: 54 times
FAF User Name: Dudekahedron

Re: Faction Diversity Mod - Noob learning the hard way

Postby Exotic_Retard » 15 Nov 2016, 09:49

thats..... actually a pretty unique concept.
i dont think ive seen anything like it, its surprisingly amazing.

this looks like it could have a great but niche role, while also kinda fitting the cybran theme of suicide/landmine/sneaky kind of thing

i can imagine several uses for it already, all of which completely different to regular units. damn.
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Faction Diversity Mod - Noob learning the hard way

Postby KeyBlue » 15 Nov 2016, 12:20

I'm trying to do something with area of effect around a unit aswell, but i couldn't get it to work yet.
So would you mind explaining how you did the scripting for your RADIOACTIVE WALL SEGMENT

If you don't want to clutter your own thread with expaining such things, then you can post it here:
viewtopic.php?f=41&t=13484
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Faction Diversity Mod - Noob learning the hard way

Postby Dudekahedron » 15 Nov 2016, 15:34

@Exotic; Thanks! As of right now though its probably OPd for its price, which is actually shocking me haha. It has next to no effect on regenerative units, but a whole bunch of them clumped together is devastating!

@Keyblue; I can explain here, I don't mind the clutter.
I cheated. I modified the Othuy script (big electricity ball) to have it attack continuously all around it;
Code: Select all
KillingState = State {
       Main = function(self)
            local bp = self:GetBlueprint()
            local aiBrain = self:GetAIBrain()
            local weaponMaxRange = bp.Weapon[1].MaxRadius
            local weaponMinRange = bp.Weapon[1].MinRadius
            local beamLifetime = bp.Weapon[1].BeamLifetime
            #local reaquireTime = bp.Weapon[1].RequireTime
            local weapon = self:GetWeapon(1)
            local location = self:GetPosition()
           
            while not self:IsDead() do
             local targets = aiBrain:GetUnitsAroundPoint( categories.LAND - categories.UNTARGETABLE, location, weaponMaxRange )
             local filteredUnits = {}
             for k,v in targets do
                 if VDist3( location, v:GetPosition() ) >= weaponMinRange and v ~= self then
                       table.insert( filteredUnits, v )
                   end
               end
               local target = filteredUnits[Random(1, table.getn(filteredUnits))]
               if target then
                   weapon:SetTargetEntity(target)
               else
                   weapon:SetTargetGround( { location[1] + Random(-20, 20), location[2], location[3] + Random(-20, 20) } )
               end
               # Wait a tick to let the target update awesomely.
               WaitSeconds(.1)
               weapon:FireWeapon()
                              
               WaitSeconds(beamLifetime)
   
               #WaitSeconds(reaquireTime)
            end
        end,
   },

That stuff is from the seraphimunits.lua file, but I put it in my unit script. There is an issue with this method though, the unit will almost certainly die while executing that loop, and if it does an error message is produced - its a one time off thing, so not a huge deal... but still.

Also make sure you turn the state on:
Code: Select all
    OnStopBeingBuilt = function(self,builder,layer)
       CStructureUnit.OnStopBeingBuilt(self,builder,layer)
        ChangeState( self, self.KillingState )
    end,


Then I copied out the outhuy's beam weapon (unstable phason something something) to my cybranweapons.lua hook, as well as the appropriate data from defaultcollisionbeams into another hook file, and in both cases I replaced the stuff I didn't want with empty brackets or a custom effect;
From cybranweapons.lua:
Code: Select all
RadiationDairy = Class(DefaultBeamWeapon) {
    BeamType = CollisionBeamFile.RadiationBeam,
    FxMuzzleFlash = {},
    FxChargeMuzzleFlash = {},
    FxUpackingChargeEffects = EffectTemplate.CMicrowaveLaserCharge01,
    FxUpackingChargeEffectScale = 1,
}

Extract from defaultcollisionbeams.lua:
Code: Select all
    TerrainImpactType = 'LargeBeam01',
    TerrainImpactScale = 0.5,
    FxBeamStartPoint = EffectTemplate.RadiationStartDairy,
    FxBeam = {},
    FxBeamEndPoint = {},
    SplatTexture = 'czar_mark01_albedo',
    ScorchSplatDropTime = 0.25,

I'm pretty sure a weapon needs a beamtype, but in the beamtype file you can specify no beam to be present. You don't need a muzzle flash in either, or charge muzzle flash, or end effect etc. Unless you want any of them. I wanted a gentle red pulse when the wall 'emitted'. I'm not sure about the charge effects yet...
For the effectTemplates; they typically refer out to an effect blueprint file, so you don't necessarily need the two step referencing. The effect bp files then reference stuff in /textures/ and they are enormously picky.

If I understand your goals correctly, you want to create almost a disease, right? If you know how to use weapon buffs for beam weapons (I don't know how), then this might work. I have no idea how you'd affect the unit scripts though :?

Right now, the only issue with my weapon is that its pretty obvious what its attacking or where. It leaves little scorch marks, and units under attack throw little sparks everywhere.

I hope this helps, its a hack approach to AoE, but it works for my stuff at least!

EDIT: Turns out, a beamtype blueprint is required, or else you get a log readout everytime the unit fires, HOWEVER, the blueprint can specify nil as the beam texture!
EDIT2: Getting rid of the 'almost guaranteed error message' is super easy;
replace "weapon:FireWeapon()" with:
Code: Select all
if not self:IsDead() then
     weapon:FireWeapon()
end
Last edited by Dudekahedron on 17 Nov 2016, 22:16, edited 2 times in total.
Check out my mod (in development): /viewtopic.php?f=41&t=13326
User avatar
Dudekahedron
Avatar-of-War
 
Posts: 118
Joined: 10 Apr 2016, 22:01
Has liked: 42 times
Been liked: 54 times
FAF User Name: Dudekahedron

Re: Faction Diversity Mod - Noob learning the hard way

Postby Dudekahedron » 17 Nov 2016, 00:38

Image
Check out my mod (in development): /viewtopic.php?f=41&t=13326
User avatar
Dudekahedron
Avatar-of-War
 
Posts: 118
Joined: 10 Apr 2016, 22:01
Has liked: 42 times
Been liked: 54 times
FAF User Name: Dudekahedron

Re: Faction Diversity Mod - Noob learning the hard way

Postby Professor » 17 Nov 2016, 01:15

Cybran unit?
Professor
Crusader
 
Posts: 46
Joined: 10 Aug 2016, 01:14
Has liked: 50 times
Been liked: 7 times
FAF User Name: ProfessorJ69

Re: Faction Diversity Mod - Noob learning the hard way

Postby Exotic_Retard » 17 Nov 2016, 01:43

Image

i bet all my money on some crazy capturing device.

also the top half of that dominator looks like your aeon emp jellyfish
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Faction Diversity Mod - Noob learning the hard way

Postby speed2 » 17 Nov 2016, 01:50

More like Brackman's brain
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Faction Diversity Mod - Noob learning the hard way

Postby biass » 17 Nov 2016, 04:15

Spoiler: show
Image

we iz the most shootiest, and the choppyest, and the stompyest there is!
Map thread: https://bit.ly/2PBsa5H

Petricpwnz wrote:biass on his campaign to cleanse and remake every single map of FAF because he is an untolerating reincarnation of mapping hitler
User avatar
biass
Contributor
 
Posts: 2239
Joined: 03 Dec 2015, 07:54
Has liked: 598 times
Been liked: 662 times
FAF User Name: biass

PreviousNext

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest