Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Your problem is in brackets, they are misplaced and misaligned. Check them properly.

And please use the Q&A thread, it was stickied specifically for simple questions.
 
Thanks for the tip, I try it out and hope to glangen the desired result.

I was here for MS, adjust gradually issues and not always open new a thread because I am a beginner as far as the scripts. It is therefore determined more questions coming.




Danke für den Tipp, ich probiere es aus und hoffe zum gewünschten Ergebniss zu glangen.

Ich wollte hier zum MS, nach und nach Fragen einstellen und nicht immer wieder neu einen Thread aufmachen da ich Anfänger bin was das Skripten angeht. Es werden daher bestimmt vermehrt Fragen kommen.
 
My problem is in the module system.

I created script from the villages monasteries. My problem is that I do not get to recruit from the menu. I'm with the help of a friend 'get this code. Unfortunately this does not quite work. Why this error message.

begins on line 8968

module_game_menus.py


("recruit_them",
      [
        (eq, reg7, 0),
        (gt, reg5, 0),
      #monastery begin
        ("recruit_volunteers",[(call_script, "script_cf_village_recruit_volunteers_cond"),]
          ,"Recruit Volunteers.",
        [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
          (else_try),
        (is_between, ":party_id", "p_start", "p_end"),
          (jump_to_menu, "mnu_recruit_volunteers"),
        (try_end),
        ]),
        #monastery end
      ],
      "Recruit them ({reg6} denars).",



error message

Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
Traceback (most recent call last):
  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,quick_strings)
  File "process_game_menus.py", line 31, in save_game_menus
    save_game_menu_item(ofile,variable_list,variable_uses,menu_item,tag_uses,qui
ck_strings)
  File "process_game_menus.py", line 12, in save_game_menu_item
    save_statement_block(ofile,0, 1, menu_item[1], variable_list, variable_uses,
tag_uses,quick_strings)
  File "C:\Programme\Steam\SteamApps\common\mountblade warband\Modules\Module Sy
stem\src\process_operations.py", line 451, in save_statement_block
    save_statement(ofile,opcode,no_variables,statement,variable_list,variable_us
es,local_vars, local_var_uses,tag_uses,quick_strings)
  File "C:\Programme\Steam\SteamApps\common\mountblade warband\Modules\Module Sy
stem\src\process_operations.py", line 400, in save_statement
    ofile.write("%d %d "%(opcode, lenstatement))
TypeError: %d format: a number is required, not str
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Imported 56 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .



I could help someone solve the problem what would be the correct code to remove the recruitment from the menu of the monasteries.

Thanks in advance Vikings




In german:

Mein problem ist im module system.

Ich habe aus dem Dörfer skript Klöster erschaffen. Mein problem ist das ich die Rekrutierung nicht aus dem Menü heraus bekomme. Ich hab mit hilfe eines freundes diesen code bekommen. Leider funktioniert dieser nicht ganz. Es kommt zu dieser Fehlermeldung.

Könnte mir da jemand helfen das problem zu lösen was der richtige code wäre um die Rekrutierung aus dem Menü der Klöster zu entfernen.

Danke vorab Vikinger
 
Vikinger1977 said:
("recruit_them", [
(eq, reg7, 0),
(gt, reg5, 0),
      ],
      "Recruit them ({reg6} denars).",
# missing Native code begin
      [
        (call_script, "script_village_recruit_volunteers_recruit"),

        (jump_to_menu,"mnu_village"),
      ]),
# missing Native code end


      #monastery begin
        ("recruit_volunteers",[(call_script, "script_cf_village_recruit_volunteers_cond"),]
          ,"Recruit Volunteers.",
        [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
          (else_try),
        (is_between, ":party_id", "p_start", "p_end"),
          (jump_to_menu, "mnu_recruit_volunteers"),
        (try_end),
        ]),
        #monastery end
It is a VERY BAD IDEA to stick a MENU OPTION inside a MENU OPTION.
I'm sorry to tell you this, but this was shocking for me; I had never expected to encounter such a catastrophic fail in menu-making.

You want to recruit troops from new parties called monasteries or what? Nothing would work, since what I see here is just a copy-paste of the normal thing. You have to put it in your monastery menu.
 
The Native code is drinne, or maybe I'm probably in the wrong line for it. Sure, I'm not quite there.

As the monasteries are built on the villages script I would like to remove the recruitment of the villages for the monasteries.

Maybe even a code or a real idea of how I could do that.




Der Native code ist drinne, ich bin wahrscheinlich oder vielleicht auch in der falschen Zeile dafür. Sicher bin ich mir da auch nicht ganz.

Da die Klöster auf dem Dörfer skript aufgebaut sind möchte ich nun die Rekrutierung aus den Dörfern für die Klöster entfernen.

Vielleicht hat auch einer einen richtigen Code oder eine Idee dafür wie ich das machen könnte.
 
