Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Lumos said:
Anyways, another Q: Can someone give me a bit of heads-up on the teams used in battle? Are there any fixed values to these teams, like 0 for the player & co, 1 for enemies and 2 for allied armies, or something?
In SP, up to 3 teams are used in battle: 0, 1, and either 2 or 3 if the player has an ally party that is not under the player's command.
The ally team will be the player team (0 or 1) + 2

Defender teams are 0 & 2
Attacker teams are 1 & 3

The player team will always be team 0 or 1.
 
There seems to be a multiplayer troop limit. I looked up the earlier question on this same thread and I don't know why he was limited to a smaller number of troop types, however, I've tested it and it seems to be 16 for faction 1 at least. I edited out some troops temporarily to see if the newer troops were causing the error, but no. It has to do with the number of troop types.

Is there a way to bypass this? When I go over this limit, I can click on the text of the unit (it shows up) and changes color when cursor is over it, but it doesn't allow me to go to the inventory screen.
 
Code:
multi_data_troop_button_indices_end = multi_data_troop_button_indices_begin + 16 #maximum 16 troops per faction
multi_data_item_button_indices_begin = multi_data_troop_button_indices_end
 
Somebody said:
Code:
multi_data_troop_button_indices_end = multi_data_troop_button_indices_begin + 16 #maximum 16 troops per faction
multi_data_item_button_indices_begin = multi_data_troop_button_indices_end

Thank you so much. I didn't know I had to use header files. Well, at least this is one more roadblock passed.  :grin: I'll go check them out again if I have some more problems.
 
But is there any way to increase the number of bots that can be used in a server, like beyond 200? I really couldn't find anything on search.  :???:
 
izaktj said:
izaktj said:
How is the reticle size calculated for javelins?
I basically created a new javelin and the reticle is huge. I tried adding 500 pts to throwable weapons, and 10 to power throw yet nothing.
anyone?
You can reduce the reticle size by raising the accuracy and by lowering the damage.
You have to do it in module_items on your javelin item... set the accuracy to whatever you want.
Code:
|accuracy(100)
 
I need dual wielding for certain characters in my mod and wondered if there is a known way of doing this, can it be done?
 
I want to make a villager have a horse but when I enter the scene he is not riding his horse. I gave him a hunter and in his code he has tf_mounted and tf_guarantee_mounted. Why wont he ride his horse in the village? Do I need to give him some riding skills or do I need to edit mission_templates?
 
Good evening.
I'm currently trying to change the death count script.

What I want is this...
If the player kills a horse with an enemy agent on it, then the kill should be count as a normal kill.

My problem is that the counter also adds a kill, if the player kills a horse without a rider on it.
I tried many things to fix this, but the problem is still there.

Maybe someone knows a solution for this :?:
Code:
  #script_add_kill_death_counts
  # INPUT: arg1 = killer_agent_no, arg2 = dead_agent_no
  # OUTPUT: none
  ("add_kill_death_counts",
   [
      (store_script_param, ":killer_agent_no", 1),
      (store_script_param, ":dead_agent_no", 2),
      
      (try_begin),
        (ge, ":killer_agent_no", 0),
        (agent_get_team, ":killer_agent_team", ":killer_agent_no"),
      (else_try),
        (assign, ":killer_agent_team", -1),
      (try_end),

      (try_begin),
        (ge, ":dead_agent_no", 0),
        (agent_get_team, ":dead_agent_team", ":dead_agent_no"),
      (else_try),
        (assign, ":dead_agent_team", -1),
      (try_end),
      
      #adjusting kill counts of players/bots
      (try_begin), 
        (try_begin), 
          (ge, ":killer_agent_no", 0),
          (ge, ":dead_agent_no", 0),
          (agent_is_human, ":killer_agent_no"),
###          (agent_is_human, ":dead_agent_no"),
          (neq, ":killer_agent_no", ":dead_agent_no"),
          
          (this_or_next|neq, ":killer_agent_team", ":dead_agent_team"),
          (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_deathmatch),
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_duel),
          
          (agent_get_player_id, ":killer_agent_player", ":killer_agent_no"),
          (try_begin),
            (agent_is_non_player, ":killer_agent_no"), #if killer agent is bot then increase bot kill counts of killer agent's team by one. 
### MOD begin ###
            (agent_is_human, ":dead_agent_no"),
### MOD end ###
            (agent_get_team, ":killer_agent_team", ":killer_agent_no"),
            (team_get_bot_kill_count, ":killer_agent_team_bot_kill_count", ":killer_agent_team"),
            (val_add, ":killer_agent_team_bot_kill_count", 1),
            (team_set_bot_kill_count, ":killer_agent_team", ":killer_agent_team_bot_kill_count"),            
          (else_try), #if killer agent is not bot then increase kill counts of killer agent's player by one.
            (player_is_active, ":killer_agent_player"),
            (player_get_kill_count, ":killer_agent_player_kill_count", ":killer_agent_player"),
### MOD begin ###
            (try_begin),
              (try_begin),
                (agent_is_human, ":dead_agent_no"),
              (else_try),
                (agent_get_rider,":rider", ":dead_agent_no"),
                (gt, ":rider", 0),
              (try_end),
              (val_add, ":killer_agent_player_kill_count", 1),
            (try_end),
            (player_set_kill_count, ":killer_agent_player", ":killer_agent_player_kill_count"),
          (try_end),
### MOD end ###
        (try_end),
...
...
...
 
Status
Not open for further replies.
Back
Top Bottom