Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Um, I checked that the textures were there, and they are. 

When I open up the brfs that use it, it says "Environment" and then "earthenmapv"

A search of Warband showed up two textures named earthenmapv and earthenmapv_b or something like that. 

Search isn't working for me atm, but a minute ago I found some posts in the forge talking about it being the shader used to simulate High Dynamic Range...

Guess I'll just reinstall Warband. 
 
Try copying the WB shader directly, and just changing the names of textures around.

In fact, I never try to build my own material. I just look for the nearest Native armor or piece of wall or helmet and copy the material it uses. Not only does it save buckets of experimental time, but I never ever have material related bugs.
 
Well, a reinstall of Warband, and removing the shaders fixed it.

And I think the problem was they were originally created for a 1.011 mod, but when we decided to port to Warband, we just used the same resources.  They worked with version 1.113 though.  :???:
 
Since you already talking about shaders, I saw option in openBRF export/import shader. So is it possible to import shaders from 1.011 to wb and reverse?
 
Can anyone knowledgable in scripting confirm whether this is the correct thing to do:

I have put the option to build a market in the towns and I want the markets to deliver an extra 250 denars a week through stall rents. I have added the constant, put the option in game menu and wrote the improvement details in scripts. Finally I have:

# Accumulate taxes

(24 * 7,
[
      (try_for_range, ":center_no", centers_begin, centers_end),
        (party_get_slot, ":accumulated_rents", ":center_no", slot_center_accumulated_rents),
        (assign, ":cur_rents", 0),
        (try_begin),
          (party_slot_eq, ":center_no", slot_party_type, spt_village),
          (try_begin),
            (party_slot_eq, ":center_no", slot_village_state, svs_normal),
            (assign, ":cur_rents", 500),
          (try_end),
        (else_try),
          (party_slot_eq, ":center_no", slot_party_type, spt_castle),
          (assign, ":cur_rents", 250),
        (else_try),
          (party_slot_eq, ":center_no", slot_party_type, spt_town),
          (assign, ":cur_rents", 1000),
        (try_end),
      (try_begin),
      (party_slot_eq, ":center_no", slot_center_has_market, 1),
      (assign, ":cur_rents", 250),
      (try_end),

        (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity),
        (store_add, ":multiplier", 10, ":prosperity"),
        (val_mul, ":cur_rents", ":multiplier"),
        (val_div, ":cur_rents", 110),#Prosperity of 100 gives the default values
        (val_add, ":accumulated_rents", ":cur_rents"),
        (party_set_slot, ":center_no", slot_center_accumulated_rents, ":accumulated_rents"),
      (try_end),


The part in bold is all I added to the accumulate rents trigger. Will that lead to the desired effect. I am unable to test at the moment and am wondering if my approach is correct?
 
Your approach is incorrect- consult header_operations.py for a full list of functions.
If you want an extra 250 denars per week, you want to (val_add, ":cur_rents", 250), not assign it. Anyways, to make it more efficient (since your market is in towns), put the check under the check in towns so there's no need to check other types of centers. Basically you want to move the (try_end), before your code to after, and change the assign to val_add. Also, try to indent your code properly.
 
A market? That's a very good idea. Does it also have an effect on the town prosperity? :smile:



Unrelated; a heads-up rather than a question;  many folk have had problems with the Warband Resource .brf type and  many people have had problems of the game simply not starting if you have meshes with 0 flags. If you save as Warband Resource you have to make sure everything has the 'standard' 30000 (or 30001 as used by buildings, it seems) flags, but if you save as M&B Resource it can work with 0 flags. But that might have been found out already.
 
FrisianDude said:
A market? That's a very good idea. Does it also have an effect on the town prosperity? :smile:

Yes I want it to add +5 every month. I guess I will copy the trigger from the schools one in simple triggers and change it a bit but I notice that the schools one doesn't specify that it is a school which is weird.

Native schools trigger

(30 * 24,
  [(try_for_range, ":cur_village", villages_begin, villages_end),
      (party_slot_eq, ":cur_village", slot_town_lord, "trp_player"),
      (party_get_slot, ":cur_relation", ":cur_village", slot_center_player_relation),
      (val_add, ":cur_relation", 1),
      (val_min, ":cur_relation", 100),
      (party_set_slot, ":cur_village", slot_center_player_relation, ":cur_relation"),
    (try_end),
    ]),

I am guessing that the correct coding is this

(30 * 24,
  [(try_for_range, ":cur_town", towns_begin, towns_end),
      (party_slot_eq, ":cur_town", slot_town_lord, "trp_player"),
      (party_slot_eq, ":town_no", slot_center_has_market, 1),
      (call_script, "script_change_center_prosperity", ":center_no", 5),
    (try_end),
    ]),


Does that look right? I am wondering whether it should be "walled_center" rather than towns in the try for range bit.

Cheers
 
SupaNinjaMan said:
How would I code a new weapon to use the no weapon boxing animations?

Also, Nameless, it looks right, have you tested it yet?

I am not at home atm to test (I can only code on my laptop rather than play as my graphics/fps suck compare to my pc) but I will be tomorrow.

I would like to know the answer to your question as well as I always thought a big spike coming out of a mail gauntlet would make an excellent weapon with the punch animation.

 
There's no way to set it based on the item flags and what not. You'd have to either set it as a weapon which gets the attack direction (agent_get_attack_direction, agent_get_action_dir), and then force plays the xxx_fist animations (agent_set_animation+progress), or a gauntlet item that deals damage to the agent the player is boxing via distance check or whatever. Either that, or you can modify module_animations, copying the stuff to a thrust animation or whatever. This is all speculation btw.

As for the school/market, the code is actually
Code:
(try_for_range, ":cur_village", villages_begin, villages_end),
      (party_slot_eq, ":cur_village", slot_town_lord, "trp_player"),
	  (party_slot_eq, ":cur_village", slot_center_has_school, 1),
      (party_get_slot, ":cur_relation", ":cur_village", slot_center_player_relation),
      (val_add, ":cur_relation", 1),
      (val_min, ":cur_relation", 100),
      (party_set_slot, ":cur_village", slot_center_player_relation, ":cur_relation"),
    (try_end),
Also, walled_centers_begin = towns_begin.
 
Ok, what is Havoc doing wrong?

I made a new type of cannon, which works kind of like the bow and therefore I need a vertex-animation. So I imported my mesh into openBRF and then used the import vertex frame to give it the next frame/mesh. But when I play the annimation, the second mesh is all distorted and broken. But the first mesh is fine, what is the issue? Am I missing something really simple? This is my first vertex mesh and i'm just doing what I think is correct. If need be i'll upload some images.

Cheers.
 
Somebody said:
As for the school/market, the code is actually
Code:
(try_for_range, ":cur_village", villages_begin, villages_end),
      (party_slot_eq, ":cur_village", slot_town_lord, "trp_player"),
	  (party_slot_eq, ":cur_village", slot_center_has_school, 1),
      (party_get_slot, ":cur_relation", ":cur_village", slot_center_player_relation),
      (val_add, ":cur_relation", 1),
      (val_min, ":cur_relation", 100),
      (party_set_slot, ":cur_village", slot_center_player_relation, ":cur_relation"),
    (try_end),
Also, walled_centers_begin = towns_begin.

Cheers somebody, for some reason it was missing that line.

This is the script I went with for the market and it compiled fine, I just have to see if it will work

(30 * 24,
  [(try_for_range, ":cur_town", walled_centers_begin, walled_centers_end),
      (party_slot_eq, ":cur_town", slot_town_lord, "trp_player"),
      (party_slot_eq, ":cur_town", slot_center_has_market, 1),
      (call_script, "script_change_center_prosperity", ":cur_town", 5),
    (try_end),
    ]),


I want to test it out but I have no saved game on the mod and my laptop is so rubbish that whilst I can play it a little I know that if I try and seige a town it will crash instantly. Is there anyway a can quickcheat a way into getting a town without having to fight a battle so I can test to see if it has worked?
 
Status
Not open for further replies.
Back
Top Bottom