Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Waldzios said:
xPearse said:
Hey guys could you possibly help me out here and figure out whats wrong. The zombie faces work but there must be something wrong with my units entry or the face codes because I can choose to be a zombie see the face and no crash but when I encounter the zombie units in battle or in a scene the game just crashes. Any help here, I could get the face texts again but I want to see if you guys see any problems.

Faces
zomface1blackhair = 0x000000003f00001436db6db6db6db6db00000000001db6db0000000000000000
zomface1brownhair = 0x000000000000001436db6db6db6db6db00000000001db6db0000000000000000
zomface2hairblack = 0x000000003f00101436db6db6db6db6db00000000001db6db0000000000000000
zomface2hairorangesmallbeard = 0x00000000000015d436db6db6db6db6db00000000001db6db0000000000000000
zomface3brownhairbeard = 0x000000000000259436db6db6db6db6db00000000001db6db0000000000000000
zomface3orangehairsmall = 0x000000000000101136db6db6db6db6db00000000001db6db0000000000000000
zomface3afro = 0x000000000000201536db6db6db6db6db00000000001db6db0000000000000000
zomface4blackhair = 0x000000003f00300136db6db6db6db6db00000000001db6db0000000000000000
zomface4bald = 0x000000003f00300036db6db6db6db6db00000000001db6db0000000000000000
zomface5shortblackhair = 0x000000003f00400636db6db6db6db6db00000000001db6db0000000000000000
zomface5mustacheblack = 0x000000003f00454a36db6db6db6db6db00000000001db6db0000000000000000

A unit entry or two

  ["khergit_tribesman","Chef Zombie","Zombie Chef's",tf_zombie|tf_randomize_face|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves,0,0,fac_khergits,
  [itm_zombootsblack,itm_zomchefthug,itm_zombiegirlhands,itm_zombiepunch],
  def_attrib|level(5),wp(50),knows_common|knows_riding_3|knows_power_draw_2|knows_horse_archery_2,zomface1blackhair],

  ["khergit_horseman","Old Man Zombie","Old Men Zombies",tf_zombie|tf_randomize_face|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves,0,0,fac_khergits,
  [itm_teacherclothing,itm_teacherflipflops,itm_zombiepunch,itm_zombiegirlhands],
  def_attrib|level(21),wp(80),knows_common|knows_riding_5|knows_power_draw_4|knows_ironflesh_1|knows_power_throw_1,zomface1blackhair],
AFAIK tf_randomize_face requires two face codes, remove tf_randomize_face flag or add second face code.

Thank you for godsend, I'll try this out and see if it works. I didn't know that about the randomize face though.
 
Hey folks

Quick question re cartridges in module_items -

["cartridges","Cartridges", [("cartridge_a",0)], itp_type_bullets|itp_merchandise|itp_can_penetrate_shield|itp_default_ammo, 0, 41,weight(2.25)|abundance(90)|weapon_length(3)|thrust_damage(1,pierce)|max_ammo(50),imodbits_missile],

Is cartridge_a both the mesh shown in the inventory and that used for bullets when firing a gun?  If so, how can I change this so the actual bullets fired look different whilst maintaining the same look in the inventory?

Cheers
 
Superelastic said:
If so, how can I change this so the actual bullets fired look different whilst maintaining the same look in the inventory?
You need to explicitly set the flying mesh, that you want to use for the fired ammo.

["cartridges","Cartridges", [("cartridge_a",0), ("cartridge_b",ixmesh_flying_ammo)], itp_type_bullets|itp_merchandise|itp_can_penetrate_shield|itp_default_ammo, 0, 41,weight(2.25)|abundance(90)|weapon_length(3)|thrust_damage(1,pierce)|max_ammo(50),imodbits_missile],

PS there are actually three flags
ixmesh_inventory 
ixmesh_flying_ammo
ixmesh_carry     
so instead you can set ixmesh_inventory and use the default mesh for the fired ammo
 
when we have the covers_legs tag off on armour,

How does the body mesh decide which parts to hide, and which to show?

Does it hide any verts not attached to the leg bones?

I mean, it's one single mesh but it hides half...
 
I am having that same problem Harry ^^

But also, I tried to do a crouch thing that Xeno made, The weird thing is it made all uniforms invisible

