Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Ok here is my sounds error


I really want help with this orI will have to abandon my sounds deaths and damages and such or extremely limit it from what I originally wanted. In my sounds txt it is like this at the start

soundsfile version 2
383

Is this 383 bad or what.
 
Caba`drin said:
Bayard-X said:
The CanFail architecture seems interesting to me, but I seem to lack the knowledge in how to make the script then.

However, even in the current state, I am happy, because I can now do some intersting things on the ReMo.

The cf version would look like this (and would work like a normal conditional operation...if it passes, the code continues, if not it stops):
Code:
("cf_check_if_one_or_more_of_these_are_factors",
   [
         (store_script_param, ":number_to_check", 1), # I want to know of this number if the following are factors.
         (store_script_param, ":number_of_loops", 2), # run loops
         (assign, ":factors_bool",0), # initialise boolean to return
         (val_add, ":number_of_loops", 3),
         (try_for_range, ":i", 3, ":number_of_loops"),           
             (store_script_param, ":this_factor", ":i"),
             (store_mod, ":check", ":number_to_check", ":this_factor"),
             (eq, ":check", 0),
             (assign, ":factors_bool",1),
             (assign, ":number_of_loops", ":i"),           
          (try_end),
          (eq, ":factors_bool", 1),         
   ]),


Hi,

I thank you a lot for the prior support on this matter.

Now I found some problem I cannot understand.



What I do now is something like this:

Code:
(try_begin),

        (call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 139, 67), 
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 249603, 9354777), 
        (do something),

      (else_try),
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 3, 48887, 42997, 88939 ),      
        (do something),

      (else_try),
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 3, 153178, 888968523, 34694817),     
        (do something),

      (else_try),
        (call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 151, 139), 
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 1349, 817 ), 
        (do something),
           
     (else_try),
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 203699, 123367 ), 
        (do something),

      (else_try),
        (call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 139), 
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 19), 
        (do something),

      (else_try),
        (call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 2641), 
         (do something),

       (try_end),


It seems not to get into the lines for 203699 and 123367 and it does not even get into the line for 19.




Edit:

Might it be that begin-try-else-end is left if one of those "script_cf_neg_" conditions is fulfilled hence making following lines inaccessible?
 
Bayard-X said:
Might it be that begin-try-else-end is left if one of those "script_cf_neg_" conditions is fulfilled hence making following lines inaccessible?
It goes with first condition that is satisfied, and hence the subsequent else_try block, and skips the rest. Since you have constants there all over, it always does the same thing.
 
No, it's impossible to do in vanilla Warband (because the netcode only uses 1 bit for skin).
So this would mean it will not work even for bots or what?
So my orc_infantry_multiplayer_ai is gonna appear with a common or buggy human face!?!  :sad:
And Players cant use races/genders other then male or female even by using the respawn as bot walkarround?
It will at least get me alternative face_textures with this:
Code:
  (
    "man", 0,
    "man_body", "man_calf_l", "m_handL",
    "male_head", man_face_keys,
    ["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    ["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o",   "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q"
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),     
#     ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
#     ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
("werewolf",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
("undeadface_a_skeleton",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
("dark_elf",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
("orc_head",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),   

skin edited??
What can be done about that stuff  is the Warband script enhancer changing annything about it?
Hell it seems the devs realy hate fantasy.  :sad: :sad: :sad:

 
No, it's impossible to do in vanilla Warband (because the netcode only uses 1 bit for skin).
So this would mean it will not work even for bots or what?
So my orc_infantry_multiplayer_ai is gonna appear with a common or buggy human face!?!  :sad:
And Players cant use races/genders other then male or female even by using the respawn as bot walkarround?



It's possible for bots, but not for player I think.
Bot example, without WSE
mb670.jpg
 
Is this tested ? You cant be sure without having played with some other players!
Im pretty sure i made a  test with bots tf_orc or undead and it worked/shown up for all player.
But then there is no proper reason why it wont work with the player_respawn_as bot! AND this is using the call "player_contol_agent".
And NO if its the skin. txt. and the _module_skins it should never work because this is the only place genders are defined! No matter for bots or players
Wow im pretty near to.....
As they made the MP i was so happy ones..................

 
Hi. I am sorry to me my English, I use a translator.
Prompt me
there is trigger
Code:
  (0, 0, 0, [],
   [

      (entry _ point _ get _ position, pos1, 16),
      (entry _ point _ get _ position, pos2, 2),
      (position _ set _ z _ to _ ground _ level, pos1),
      (position _ set _ z _ to _ ground _ level, pos2),
      (try _ for _ agents,":agent _ no"),
         (agent _ is _ non _ player, ":agent _ no"),
         (agent _ is _ alive, ":agent _ no"),
         (agent _ get _ horse,":horse",":agent _ no"),
         (ge, ":horse", 0),
         (agent _ set _ position, pos1,":horse"),
         (agent _ set _ scripted _ destination, ":agent _ no", pos2, 1),        
      (try _ end), 
]
 ),
What do I do not so as needed?
An agent does not follow at pos2.

Regards,
 
cmpxchg8b said:
Alrik der Goblin said:
It's possible for bots, but not for player I think.
Bot example, without WSE
Ah, you're right, the limitation only applies to players. It should be possible to do it by taking control of a spawned bot then, like Somebody said earlier.

Only problem is that the face may change back. I think it happens when you pick up weapons, but not exactly sure.
 
LegionaireR said:
An agent does not follow at pos2.
You can't separate rider and mount agents like that. You need to call agent_start_running_away on the horse first to dismount the agent, then move the horse and cause the agent to follow.
Barabas said:
Only problem is that the face may change back. I think it happens when you pick up weapons, but not exactly sure.
Isn't the face randomized in the first place? Does this happen with bots that you control after the player dies? If all else fails, make the face part of the helmet.
 
Somebody said:
Barabas said:
Only problem is that the face may change back. I think it happens when you pick up weapons, but not exactly sure.
Isn't the face randomized in the first place? Does this happen with bots that you control after the player dies? If all else fails, make the face part of the helmet.

All I know for sure is that it happens when male players take over the female villagers that we spawn in our raid mode. Sometimes (I think when picking up weapons from the ground) they get their original face back, so you get women with beards and such  :lol:
 
Somebody said:
LegionaireR said:
An agent does not follow at pos2.
You can't separate rider and mount agents like that. You need to call agent_start_running_away on the horse first to dismount the agent, then move the horse and cause the agent to follow.
On first glance, actually, I think that is right. (Unless LegionaireR wanted there to be dismounting...)
When you are dealing with a mounted agent pairing, you need to use agent_set_position on the horse agent (to teleport the mounted pair somewhere), but you must use agent_set_scripted_destination on the human agent (to tell the pair where to move).

Biggest problem is the arguments for
(agent_set_position, ":horse", pos1),
are backwards--horse and pos1 are flipped in what you have above.

Then, since that is an every frame trigger with no way of it failing, you'll never see the mounted agents move. They'll just keep being set to pos1.
 
Somebody,  I need a rider. This need for Knight Tournaments.

Caba`drin, I am sorry, it error at writing of post, don't in MS

