Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Looking to add in the faction banner mesh besides the name [position can be sorted by myself] of the two available faction choices in MP during the selection screen. Cannae handle it cap'n.  :razz: Any help would be much appreciated.

Also; I don't suppose there are any semi-useful guides floating around regarding some of the presentation-useful values?
 
Caba`drin said:
Specialist said:
Is there a way to restrict the "Shift" zoom function to a certain item?
I want to make the zoom only work while using a sniper or scoped gun. :razz:
You can hijack the mission_cam on key press.

Code:
(0, 0, 0,
  [(key_is_down, key_left_mouse_button),], ##add item checks for not sniper rifles...or for them and make it zoom more
  [(mission_set_cam_mode, 1),
   #set the appropriate camera position)
  ]),
 (0, 0, 0,
   [(neg|key_is_down, key_left_mouse_button)], ##other checks, what have you
  [(mission_cam_set_mode, 0) #return to normal camera
  ]) ,
That would go in each template I'm guessing.. but where in each MT would they go?
I would assume in the triggers, but would I have to make a new one or add it to an existing one?
 
Caba`drin said:
Specialist said:
Is there a way to restrict the "Shift" zoom function to a certain item?
I want to make the zoom only work while using a sniper or scoped gun. :razz:
You can hijack the mission_cam on key press.

Code:
(0, 0, 0,
  [(key_is_down, key_left_mouse_button),], ##add item checks for not sniper rifles...or for them and make it zoom more
  [(mission_set_cam_mode, 1),
   #set the appropriate camera position)
  ]),
 (0, 0, 0,
   [(neg|key_is_down, key_left_mouse_button)], ##other checks, what have you
  [(mission_cam_set_mode, 0) #return to normal camera
  ]) ,
Specialist said:
That would go in each template I'm guessing.. but where in each MT would they go?
I would assume in the triggers, but would I have to make a new one or add it to an existing one?
These are the shells of two new triggers. The orders of triggers in the list of triggers for a template doesn't much matter, so they can be anywhere so long as you don't put them in the middle of another trigger.
 
Thanks caba. Gonna be working with it now. :smile:

To modify the code so that it would do the check I would use the whole "try_begin", "try_end", and "item_is_between" correct?
 
So I'm a little confused.  I was messing around in the troop file doing some editing and ran the build module file.  Comes up saying there is a syntax error.  No problem I found the syntax error using check module and fixed the error.  Ran check module again and it tells me this:


Code:
[color=red]upgrade[/color](troops,"farmer", "watchman")

Error in red.  Now normally when this has happened previously it's usually been that I haven't closed a bracket somewhere, BUT I'm 99 percent sure I haven't changed anything in this regard.  I'll post below the full file, I'd appreciate if someone can track down my error.

http://www.freefilehosting.net/moduletroops

Thanks a lot!
 
magicbat said:
Sorry to spam this thread with my problems, but I'm totally stumped on what to to next.

I am really struggling with getting banners into the game. My custom faction doesn't have a faction banner, as in the king is bannerless. I edited the kingdoms banners dds file and added the custom one onto the end, I then told the faction in module scripts to use that as their banner, but no dice. I have aslo added a new banner file, and saved it as std_banner_h.dds in the texture file of my module. I then followed the instructions in this: http://forums.taleworlds.com/index.php/topic,88940.msg2296316.html#msg2296316 thread, but they don't appear in game. Even if they do, I am not sure how to get them being used by the custom faction and no other.

I am also having a problem with certain npcs. In my custom city, the guards say the bandit attack dialogue, not the 'I'm watching you' dialogue, I'm not sure what causes this issue.

I'm also stuck on getting noble relations working. I have made all the lords and ladies for my kingdom, but they remain all unrelated, and their ages don't show up like the lords and ladies from other factions.

In regards to your question regarding the NPC dialogue, I'm having a similar problem, but I know why.  I added several new hero characters to the game, who essentially have no reference points in the various other files.  AKA Strings, Dialogue etc.  SO if you've added new NPCS, whether they be lords, ladies, etc I'm assuming that this would have a similar if not identical effect.

Sorry for the double post, or what will be assuming no one posts in between this and my previous post....
 
About animations:

Is weapon hit detection for melee weapons based on the animation itself? Would it be possible to create any manner of melee attack by creating new animations?
 
MadocComadrin said:
SPD_Phoenix said:
If that is the case, it was a bad design. Empty/unassigned placeholder should be null, not zero. I thought that the module system defined some values to be read as integer from the slots, so null and negative are set to zero. Anyway, I don't use uninitilized slots, so I get away with a lot of bug.
Bad design? Integers in most languages have either been automatically assigned to 0 or to whatever was in that chunk of memory.
Then player id should not be zero.

Edit: not just player id, most of the stuffs that have an id of zero should be invalid, like no_item in module_items. Then it will be a little easier to work with unassign/uninitialized slots, party/troop id,... 
 
Tricket said:
So I'm a little confused.  I was messing around in the troop file doing some editing and ran the build module file.  Comes up saying there is a syntax error.  No problem I found the syntax error using check module and fixed the error.  Ran check module again and it tells me this:


Code:
[color=red]upgrade[/color](troops,"farmer", "watchman")

Error in red.  Now normally when this has happened previously it's usually been that I haven't closed a bracket somewhere, BUT I'm 99 percent sure I haven't changed anything in this regard.  I'll post below the full file, I'd appreciate if someone can track down my error.
The problem is somewhere above that line. Probably a missing bracket.

Dwinny said:
About animations:

Is weapon hit detection for melee weapons based on the animation itself? Would it be possible to create any manner of melee attack by creating new animations?
To my knowledge, yes.
 
Hello guys!
I'm trying to add transparency to poll presentation, but I have little problem here:
(else_try),
(position_set_x, pos1, 50),
(position_set_y, pos1, 70),
(overlay_set_alpha, reg0, 0x80),
(overlay_set_position, reg0, pos1),
(position_set_x, pos1, 750),
(position_set_y, pos1, 60),
(overlay_set_area_size, reg0, pos1),
(try_end),
When I try to use (overlay_set_alpha, reg0, 0x80), game crashes. I tried few times with same result. It seems I can't/don't know how to use alpha when overlay_set_area_size is used. Is there any way to do this without crashing the game ?

It works fine with single text line overlay (without set_area_size):
(try_begin),
(neq, "$g_multiplayer_poll_to_show", 3),
(neq, "$g_multiplayer_poll_to_show", 4),
(position_set_x, pos1, 400),
(position_set_y, pos1, 100),
(overlay_set_alpha, reg0, 0x80),
(overlay_set_position, reg0, pos1),
(else_try),
 
I just want to make this poll transparent, I don't want to change it's size.

PS. This is original module code, only bold text is added by me.
 
If i'm right, developers used set_area_size here, because it splits text into few lines.
When I use set_size I see just 1 line of text (smaller or bigger). But I still want to split those lines, I just need transparency, like counter below has:
53009255.jpg
So I guess there is no way to do this ?
 
Can anyone explain how shield sizes in the MS convert into actual shield sizes in the game?

Comparing the numbers, I get the impression that

Game_ShieldHeight = Module_ShieldHeight + Module_ShieldWidth
Game_ShieldWidth = 2 * Module_ShieldWidth

These formulas roughly match, but only roughly - there are still frequent deviations within the 1-2 units range.

Creating a test shield with shield_height(70)|shield_width(60) resulted with shield 119x130 ingame, which also seems to match.

Can anyone please confirm or refute this?
 
Status
Not open for further replies.
Back
Top Bottom