Here is error I get :
Code:
[11:38:38 AM] Bravo Alpha: Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
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...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_move_heroes
WARNING: Global variable never used: g_castle_left_to_player
WARNING: Global variable never used: g_player_banner_granted
WARNING: Global variable never used: g_custom_battle_scenario
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
WARNING: Global variable never used: new_encounter
WARNING: Global variable never used: routed_party_added
WARNING: Global variable never used: thanked_by_ally_leader
WARNING: Global variable never used: last_freed_hero
WARNING: Global variable never used: capture_screen_shown
WARNING: Global variable never used: loot_screen_shown
WARNING: Global variable never used: g_prison_heroes
WARNING: Global variable never used: g_last_defeated_bandits_town
WARNING: Global variable never used: g_siege_force_wait
WARNING: Global variable never used: g_siege_sallied_out_once
WARNING: Global variable never used: g_castle_requested_by_player
WARNING: Global variable never used: qst_train_peasants_against_bandits_currentl
y_training
WARNING: Global variable never used: g_player_raid_complete
WARNING: Global variable never used: g_strength_contribution_of_player
WARNING: Global variable never used: g_town_assess_trade_goods_after_rest
WARNING: Global variable never used: g_tournament_last_bet_tier
WARNING: Global variable never used: qst_collect_taxes_menu_counter
WARNING: Global variable never used: qst_collect_taxes_unrest_counter
WARNING: Global variable never used: g_training_ground_training_count
WARNING: Global variable never used: nurse_assists_entry
WARNING: Global variable never used: debug_message_in_queue
WARNING: Global variable never used: g_train_peasants_against_bandits_training_s
ucceeded
WARNING: Global variable never used: g_defender_reinforcement_limit
WARNING: Global variable never used: defender_reinforcement_limit_increased
WARNING: Global variable never used: g_arena_training_next_spawn_time
WARNING: Global variable never used: tutorial_1_msg_1_displayed
WARNING: Global variable never used: tutorial_1_msg_2_displayed
WARNING: Global variable never used: tutorial_1_msg_3_displayed
WARNING: Global variable never used: tutorial_1_msg_4_displayed
WARNING: Global variable never used: tutorial_1_msg_5_displayed
WARNING: Global variable never used: tutorial_1_msg_6_displayed
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_msg_1_displayed
WARNING: Global variable never used: tutorial_2_msg_2_displayed
WARNING: Global variable never used: tutorial_2_msg_3_displayed
WARNING: Global variable never used: tutorial_2_msg_4_displayed
WARNING: Global variable never used: tutorial_2_msg_5_displayed
WARNING: Global variable never used: tutorial_2_msg_6_displayed
WARNING: Global variable never used: tutorial_2_msg_7_displayed
WARNING: Global variable never used: tutorial_2_msg_8_displayed
WARNING: Global variable never used: tutorial_2_msg_9_displayed
WARNING: Global variable never used: tutorial_2_melee_agent_state
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_msg_6_displayed
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_msg_1_displayed
WARNING: Global variable never used: tutorial_4_msg_2_displayed
WARNING: Global variable never used: tutorial_4_msg_3_displayed
WARNING: Global variable never used: tutorial_4_msg_4_displayed
WARNING: Global variable never used: tutorial_4_msg_5_displayed
WARNING: Global variable never used: tutorial_4_msg_6_displayed
WARNING: Global variable never used: tutorial_4_msg_7_displayed
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_msg_1_displayed
WARNING: Global variable never used: tutorial_5_msg_2_displayed
WARNING: Global variable never used: tutorial_5_msg_3_displayed
WARNING: Global variable never used: tutorial_5_msg_4_displayed
WARNING: Global variable never used: tutorial_5_msg_5_displayed
WARNING: Global variable never used: tutorial_5_msg_6_displayed
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_multiplayer_poll_running
WARNING: Global variable never used: g_number_of_initial_team_1_flags
WARNING: Global variable never used: g_number_of_initial_team_2_flags
WARNING: Global variable never used: g_random_entry_point
WARNING: Global variable never used: g_player_party_icon
WARNING: Global variable never used: g_lord_long_term_count
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: g_placing_initial_flags
WARNING: Global variable never used: g_multiplayer_team_1_first_spawn
WARNING: Global variable never used: g_multiplayer_team_2_first_spawn
WARNING: Global variable never used: g_training_ground_training_num_gourds_to_de
stroy
WARNING: Global variable never used: players_kingdom_days_at_peace
WARNING: Global variable never used: ai_team_1
WARNING: Global variable never used: num_routed_allies
WARNING: Global variable never used: belfry_num_men_pushing
WARNING: Global variable never used: g_custom_battle_team1_death_count
WARNING: Global variable never used: total_relation_adds
WARNING: Global variable never used: total_relation_subs
WARNING: Global variable never used: g_concession_demanded
WARNING: Global variable never used: g_half_payment_checkpoint
WARNING: Global variable never used: g_tutorial_update_mouse_presentation
WARNING: Global variable never used: g_start_belligerent_drunk_fight
WARNING: Global variable never used: g_start_hired_assassin_fight
WARNING: Global variable never used: g_tutorial_mouse_dir
WARNING: Global variable never used: g_tutorial_training_ground_melee_last_winne
r
WARNING: Global variable never used: g_tutorial_training_ground_melee_paused
WARNING: Global variable never used: g_tutorial_training_ground_next_score_time
WARNING: Global variable never used: newglob_total_prosperity_from_townloot
WARNING: Global variable never used: newglob_total_prosperity_from_caravan_trade