I sorted out triggers since (0,0,0,....
ti _ after _ mission _ start,
ti _ on _ agent _ spawn

This works
Code:
     (ti _ after _ mission _ start, 0,0,  [],
	 [  	  
        (entry _ point _ get _ position, pos1, 16),
	(entry _ point _ get _ position, pos2, 2),
	(position _ set _ z _ to _ ground _ level, pos1),
	(position _ set _ z _ to _ ground _ level, pos2),
	  (try _ for _ agents,":agent _ no"),
           (agent _ is _ alive, ":agent _ no"),
           (agent _ set _ position, pos1,":agent _ no"),
           (agent _ set _ scripted _ destination, ":agent _ no", pos2, 1),
         (try_end),
       ]),

but I get OPKOD Invalid_agent on a line 6. I understand verification is needed
      (agent _ get _ horse, ":agent _ horse",  ":agent _ no"),
          (ge,  ":agent _ horse", 0),

but what then to do with a noble animal I do not understand.
and he is an agent in the scene, but...

I thank you for a help.
With kind regards.
 
Hi all,

Because this is a question and answers thread I thought: "Let's ask some questions."
Here it is: "I am working on a mod myself but I don't have time to make weapons. Is there any mod which has elven weapons out of LotR?"

Thanks,

Ton
 
Tonny93 said:
I am working on a mod myself but I don't have time to make weapons. Is there any mod which has elven weapons out of LotR?"
There are some weapon LotR weapon packs available in the OSP section. Give it a search.

LegionaireR said:
I sorted out triggers since (0,0,0,....
ti _ after _ mission _ start,
ti _ on _ agent _ spawn
The first number is how frequently the code will run. If you only want it to run 1 time, after spawning, then ti_after_mission_start is the correct interval. (There is a mission template trigger section in the syntax thread that is linked in my signature if you want more info there)

In this code section:
LegionaireR said:
Code:
     (ti _ after _ mission _ start, 0,0,  [],
	 [  	  
        (entry _ point _ get _ position, pos1, 16),
	(entry _ point _ get _ position, pos2, 2),
	(position _ set _ z _ to _ ground _ level, pos1),
	(position _ set _ z _ to _ ground _ level, pos2),
	  (try _ for _ agents,":agent _ no"),
           (agent _ is _ alive, ":agent _ no"),
           (agent _ set _ position, pos1,":agent _ no"),
           (agent _ set _ scripted _ destination, ":agent _ no", pos2, 1),
         (try_end),
       ]),
but I get OPKOD Invalid_agent on a line 6. I understand verification is needed
Your invalid agent line 6 is still the agent_set_position command, because the arguments are still backwards. It should read: (agent_set_position, ":agent_no", pos1)

But, if you are dealing with a mounted agent human/horse pairing, you still need to get the horse agent, like you did the first time, above.

 
Hello guys,

I don't know if this is the right thread to ask this question, so if not please excuse me.

I was wondering if there is an easy way to see what item is used by what troops? Morgh's troop editor doesn't seem to give that option.

RJA
 
RJA said:
I was wondering if there is an easy way to see what item is used by what troops? Morgh's troop editor doesn't seem to give that option.
Tis just a fine place.

And the easiest way would be to get the module system and search module_troops for the item ID you are interested in. Nothing particularly elegant or GUI/tool-based exists that I'm aware of.
 
Thank you for the quick answer Caba. I'm hesitant to use the module system, but I'll see if it bothers me that much to convince me to use it. :smile:

RJA
 
Caba`drin you again specified an error to me. .probably it is a tiredness .  :???:
I decided it other -
Code:
(try _ for _ agents,":agent _ no"),
          (agent _ is _ alive, ":agent _ no"),
    	  (agent _ get _ horse, ":agent _ horse",  ":player _ agent"),
          (ge,  ":agent _ horse", 0),
          (agent _ get _ position, ":agent", pos0),
	  (agent _ set _ scripted _ destination, "::agent", pos0, 1),
          (entry _ point _ get _ position, pos2, 2),
          (agent _ set _ scripted _ destination, "::agent", pos2, 1), 
(try _ end),
Thank you for a help.

The first number is how frequently the code will run. If you only want it to run 1 time, after spawning, then ti_after_mission_start is the correct interval.
yes, I know.
(There is a mission template trigger section in the syntax thread that is linked in my signature if you want more info there)
It is useful information about delays on start counting out of time in some triggers. Thank you it is useful.
 
Status
Not open for further replies.
Back
Top Bottom