Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Hi,
I have a little problem again. A friend designed me a scene for a town. Yesterday I got the finished version of this scene, and now is there a bug. I copyed the ...sco files, but if I start the game and enter this scenes, is there an old Native scene. And one more thing. The town was called Dhirim in Native. But now I have there a scene of an old sarranid town.
Now I tried to rename my .sco files for town_6. And thats the really mysterious thing. In town_6 is the scene of my friend succesfully loaded. The only bug was, that the ground height was flase. The houses were half in the earth etc..
So, my question. Which kind of bug is this?
Is this build_module ERROR the reason for it?
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
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 45, in save_parties
    file.write("%f %f "%(default_behavior_location[0],default_behavior_location[
1]))
TypeError: 'int' object is unsubscriptable
Exporting quest data...
Exporting info_page data...
Exporting scripts...
WARNING: Local variable never used: lair_y, at: spawn_bandits
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 can't find the reported error in anyone of the parties.py datas.

Please help.  :neutral:
 
Always build the module system with every little change you make. Don't make lots of changes without building, because if you then get errors, you may not remember all the changes you've made.
Apparently you made some changes to the parties that broke the build. Look at what you've changed and fix it.
 
I changed nothing with the parties since 6-7 days. And as I build the module at this time, I got no ERRORS.
And I posted this ERROR before a few days too.

Roemerboy said:
Somebody said:
Rotate the shield in Y by 45 degrees, then 90 degrees. Never seen map icons like those before. Make sure your texture size is a power of 2.

Thanks for this tip. The shields are now fine. But the textures are still buggy.
And if I build module, I get now this 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
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 45, in save_parties
    file.write("%f %f "%(default_behavior_location[0],default_behavior_location[
1]))
TypeError: 'int' object is unsubscriptable
Exporting quest data...
Exporting info_page data...
Exporting scripts...
WARNING: Local variable never used: lair_y, at: spawn_bandits
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. . .
 
What cause the error is either that you put extra integer value before the initial coordinate part of a party or you write the coordinate with wrong format it should be (x,y)
Example for town_8 :
  ("town_8","Reyvadin", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(48.44, 39.3),[], 175),

May be you make a mistake like one of these below :
1. It can be extra list value (on red) :
  ("town_8","Reyvadin", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,0,(48.44, 39.3),[], 175),

2. Wrong format of coordinate :
  ("town_8","Reyvadin", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,48.44, 39.3,[], 175),

When the scene's made, it's set from unique terrain code like : "0x300028000003e8fa0000034e00004b34000059be"
So if you use a scene, you should modify your scene's terrain code on module_scenes.py being the same as the terrain code the scene maker used. if you don't want some of your building is in the ground or something like that.
 
Roemerboy said:
The only bug was, that the ground height was flase. The houses were half in the earth etc..
So, my question. Which kind of bug is this?
This is because your terrain code for module_scenes is not the same as the one used by your friend. That causes a different terrain to generate, which causes the problem with different elevations, wrong terrain, etc.
 
Hm, ok I can fix this. Thanks.

But the really important problem is this.

Roemerboy said:
Hi,
I have a little problem again. A friend designed me a scene for a town. Yesterday I got the finished version of this scene, and now is there a bug. I copyed the ...sco files, but if I start the game and enter this scenes, is there an old Native scene. And one more thing. The town was called Dhirim in Native. But now I have there a scene of an old sarranid town.
Now I tried to rename my .sco files for town_6. And thats the really mysterious thing. In town_6 is the scene of my friend succesfully loaded.
 
Roemerboy said:
Hm, ok I can fix this. Thanks.

But the really important problem is this.

Roemerboy said:
Hi,
I have a little problem again. A friend designed me a scene for a town. Yesterday I got the finished version of this scene, and now is there a bug. I copyed the ...sco files, but if I start the game and enter this scenes, is there an old Native scene. And one more thing. The town was called Dhirim in Native. But now I have there a scene of an old sarranid town.
Now I tried to rename my .sco files for town_6. And thats the really mysterious thing. In town_6 is the scene of my friend succesfully loaded.
Did you edit module_scenes and module_strings with the new maps in the correct places? This thread explains it: http://forums.taleworlds.com/index.php/topic,112508.0.html


Alright I have a question about the arf_play_custom_sound line in Module_animations. I am trying to get a sound to play when reloading a pistol, like is already being done for the crossbow. Heres a look at the crossbows reload code in module_animations:

Code:
 ["reload_crossbow", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [3.0, "reload_musket", 0, 309, blend_in_ready|arf_stick_item_to_left_hand|arf_make_custom_sound, pack2f(0.40, 0.94)], 
 ],

I've changed things on it so ignore any inconsistencies, what I already know is:

pack2f indicates that 2 sounds will be played.
(0.40, 0.94) are the frames of the animation at which the sounds will be played.

What I can't figure out is how does it know what sounds are supposed to be played? There is nothing here to tell it what sounds to play, and arf_make_custom_sound is being used for many things such as for drawing a bow, falling down etc. so there must be something somewhere that defined what animations will use what sounds but I sure can't find anything. Anyone else know something about this? :???:
 
You should look in ID_sounds.py and/or header_sounds.py . It should define there.

I defined, that town_16 load the town_16.sco files. But it looks, that this doesn't work anylonger.
 
sirwho said:
Alright I have a question about the arf_play_custom_sound line in Module_animations. I am trying to get a sound to play when reloading a pistol, like is already being done for the crossbow. Heres a look at the crossbows reload code in module_animations:

Code:
 ["reload_crossbow", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [3.0, "reload_musket", 0, 309, blend_in_ready|arf_stick_item_to_left_hand|arf_make_custom_sound, pack2f(0.40, 0.94)], 
 ],

I've changed things on it so ignore any inconsistencies, what I already know is:

pack2f indicates that 2 sounds will be played.
(0.40, 0.94) are the frames of the animation at which the sounds will be played.

What I can't figure out is how does it know what sounds are supposed to be played? There is nothing here to tell it what sounds to play, and arf_make_custom_sound is being used for many things such as for drawing a bow, falling down etc. so there must be something somewhere that defined what animations will use what sounds but I sure can't find anything. Anyone else know something about this? :???:

May be it will play sound with same ID as the animation.
 
Ok I don't really know if this is the right place but how could I set-up signatures for my mod, I don't really know how to go about it so could anyone help me out or point me in the right direction.
 
xPearse said:
Ok I don't really know if this is the right place but how could I set-up signatures for my mod, I don't really know how to go about it so could anyone help me out or point me in the right direction.
You make a picture and upload it somewhere. Then you tell people the BB code to use to put it in their forum signature, like this:


Code:
[url=http://forums.taleworlds.com/index.php/topic,133708.0.html][IMG]http://img405.imageshack.us/img405/7549/signaturemd.jpg[/IMG][/url]
 
Hi,  I made a multiplayer Native Compatible mod for duels and when here have passed some few fightings the bodies that are left become so annoying, So I want to know if there is any way to do that when an agent dies and ends the ragdoll animation , the corpse fade out (and also remove weapons if possible). Thanks

EDIT: I try this after "ti_on_agent_killed_or_wounded":

        (try_begin),       
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_duel),           
          (try_for_agents, ":cur_agent"),
          (neg|agent_is_alive, ":cur_agent"),
          (agent_fade_out, ":cur_agent"),
        (try_end),

But with this, the agent fade out just at the moment of energy is "0", before of ragdoll animation, so this looks like the agent pauses and fade out in pause, so ugly  :sad:
 
Andrews said:
Hi,  I made a multiplayer Native Compatible mod for duels and when here have passed some few fightings the bodies that are left become so annoying, So I want to know if there is any way to do that when an agent dies and ends the ragdoll animation , the corpse fade out (and also remove weapons if possible). Thanks

EDIT: I try this after "ti_on_agent_killed_or_wounded":

        (try_begin),       
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_duel),           
          (try_for_agents, ":cur_agent"),
          (neg|agent_is_alive, ":cur_agent"),
          (agent_fade_out, ":cur_agent"),
        (try_end),

But with this, the agent fade out just at the moment of energy is "0", before of ragdoll animation, so this looks like the agent pauses and fade out in pause, so ugly  :sad:

A couple things on your code snippet:
1) looks like you are missing a try_end (unless it just wasn't copied) as you'd need 1 for the try_for_agents and 1 for the try_begin
2) if this is in the on_agent_killed_or_wounded, there's no need to loop through all agents, just use the agent ID stored on the trigger getting called

For a gap between death and fade out, what you'll probably want to do is use an agent slot and store the mission time of death in it; then have an every 5 second (or so) trigger fire, loop over all agents, find the dead ones and check that the current time is 5 seconds or so after death to ensure time for ragdoll animations to finish.

To remove items from dropping, WSE has a 'prune time' you can set, or for non-WSE, using the same death trigger, unequip the agent so there's nothing that can be spawned. It might look ugly, I'm not sure. You could take a look at how xenoargh does it in Blood & Steel.
 
MadVader said:
xPearse said:
Ok I don't really know if this is the right place but how could I set-up signatures for my mod, I don't really know how to go about it so could anyone help me out or point me in the right direction.
You make a picture and upload it somewhere. Then you tell people the BB code to use to put it in their forum signature, like this:


Code:
[url=http://forums.taleworlds.com/index.php/topic,133708.0.html][IMG]http://img405.imageshack.us/img405/7549/signaturemd.jpg[/IMG][/url]

Great thanks for the help, so is 350x129 (Like the one in the spoiler) a normal size signature image of can they be bigger.
 
The restrictions on signatures are right there on your profile editing page: 200px tall; width unrestricted though you should be aware of folks' monitor widths and desires to have more than on sig, etc. For other bits of forum-use info like this, click "Help" then see the options, particularly "Using the Forum"
 
Caba`drin said:
Andrews said:
Hi,  I made a multiplayer Native Compatible mod for duels and when here have passed some few fightings the bodies that are left become so annoying, So I want to know if there is any way to do that when an agent dies and ends the ragdoll animation , the corpse fade out (and also remove weapons if possible). Thanks

EDIT: I try this after "ti_on_agent_killed_or_wounded":

        (try_begin),       
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_duel),           
          (try_for_agents, ":cur_agent"),
          (neg|agent_is_alive, ":cur_agent"),
          (agent_fade_out, ":cur_agent"),
        (try_end),

But with this, the agent fade out just at the moment of energy is "0", before of ragdoll animation, so this looks like the agent pauses and fade out in pause, so ugly  :sad:

A couple things on your code snippet:
1) looks like you are missing a try_end (unless it just wasn't copied) as you'd need 1 for the try_for_agents and 1 for the try_begin
2) if this is in the on_agent_killed_or_wounded, there's no need to loop through all agents, just use the agent ID stored on the trigger getting called

For a gap between death and fade out, what you'll probably want to do is use an agent slot and store the mission time of death in it; then have an every 5 second (or so) trigger fire, loop over all agents, find the dead ones and check that the current time is 5 seconds or so after death to ensure time for ragdoll animations to finish.

To remove items from dropping, WSE has a 'prune time' you can set, or for non-WSE, using the same death trigger, unequip the agent so there's nothing that can be spawned. It might look ugly, I'm not sure. You could take a look at how xenoargh does it in Blood & Steel.

Thanks for you idea, I will try it and i will post results :wink:
 
Status
Not open for further replies.
Back
Top Bottom