Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I've encountered a problem related to banners with my mod Call of the Kings, I seem to have completely ran out of banners for lords to use, is there a way to bypass this by maybe making lords use their faction banner?
 
How would I go about getting how much the player has of a certain item, for things like consumables - e.g if the player has 13 grain out of 50 - how would I get the 13

I have tried using - (item_get_slot, ":item_amount", ":cur_item", slot_item_amount_available) but it doesnt seem to work

Any help would be much appreciated  :grin:

EDIT: Forget that, got it working, realised that I needed to use troop_inventory_slot_get_item_amount,
 
chlom said:
Is it possible to make a dialogue with more than 2 participants?
Troop + player + another.
Yes. Here's a quote from the topmost part of module_dialogues:
Code:
# 1) Dialogue partner: This should match the person player is talking to.
#    Usually this is a troop-id.
#    You can also use a party-template-id by appending '|party_tpl' to this field.
#    Use the constant 'anyone' if you'd like the line to match anybody.
#    Appending '|plyr' to this field means that the actual line is spoken by the player
#    Appending '|other(troop_id)' means that this line is spoken by a third person on the scene.
#       (You must make sure that this third person is present on the scene)
Next time, read this stuff. It's there for your sake.
 
Thanks for a quick reply, Lumos. I did read. Line was missing. Suspecting the kids have gotten to that file somehow. More stuff was missing to. Fixed now. Again thank you.
 
Hi. I've been working on my own mod.
i have added some items and have been trying to change items user can use playing multi player to the items I added.
But I can't really find out how to change the items I can choose in Multiplayer.
Any guides will be soooooo helpful.
 
troller01 said:
Hi. I've been working on my own mod.
i have added some items and have been trying to change items user can use playing multi player to the items I added.
But I can't really find out how to change the items I can choose in Multiplayer.
Any guides will be soooooo helpful.
There's a tutorial sub-board - if you make use of the search function you might find this thread.
 
Hi I am quite new to modding and was wondering if you guys could help me out :grin:. I have two questions which you can find below, I hope you can help.

1. I understand how to set up a modsys folder and the such for a native mod but I wish to edit Napoleonic wars. I have downloaded the link provided on the modsys downloads page however after following the readme I still don't understand how I can mod with it as It seems very different to the native modsys. Can anyone explain this, please ? / Provide me with a link.

2. Also I was wondering if it while editing a scene there was any way to add pickup-able weapons. As tough you had dropped them ingame. In my case Rifles and Banners/Colours from NW.
 
Is there any reason why the following script would work when called from a game menu but not when it is called in a scene. I can get it to work perfectly from the camp menu but not during a battle

Code:
  ("reduce_item_amount",
   [(store_script_param, ":troop_no", 1),
     (store_script_param, ":item_no", 2),
     (troop_get_inventory_capacity, ":capacity", ":troop_no"),
     (try_for_range, ":i_slot", 0, ":capacity"),
      (troop_get_inventory_slot, ":cur_item", ":troop_no", ":i_slot"),
      (eq, ":cur_item", ":item_no"),
    #  (item_slot_eq, ":cur_item", slot_item_is_checked, 0),
    #  (item_set_slot, ":cur_item", slot_item_is_checked, 1),
      (assign, ":capacity", 0),
      (troop_inventory_slot_get_item_amount, ":cur_amount", ":troop_no", ":i_slot"),
      (val_sub, ":cur_amount", 1),
      (troop_inventory_slot_set_item_amount, ":troop_no", ":i_slot", ":cur_amount"),
    (try_end),
    ]),

I use the following to call it
Code:
(call_script, "script_reduce_item_amount", "trp_player", "itm_new_grain"),
 
Fraser said:
Hi I am quite new to modding and was wondering if you guys could help me out :grin:. I have two questions which you can find below, I hope you can help.

1. I understand how to set up a modsys folder and the such for a native mod but I wish to edit Napoleonic wars. I have downloaded the link provided on the modsys downloads page however after following the readme I still don't understand how I can mod with it as It seems very different to the native modsys. Can anyone explain this, please ? / Provide me with a link.

2. Also I was wondering if it while editing a scene there was any way to add pickup-able weapons. As tough you had dropped them ingame. In my case Rifles and Banners/Colours from NW.

You should follow this for NW.
http://www.fsegames.eu/forum/index.php?topic=11836.0
 
Willhelm said:
Fraser said:
Hi I am quite new to modding and was wondering if you guys could help me out :grin:. I have two questions which you can find below, I hope you can help.

1. I understand how to set up a modsys folder and the such for a native mod but I wish to edit Napoleonic wars. I have downloaded the link provided on the modsys downloads page however after following the readme I still don't understand how I can mod with it as It seems very different to the native modsys. Can anyone explain this, please ? / Provide me with a link.

2. Also I was wondering if it while editing a scene there was any way to add pickup-able weapons. As tough you had dropped them ingame. In my case Rifles and Banners/Colours from NW.

You should follow this for NW.
http://www.fsegames.eu/forum/index.php?topic=11836.0

Thanks very much sir !

With regards to my other question "Can I add scene props such as weapons that can be picked up as tough someone dropped a weapon. ?"
 
La Grandmaster said:
Is there any reason why the following script would work when called from a game menu but not when it is called in a scene. I can get it to work perfectly from the camp menu but not during a battle

Code:
  ("reduce_item_amount",
   [(store_script_param, ":troop_no", 1),
     (store_script_param, ":item_no", 2),
     (troop_get_inventory_capacity, ":capacity", ":troop_no"),
     (try_for_range, ":i_slot", 0, ":capacity"),
      (troop_get_inventory_slot, ":cur_item", ":troop_no", ":i_slot"),
      (eq, ":cur_item", ":item_no"),
    #  (item_slot_eq, ":cur_item", slot_item_is_checked, 0),
    #  (item_set_slot, ":cur_item", slot_item_is_checked, 1),
      (assign, ":capacity", 0),
      (troop_inventory_slot_get_item_amount, ":cur_amount", ":troop_no", ":i_slot"),
      (val_sub, ":cur_amount", 1),
      (troop_inventory_slot_set_item_amount, ":troop_no", ":i_slot", ":cur_amount"),
    (try_end),
    ]),

I use the following to call it
Code:
(call_script, "script_reduce_item_amount", "trp_player", "itm_new_grain"),

After finishing a mission (quit from a scene),  somehow the game resets player troop inventory to the condition before entering the scene. You can count total grain you have at the beginning of the mission, save the value to a global variable, do the stuff to the global, and then after quitting the scene, set the new amount of grain there according to the global.
 
I added this new city and villages into the game, assigned it to a faction and all that but when I load up the mod it appears neutral. Any idea why this is happening.
 
Yea I did, I'll look around to see if I missed something but im sure I didn't.

Edit
Ran the game in admin mode and then it worked fine, weird because other stuff that I added loaded but this specific script didn't.
 
dunde said:
After finishing a mission (quit from a scene),  somehow the game resets player troop inventory to the condition before entering the scene. You can count total grain you have at the beginning of the mission, save the value to a global variable, do the stuff to the global, and then after quitting the scene, set the new amount of grain there according to the global.
It probably has to do with the player's chest and/or ammo consumption. Either do it outside the context of a battle or do some funny business with the player/chest troop references.
 
Status
Not open for further replies.
Back
Top Bottom