WARNING: Global variable never used: total_indictment_changes
WARNING: Global variable never used: total_policy_dispute_changes
WARNING: Global variable never used: total_no_fief_changes
Exporting postfx_params...
  Any help?
 
Hello, I want to make it so that all factions only have one troop upgrade "tree" with no cavalry or skirmishers, just; (Recruit - Veteran - Expert - Officer) with no other options, only one way you can upgrade troops. Please help. :smile:
 
* go ahead and groan yes it's a gun post* :p
I *think* I've done everything I need to do to put guns into a mod (they're set to merchandise and have high abundancies and all that) but the storekeepers won't sell them.  I've been searching for days for a solution.  It appears that merchants just don't sell firearms and bullets by default, and I can't figure out what in the .txt files to change to fix this... does anyone know what text needs to be changed? 
I'm really not interested in struggling with python or the module system.  I've added a lot already just by working with the text files and morgh's tools so far as it is.  I'm hoping there's just a number I can switch in a text file and be done with it.  Anyone? :smile:
 
I tried to port my mod (which used the 1.143 module system) to the 1.152 version. Now when I compile I get this new error.

Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
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...
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
ERROR: Usage of unassigned local variable: :max_amount
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

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

I don't believe I've changed anything with "max_amount" so I'm not sure why only now this bug is coming up. Is there any generic assigning code I can use to declare initial values for max_amount without actually altering what it does?
 
danest said:
* go ahead and groan yes it's a gun post* :p
I *think* I've done everything I need to do to put guns into a mod (they're set to merchandise and have high abundancies and all that) but the storekeepers won't sell them.  I've been searching for days for a solution.  It appears that merchants just don't sell firearms and bullets by default, and I can't figure out what in the .txt files to change to fix this... does anyone know what text needs to be changed? 
I'm really not interested in struggling with python or the module system.  I've added a lot already just by working with the text files and morgh's tools so far as it is.  I'm hoping there's just a number I can switch in a text file and be done with it.  Anyone? :smile:

Not an easy way to do this by .txt editing, no. ...well, not without someone else making the module system change for you and converting it to a .txt edit so you don't need to use the module system, that is.

Merging to Q&A thread.
 
Caba`drin said:
You should locate which script ":max_amount" is used it. It is possible that the 1.152 header_operations is missing whichever operation is supposed to assign a value to ":max_amount" from its lhs_operations list.

Would this be resolved by adding the scripts that use ":max_amount" into the lhs_operations list?

Edit: I found two scripts that :max_amount is used in, both are from the mod compilation I used. The scripts are sort_food and auto_buy_food. How would I go about assigning :max_amount for them?
 
So, can't do it without the module system, which would mean I'd have to start fresh with a vanilla native, and mod that, losing and over-writing all the hand-made changes I made?  Ack. :sad: 
 
Runea said:
Caba`drin said:
You should locate which script ":max_amount" is used it. It is possible that the 1.152 header_operations is missing whichever operation is supposed to assign a value to ":max_amount" from its lhs_operations list.

Would this be resolved by adding the scripts that use ":max_amount" into the lhs_operations list?

Edit: I found two scripts that :max_amount is used in, both are from the mod compilation I used. The scripts are sort_food and auto_buy_food. How would I go about assigning :max_amount for them?
At the beginning of those scripts, you could add (assign, ":max_amount", 0), or check the assign/add/get/store-type operations that first use ":max_amount" and see if they are in the 1.152 lhs_operations = [] list at the bottom of header_operations. Or you could paste those scripts here in a [code] [/code] block and we can all take a gander.

