OSP Code SP [WFaS] Salt-mine for Fire&Sword

Users who are viewing this thread

This isn't my first tutorial, but i don't know where can i write this topic. I want to take this in unofficial tutorials.
I have some tutorials in turkish. You can look my tutorials from http://forums.taleworlds.com/index.php/topic,219086.0.html

I don't speak english very well but i try to explain coding.
Firtly, open the module_troops.py file and find this;
Code:
  ["salt_mine_merchant", "Barezan","Barezan",                tf_hero|tf_is_merchant, scn_salt_mine|entry(1),0, fac_commoners,        [ ],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c528601ea69b6e46dbdb6],

change with this;
Code:
  ["salt_mine_merchant", "Barezan","Barezan",                tf_hero|tf_is_merchant, scn_salt_mine|entry(1),0, fac_commoners,        [itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt, itm_salt],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c528601ea69b6e46dbdb6],

Explain;
salt_mine_merchant = Merchant ID.
Barezan = His name.
tf_hero = Unkillable.
tf_is_merchant = He is a merchant.
scn_salt_mine_entry(1) = Entry point in scene.
[itm_salt, ...] = His items, which are sold by him.

Yeh, now we write us merchant. Save and Close file. Now we write us mine.

Open module_parties.py file and find this;
Code:
  ("salt_mine", "Salt Mine", icon_village_a|pf_disable|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(99.66, -80.8),[]),

Change with this;
Code:
  ("salt_mine", "Salt Mine", icon_village_a|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(99.66, -80.8),[]),

Explain;
salt_mine = The ID of salt mine.
Salt Mine = The name of salt mine.
icon_village_a = Icon.
pf_is_static = Static.
pf_always_visible = Always visible.
(99.66, -80.:cool: = Coordinates.

Ok, us village is finish. Save and close file and go to next process.

Now we open module_dialogs.py file and find this;
Code:
#Goods Merchants

Add after;
Code:
  #Salt merchant by Porshy.
  [trp_salt_mine_merchant,"start", [], "Hello my {sir/madam}.", "salt_mine_merchant_talk", []],
  [trp_salt_mine_merchant|plyr, "salt_mine_merchant_talk", [], "Hello.", "salt_mine_merchant_talk2", []],
  [trp_salt_mine_merchant,"salt_mine_merchant_talk2", [], "How can i help you?", "salt_mine_merchant_talk3", []],

  #This is trade window.
  [trp_salt_mine_merchant|plyr,"salt_mine_merchant_talk3", [], "I need some salt", "salt_mine_merchant_talk4", []],
  [trp_salt_mine_merchant,"salt_mine_merchant_talk4", [], "Sure, sure... Here, have a look at my stock...", "salt_mine_merchant_talk4_c", [[change_screen_trade]]],
  [trp_salt_mine_merchant,"salt_mine_merchant_talk4_c", [], "Anything else {sir/madam}?", "salt_mine_merchant_talk3", []],

  #This is stupid window :p
  [trp_salt_mine_merchant|plyr,"salt_mine_merchant_talk3", [], "What do you sell here?", "salt_mine_merchant_talk5", []],
  [trp_salt_mine_merchant,"salt_mine_merchant_talk5", [], "We sell only salt here my {sir/madam}.", "salt_mine_merchant_talk6", []],
  [trp_salt_mine_merchant|plyr,"salt_mine_merchant_talk6", [], "Okey.", "salt_mine_merchant_talk6_c", []],
  [trp_salt_mine_merchant,"salt_mine_merchant_talk6_c", [], "Anything else {sir/madam}?", "salt_mine_merchant_talk3", []],

  #This is cancel window :)
  [trp_salt_mine_merchant|plyr,"salt_mine_merchant_talk3", [], "Nothing", "close_window", []],

Now, all of them is ready. Save and close us file and run build_module.bat.

Now we change us language;
open Modules>your module>language>your language folder and find dialogs.csv text document.
Then, add this bottom;
Code:
dlga_start:salt_mine_merchant_talk|Hello my {sir/madam}.
dlga_salt_mine_merchant_talk:salt_mine_merchant_talk2|Hello.
dlga_salt_mine_merchant_talk2:salt_mine_merchant_talk3|How can i help you?
dlga_salt_mine_merchant_talk3:salt_mine_merchant_talk4|I want some salt
dlga_salt_mine_merchant_talk4:salt_mine_merchant_talk4_c|Sure, sure... Here, have a look at my stock...
dlga_salt_mine_merchant_talk4_c:salt_mine_merchant_talk3|Anything else my {sir/madam}?
dlga_salt_mine_merchant_talk3:salt_mine_merchant_talk5|What do you sell here?
dlga_salt_mine_merchant_talk5:salt_mine_merchant_talk6|We sell only salt here my {sir/madam}.
dlga_salt_mine_merchant_talk6:salt_mine_merchant_talk6_c|Okey.
dlga_salt_mine_merchant_talk6_c:salt_mine_merchant_talk3|Anything else my {sir/madam}?
dlga_salt_mine_merchant_talk3:close_window|Nothing.

After download this;
Salt Mine Scenes
and copy scn_salt_mine.sco to modules>your module>SceneObj folder.

now, we finish all. Enjoy it :p
 
But did you port the codes from Warband to WFAS? Or the scenes? Because that's against privacy policies/copyrights of TW
 
Yes i know, but i use only fire&sword codes which is shared by TW. On the other hand, dialog etc. new codes were written by me. So i don't use any Warband codes. But scenes, yes they have polities, but i don't change and i don't share it any other forums. So i think i don't break rules :smile:

I want to say something "fire&sword has scn_salt_mine.sco file :smile:" So i don't take it in warband. I give download link because some people can be delete it :smile: Thanks.
 
Back
Top Bottom