SP Tutorial Module System Make your own Companions

Users who are viewing this thread

Ok I am having difficulty with this. I followed the steps filling in everything but inly changing the name in part 1 (meaning it still looks like klethi) When I run the .bat file i get a whole bunch of errors in various places saying TypeError: 'str' object is not callable
What does that mean?
 
Tirok said:
Ok I am having difficulty with this. I followed the steps filling in everything but inly changing the name in part 1 (meaning it still looks like klethi) When I run the .bat file i get a whole bunch of errors in various places saying TypeError: 'str' object is not callable
What does that mean?
Likely you are missing a comma somewhere right before the place you are getting the error.
There is a listing/decoding of other compiler errors here.
 
Ok I got it fixed thanks. Although i now have a new problem. The scripts are messed up. When i talk to someone they say the correct first line, but the lines after it are lines that belong to other characters in a seemingly random order. What would be the cause of this?
 
Most likely highlight it, press crtl c, then crtl v at the location you want it. Then change all of the lines that look this this \ to this /
It would help if your more clear about what you wish to copy.
 
Do you HAVE to have a default know warrior/trader/tracker?

I was trying to make some level 1 companions custom tailored with the proper number of skill points, I didn't want the inventory management so I deleted the field and tried to manually set 15 skill points worth of stuff but it defaulted the skills I set to 10.
 
ForceRecon569 said:
how do u copy the file path  :oops: :oops:

You can right click the top navigation bar of your folder and select copy as text but you still have to change the slashes after pasting.
 
Thank you very much for the tutorial! I just made 13 new companions for myself, very good job explaining this!

I don't know about you, but python is weird.

Example: After the first try i made a few errors, forgot to put commas after the new companions lines in strings.py and to change 'newtitle' to the title i wanted. After i ran build_module.bat and got some weird errors that i ignored. This is what actually happened in-game: My character magically got 26 xp levels in the character creation screen and instead of the merchant that appears after you kill the first bandit i got attacked by a naked arena fighter and got stuck in that area....
:shock:  :shock:    :shock:
After searching the forum for answers i managed to correct my errors and everything works just fine :smile:

Now, to my point:
Instead of editing a companions face, items, level, proficiency's and skills in module_troops.py you can leave them how they are (face codes need to be for corresponding to gender though) and edit them later via the TroopEditor.

This way is much more faster, more user-friendly and less likely to miss/delete/mess something up.
 
Python is sooo hard to use , can't I just use text to add companions / new lord / ladies?
Because Python doesn't work in my mod .............don't know why , is there anyway to do it?
Like companion do I just copy npc 1 intro and go to the bottom and paste npc 17 the new one adn do it with other conversation?
I am super confuse and need help , is it only python can do it???????? No other ways?  :neutral:
 
Alex Dragon said:
is it only python can do it???????? No other ways?
No other ways. Adding troops will shift the number of troops present in the file. Since troops are referred to in the game by the order they are in the troops file, this will cause many problems. (If you add a troop after npc16, for instance, the game will think your new troop is the first King in the game...not another companion.) The only way to avoid those problems is to re-create the .txt files the game runs on...which you do by editing the Module System and compiling a new module.
 
Alex Dragon said:
Python is sooo hard to use , can't I just use text to add companions / new lord / ladies?
Because Python doesn't work in my mod .............don't know why , is there anyway to do it?
Like companion do I just copy npc 1 intro and go to the bottom and paste npc 17 the new one adn do it with other conversation?
I am super confuse and need help , is it only python can do it???????? No other ways?  :neutral:

I dunno how anyone could think the txt files would be easier to work with.


How is this:
Code:
trp_npc1 Borcha Borcha 0 268435472 0 0 1 0 0
  213 0 181 0 392 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 
  8 7 12 7 3
 60 60 60 60 60 60 0
0 52559872 3 4130 69632 0 
  20384866627 2710329261906387509 1946924 0 0 0 0 0

easier then this:

Code:
  ["npc1","Borcha","Borcha",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_khergit_armor,itm_nomad_boots,itm_knife],
   str_8|agi_7|int_12|cha_7|level(3),wp(60),knows_tracker_npc|
   knows_ironflesh_1|knows_power_strike_1|knows_pathfinding_3|knows_athletics_2|knows_tracking_1|knows_riding_2, #skills 2/3 player at that level
   0x00000004bf086143259d061a9046e23500000000001db52c0000000000000000],
 
