Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I made a sword using alpha transparency but I have an issue : during a slashing movement, the model vanishes until the end of the animation.
The thrusting animation works fine.

I tried to use no alpha on the texture but it had no effect. Has anyone encountered the same issue ?
 
pete99 said:
if not is there some way to actually give an AI agent the order to say mount a horse?

That is already part of the menu IIRC (long time since I played Native lol), you have order to mount and dismount. So yes, you can also do it with code. You give a order to a division, so if you want to control the agents just move them around divisions.

to see all you can do with AI combat just check Lav's modsys agent section on header_operations.py and the mission template triggers on header_triggers.py. You will see how flexible the entire system is.
 
hello everyone,

I have a question, so I'm working on scenes, villages at the moment and I have in some scenes farms where either crops or fruits are planted and sometimes both. I want to add like some NPCs villagers who will farm and stuff like that.
I have the animations ready but the problem is I don't know how to add these villagers to the scenes nor how to assign the animations for them like how its done in most mods, for example, Nova Aetas and Game of Thrones Mod.

I tried to search for a tutorial on how I can do that but I found nothing maybe there isn't? or I'm looking in the wrong way?
thank you for your help!
 
imado552 said:
I tried to search for a tutorial on how I can do that but I found nothing maybe there isn't? or I'm looking in the wrong way?

a good reference point would be the tavern animation OSP. You can also check how VC uses props to spawn villagers to work the fields, etc.
 
kalarhan said:
imado552 said:
I tried to search for a tutorial on how I can do that but I found nothing maybe there isn't? or I'm looking in the wrong way?

a good reference point would be the tavern animation OSP. You can also check how VC uses props to spawn villagers to work the fields, etc.
thanks!
even though after a few mistakes... I won't lie some....well screw it a lot of mistakes that I almost lost my hair from pulling! I managed to get a grip so far, used VC as a reference and now I can place new villagers and such now I'm planning to learn how to do the animation part and for sure I'm gonna use Tavern animation OSP for reference!

thank you Kalarhan, for always being here to help out!
 
Hi




I would like to follow the manhunters as we follow a lord of our faction.
Adding the option "Accompany" over them, on the world map.





Does it possible?
If yes, please tell me whose file I must modify.



