• The forum has been updated. For an explanation of some of the changes, head over here.

Modding Q&A [For Quick Questions and Answers]

Currently viewing this thread:

Status
Not open for further replies.

Ivkolya

Sergeant
WF&SWBNWM&BVC
Where can I get values of moving and rotating of scabbard mesh when it is mounted on abdomen bone as one of carry positions?
OpenBRF knows those values, because there is an option of mounting on one bone as carry positions, but I'd like to know these values to place my scabbard mesh in exact position in 3Ds Max.


I figured out, how to do it.
1) make scabbard mesh and import it in OpenBRF
2) mount on one bone (in carry position you need), export it as static mesh
3) import this new mesh in same scene with original scabbard mesh from first step, rotate it 180 degrees horizontally
4) use one of scripts for making instances from copies (I use this one]https://www.scriptspot.com/3ds-max/scripts/instance-tool?page=2]this one
5) import in the scene mesh of armour, which will use this scabbard, and in Vertices mode place scabbard from step 2 like you need
6) export scabbard from step 1 (which will be by this moment instanced and transformed) and import it in OpenBRF

If it can be interesting, I can make a tutorial topic with screenshots (for me it was very unclear how to make scabbards with correct coordinates and rotation)
 

Cozur

Grandmaster Knight
WB
I've made this:

Code:
  [anyone,"start", [
				(eq, "$g_encountered_party_template", "pt_taiga_bandits_e"),
      (store_random_in_range, ":rand", 0, 7),
      (try_begin),
      (eq, ":rand", 0),
      (str_store_string, s5, "@Do you want to barter? Fat chance! Hand over your valuables, and might be we'll let you live."),
      (else_try),
      (eq, ":rand", 1),
      (str_store_string, s5, "@I’m told there’s nothing like a wolfskin cloak to warm a man by night. I wonder what a man-skin cloak would be like, eh? Hand over your goods, unless you want to find out."),
      (else_try),
      (eq, ":rand", 2),
      (str_store_string, s5, "@A kneeler! You don't need to kneel for me, you just need to hand over your gold. It's that, or your life."),
      (else_try),
      (eq, ":rand", 3),
      (str_store_string, s5, "@A1"),
      (else_try),
      (eq, ":rand", 4),
      (str_store_string, s5, "@A2"),
      (else_try),
      (eq, ":rand", 5),
      (str_store_string, s5, "@A3"),
      (else_try),
      (eq, ":rand", 6),
      (str_store_string, s5, "@We free folk know things you kneelers have forgotten. The darkness is coming. I'd like to be warm when it does, so hand over your silver."),
                                (try_end),
    ], "{s5}", "bandit_meet_taiga_bandits",[]],

As a way to have the bandits met on the world map give different dialogue - but the same one pops up no matter which party I talk to. Pure coincidence, or is something else going on here?
 

Janycz

Knight at Arms
WB
Hello! I have a troop who has flag tf_guarantee_horse and horse in inventory. I want spawn this troop on scene without horse. I can spawn this troop mounted. It is trivial: 
Code:
(spawn_agent, ":troop"), (assign, ":agent", reg0),
But, I need spawn this troop without horse.
I try to remove horse (agent_fade_out):
Code:
(agent_get_horse, ":horse", ":agent"),
(try_begin),
  (neq, ":horse", -1),
  (agent_fade_out, ":horse"),
(try_end),
It is not working, because horse and troop are being faded out.

I try to remove horse (remove_agent):
Code:
(agent_get_horse, ":horse", ":agent"),
(try_begin),
  (neq, ":horse", -1),
  (remove_agent, ":horse"),
(try_end),
It is working, but bad. Horse are being died and its corpse remains on the scene.

How can I spawn normally this troop without horse? :?: :?: :?: :?: :?: :?:
 

Somebody

Code Pope
Baron
WBWF&S
You call agent_start_running_away on the horse agent (so the human agent is no longer mounted) and then agent_fade_out on the horse.
 

Janycz

Knight at Arms
WB
Somebody said:
You call agent_start_running_away on the horse agent (so the human agent is no longer mounted) and then agent_fade_out on the horse.
Thanks, but it changes nothing (the following 2 fragments of code do the same thing):
Code:
(agent_get_horse, ":horse", ":agent"),
(try_begin),
        (neq, ":horse", -1),
        (agent_start_running_away, ":horse"),
        (agent_fade_out, ":horse"),
(try_end),

Code:
(agent_get_horse, ":horse", ":agent"),
(try_begin),
        (neq, ":horse", -1),
        (agent_fade_out, ":horse"),
(try_end),
 

Janycz

Knight at Arms
WB
Somebody said:
So is this for a battle or a dummy agent
Generally, I need it for visitor in tavern or castle. Maybe, it will need for more something.
It is not for battle. Just for 'peaces' scenes.
 

Somebody

Code Pope
Baron
WBWF&S
That's typically what the entry point system (and the override flags) are for. If you really must use a scene prop to spawn_agent, set the horse slot to -1 and set it back after spawn_agent as belendor said.
 

Cozur

Grandmaster Knight
WB
Cozur said:
I've made this:

Code:
  [anyone,"start", [
				(eq, "$g_encountered_party_template", "pt_taiga_bandits_e"),
      (store_random_in_range, ":rand", 0, 7),
      (try_begin),
      (eq, ":rand", 0),
      (str_store_string, s5, "@Do you want to barter? Fat chance! Hand over your valuables, and might be we'll let you live."),
      (else_try),
      (eq, ":rand", 1),
      (str_store_string, s5, "@I’m told there’s nothing like a wolfskin cloak to warm a man by night. I wonder what a man-skin cloak would be like, eh? Hand over your goods, unless you want to find out."),
      (else_try),
      (eq, ":rand", 2),
      (str_store_string, s5, "@A kneeler! You don't need to kneel for me, you just need to hand over your gold. It's that, or your life."),
      (else_try),
      (eq, ":rand", 3),
      (str_store_string, s5, "@A1"),
      (else_try),
      (eq, ":rand", 4),
      (str_store_string, s5, "@A2"),
      (else_try),
      (eq, ":rand", 5),
      (str_store_string, s5, "@A3"),
      (else_try),
      (eq, ":rand", 6),
      (str_store_string, s5, "@We free folk know things you kneelers have forgotten. The darkness is coming. I'd like to be warm when it does, so hand over your silver."),
                                (try_end),
    ], "{s5}", "bandit_meet_taiga_bandits",[]],

As a way to have the bandits met on the world map give different dialogue - but the same one pops up no matter which party I talk to. Pure coincidence, or is something else going on here?

Just before this one gets lost.
 
Perhaps this could work:
Code:
[party_tpl|pt_taiga_bandits_e,"start", [
      (store_random_in_range, ":rand", 0, 7),
      (try_begin),
      (eq, ":rand", 0),
      (str_store_string, s5, "@Do you want to barter? Fat chance! Hand over your valuables, and might be we'll let you live."),
      (else_try),
      (eq, ":rand", 1),
      (str_store_string, s5, "@I’m told there’s nothing like a wolfskin cloak to warm a man by night. I wonder what a man-skin cloak would be like, eh? Hand over your goods, unless you want to find out."),
      (else_try),
      (eq, ":rand", 2),
      (str_store_string, s5, "@A kneeler! You don't need to kneel for me, you just need to hand over your gold. It's that, or your life."),
      (else_try),
      (eq, ":rand", 3),
      (str_store_string, s5, "@A1"),
      (else_try),
      (eq, ":rand", 4),
      (str_store_string, s5, "@A2"),
      (else_try),
      (eq, ":rand", 5),
      (str_store_string, s5, "@A3"),
      (else_try),
      (eq, ":rand", 6),
      (str_store_string, s5, "@We free folk know things you kneelers have forgotten. The darkness is coming. I'd like to be warm when it does, so hand over your silver."),
                                (try_end),
    ], "{s5}", "bandit_meet_taiga_bandits",[]],
 

Somebody

Code Pope
Baron
WBWF&S
You gotta make sure the dialogue actually gets to that branch, it could be picking up some other bandit dialogue that precedes it.
 

Cozur

Grandmaster Knight
WB
It actually works with the custom dialogue coming up, the only thing is that the same string keeps being chosen, in this case:

      (else_try),
      (eq, ":rand", 3),
      (str_store_string, s5, "@A1"),

Which is what really confuses me.
 
Alex Kit said:
Hello!

In Viking Conquest I'm trying to mod all lords and towns/castles to spawn only their current faction's troops when they reinforce. They spawn their original faction's troops by default.

I was advised to mod it so that the towns/villages would change their culture after conquest, and so I did.
I was also advised to remove the following lines from the scripts.py:

Code:
      (try_begin),
        (eq, ":party_type", spt_kingdom_hero_party),
        (party_stack_get_troop_id, ":leader", ":party_no"),
        (troop_get_slot, ":party_faction",  ":leader", slot_troop_original_faction),
      (try_end),   

and

Code:
          (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
        (else_try),
          (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),

It seems it worked very well for the AI factions, however, the player's faction's lords and towns/castles don't reinforce at all.

Is it possible to mod it so that all lords of any kingdoms, including the player's kingdom, would only recruit the troops from that particular kingdom's culture?
Please could you help? I couldn't find any relevant information within this thread, but please refer me if there is an existing solution.

I've been trying to find a solution to the same problem.
Perhaps a pop up menu to pick culture again after faction creation could work, though I'm not sure how to do it.
Did you figure it out by the way?
 

Cozur

Grandmaster Knight
WB
Somebody said:
You gotta make sure the dialogue actually gets to that branch, it could be picking up some other bandit dialogue that precedes it.

Could it have something to do with the party template being treated as the same party all the time, so if one string is randomly chosen, then it will be that randomly chosen string that is used forever, as all the parties are treated as the same?
 
Maybe this is a silly question, but I can't seem to figure it out on my own...

How does the game determine which fiefs are associated with each other? Like, when you capture a town or castle and get the related village, how does the game figure out which village? Is it a distance thing, or is there a file somewhere with the information? Module_parties doesn't seem to have anything like that in it.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Space Commander Nemo said:
How does the game determine which fiefs are associated with each other?

it uses the slot "slot_village_bound_center". When you start a new game the script "game_start" does all the setup, which includes the distribution of villages to towns and castles. Native rule is one castle = 1 village, while towns can have several villages. It uses the distance to a center to choose who belongs to who.

Search for that slot on module_scripts.py to see the code.
 
Is it hardcoded that characters remove their helmets in conversations? I have checked the conversation_encounter mission template and other than override_horse nothing seems to be affected.
 
Status
Not open for further replies.
Top Bottom