Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
SupaNinjaMan said:
Ty294 said:
This is probably an easy one, but the question would be too long to run through the search...

So I added some new items to the game, and but when I started playing it a while, I noticed the ambient lighting did not apply to that item. Basically, I had created a new glove (renamed mesh and altered texture), but when I was doing a battle at night, the glove was brightly lit as though it was daytime.

I'm guessing this is probably something really easy, but I figured I'd ask so I don't waste a ton of time trying to find it. Is this a line in a shader file somewhere? Or is it just something simple I missed in the file with the meshes itself?

You are probably using a material that has the No Lighting, or Uniform Lighting tags checked.

Sorry, intended to get back on this sooner, but I've been busy and was unable to get to it.

So, where are these tags located? I don't see them in OpenBRF, so either I'm missing the obvious, or they must be defined elsewhere?

EDIT: I seem to have found it. But those options were not checked, so I'm trying to see if I can figure out what else might have caused it.

EDIT2: I figured it out.
 
Hey everyone.

Does anyone know if it is possible to increase the zoom level of the campaign map?
I scaled down all locations to be able to have more in the same areas without it
looking too close to the other places but still it looks way too close to other locations.
 
Hello, I want to add ground blood when player hit to enemy, I added this but not working, help me please.
Code:
ground_blood = (
  0, 0, ti_once, [], [
     
  ],
   ti_on_agent_hit, 0, 0, [], [
   (store_trigger_param, ":agent_pos", 1),
    
      (agent_get_position, pos1, ":agent_pos"),
   (position_set_z_to_ground_level, pos1),
      (set_spawn_position, pos1),
      (spawn_scene_prop, "spr_necturus_blood_5"),
	  (get_player_agent_no, ":player_agent"),
	  (agent_play_sound,":player_agent", "snd_man_warcry"),
   
    
     
 ],
 
Blubby said:
Does anyone know if it is possible to increase the zoom level of the campaign map?

check module.ini
Code:
map_min_elevation = 0.2  #zoom
map_max_elevation = 1.0  #zoom



frozenpainter said:
  ti_on_agent_hit

see how that trigger works. Your code is invalid as it is putting a trigger inside another, and it is also using the wrong parameters

Code:
ti_on_agent_hit               = -28.0 # Agent has been damaged with a weapon attack. Does not fire on client side in multiplayer missions.
    # trigger param 1 = damage inflicted agent_id
    # trigger param 2 = attacker agent_id
    # trigger param 3 = inflicted damage
    # trigger param 4 = hit bone
    # trigger param 5 = item_id of missile used to attack (if attack was with a ranged weapon)
    # reg0            = weapon item_id
    # pos0            = position of the hit area, rotation fields contain the direction of the blow
    # If (set_trigger_result) is used in the code with operation parameter equal or greater than zero, it will override the inflicted damage.
 
@kalarhan
I added look like, working but there is a wrong thing. If ground is inclined ground blood not spawn inclined. Look the screenshot.
Code:
ground_blood = (
  ti_on_agent_hit, 0, 0, [], [
  (store_trigger_param_1, ":agent_pos"),
 #  (store_trigger_param_2, ":attacker_agent_2"),
   (store_trigger_param_3, ":damage_2"), 
	(agent_is_human, ":agent_pos"),
      (agent_get_position, pos1, ":agent_pos"),
   (position_set_z_to_ground_level, pos1),
      (set_spawn_position, pos1),
	  (try_begin),
	  (is_between, ":damage_2", 10,15),
      (spawn_item, "itm_necturus_blood_3"),
	  (else_try),
	  (is_between, ":damage_2", 15,25),
      (spawn_item, "itm_necturus_blood_4"),
	  (else_try),
	  (is_between, ":damage_2", 25,30),
      (spawn_item, "itm_necturus_blood_6"),
	  (else_try),
	  (is_between, ":damage_2", 30,40),
      (spawn_item, "itm_necturus_blood_2"),
	  (else_try),
	  (is_between, ":damage_2", 40,50),
      (spawn_item, "itm_necturus_blood_5"),
	  (else_try),
	  (gt, ":damage_2", 50),
      (spawn_item, "itm_necturus_blood_1"),
	  (get_player_agent_no, ":player_agent"),
	  (agent_play_sound,":player_agent", "snd_man_warcry"),
	  (try_end),
   
  ]
  ,[])
a86123454d880d3dac89f9a2430b7907.png

@edit
screenshot reuploaded.
 
I'm currently working on attaching a prop to an agent. Is it at all possible to rotate the angle of the prop once attached? I realize you can play around with x, y, z, axis, but not sure if say I could rotate the x axis, and thus change the angle of the attached prop. Would appreciate any help,
Thanks!
 
In bold are my added lines of code.

str_26          = bignum | 0x0000001a
str_27          = bignum | 0x0000001b
str_28          = bignum | 0x0000001c
str_29          = bignum | 0x0000001d
str_30          = bignum | 0x0000001e
str_31          = bignum | 0x0000001f
str_32          = bignum | 0x0000001g
str_33          = bignum | 0x0000001h
 
that is not how hex numbers work, and now you can see the max value, as the mask is reserved for the next group of STAT

hex numbers https://en.wikipedia.org/wiki/Hexadecimal

if you try to add str_32, as a example, that would conflict with agi_1

you can do this on the game via scripts tho, by using
Code:
store_attribute_level                    = 2172  # (store_attribute_level, <destination>, <troop_id>, <attribute_id>),
                                                 # Stores current value of troop attribute. See ca_* constants in header_troops.py for reference.
troop_raise_attribute                    = 1520  # (troop_raise_attribute, <troop_id>, <attribute_id>, <value>),
                                                 # Increases troop attribute by the specified amount. See ca_* constants in header_troops.py for reference. Use negative values to reduce attributes. When used on non-hero troop, will affect all instances of that troop.

 
In addition to things that were said above - even if you properly increase the max strength number using the correct hex values the game won't let you increase your attribute above 63 using the conventional method.

Just if anyone else is wondering.
 
frozenpainter said:
@kalarhan
I added look like, working but there is a wrong thing. If ground is inclined ground blood not spawn inclined. Look the screenshot.
Code:
ground_blood = (
  ti_on_agent_hit, 0, 0, [], [
  (store_trigger_param_1, ":agent_pos"),
 #  (store_trigger_param_2, ":attacker_agent_2"),
   (store_trigger_param_3, ":damage_2"), 
	(agent_is_human, ":agent_pos"),
      (agent_get_position, pos1, ":agent_pos"),
   (position_set_z_to_ground_level, pos1),
      (set_spawn_position, pos1),
	  (try_begin),
	  (is_between, ":damage_2", 10,15),
      (spawn_item, "itm_necturus_blood_3"),
	  (else_try),
	  (is_between, ":damage_2", 15,25),
      (spawn_item, "itm_necturus_blood_4"),
	  (else_try),
	  (is_between, ":damage_2", 25,30),
      (spawn_item, "itm_necturus_blood_6"),
	  (else_try),
	  (is_between, ":damage_2", 30,40),
      (spawn_item, "itm_necturus_blood_2"),
	  (else_try),
	  (is_between, ":damage_2", 40,50),
      (spawn_item, "itm_necturus_blood_5"),
	  (else_try),
	  (gt, ":damage_2", 50),
      (spawn_item, "itm_necturus_blood_1"),
	  (get_player_agent_no, ":player_agent"),
	  (agent_play_sound,":player_agent", "snd_man_warcry"),
	  (try_end),
   
  ]
  ,[])
a86123454d880d3dac89f9a2430b7907.png

@edit
screenshot reuploaded.
 
#Reposting This

I'm currently working on attaching a prop to an agent. Is it at all possible to rotate the angle of the prop once attached? I realize you can play around with x, y, z, axis, but not sure if say I could rotate the x axis, and thus change the angle of the attached prop. Would appreciate any help,
Thanks!
 
kalarhan said:
check module.ini


Code:
map_min_elevation = 0.2  #zoom
map_max_elevation = 1.0  #zoom

Thank you for your answer and sorry for my delayed response.

I had to add these lines to my module.ini that must have been the
reason why I could not find anything related to the zoom levels.
So thank you again.
 
Okay, I just found something weird in vanilla Warband and I need advice from experienced people.

I did a search for this:
      ":faction_leader",
in the module system files. You know, to find out all the ways the AI king can lose/gain relationship with his vassals. And guess what: there was no mention of feasts anywhere! This means that AI kings do NOT gain relation with vassals when they throw a feast. This mechanic does nothing for them. Kings can only LOSE relation with everybody (except for the occasional +10 when they award a lord with a fief) until they are hated by everyone.

Can someone confirm? Am I maybe missing something and AI kings in fact do gain relation from feasts and I just overlooked it?

edit: false alarm, I looked through the files again and managed to find it:

Code:
(call_script, "script_troop_change_relation_with_troop", ":feast_host", ":troop_no", ":relation_booster"),
 
aleeque said:
":faction_leader"

that is just a variable name. As different pieces of code where created by different developers, you shouldnt expect them to follow a convention for naming. It is worth a try, but it will probably be full of exceptions lol
 
I am stuck in somewhere in sea_ai_3 script. Which gives errors in red colors. It causes these:

http://prntscr.com/my12pn

http://prntscr.com/my13ih

Code:
(else_try),
            #scenario 2: ai_object on land
            (neq, ":ai_object", -1),
            (neq, ":ai_behavior", ai_bhvr_hold),
            (neq, ":ai_behavior", ai_bhvr_patrol_location),
            (neq, ":ai_behavior", ai_bhvr_travel_to_point),
            (party_slot_eq, ":ai_object", slot_party_on_water, 0),
            (assign, ":block", 0),
            (call_script, "script_get_closest_port", ":ai_object"),
            (party_get_slot, ":port_party", reg0, slot_party_port_party),
          (else_try),
            #scenario x: parties who shouldn't be on the sea
            #(this_or_next|is_between, ":party_template_id", "pt_looters",
            #"pt_merchant_caravan"),
            (this_or_next | is_between, ":party_template_id", "pt_looters", "pt_deserters"),  #Deserters are now allowed to go on sea since they have a AI now
            (eq, ":party_template_id", "pt_routed_warriors"),
            (assign, ":block", 0),
            (call_script, "script_get_closest_port", ":party_no"),
            (party_get_slot, ":port_party", reg0, slot_party_port_party),

These are the parts which game throws error. party_get_slot doesnt work as it needs to be. I am still trying to port VC sea travel system to my mod  :facepalm: I think I have already ported the necessary parts but it seems I have done sth wrong. And I don't know what it is. What should I do? check the codes in both of MS'?

script_get_closest_port assigns reg0 the jetties. But ":port_party" seems to be undefined. I'll check in to this. I am open to any suggestions on this. It is so annoying.  :meh:
 
Status
Not open for further replies.
Back
Top Bottom