Sending in the muscle!

Post » Mon Nov 19, 2012 7:12 am

I'm making a Loanshark. I've scripted the loan mechanics and its working fine for the time being. All that's left is sorting out the consequences for the player not paying

What I want to do is send a thug to have a brawl with the player, then the following week send a group of assassins to try and kill them.

I think I can figure out the spawning part myself by picking apart Redwood Elf's courier thread (if I get stuck I'll post here)

And the assassins should just be a case of:
AssasinActor.StartCombat(playerRef)

The bit I cannot find any information on is how do I set up an NPC to have a brawl with the player?

Thanks in advance
- Hypno
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm

Post » Mon Nov 19, 2012 2:34 am

EDIT: Hold on, I'm remembering this totally wrong. I'm looking it up myself now.
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Mon Nov 19, 2012 11:02 am

Uh, this looks messy, we may need a scripting pro in here or something. I wish I had more time to look into this right now. Here's what I found:

When you agree to brawl Uthgerd in The Bannered Mare, she says "Just fists. No weapons, no magic... no crying. Let's go!" And this script fragment is on that info;

GetOwningQuest().SetStage(10)Game.GetPlayer().RemoveItem(Gold001, 100)DialogueFavorGeneric.Brawl(akspeaker)

Now that points to a favor quest (Favor017), in which stage 10 has a script fragment that says:

;The FavorAccepted function handles the actor variable and timer for the favor system
;Note that you don't need SetObjectiveDisplayed here, the function does that on it's own
kmyquest.FavorAccepted()

Now, the fragment on the dialogue info also says 'Brawl()' which is a function in the quest DialogueFavorGeneric, which has the script FavorDialogueScript attached. In that script is the function for 'Brawl()' which is;

; call this to initiate brawl quest through story managerFunction Brawl(Actor pTarget, Actor pTargetFriend = None)   trace("Brawl: " + pTarget + ", friend=" + pTargetFriend)   BrawlKeyword.SendStoryEvent(None, pTarget, pTargetFriend)endFunction

That sends the BrawlKeyword into a story manager, which I've never dealth with so that's where I lost the trail.

I really hope half of this can be copy+pasted onto a custom character, because it seems like a hell of a lot of work just to be able to punch someone without everyone flipping out at you. :tongue:

Hopefully this half-baked anolysis helps...
User avatar
Kayleigh Williams
 
Posts: 3397
Joined: Wed Aug 23, 2006 10:41 am

Post » Mon Nov 19, 2012 5:44 am

The StoryManager just starts DGIntimidateQuest, which handles the rest - removing the player's weapons, the dialogue on victory/defeat, etc. The DialogueFavorGeneric.Brawl(akspeaker) line you showed is the important bit.
User avatar
Alexx Peace
 
Posts: 3432
Joined: Thu Jul 20, 2006 5:55 pm

Post » Mon Nov 19, 2012 11:30 am

Cheers you two.

Still confused :P but at least now I have a couple of leads to persue. I'll try and have a look at the quests mentioned here and see what I can bodge together. I'll report back with what I find. There are not many threads that come up when searching for "brawl" so if I figure something out, I'll try and explain here what I did

- Hypno

EDIT: I'm on my way home now. What I'm going to do is make a new NPC, give them a dialogue, and add "DialogueFavorGeneric.Brawl(akspeaker)" to the "end" fragment section and then sit back and see what happens. Do I have to define akSpeaker, or am I right in thinking that this is a "magic property" that automatically points to the NPC speaking?
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Mon Nov 19, 2012 3:17 am

That worked perfectly. Here's the whole process for the benefit of somebody searching this:

1. In the dialogue info that you want use to initiate the brawl with add a " ; " to the end fragment, then click "compile", then "OK"
2. Open up the the dialogue info again
3. Right click on the TIF script in the script list, then click on "edit source"
4. Add the following line after the "end fragment" line:
FavorDialogueScript Property DialogueFavorGeneric  Auto
5. ctrl+s and let the script compile then exit it.
6. Now click on the "properties" button. Click "auto-fill all" then "ok"
7. Replace the ";" in the end fragment with the following code:
DialogueFavorGeneric.Brawl(akspeaker)
8. Click "compile" and then its done

- Hypno
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Mon Nov 19, 2012 2:58 pm

But does that add vanilla dialogue on to your character or anything, or can you use it for literally any NPC? I have a unique entirely seperate NPC in my land. He has his own voicetype, his own dialogue, etc. 100% free of vanilla. Can I simply use that on him, or will I need to set up my own backbone for it as well?
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Mon Nov 19, 2012 3:21 pm

Well I just used it on a unique npc, but with MaleNord as his voicetype. After beating him up he spoke a "you beat me fair and square" line so I'm not sure if this will work for your specific situation. I'm going to carry on digging into it a bit more to see if I can get the npc to remove gold from the you if you lose (even though you'd have to be pretty bad to lose one of those fights :P). I'm not very experienced with the story manager either so not sure if I can work out what happens in there. If I see anything that might help you I'll post it in this thread.

Now on to spawning the thug. I think I'll just copy+paste however beth did it in the courier quest.

Thanks again to both of you for pointing me in the right direction

- Hypno
User avatar
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Post » Mon Nov 19, 2012 2:18 pm

But does that add vanilla dialogue on to your character or anything, or can you use it for literally any NPC? I have a unique entirely seperate NPC in my land. He has his own voicetype

The DGIntimidateQuest dialogue has a few lines with the condition that the voicetype is in the VoicesBrawling formlist. So if you just added your voicetype to that (and recorded the necessary lines) it should be fine.
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Mon Nov 19, 2012 5:14 am

The DGIntimidateQuest dialogue has a few lines with the condition that the voicetype is in the VoicesBrawling formlist. So if you just added your voicetype to that (and recorded the necessary lines) it should be fine.
Simple enough, there are just two issues I can think of; 1. Would that conflict with any other mod that adds a voicetype to that formlist? and 2. Then I wont be able to customize the scripts or results of the dialogue at the end of the fight, right?

I think to be in 'full control' I'd rather set up my own thing, so long as it's not too complex...
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Mon Nov 19, 2012 7:33 am

1. Would that conflict with any other mod that adds a voicetype to that formlist? and 2. Then I wont be able to customize the scripts or results of the dialogue at the end of the fight, right?

I think to be in 'full control' I'd rather set up my own thing, so long as it's not too complex...

Yes and yes, so yes. :) It shouldn't be too difficult to make your own intimidate quest, started by a different keyword event.
User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm


Return to V - Skyrim