What does "drinne" mean?
Anyways. If you have one monastery, called "p_monastery_1", then you should do what is shown below.
If you have more than one monastery, then put them below each other. My example also shows what you should do if you have more. (You can also define constants, but that's a different matter.)
Code:
      ("recruit_volunteers",
      [
	(call_script, "script_cf_village_recruit_volunteers_cond"),
	# Monasteries begin
	(neq, "$current_town", "p_monastery_1"), # Current_town used in native context
	## OR:
	(neg|is_between, "$current_town", "p_monastery_1", "p_monastery_23"), # or whatever you have
	# Monasteries end
       ]
       ,"Recruit Volunteers.",
       [
         (try_begin),
           (call_script, "script_cf_enter_center_location_bandit_check"),
         (else_try),
           (jump_to_menu, "mnu_recruit_volunteers"),
         (try_end),
 
Just askin', can i have a clue on server side codding? Is it just an "enhanced" modded Native that is replaced with the one in the server?
 
Lumos said:
Bayonet attaching/detaching animations exist even in Warband (at least in the code, I've never checked them out). Use itp_has_bayonet on your item to allow attaching/detaching a bayonet on it. After that, I think you should just treat it as itp_next_item_as_melee. Not sure though.

No, I mean, where the musket, has no bayonet, and then, it will load a mesh with the bayonet. I want it, where you press "b", it will switch the mesh. Something like this.

Also, where would "Server Events" be placed?

 
Code:
#bayonet
         (0, 0, 3, [(key_clicked, key_b),
    ], [
        
         (multiplayer_get_my_player, ":playernum"),
         (player_get_agent_id, ":agentnum", ":playernum"),
         (agent_get_wielded_item, ":rifle",":agentnum"),
         (assign,":val",1),
        

     #infantry_musket to bayonet
         (try_begin),
         (eq, ":rifle", "itm_infantry_musket"),
         (assign,":val",1),
         (multiplayer_get_my_player,":player"),
         (assign,"$g_in_crouch",0),

Swyter said:
Bravo2255 said:
Is there any good Coding tutorials, I want to get more familiar. I would like to learn where to make a button, activate something. Animations, and such.


I want to add a code, where the guy, fixes a bayonet, and it will load another mesh, with a bayonet on the musket. Can someone help me?

Ehm, just a comment, your signature is horrifying me.
May I ask you politely to not put that kind of images on here? I would call that more than rude.

If you think that's funny we've a problem.

itW5r.gif

I do not see how this is offensive? I will remove it, if I get to many negative sayings, but people send me messages, laughing..

Anyway, I came here for help, not insults.
 
Is there any easy way to pull this off? I don't see an option for carry scabbard on the right hip like a sword. Normally I wouldn't need to but all the art I've seen of Scythians (or most, at least) have it on the right side. I could make the scabbard use the carry dagger or quiver right position, but that requires a lot of editing that I have to do blindly.

 
Bravo2255 said:
No, I mean, where the musket, has no bayonet, and then, it will load a mesh with the bayonet. I want it, where you press "b", it will switch the mesh.
Why would you copy/paste a post you did on the last page?

Some food for thought: What is the point of having an itp_has_bayonet flag, if it won't load another mesh when equipping a bayonet?
Either prove me wrong with testing or understand what I'm trying to tell you already.
 
There are 5 carry positions on the right side.
Code:
#right stomach
itcf_carry_dagger_front_right

#right hip
itcf_carry_quiver_right_vertical
itcf_carry_quiver_front_right #flipped
itcf_carry_quiver_back_right

#right upper leg
itcf_carry_revolver_right
Try all of these carry positions, and you will see which one is the best.
But you have to remodel the weapon and holster model to fit to the right hip.
 
SnRolls said:
Belendor said:
SnRolls said:
Why everybody ignores my questions ? -_-

Because, you ain't the only one who seeks help.
? -_-
Im repeating my questions for days...
What did you do to find out besides posting? It's expected from everyone to put their own time and effort into a problem before asking for other's people time and expertise. Also, complaining about not getting free advice doesn't help.
 
Do you really think i just came and post without doing anything else?
Well, i spent days about thinking how to solve it.
 
heres a horse item code :

Code:
["arabhorse1", "Arabian Horse", [("arabian_horse_grey",0)], itp_type_horse, 0,
  700,abundance(35)|hit_points(130)|body_armor(11)|difficulty(5)|horse_speed(46)|horse_maneuver(47)|horse_charge(26),imodbits_horse_basic],

Can someone tell me where is the "horse scale" ? In Morgh's item editor, theres "Horse Scale" where you can rescale a horse. Where is it here? Is it hardcoded?


Thanks.
 
SnRolls said:
Do you really think i just came and post without doing anything else?
Well, i spent days about thinking how to solve it.

Lumos said:
- Firstly, grammar and attitude. Remember these two words, for they are very important. Write properly, be polite to others, and your chances of getting help will increase exponentially. Put spaces after punctuation marks, remember that "u" and "y" and other crap are not words but letters, and no "halp plox". Treat others as your equals, in the way that you want to be treated. Members with experience (that even spare time to answer your questions) should be treated with all the respect you (should) treat your mentors with. Don't be afraid to ask your questions and to use the word "please".

in other words, dont expect much of a help if you go here like, "hey i wanna do this, tell me how to do it"

depending on what you want, you have to split the potenitall helpers to those who know and those who dont know how to help you on your problem. And out of those who know how to help you, some dont have time. And out of those who have time and know how to may not be willing to , if you presented youself and your question in a inpolite or rude way
 
Status
Not open for further replies.
Back
Top Bottom