Code:
     #script_game_context_menu_get_buttons:
    # This script is called from the game engine when the player clicks the right mouse button over a party on the map.
    # INPUT: arg1 = party_no
    # OUTPUT: none, fills the menu buttons
    ("game_context_menu_get_buttons",
      [
        (store_script_param, ":party_no", 1),
        (try_begin),
          (neq, ":party_no", "p_main_party"),
          (context_menu_add_item, "@Move here", cmenu_move),
		  (assign, "$g_camp_mode", 1),
        (try_end),
        
		 (try_begin),
		   (is_between, ":party_no", centers_begin, centers_end),
		   (context_menu_add_item, "@View notes", 1),
		 (else_try),
		   (party_get_num_companion_stacks, ":num_stacks", ":party_no"),
		   (gt, ":num_stacks", 0),
		   (party_stack_get_troop_id, ":troop_no", ":party_no", 0),
		   ##diplomacy start+ support for promoted kingdom ladies
		   (is_between, ":troop_no", heroes_begin, heroes_end),
		   (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
		   ##diplomacy end+
		   (is_between, ":troop_no", active_npcs_begin, active_npcs_end),
		   (context_menu_add_item, "@View notes", 2),
		 (try_end),
        
        (try_begin),
          (neq, ":party_no", "p_main_party"),
          (store_faction_of_party, ":party_faction", ":party_no"),
          
          (this_or_next|eq, ":party_faction", "$players_kingdom"),
          (this_or_next|eq, ":party_faction", "fac_player_supporters_faction"),
          (party_slot_eq, ":party_no", slot_party_type, spt_kingdom_caravan),
          
          (neg|is_between, ":party_no", centers_begin, centers_end),
          
          (context_menu_add_item, "@Accompany", cmenu_follow),
        (try_end),
    ]),
 

Edit:

Ok, I found the solution:



I had add this line of code
Code:
  (this_or_next|eq, ":party_faction", "fac_manhunters"), 

before
Code:
"(party_slot_eq, ":party_no", slot_party_type, spt_kingdom_caravan),"

Now, I can easy follow manhunters to found bandit, looters and sea raiders to kill all of them to get money a lot !!  :iamamoron:

Thank you.

Note:
it work fine but...
The file script.txt is create in the same folder than the file "compile_floris_expanded_source_to_custom_directory".

   
       
Any idea?
 
Reyne said:
I made a sword using alpha transparency but I have an issue : during a slashing movement, the model vanishes until the end of the animation.
The thrusting animation works fine.

I tried to use no alpha on the texture but it had no effect. Has anyone encountered the same issue ?
Add itp_no_blur to the flags of that item.
 
imado552 said:
I managed to get a grip so far, used VC as a reference and now I can place new villagers and such now I'm planning to learn how to do the animation part

as a example you can start from the animations in VC

Code:
###SP scene animations
 ["sitting", acf_enforce_all, amf_priority_continue|amf_play,
	[24.0, "sitting", 0, 40, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_drinking", acf_enforce_all, amf_priority_continue|amf_play,
	[20.0, "sitting_drinking", 0, 30, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_eating", acf_enforce_all, amf_priority_continue|amf_play,
	[2.5, "sitting_eating", 0, 15, arf_use_stand_progress|arf_cyclic],
 ],
###village
 ["sitting_working_1", acf_enforce_all, amf_priority_continue|amf_play,
	[3, "sitting_working_1", 0, 14, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_working_2", acf_enforce_all, amf_priority_continue|amf_play,
	[1.2, "sitting_working_2", 0, 12, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_working_3", acf_enforce_all, amf_priority_continue|amf_play,
	[1, "sitting_working_3", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_fishing", acf_enforce_all, amf_priority_continue|amf_play,
	[2.5, "sitting_fishing", 0, 8, arf_use_stand_progress|arf_cyclic],
 ],
###
 ["sitting_child_1", acf_enforce_all, amf_priority_continue|amf_play,
	[2.0, "sitting_child_1", 0, 8, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_sharpening_1", acf_enforce_all, amf_priority_continue|amf_play,
	[1.5, "sitting_sharpening_1", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
###
 ["sitting_reading", acf_enforce_all, amf_priority_continue|amf_play,
	[14, "sitting_reading", 0, 22, arf_use_stand_progress|arf_cyclic],
 ],
 ["woodcutting_2", acf_enforce_all, amf_priority_continue|amf_play,
	[1, "woodcutting_2", 0, 15, arf_use_stand_progress|arf_cyclic],
 ],
 ["brooming", acf_enforce_all, amf_priority_continue|amf_play,
	[1.6, "brooming", 0, 36, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_1", acf_enforce_all, amf_priority_continue|amf_play,
	[1.3, "field_working_1", 1, 7, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_2", acf_enforce_all, amf_priority_continue|amf_play,
	[2, "field_working_2", 0, 5, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_3", acf_enforce_all, amf_priority_continue|amf_play,
	[2.3, "field_working_3", 0, 5, arf_use_stand_progress|arf_cyclic],
 ],
 ["grinding", acf_enforce_all, amf_priority_continue|amf_play,
	[1.2, "grinding", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
 ["smithing", acf_enforce_all, amf_priority_continue|amf_play,
	[0.75, "smithing", 0, 9, arf_use_stand_progress|arf_cyclic],
 ],

then check the triggers (mission templates) and scripts and how they are used

script
Code:
  ###############
  ###Singleplayer
  ("cf_prop_spawn_agent", [

remember that the animations themselves are not open source, but you can use the code as reference.
 
Dj_FRedy said:
@lolitablue, open info.py inside the folder "Module info", there you can create your own directories, just follow the examples.

Thank you for your answer but sorry it's not my problem. My path dirctories is good...

Edit.... I'm so stupid!

Well, A few days ago, I made a copy of the script.py file in script.txt I forgot to delete it ... and it remained among the files * .py the compiler took into account in creating a script.txt file but empty.
I deleted the script.txt file (intruder) and everything works fine now.

Sorry to disturb you!
 
kalarhan said:
imado552 said:
I managed to get a grip so far, used VC as a reference and now I can place new villagers and such now I'm planning to learn how to do the animation part

as a example you can start from the animations in VC

Code:
###SP scene animations
 ["sitting", acf_enforce_all, amf_priority_continue|amf_play,
	[24.0, "sitting", 0, 40, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_drinking", acf_enforce_all, amf_priority_continue|amf_play,
	[20.0, "sitting_drinking", 0, 30, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_eating", acf_enforce_all, amf_priority_continue|amf_play,
	[2.5, "sitting_eating", 0, 15, arf_use_stand_progress|arf_cyclic],
 ],
###village
 ["sitting_working_1", acf_enforce_all, amf_priority_continue|amf_play,
	[3, "sitting_working_1", 0, 14, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_working_2", acf_enforce_all, amf_priority_continue|amf_play,
	[1.2, "sitting_working_2", 0, 12, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_working_3", acf_enforce_all, amf_priority_continue|amf_play,
	[1, "sitting_working_3", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_fishing", acf_enforce_all, amf_priority_continue|amf_play,
	[2.5, "sitting_fishing", 0, 8, arf_use_stand_progress|arf_cyclic],
 ],
###
 ["sitting_child_1", acf_enforce_all, amf_priority_continue|amf_play,
	[2.0, "sitting_child_1", 0, 8, arf_use_stand_progress|arf_cyclic],
 ],
 ["sitting_sharpening_1", acf_enforce_all, amf_priority_continue|amf_play,
	[1.5, "sitting_sharpening_1", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
###
 ["sitting_reading", acf_enforce_all, amf_priority_continue|amf_play,
	[14, "sitting_reading", 0, 22, arf_use_stand_progress|arf_cyclic],
 ],
 ["woodcutting_2", acf_enforce_all, amf_priority_continue|amf_play,
	[1, "woodcutting_2", 0, 15, arf_use_stand_progress|arf_cyclic],
 ],
 ["brooming", acf_enforce_all, amf_priority_continue|amf_play,
	[1.6, "brooming", 0, 36, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_1", acf_enforce_all, amf_priority_continue|amf_play,
	[1.3, "field_working_1", 1, 7, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_2", acf_enforce_all, amf_priority_continue|amf_play,
	[2, "field_working_2", 0, 5, arf_use_stand_progress|arf_cyclic],
 ],
 ["field_working_3", acf_enforce_all, amf_priority_continue|amf_play,
	[2.3, "field_working_3", 0, 5, arf_use_stand_progress|arf_cyclic],
 ],
 ["grinding", acf_enforce_all, amf_priority_continue|amf_play,
	[1.2, "grinding", 0, 4, arf_use_stand_progress|arf_cyclic],
 ],
 ["smithing", acf_enforce_all, amf_priority_continue|amf_play,
	[0.75, "smithing", 0, 9, arf_use_stand_progress|arf_cyclic],
 ],

then check the triggers (mission templates) and scripts and how they are used

script
Code:
  ###############
  ###Singleplayer
  ("cf_prop_spawn_agent", [

remember that the animations themselves are not open source, but you can use the code as reference.
thank you!
I managed so far to like spawn villagers with their animations used tavern animations OSP, and some free copyrighted animations I found them on the net.
The problem is, as far as I know, is they will turn to me when I walk near them which will break their animation, I have like to talk to them before the animation will restart, and go away. And if I get near them again the same thing happen, why?
here are some screenies
J8htgHO.png
B9fiqSB.png

as you can see in both pics above, they have their correct animations when testing the scene but when trying in it in singleplayer villages) the problem of above happens.

help for that would be great!
 
imado552 said:
as you can see in both pics above, they have their correct animations when testing the scene but when trying in it in singleplayer villages) the problem of above happens.

have you blocked interaction with the player?

from VC script
Code:
      (agent_set_stand_animation,":agent",":anim"),
      (agent_set_animation,":agent",":anim"),
      (assign,":end",1),
      (convert_to_fixed_point,":end"),
      (store_random_in_range,":progress",0,":end"),
      (agent_set_animation_progress,":agent",":progress"),
      (agent_ai_set_interact_with_player,":agent",0),
 
kalarhan said:
imado552 said:
as you can see in both pics above, they have their correct animations when testing the scene but when trying in it in singleplayer villages) the problem of above happens.

have you blocked interaction with the player?

from VC script
Code:
      (agent_set_stand_animation,":agent",":anim"),
      (agent_set_animation,":agent",":anim"),
      (assign,":end",1),
      (convert_to_fixed_point,":end"),
      (store_random_in_range,":progress",0,":end"),
      (agent_set_animation_progress,":agent",":progress"),
      (agent_ai_set_interact_with_player,":agent",0),
no, I didn't because I wanted the player to be able to interact with them the same as the other villagers
so does this mean without blocking the interaction between them they won't sit still and play their animation and this problem will not be fixed? or is there another way?
 
imado552 said:
or is there another way?

you would need to detect that the player is close to the npc, change the animation to a normal one (like standing) and let them be a normal NPC. Then later make them go back to work. The game doesnt know that you want to transition from a fake position (sitting, working, etc) to a dialog position (waiting ... waiting...).

remember that when you do something that is not part of the base game that you are responsible for all the details.
 
kalarhan said:
imado552 said:
or is there another way?

you would need to detect that the player is close to the npc, change the animation to a normal one (like standing) and let them be a normal NPC. Then later make them go back to work. The game doesnt know that you want to transition from a fake position (sitting, working, etc) to a dialog position (waiting ... waiting...).

remember that when you do something that is not part of the base game that you are responsible for all the details.
thanks, I'll try to find how it works,
well if I can't make it, I guess I have another way to populate the scenes hahaha
 
_Sebastian_ said:
Reyne said:
I made a sword using alpha transparency but I have an issue : during a slashing movement, the model vanishes until the end of the animation.
The thrusting animation works fine.

I tried to use no alpha on the texture but it had no effect. Has anyone encountered the same issue ?
Add itp_no_blur to the flags of that item.
That's it ! Thanks
 
How do i convert a value to a string?

Code:
      ("pre_join_help_attackers",[
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (str_store_string, s4, ":attacker_relation"),
          ],
           "Move in to help the {s2}. [Relation: {s4}]",[
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),
I'm trying to make the game display the relation of the player to the party here but it doesn't seem to be working.
 
Where would you go to change what footstep sound is used when? I don't want to have to actually replace the sounds in the sound files, but instead am interested in changing which sound from the sound file they use when walking.
Thanks,
 
Status
Not open for further replies.
Back
Top Bottom