Getting a brawl to work

Users who are viewing this thread

svaucher

Veteran
I've managed to get a character to pick fights with others (one-on-one) in a tavern. I haven't been able to get a brawl going.
DUEL (works)

For the duel, I use the following instructions with the unofficial editor:
Code:
modify_visitors_at_site(<tavern>)
reset_visitors()
set_visitor(0,0)
set_visitor(1,<troop>) 
set_jump_mission(mst_duel)
jump_to_scene(<tavern>)
I assume that the first parameter of set_visitor is the index of the spawn_record.

For dualling mission template, I configure it as an arena fight. Two spawn records with the position of the fighting characters. (in tavern player at entry 0, adversary at entry 2). Of course without a horse.

This works fine. The only frustrating things seems to be that I cannot send parameters to my dueling script. I can only use global variables. I wanted to pass the scene, positions and success/failure scripts to the dueling script. I found that you cannot pass register information, only the variables.

BRAWL(doesn't work)

Code:
set_visitor(0,0)
set_jump_mission(mst_brawl)
jump_to_scene(<tavern>)

I set the mission template to use scene characters, but then I'm stuck with the NPCs not attacking me and being friendly. Out of frustration, I have fun killing them with head shots. Oh, yes, I specify a different team for them (1 for me, 2 for the,).

Any hints anyone? I've spent a few hours on this one (granted, it's not that long, but the answer might help others in my situation).

cheers,
sv
 
Looks like you've got the gist of it down pretty well.
I'd double-check the entry points set up in the mission compared to set up for the original fight setup, to make sure they match up for you on one team and your enemy on another. I know, already done it, but triple-check.
Also, make sure your enemy has a weapon he can use or he'll just stand there. If you've removed his standard equipment for the fight or if his troop type has no weapons in inventory by default, be sure to assign him a weapon in the mission template or edit him in module_troops.py to give him a weapon in inventory.

This also should go in Mod Discussion since it's referencing the official module system rather than unofficial editing tools. No big deal though.

EDIT: the "modify_visitors_at_site(<tavern>)" and "reset_visitors()" are needed as well. Also the "set_visitor(0,0)" is what sets the player to entry point 0 of course, and you'll need to also set the enemy to the entry point for the other team.
 
Janus said:
I'd double-check the entry points set up in the mission compared to set up for the original fight setup

Don't know if I was clear. I'm in a tavern, the player yells at an NPC, and a brawl starts. Player vs other people in pub. Should there be entry points?

An example, I'm in the Happy Boar. I tell off Xerina, she tries to beat me up with Dranton thus there is no original fight setup.

Janus said:
Also, make sure your enemy has a weapon he can use or he'll just stand there. If you've removed his standard equipment for the fight or if his troop type has no weapons in inventory by default, be sure to assign him a weapon in the mission template or edit him in module_troops.py to give him a weapon in inventory.

That's done, presently they are considered friendly...

Janus said:
This also should go in Mod Discussion since it's referencing the official module system rather than unofficial editing tools. No big deal though.

Yeah, you're right, I don't know if can move the thread, or if it must be done by a moderator.
 
The entry points are vital for setting up the mission in arena type fights. In module_mission_templates.py, the first number of each entry indicates the affected entry point, then sets the team number for that entry point.
You can see the numbering of the scene's entry points by enabling edit mode and editing the scene in-game.

You might need to set up another duplicate scene to be used for the brawl. In my experience some things aren't properly changed if you jump to a scene that you are already in, though that's from limited experience. Might not be the case here.

EDIT:
A moderator would need to move this thread, which has apparently been done.

What can I say, I'm a bored man -LL
 
This sounds interesting, and I see some great possibilities. You could have a count's guards attack you if the count didn't like you. Keep up the good work!

Crazed Rabbit
 
Crazed Rabbit said:
This sounds interesting, and I see some great possibilities. You could have a count's guards attack you if the count didn't like you. Keep up the good work!

Crazed Rabbit
I've already managed things in this vein in Storymod. To make this idea work properly, you have to set up a duplicate scene as Janus said (copy the original scene information in module_scenes.py, copy the original scene objects file and rename it to your duplicate scene name) and set all the NPCs to their proper entry points via set_visitor. Be sure that the combatants have the AI flag aif_start_alarmed in your brawl mission template.

Also, I don't know if your examples are direct copy-pastes or rough paraphrases, but mission template calls are supposed to be defined by the prefix mt_ , not mst_ as in your examples.

Infamously,
Winter
 
Thanks for the info. I was using the unofficial editor, so I haven't looked at the python files. It's been 2 years since I've touched a python file, but these seem pretty simple. I guess I'll code my mod directly. It should be significantly more flexible than the editor.

Basically, I want to include the possibility to include flexible brawl/duel (using scripts). I've personnally thought of including "taking out the trash" at the local tavern to quest completitions.

I'll try to make everything I do reusable by others in order publish them for the community.

cheers,
sv
 
svaucher said:
Thanks for the info. I was using the unofficial editor, so I haven't looked at the python files. It's been 2 years since I've touched a python file, but these seem pretty simple. I guess I'll code my mod directly. It should be significantly more flexible than the editor.

Basically, I want to include the possibility to include flexible brawl/duel (using scripts). I've personnally thought of including "taking out the trash" at the local tavern to quest completitions.

I'll try to make everything I do reusable by others in order publish them for the community.

cheers,
sv
I'm not sure what you mean by 'flexible', but your mission template will function with any visitors you want to set in your dialogue consequence block. So, if you have two different NPCs in two different taverns, all you need to do is create the proper set_visitor operations for each and point everything to the right scene, and the mission will work just fine for either situation.

Sordidly,
Winter
 
I'll post my python configuration to have a "flexible dueling system". You'll be able to see what I mean.

sv
 
Back
Top Bottom