FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    1. Home
    2. Resin_Smoker
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 43
    • Posts 232
    • Groups 0

    Resin_Smoker

    @Resin_Smoker

    91
    Reputation
    64
    Profile views
    232
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Resin_Smoker Unfollow Follow

    Best posts made by Resin_Smoker

    • 4DFAF Uploaded

      ******* Now on FAF client for download *******
      225dab7a-f8d0-48a4-9b4e-546f837f5229-image.png

      Been working on converting the old 4th-D mod to work with FAF. Just uploaded the 1st portion of it, the original UEF units.

      A few important things of note...

      • It wont modify the preexisting units or game assets. There maybe a follow on mod later that uses the 4th-D and 4DC content for the preexisting units.

      • Currently I've not added any AI support. Partly because its likely changed quite a bit since last I modded anything, and that I'd rather get the units in a playable state first before attempting this.

      • Balancing has been quickly looked at for some units but not all. Hence your constructive input is welcome.

      All in all its taken the better part of a week to go through all 14 of the UEF original units, get them working and cleaned up. There is a far bit of new script done to improve upon or outright replace what was done using DMS.

      Two examples...

      UEF land mines in 4DC used an area sensing technique that to this day I don't fully understand. It was replaced with a "weapon" based system, but does work as intended.

      UEF Thrasher T2 fighter has a all new afterburner script. Able to use the afterburner to catch up to targets or escape. While also able to automatically adjust its Break off distance / trigger based on the type of target it has.

      Enjoy!

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker
    • Messing around with unit intel and whats possible

      Here is a unit with a series of entities that are attached / offset from the parent unit. Each entity has its own intel range that displays for the player at a roughly 45 degree angle from the point of origin. Stopping at what is exactly the units max weapon range.

      11b89425-62cd-4bb3-9bc7-7e3cc9a49b37-image.png

      As the unit moves so do the attached entities. Effectively i can apply this to any intel type that's needed. Creating a cone of intel rather than a circle. (Which is more realistic)

      Script snippet (or it didn't happen)

      CreateIntelEntity = function(self, bone, intel, radius)
          if not self.IntelEntity then
              self.IntelEntity = {}
          end
          if not self:BeenDestroyed() and radius > 0 then
              local counter = 1
              while counter <= radius do
                  local angle = math.ceil(counter / 3.14)
                  if counter + angle < radius then
                      ent = import('/lua/sim/Entity.lua').Entity({Owner = self,})
                      table.insert(self.IntelEntity, ent)
                      self.Trash:Add(ent)					
                      ent:AttachBoneTo( -1, self, bone or 0 )
                      local pos = self:CalculateWorldPositionFromRelative({0, 0, counter})
                      ent:SetParentOffset(Vector(0,0, counter))
                      ent:SetVizToFocusPlayer('Always')
                      ent:SetVizToAllies('Always')
                      ent:SetVizToNeutrals('Never')
                      ent:SetVizToEnemies('Never')
                      ent:InitIntel(self.MyArmy, intel, angle)
                      ent:EnableIntel(intel)
                  end
                  counter = counter + 1
              end	
          end
      end,	
      
      

      Currently I'm calling this from the units OnCreate to facilitate easier testing.

      OnStopBeingBuilt = function(self,builder,layer)
          TAirUnit.OnStopBeingBuilt(self,builder,layer)
      
          --Start advanced radar
          self:ForkThread(self.CreateIntelEntity,'MuzzleFront', 'Vision', 45)
      end,
      

      This could be applied to every "radar" unit in the game including units that have rotating radar antenna.s Thus allowing the intel entities to sweep an area just like a real radar! Eventually, once i unravel the mystery that is the FAF intel system, I will make a mod using this ability as well as something similar for sonar as well.

      Enjoy!

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker
    • Predator Camouflage

      Did a short little script to allow my bot to look like any prop its standing next to.

      Video (or it didn't happen): https://youtu.be/frnP8V9ZPW8

      Script...

      -----------------------------------------------------------------------------
      --	File	 : /units/ual0204/ual0204_script.lua
      --
      --	Author(s): EbolaSoup, Resin Smoker, Optimus Prime, Vissroid
      --
      --	Summary  : Aeon T2 Sniper Bot
      --
      --	Copyright © 2024 4DFAF, All rights reserved.
      -----------------------------------------------------------------------------
      
      -- Misc Lua called
      local AWalkingLandUnit = import('/lua/aeonunits.lua').AWalkingLandUnit
      local EffectUtils = import('/lua/EffectUtilities.lua')
      local EffectTemplate = import('/lua/effecttemplates.lua')
      local Custom_4D_EffectTemplate = import('/mods/4DFAF/lua/4D_EffectTemplates.lua')
      local utilities = import('/lua/utilities.lua')
      
      local myDebug = false
      
      -- Weapon Local lua called
      local SniperWeapon = import('/lua/aeonweapons.lua').ADFDisruptorCannonWeapon
      
      -- Bones for weapon recoil effects
      local weaponBones = { 'sniper_rifle', 'sniper_barrel' }
      
      ual0204 = Class(AWalkingLandUnit) {
      	Weapons = {
      		-- Shield Piercing Rifle
      		Sniper_Piercing_Rifle = Class(SniperWeapon) {
      			PlayFxMuzzleSequence = function(self, muzzle)
      				for k, v in weaponBones do
      				   local steamEffects = EffectUtils.CreateBoneEffects( self.unit, v, self.unit:GetArmy(), EffectTemplate.WeaponSteam01 )
      				end
      				local groundEffects = EffectUtils.CreateBoneEffects( self.unit, 'ual0204', self.unit:GetArmy(), Custom_4D_EffectTemplate.ConcussionRing )
      				if self.unit.CamoEntity then
      					self.unit.CamoEntity:Destroy()
      					self.unit.CamoEntity = nil
      					self.unit:DisableIntel('Cloak')
      					self.unit:SetVizToFocusPlayer('Always')
      					self.unit:SetVizToAllies('Always')
      				end
      				SniperWeapon.PlayFxMuzzleSequence(self)
      			end,
      		},
      	},
      
      	OnCreate = function(self,builder,layer)
      		AWalkingLandUnit.OnCreate(self)
      		self:DisableIntel('Cloak')
      		self.CamoEntity = nil
      	end,
      
      	OnMotionHorzEventChange = function(self, new, old)
      		if myDebug then WARN('OnMotionHorzEventChange') end
      		if self and not self:IsDead() then
      			if new == 'Stopped' then
      				if myDebug then WARN('	Stopped') end
      				local propTbl = self:GetPropsInRadius(2)
      				local propBp = propTbl[1].prop.Blueprint
      				if myDebug then WARN('	prop blueprint '..repr(propBp) ) end
      				local mesh = propBp.Display.MeshBlueprint or nil
      				local scale = propBp.Display.UniformScale
      				if myDebug then WARN('	Mesh / Scale: ', mesh, scale) end
      				if mesh then
      					self:EnableIntel('Cloak')
      					self:SetVizToFocusPlayer('Never')
      					self:SetVizToAllies('Never')
      					self.CreateCamoEntity(self, mesh, scale)
      				end
      			else
      				if myDebug then WARN('	moving') end
      				if self.CamoEntity then
      					self.CamoEntity:Destroy()
      					self.CamoEntity = nil
      					self:DisableIntel('Cloak')
      					self:SetVizToFocusPlayer('Always')
      					self:SetVizToAllies('Always')
      				end
      
      			end
      		end
      		AWalkingLandUnit.OnMotionHorzEventChange(self, new, old)
      	end,
      
      	CreateCamoEntity = function(self, mesh, scale)
      		if myDebug then WARN('CreateCloakEntity') end
      		ent = import('/lua/sim/Entity.lua').Entity({Owner = self,})
      		ent:AttachBoneTo( -1, self, 'ual0204' )
      		ent:SetMesh(mesh)
      		ent:SetDrawScale(scale or 1)
      		ent:SetVizToFocusPlayer('Always')
      		ent:SetVizToAllies('Always')
      		ent:SetVizToNeutrals('Intel')
      		ent:SetVizToEnemies('Intel')
      		self.CamoEntity = ent
      		self.Trash:Add(ent)
      	end,
      
      	GetPropsInRadius = function(self, radius)
      		if myDebug then WARN('GetPropsInRadius') end
      		radius = radius or 1
      		local pos = self:GetPosition()
      		local props = GetReclaimablesInRect(Rect(pos[1] - radius, pos[3] - radius, pos[1] + radius, pos[3] + radius))
      		if table.getn(props) then
      			local propsByDist = {}
      			for a, b in props do
      				if not b:BeenDestroyed() then
      					if not IsUnit(b) and not b.IsWreckage then
      						table.insert(propsByDist, {dist = utilities.XZDistanceTwoVectors(pos, b:GetPosition()), prop = b})
      					end
      				end
      			end
      			if myDebug then WARN('	num props after filter: ', table.getn(propsByDist)) end
      			table.sort(propsByDist, sort_by('dist'))
      			return propsByDist
      		else
      			if myDebug then WARN('	no props in radius') end
      			return false
      		end
      	end,
      
      }
      TypeClass = ual0204
      

      Still a lot of work to do on this concept, but at least the hard part is done.

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker
    • Modular Fatboy (2014)

      See attached Zip
      Modular_FatBoy.zip

      If you haven't already guessed, this mod is not going to be compatible with the current iteration of FAF. My posting here is for those that wanted to know how it was done, and thus have my permission to use what's posted here as they see fit without my support.

      Cheers!

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker
    • Blast from the past, Cybran Vulcanizer!

      Cybran Vulcanizer in FAF Client: https://youtu.be/Rp5_5j8A-UI

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Need a second set of eyes as I'm having a issue resolving a trashbag

      Figured it out...

      Looks like something wasn't liking my use of BeamExhaustEffectsBag to store the emitters used for the afterburner effects. Dropping the Bag for locals, solved the issue completely.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      Uploaded a quick and dirty video: https://youtu.be/smLBx5wSLBc

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Firey Explosions mod FAF

      @nuggets Cause explosions are all sim side mate.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Are these mods possible?

      (Flash back to the old 4DC days)

      While Air units can "land", and thus temporarily change layers, they cannot be permanently swapped. Thus locking them into a specific mode of travel. The Kykhu Oss, transformed via "replacement" method creating a new unit, passing the significant details, and then deleting the former. The biggest issue we encountered was saving / copying orders from one unit mode to the other. (It was possible, but only just) The AI especially had problems with this, as effectively the unit was deleted from play. With the newly spawned unit not able to be reassociated with the AI of the former. Optimus tried at length to find a work around without much success. Not that the AI was well understood at the time either, as many of the AI bells and whistles are internal to the game engine.

      Note: The Cybran Naval walker got around this by having a workaround coded directly into the game engine. Thus enabling them to use the same unit for both Sea and Land layers. Far as I know of the unit just simply shifts from one animation set to another but otherwise its all seamlessly handled engine-side.

      At one point we had a version of the Kykhu Oss that was comprised of two units. A visible and invisible unit that were both interlinked. We'd could easily control which unit was selected, visible and was subject to attacks. While this worked out great, it did have the drawback of using two unit counters. No matter what we tried, we were never able to spawn a dummy unit that didn't count against the players unit-counter.

      In hindsight, I could of easily used projectiles, just having the "land" unit leap-frog from point to point. Effectively, we'd add a dummy weapon to the unit and have it target / fire on the location we wish to jump to. The projectile created would be invisible and would use a helper-bone to attach the firing unit to. On impact the unit would be removed from the projectile that's immediately deleted from play. Thing to watch out for here is that the units hitbox could impact the ground / water before it's helper-projectile, likely damaging or destroying the unit. This can be prevented by making the projectiles hit-sphere the diameter that's equal to the units largest XYZ dimension. Though also keep in mind that the games tick-rate is poo poo, thus what we perceive as an impact may or may not occur in the same game "tick".

      @CDRMV : I'm betting that the JetPack mod will run into errors if the game is at or near its max unit count. Simply put, you'll be unable to spawn a helper unit into play if your unit counter is already maxed. That is unless the FAF folks corrected the unit count problems my 4DC team encountered.

      You could try using the projectile methods as I've detailed above. Just use the units main bone as the weapon, while not requiring it to aim. Just add the requirement that the unit face towards the target before firing. The helper_projectile spawns in (fires), runs its Lua, to attach to parent unit. Once fired, you can remove the parent unit from the projectile as it's now inherited the projectiles velocity and direction. It should continue on to impact the target location, after the helper is removed. Keep in mind that many units don't survive being dropped from a transport, so it stands to reason that the JetPacks could lead to a units death from time to time. There is a Lua for this event as that you could override within your jetpack units Lua. The override would work only for that unit if done in this way, making it compatible with most everything else.

      Edit: You may need to add a bone to your JetPack unit in Blender to get the projectile method to work. Reason this may be is that the "bone" must face in the direction you want the projectile to travel. Thus adding a "helper" bone to the units main bone via Blender should be pretty easy. Just have the units updated mesh in the /unit file with its bp. When you call upon the bone via the weapon blueprint and associated Lua, you'll need to reference the name you've chosen. Something Simple like "Helper" is usually good as this doesn't interfere with any of the other set bones. Otherwise you risk breaking the units animations. An alternate method is to create an "entity" that's attached to your unit. I think, this entity can in itself act as a weapon bone. Like i said, its been a long while. (10 years)

      posted in Modding & Tools
      R
      Resin_Smoker
    • Projectile reflections v3 (2014)

      See attached Zip
      Projectile Reflections v3.zip

      If you haven't already guessed, this mod is not going to be compatible with the current iteration of FAF. My posting here is for those that wanted to know how it was done, and thus have my permission to use what's posted here as they see fit without my support.

      Cheers!

      Resin

      posted in Modding & Tools
      R
      Resin_Smoker

    Latest posts made by Resin_Smoker

    • RE: Advanced Intel (Work in Progress)

      @maudlin27 true... good idea

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      @Jip

      The goal of this mod was to make intel directional vs a sphere, thereby making it less powerful as a result. Currently, as the game stands, intel is incredibly overpowered. Now, if reduced coverage means that players feel the need to manage their intel units to have better coverage, then that's up to them. This was the intended idea, after all.

      Using the existing Intel was required as doing otherwise, would of introduced a whole laundry list of issues further on. Over writing the existing lua was also required as the way it's currently setup doesn't lend itself to being easily mod'd without it.

      The memory and sim speed are things that can't be helped as this is directly related to the creation of entities and how the intel radius is being scaled for each one added. (Pearls on a chain) The only alternative I can think of for radar would be to use a single entity and a slider. Then, rapidly move the entity away from the parent while increasing its intel radius. This would allow for fewer entities but make the coverage provided a bit spotty. Simply because the intel fog would creep in between slider passes. Rotation of the radar with a slider wouldn't be possible as this would create even bigger gaps.

      Edit: Projectiles could easily be used in place of the entities, with the added benefit being that terrain would block radar. The projectiles would simply encounter the terrain, have an on collision check, and be removed from play.

      Furthermore, rotators, as they are be handled, are uncontrolled or rather undefined assets. Many of these are either set up under local variables or have some arbitrary global name attached to them. Which makes it very difficult to externally see if a unit already has a rotator in play for a given bone.

      The air-scouts losing the cone on landing was planned. After all, this was just a test to see if it were possible. Though I'm not believing this is worth further development considering the lack of interest. Someone is welcome to pick it and run with it if they think they can do better.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Firey Explosions mod FAF

      @nuggets If the mod uses ANY sim side code then it is termed as a SIM mod. Maybe there was an exception for this mod due to its acceptance and popularity.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Firey Explosions mod FAF

      @nuggets Cause explosions are all sim side mate.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      @ctrl-k Don't be coy.
      , if you have something to say, spit it out.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      So no feed back... Glad I didn't start the 2nd half of this mod.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      Discovered today that entities like the radar entities I'm using can be connected together and then offset from each other, Kind of like pearls on a string. They can not however be rotated without the use of real unit as something is missing from a blank entity that the CreateRotator needs. Played around with attempting to add Sync_Meta to a blank entity. Was able to add it without the game freaking out. However in doing so, the entity was not longer able to be attached to anything.

      Projectiles were next on my list of candidates but unfortunately attaching them appears to be problematic if they have any velocity set within their bp. While this can be nullified easily, they're not able to rotate via CreateRotator. Though I know some of the missiles do spin, which suggests that this is being handled by the game engine.

      Helper_unit is next on my list to try... I know it will 100% work with CreateRotator but I'm concerned that using helpers in this way with intel could create unit cap issues at some point.

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      Uploaded a quick and dirty video: https://youtu.be/smLBx5wSLBc

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      Made a some significant changes to aid in performance as well as to make the radar behave better. Most of the previous issues have been addressed. Though I am still looking for a way to detect if a unit has a spinner of not via some scripted method. (CreateRotator)

      File: Update 7-16-2024 Advanced_Intel.zip

      Please note that in the above file, test-mode is active. So rather than seeing Radar, you get vision in the shape that the radar would of been. This makes it easier to see what the radar is doing within the game world as normally you can't otherwise see it.

      Keep in mind that the file posted is not a public release but does allow people to try it out and provide feedback. Beyond that, I'll start looking at adding the sonar component to this soon.

      Question: Was also pondering EMCON or emissions control. With the idea being that if someone is transmitting a signal into space, that others can see you. Effectively meaning, that if your radar is active, the enemy knows where its coming from, but not necessarily what its coming from. How would people feel about something like this, assuming its possible ?

      posted in Modding & Tools
      R
      Resin_Smoker
    • RE: Advanced Intel (Work in Progress)

      Today I was able to sort out the issues noted earlier and clean up the script some too, making it much easier to read. Only issue to sort out is that some units have spinner antennas and all have non-standardized naming. Using the existing spinner as the radars point of origin /rotation requires that I figure out how to locate them in a simple, stream-lined way.

      Side note: I've also created a "test-mode" so that the radar cone can visually be seen by the player, as normally you'd not know it was there until you had a radar ping.

      Edit: The CreateRotator is a real mess. Some of these rotators are defined as locals and then added to the trash within the units script. Not sure how I can go about detecting the rotators to prevent from creating another one on top of a pre-existing one.

      posted in Modding & Tools
      R
      Resin_Smoker