Caba`drin said:
Alex Dragon said:
is it only python can do it???????? No other ways?
No other ways. Adding troops will shift the number of troops present in the file. Since troops are referred to in the game by the order they are in the troops file, this will cause many problems. (If you add a troop after npc16, for instance, the game will think your new troop is the first King in the game...not another companion.) The only way to avoid those problems is to re-create the .txt files the game runs on...which you do by editing the Module System and compiling a new module.

When I add troops I add them in the back and they work in the game , just lord and ladies doesn't work , companion work but not lord or lady. How can I re-create the .txt file? How to edit the module system ????
How to compiling a new module?
Thanks Caba`drin
 
Malik Faris said:
Alex Dragon said:
Python is sooo hard to use , can't I just use text to add companions / new lord / ladies?
Because Python doesn't work in my mod .............don't know why , is there anyway to do it?
Like companion do I just copy npc 1 intro and go to the bottom and paste npc 17 the new one adn do it with other conversation?
I am super confuse and need help , is it only python can do it???????? No other ways?  :neutral:

I dunno how anyone could think the txt files would be easier to work with.


How is this:
Code:
trp_npc1 Borcha Borcha 0 268435472 0 0 1 0 0
  213 0 181 0 392 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 
  8 7 12 7 3
 60 60 60 60 60 60 0
0 52559872 3 4130 69632 0 
  20384866627 2710329261906387509 1946924 0 0 0 0 0

easier then this:

Code:
  ["npc1","Borcha","Borcha",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_khergit_armor,itm_nomad_boots,itm_knife],
   str_8|agi_7|int_12|cha_7|level(3),wp(60),knows_tracker_npc|
   knows_ironflesh_1|knows_power_strike_1|knows_pathfinding_3|knows_athletics_2|knows_tracking_1|knows_riding_2, #skills 2/3 player at that level
   0x00000004bf086143259d061a9046e23500000000001db52c0000000000000000],

To me txt file are very easy to work with (Only me I guess)  :razz:
 
Hahaha! You! Malik Faris!

Your tutorial almost made me cry... of happiness!

After two days following your steps (I went directly with 5 npc's and added all the dialogue), compiling was painless and it worked at first try!

Now of course I have to rework some of the dialogue and some of the face codes (and equipment) but it's grreeeeeat!
 
I have succesfully created 16 new companions, they all work in game, have custom faces, there skills and stats seem to work fine even tough they all need some knows_warrior etc.

My question now is, how can I set companions to be not noble and or to be noble (in this order because malik already told me that companions are considered noble unless said otherwise) I can't seem to find where I can adjust this.

Secondly, how can i set which type of troops my companions recruit as lords?
 
manekemaan said:
My question now is, how can I set companions to be not noble and or to be noble (in this order because malik already told me that companions are considered noble unless said otherwise) I can't seem to find where I can adjust this.
SPD_Phoenix said:
Module_scripts, script "initialize_npcs". Every companion has a line:
(troop_set_slot, "trp_npc1", slot_lord_reputation_type, lrep_roguish),
The complete list of personality is in module_constants. From "lrep_martial" to "lrep_upstanding" are noble. From "lrep_roguish" to "lrep_custodian" are non-noble.

manekemaan said:
Secondly, how can i set which type of troops my companions recruit as lords?
This is governed in the script "cf_reinforce_party", or in "hire_men_to_kingdom_hero_party"
 
thank you very much caba'drin

You are one of the most helpfull people on the forum. Kudos to you.

i can't quite figure the reinforce party script out tough, cant it just be this line : (troop_set_slot, "trp_npc5", slot_troop_original_faction, "fac_kingdom_3"), #khergit
?
 
Thank you, this has helped me a great deal. I have but one problem I can't seem to fix on my own.
I made my companion with the desired strings, but when I go into party, then click Robert(my companion) and talk, his string is talking about my legal merits to the throne. With others it usually says "Yes sir?", or something along those lines.
Sorry I'm new to this  :neutral:
Untitled.png
 
have you already made his dialogues? if not than they will just use random strings from other things, if you have make sure you have a npc17 dialogue for everything the other npc's have
 
Back
Top Bottom