Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Is there any way to make night darker? (Aside from faking it with fog?) I've tried the sunlight and ambient light ops, but they only do so much. The ground and certain props and plants are the worst offenders when it comes to being too bright.
 
Aye, that helps. I'll toy with it a bit. The .py file is in the MS Data folder you get with the module system download.

Michadr said:
Yeah, just see use the shaders used for other plants (look in brfs), and that should fix it :smile:

The problem is with native plants (especially certain bushes and trees). Even by swapping their shaders, I'm not sure how I'd distribute the fix with my mod.

 
Somebody said:
Native keeps track of damage (for hero troops at least) by using
Code:
set_party_battle_mode/finish_party_battle_mode
. For missions involving a single agent (the player) store its health with
Code:
store_agent_hit_points
when the player ends a mission (whether through tabbing, passages, or saving the game) and then applying it to the template through
Code:
troop_set_health
between missions or with
Code:
agent_set_hit_points
in the next mission.

Hello guys

Somebody, thank you very much for the answer, the explanations and responsiveness. And the light shines!  :idea:
In my case I use a passage, so I put the code in the passage (I had not thought about it), using "store_agent_hit_points" at the start of code, and "troop_set_health" at the end, before next mission.
It works very well!  :grin:

Again thank you very much, this Thread is marvelous!

Tchin!
:twisted:



 
Well, my campaign map is now crashing on loading the map file when starting a new game. It's not the amount of forest, because I removed all the forest and it continued crashing. However, it has something to do with my map.txt because it causes crashes for other modules as well.

Here is a link to my map file, if anyone can shed some light on the problem it would be great. :smile: https://www.dropbox.com/s/shj42hiquk6eqju/map.txt?dl=0
 
0 ford/bridge terrain at the moment.

Edit: Well, this is odd. After changing the map and parties files in my mod back to Native, it is STILL crashing on "loading map file". What exactly does the engine do during this stage of starting a new game or custom battle?
 
Since we're at the map questions, and I'm receiving no answer on Thorgrim's thread..

Sherlock Holmes said:
I exported my map mesh from swycartographer(it was rotated and scaled fine) to map.txt, loaded it up in thorgrim's and then the map mesh and the map icons were all rotated 90°. Ctrl-R only rotates it left-right, has anyone had this before?

Also another thing I've noticed is that I scaled my mesh accordingly to the image in swytercartographer, where my map is about 40% expanded on each border. In Thorgrim's editor though, it looks a lot bigger than that.

I also tried to load that map.txt into Warband Native, or my mod and it says "Unable to position party Main Party at(17.00, 52.50).
 
Does anyone know how I could go about tying a sound to an animation? Like, when you swing your sword there's a whoosh noise, I was wondering if I was able to add that sort of thing to custom animations I'd created?
 
ChiefNinja2 said:
Does anyone know how I could go about tying a sound to an animation? Like, when you swing your sword there's a whoosh noise, I was wondering if I was able to add that sort of thing to custom animations I'd created?
You can use agent_play_sound in the mission trigger activating the animation.
 
Dusk Voyager said:
ChiefNinja2 said:
Does anyone know how I could go about tying a sound to an animation? Like, when you swing your sword there's a whoosh noise, I was wondering if I was able to add that sort of thing to custom animations I'd created?
You can use agent_play_sound in the mission trigger activating the animation.

Hmm, what if I want to play the sound after a certain delay? Just using agent_play_sound plays the sound as soon as the trigger is activated...
 
Hi, I have a question:
How can I divide the existing Native factions in order to have more factions? I mean dividing each faction to two other, so they have a king and 10 lords each. Can it be done and if yes, how?

Thank you!
 
Antonis said:
How can I divide the existing Native factions in order to have more factions? I mean dividing each faction to two other, so they have a king and 10 lords each. Can it be done and if yes, how?
There's a tutorial on faction creation. It is not complete, but the points skipped by the original author are mentioned in the discussion thread. The only difference from your situation is that you'll be reusing existing centers, lords and ladies instead of adding new ones. The only real issue you'll have to address is that "script_initialize_aristocracy" which is used to initialize noble families in the game assumes there's a certain amount of lords and ladies per each kingdom, so you'll have to re-engineer that script a bit.
 
Please i have some difficulty with my real joustes scripts  :grin:

presentation (with a stupid plan, because i don't have a good english)  :mrgreen:

it's just the joust training here, but the same scripts for the real tournament...
EEP4K.jpg
eUipk.jpg

* scripted entry point green:
...
  (get_distance_between_positions, ":dist", pos0, pos1),
  (try_begin),
    (le, ":dist", 500),

= joustes finished and check for result...

scripted entry point blue:
...
(agent_set_scripted_destination, ":competitor_agent", pos1, 0),
...
"go to this entry point".


The competitor go to her entry point destination, but he's not realy good with her lance (because he have a destination script of course), any idea for make this better, lance more long, set_agressivity something like that...?
He miss me 8 out of 10 time  :neutral: and of course 10/10 hits without my destination script.

And in the scene i don't have my lance on my hands, what codes i need for start the scene with the lance ready ?

module mission template
...
      (60, mtef_visitor_source|mtef_team_0, af_override_all, aif_start_alarmed, 1, [itm_tutorial_saddle_horse, itm_mail_mittens, itm_mail_boots, itm_mail_hauberk, itm_mail_coif, itm_new_jousting_lancebluewhite]),#player entry point
      (61, mtef_visitor_source|mtef_team_1, af_override_all, aif_start_alarmed, 1, [itm_tutorial_saddle_horse, itm_mail_mittens, itm_mail_boots, itm_mail_hauberk, itm_mail_coif, itm_new_jousting_lancebluewhite]),#competitor entry point

I hope it's clear  :oops:

Thank you.
 
@FantasyWarrior, you could maybe try writing a trigger which checks the distance between the player and the enemy. If they are far apart set scripted destination, if they are within range then clear scripted mode, so he attacks the player, then after he has attacked set scripted mode back on, ou would have to play around with it. You could also try experimenting with

Code:
(agent_set_look_target_agent, <agent_id>, <agent_id>),
(agent_set_attack_action, <agent_id>, <value>, <value>), #value: -2 = clear any attack action, 0 = thrust, 1 = slashright, 2 = slashleft, 3 = overswing - second value 0 = ready and release, 1 = ready and hold
 
In addition to what Grandmaster suggested you could try playing with AI meshes in your jousting scene.

FantasyWarrior said:
And in the scene i don't have my lance on my hands, what codes i need for start the scene with the lance ready ?
Something like this should equip your lance on every agent upon spawn, provided they have it in their equipment:
Code:
(ti_on_agent_spawn, 0, 0, [],[
  (store_trigger_param, ":agent", 1),
  (assign, ":end", 4),
  (try_for_range, ":cur_slot", 0, ":end"),
    (agent_get_item_slot, ":cur_item", ":agent", ":cur_slot"),
    (eq, ":cur_item", "itm_new_jousting_lancebluewhite"),
    (agent_set_wielded_item, ":agent", ":cur_item"),  # had ":cur_slot" instead of ":cur_item"
    (assign, ":end", 0), # break
  (try_end),
]),

Edit: You're right FantasyWarrior, I had a typo above.
 
Oh thank you, thank you  :razz:


-ai_mesh around the railling is not adapted
-if i make "normal attack to the player and go to the entry point" the competitor will cash on the railling.(i think)

I will try your codes and a lance a bit more long for the competitor,  :wink: a collision more flat for the railling (a new model) perfect placement for entry points...

Thank you!

edit: very sharp La Grandmaster  :shock:

& Thank's for the lance shokkueibu  :wink:
I think it's the entry point ?
(ti_on_agent_spawn, 0, 0, [],[
  (store_trigger_param, ":agent", 1),
  (assign, ":end", 4),
  (try_for_range, ":cur_slot", 0, ":end"),
    (agent_get_item_slot, ":cur_item", ":agent", ":cur_slot"),
    (eq, ":cur_item", "itm_new_jousting_lancebluewhite"),
    (agent_set_wielded_item, ":agent", ":cur_slot"),
    (assign, ":end", 0), # break
  (try_end),
]),


edit:
well, it work with this  :smile:

start in a scene with an override item equiped

module mission template
Code:
(ti_on_agent_spawn, 0, 0, [],[
         (try_for_agents, ":cur_agent"),  #Or just :player_agent 
           (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
           (eq, ":cur_agent_troop", "trp_player"),
           (try_begin),
             (agent_get_wielded_item, ":cur_wielded_item", ":cur_agent", 0),
              (assign, ":cur_wielded_item", "itm_new_jousting_lancebluewhite"),
             (agent_set_wielded_item, ":cur_agent", ":cur_wielded_item"),
         (try_end),
 
]),
 
Status
Not open for further replies.
Back
Top Bottom