danest said:
So, can't do it without the module system, which would mean I'd have to start fresh with a vanilla native, and mod that, losing and over-writing all the hand-made changes I made?  Ack. :sad: 
Yeah, more or less...
Ah, hell.

1. Open up scripts.txt (back it up first)
2. Find refresh_center_weaponsmiths
3. Increase the first number on the next line by 3 (change 23 to 26)
4. Find the first 1513 on the line.
5. Immediately before it, paste
Code:
1513 4 1224979098644774912 1224979098644774914 16 2 1513 4 1224979098644774912 1224979098644774914 17 2 1513 4 1224979098644774912 1224979098644774914 18 2
That 2s that come at the end and before the next 1513 can be changed to whatever number of pistols, muskeets, and bullets you want available, respectively
6. Ensure that there is 1 and only 1 space between the number that comes before your first 1513 and 1513 and 1 and only 1 space after the final 2 and the next 1513
7. Save, play.
 
Caba`drin said:
Runea said:
Caba`drin said:
You should locate which script ":max_amount" is used it. It is possible that the 1.152 header_operations is missing whichever operation is supposed to assign a value to ":max_amount" from its lhs_operations list.

Would this be resolved by adding the scripts that use ":max_amount" into the lhs_operations list?

Edit: I found two scripts that :max_amount is used in, both are from the mod compilation I used. The scripts are sort_food and auto_buy_food. How would I go about assigning :max_amount for them?
At the beginning of those scripts, you could add (assign, ":max_amount", 0), or check the assign/add/get/store-type operations that first use ":max_amount" and see if they are in the 1.152 lhs_operations = [] list at the bottom of header_operations. Or you could paste those scripts here in a [code] [/code] block and we can all take a gander.

danest said:
So, can't do it without the module system, which would mean I'd have to start fresh with a vanilla native, and mod that, losing and over-writing all the hand-made changes I made?  Ack. :sad: 
Yeah, more or less...
Ah, hell.

1. Open up scripts.txt (back it up first)
2. Find refresh_center_weaponsmiths
3. Increase the first number on the next line by 3 (change 23 to 26)
4. Find the first 1513 on the line.
5. Immediately before it, paste
Code:
1513 4 1224979098644774912 1224979098644774914 16 2 1513 4 1224979098644774912 1224979098644774914 17 2 1513 4 1224979098644774912 1224979098644774914 18 2
That 2s that come at the end and before the next 1513 can be changed to whatever number of pistols, muskeets, and bullets you want available, respectively
6. Ensure that there is 1 and only 1 space between the number that comes before your first 1513 and 1513 and 1 and only 1 space after the final 2 and the next 1513
7. Save, play.

Thanks... that's just what I was looking for. :wink: There's no sound yet, but it's working so it's good.
 
Runea said:
Caba`drin said:
You should locate which script ":max_amount" is used it. It is possible that the 1.152 header_operations is missing whichever operation is supposed to assign a value to ":max_amount" from its lhs_operations list.

Would this be resolved by adding the scripts that use ":max_amount" into the lhs_operations list?

Edit: I found two scripts that :max_amount is used in, both are from the mod compilation I used. The scripts are sort_food and auto_buy_food. How would I go about assigning :max_amount for them?
Looks like
troop_inventory_slot_get_item_max_amount,
is missing from the lhs_operations list in 1.152
 
Hi folks

I'd like to skip the alley fight and merchants quest and go straight to a normal 'walking around town during the day' scene.  I'm guessing the change needs to be made in here:

  ("start_phase_2_5",mnf_disable_all_keys,
    "{!}{s16}",
    "none",
    [
      (str_store_party_name, s1, "$g_starting_town"),
      (str_store_string, s16, "$g_journey_string"),
    ],
    [
      ("continue",[], "Continue...",
      [
            (jump_to_menu, "mnu_start_phase_3"),
      ]),
    ]

I've tried changing (jump_to_menu, "mnu_start_phase_3") to (jump_to_scene, "scn_town_1_center").  Sadly, this just ends up with an intro screen I can't exit.  Would appreciate any pointers.  Also - how would I go about jumping to the correct town centre scene depending on $g_starting_town?

Cheers
 
Status
Not open for further replies.
Back
Top Bottom