Jump to content

[LE] How to setup a Brawl Event?


Ezarr

Recommended Posts

Hi, could someone tell me how can I setup a Brawl event? I want to get a follower to brawl the player the first time they meet. Or is there a papyrus fragment that makes the speaker attack the player?

Edited by Ezarr
Link to comment
Share on other sites

In the papyrus fragment of the dialogue in which you want to trigger a brawl event, make a quest property for DialogueFavorGeneric, then pass the line

DialogueFavorGeneric.Brawl(akspeaker)

But this might only work properly if your follower has a valid voice type for brawls. Otherwise you would have to look into the quests DialogueFavorGeneric and DGIntimidateQuest to see if you can mimic how brawl works -- or just add custom voice type lines to the latter if you don't care about your mod's compatibility.

Link to comment
Share on other sites

Hi, I already tried that line, I set the property and all but nothing. My follower is custom voiced, I guess that's why is not working. I've been looking into DialogueFavorGeneric and DGIntimidateQuest but all that goes beyond me. I'm not a papyrus person to be honest. And yes, I do care about compatibility.

 

I've been checking other threads about this same topic, but it doesn't look like anyone has got it working yet. Isn't there other way around this? Even if is not a very conventional one? If I can get my follower to fight the player, even if it's not a real 'brawl event' it would be fine. I just want my follower to attack the player, and when he is on bleeding state a new dialogue line becomes available for the player to end the brawl.

Link to comment
Share on other sites

Yes, it should be quite possible to make your follower fight you -- primary problem is that it will count as an assault which means that guards and other people nearby might interfere. But let's see how you'd do something like that anyway:

 

1. If you have SKSE, you might want to temporarily change your follower's combat style to a hand-to-hand one with SetCombatStyle. Otherwise, at least make sure he has no weapon in his inventory and hope he doesn't go searching for a weapon elsewhere...

 

2. To make an actor fight you, use ForceActorValue("Aggression", 1) -- if the follower is not already marked as aggressive in Data AI setttings -- then add him to the faction WEPlayerEnemy with AddToFaction. Then, to make absolutely sure he will attack you, call StartCombat(Game.GetPlayer()) too.

 

3. Make your follower Essential. Add a script to him or an alias that points at him and use the OnDeath or OnEnterBleedout events to detect when you have beaten him. There you want to revert all the temporary changes you made before, and call StopCombat(). Then use SetNoBleedoutRecovery and AllowBleedoutDialogue to make him able to speak to the player in this state.

Edited by wormple12
Link to comment
Share on other sites

I see, I see, this could work fine. Luckily I placed my follower in a non populated area (outside of the Nightgate Inn), well except for that orc guy that comes out from time to time. Also thanks for all the links, I'll be checking this.

Link to comment
Share on other sites

Hi again man, I tried the way you suggested, but I got these errors when I hit 'compile'. Could you help me?

 

Here is the one that starts the fight:

https://i.imgur.com/YhFTOZi.jpg

 

And this on here is for the bleeding state:

https://i.imgur.com/GCmZK70.jpg

 

Note: Android18 is a refAlias I made for my follower.

 

I apologize if I'm making silly mistakes. Not my intention at all. It's just that as I said before I don't got much experience when it comes to scripts. And this is a first time for me making Events.

 

By the way, I know about quest stages. It's just that I was too focused on making the script compile that I didn't pay attention to it.

Edited by Ezarr
Link to comment
Share on other sites

The first picture:

  • When the console says that something is undefined it means that you have forgotten to create a variable or property. You need to make a faction property and fill it before the script will detect that WEPlayerEnemy is actually a faction.
  • StartCombat is an actor function, meaning that it can only be run on an actor. Right now you are running it on the topic info. Remember akSpeaker on that line as you have done with the other lines.

The second picture:

  • You can't place an event in a dialogue script fragment. You need to create a new script either on the actorbase itself, or on an alias referencing the follower, then add the event to that script. This tutorial explains what aliases are, if you don't know. Actually, I strongly recommend that you follow the entirety of their series of tutorials -- all of it is essential knowledge to mod succesfully.
Link to comment
Share on other sites

Hey man, thanks a lot for your help. Finally the "brawl" is working fine, but I still got some problems with the last part. When I get my follower into bleeding state I try talking to him, but the dialogue option that should be present is not showing up. My follower just stands up and stops attacking me, which makes me think that the script that stops the brawl is working fine too. So the only problem is that I'm not getting dialogue in bleeding state. Could you have a look at these pictures and see if you spot something?

 

Here are the Alias and the script that stops the fight:

https://i.imgur.com/rcwJNTA.jpg

 

And here are the conditions for the dialogue for when my follower is in bleeding state:

https://i.imgur.com/Whh2Rwr.jpg

Edited by Ezarr
Link to comment
Share on other sites

akSpeaker is a special syntax that only exists within dialogue fragments. In an alias, there is no such thing as a 'speaker', since an alias can't be spoken.

 

When a script extends something - in this case ReferenceAlias - you can only call functions belonging to that parent object type directly. So instead you need to use the function GetActorReference() which gets the actor that the alias is pointing to - and from there you can call all functions belonging to the Actor object. Try and have a look at this overview of all object types in the game. As you click around in there, you should get a feeling of what these objects actually are in relation to each other, and which functions can be called from which object type :)

Link to comment
Share on other sites

Hellow man, sorry for the late reply. I was busy dealing with new problems on my follower. Just wanted to let you now that everything is working now (kinda, lol) I mean the brawl event is running good now from star to finish. But I still have some adjustments to make to the quest, Just wanted to say thanks a lot for all your help. Kudos and credit will be given to you when I release my mod!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...