Jump to content


Photo

One Ring Pickup Mechanic


  • Please log in to reply
5 replies to this topic

#1 darkatra

darkatra
  • New Members
  • 4 posts

Posted 02 October 2023 - 07:29 PM

Hello,

 

i'm currently trying to alter the ring hero system a bit. I want to allow certain heroes to pickup the ring on their own, e.g. granting them new special powers when they pickup the TheDroppedRing entity.

So far i managed to successfully grant upgrades whenever a hero picks up the one ring (via lua).

 

scriptevents.xml:

<ObjectStatusEvent Name="OnPickupRing">
    <Conditions>+HOLDING_THE_RING</Conditions>
</ObjectStatusEvent>

...

<EventList Name="MyFancyFunctions" Inherit="BaseScriptFunctions">
    <EventHandler EventName="OnPickupRing" ScriptFunctionName="OnRingPickup" DebugSingleStep="false"/>
</EventList>

scripts.lua:

function OnRingPickup(self)
    ObjectGrantUpgrade(self, "Upgrade_MyFancyUpgrade")
end

The only issue with this approach is that the one ring FX, as seen in the screenshot below, is not removed.

bfme-ringhero-pickup-mechanic.jpg

 

The question is: is it possible to somehow destory (or maybe just hide) the attached TheDroppedRing entity?


Edited by darkatra, 02 October 2023 - 07:33 PM.


#2 RTZS

RTZS
  • Members
  • 8 posts

Posted 26 October 2023 - 03:02 PM

what fx is this black aura?



#3 darkatra

darkatra
  • New Members
  • 4 posts

Posted 13 November 2023 - 07:02 PM

what fx is this black aura?

It's the fx from a Ringwraith and upscaled a little if i'm not mistaken:
 

FXParticleSystem DarkAtraFlare
    System
        Priority = ALWAYS_RENDER
        Shader = ALPHA
        ParticleName = EXCloudNazgul.tga
        Lifetime = 25 25
        Size = 75 75
        BurstDelay = 1 1
        BurstCount = 1 2
        SortLevel = 2 ; z-index
    End
    Color = DefaultColor
        Color2 = R:0 G:0 B:0 25
    End
    Alpha = DefaultAlpha
        Alpha2 = 0.7 1 5
        Alpha3 = -0.2 0 30
    End
    Update = DefaultUpdate
        SizeRate = 1 1
        SizeRateDamping = 1 1
        AngleZ = -3 3
        AngularRateZ = -0.01 0.01
        AngularDamping = 1 1
        AngularDampingXY = 1 1
    End
    Physics = DefaultPhysics
        VelocityDamping = 1 1
    End
    EmissionVelocity = OutwardEmissionVelocity
    End
    EmissionVolume = LineEmissionVolume
        StartPoint = X:0 Y:0 Z:10
        EndPoint = X:0 Y:0 Z:25
    End
    Draw = DefaultDraw
    End
End

The outer part (the green-whitish fx) is this one (also from a ringwraith if i remember correctly):

FXParticleSystem DarkAtraWraithFlare
    System
        Priority = ALWAYS_RENDER
        ParticleName = EXexplo01.tga
        Lifetime = 25 25
        Size = 70 70
        BurstDelay = 2 2
        BurstCount = 1 1
        SortLevel = 1 ; z-index
    End
    Color = DefaultColor
        Color2 = R:50 G:75 B:75 5
        Color3 = R:0 G:0 B:0 30
    End
    Alpha = DefaultAlpha
        Alpha2 = 0.5 0.75 5
        Alpha3 = -0.2 0 30
    End
    Update = DefaultUpdate
        SizeRate = 1 1
        SizeRateDamping = 1 1
        AngleZ = -1 1
        AngularRateZ = -0.01 0.01
        AngularDamping = 1 1
        AngularDampingXY = 1 1
    End
    Physics = DefaultPhysics
        VelocityDamping = 1 1
    End
    EmissionVelocity = OutwardEmissionVelocity
    End
    EmissionVolume = LineEmissionVolume
        StartPoint = X:0 Y:0 Z:10
        EndPoint = X:0 Y:0 Z:25
    End
    Draw = DefaultDraw
    End
End


#4 RTZS

RTZS
  • Members
  • 8 posts

Posted 15 November 2023 - 07:59 AM

thanks it looks cool

do you know how can i put this aura on my createahero?



#5 darkatra

darkatra
  • New Members
  • 4 posts

Posted 17 November 2023 - 09:32 PM

thanks it looks cool

do you know how can i put this aura on my createahero?

You'd probably have to create a mod that adds the FX to the CAH Object and somehow make it toggleable, maybe with a unique upgrade for the specific class of your custom hero.

There are a few guides regarding the CAH system on the 3rd age: https://www.the3rdag...item-46?addview

They'll probably help you get an understanding of what's necessary.

Note that most changes to the games ini files will cause "out of sync" issues in multiplayer (at least if not all of the people are using the exact same version of the game).


Edited by darkatra, 23 November 2023 - 07:56 PM.


#6 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,438 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 17 December 2023 - 02:52 PM

The question is: is it possible to somehow destory (or maybe just hide) the attached TheDroppedRing entity?

You should be able to kill it by having the hero(es) triggering a weapon that only targets TheDroppedRing upon recieving the Upgrade_MyFancyUpgrade upgrade, and kills it instantly. You might have to adjust TheDroppedRing's health, I believe there's an InstantlyKilledBy mechanic (though I might misremember the name). You can then decide if the hero will drop a new ring upon death when it has that upgrade, which could again remove Upgrade_MyFancyUpgrade from the hero.

 

At least I don't see an issue with this.


T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users