RQ: New NPCs for m&b

正在查看此主题的用户

streetdog

Regular
Hello
I would like to ask if someone has created new NPCs for m&b(no expansions). I would like to have more in my army.
I found one guide how to create new NPCs in warband, i suppose it's the same in basic version too, but somehow I failed creating them :sad:
So I am asking if somebody has done some of them, mb he can send me the codes and I will try to merge them.
Thanks and sorry if this is not right place to post this thread
Modify message
 
It's a crapload of work. Cutting and pasting the character info block to add a new one isn't so bad... but if you go all the way and give them new dialogue options, it can be a headache from Hell. If you have the slightest error in formatting it can throw off the conversation of every NPC after that point, and can be a real pain in the rear to find and fix.

The basic method should still be in the tutorial section. Warband's method looks very similar, but for all I know there may be hidden little code elements that make the two techniques incompatible.
 
I disabled companion interaction anyway...
What about if I only clone an existing NPC ? How to do it and what I need to edit ?
 
Take a look at the custom settlements source code. It is open source I think and already has about 100 new npc added. Just copy paste in your troops file, give them dialogues and compile.

Add them in between the existing npcs or change the companions_end in module_constants.

May be some more little tidbits of code that I missed.
 
What files do I need to edit exactly?
I edited only troops.txt, but numerous bugs appear(the supposed companions become lords of the castles :/). Obviously I need to change something more
 
Streetdog use the module system to create new companions its really the only way. Follow the companion guides already there and put in the stuff only relating to mount and blade.
 
I found 1 guide about how to create new companions, but there are no .py files to edit. There are however txt files, i tried to edit troops.txt, but as I said, I had moderate success.... That's why if you could tell me which files to edit and what to edit there, i'd be gratefull.
 
have you downlaoded the module system, if not do so. Then if not already have get python 2.6 or 2.7, that allows you to edit python files(py files).
 
alright then install the python and then you can edit the python files. Ill put up an example of what the parts you insert looks like, this is from the When Worlds Collide module system.

Module Troops
["npc17","Leaf","Leaf",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved,  fac_commoners,[itm_peasant_dress,itm_nomad_boots, itm_dagger, itm_throwing_knives],
  str_10|agi_11|int_9|cha_11|level(4),wp(80),knows_tracker_npc|
  knows_power_throw_3|knows_athletics_2|knows_power_strike_1,
  0x000000000000000336db6db6db6db6db00000000001db6db0000000000000000],

Module Scripts
        (troop_set_slot, "trp_npc17", slot_troop_morality_type, tmt_aristocratic), #leaf
        (troop_set_slot, "trp_npc17", slot_troop_morality_value, 4),
        (troop_set_slot, "trp_npc17", slot_troop_2ary_morality_type, tmt_humanitarian),
        (troop_set_slot, "trp_npc17", slot_troop_2ary_morality_value, -1),
        (troop_set_slot, "trp_npc17", slot_troop_personalityclash_object, "trp_npc15"), #leaf
        (troop_set_slot, "trp_npc17", slot_troop_personalityclash2_object, "trp_npc1"), #leaf - borcha
        (troop_set_slot, "trp_npc17", slot_troop_personalitymatch_object, "trp_npc7"),  #deshavi - leaf
        (troop_set_slot, "trp_npc17", slot_troop_home, "p_village_94"), #Paris
        (troop_set_slot, "trp_npc17", slot_troop_payment_request, 20),

Module Strings For the strings here Ill show you just the newly added entrys.

("npc17_intro", "Hey tough guy. Would you mind letting a girl like me join your ranks, I could sure use a job."),

("npc17_intro_response_1", "I guess so but it looks like you have some problems."),

("npc17_intro_response_2", "You aint from this land your one of those invaders your different I dont like you."),

("npc17_backstory_a", "As long as I can remeber I was a kid on the streets of Paris, orphaned and lost. My parents left me alone, ran away leaving me to fend for myself in the cold dark streets of Paris."),

("npc17_backstory_b", "I grew up in a backwater dump section of Paris where crime was commonplace, I surived barley by myself for many years alone without any friends. I stole and squatted me way through 18 years of hell but now I can start over."),

("npc17_backstory_c", "I don't want to run anymore but want to life a normal life with friends and a place to call my own, so please let me come with you, Ill fight for my place"),

("npc17_backstory_later", "I wish to help you on your journey and fight for you as steady employment"),

("npc17_backstory_response_1", "You seems intresting, I guess you can work with me."),

("npc17_backstory_response_2", "You scum, youll be more of a lilability than a benefit, trouble would follow you everywhere."),

("npc17_signup", "Well, {sir/madame}, let me tell you. I may not have had an education but I know how to survive. "),

("npc17_signup_2", "I have the will to fight and survive and thats all I need."),

("npc17_signup_response_1", "Yes the will to fight is all I will need from you"),

("npc17_signup_response_2", "To be honest, I'd prefer someone who isnt uneducated."),

("npc17_payment", "Now, thank you but could you possibly pay for my drinks, its nothing big A mere {reg3} would be enough."),

("npc17_payment_response", "All right, here's {reg3} denars for you. Make yourself ready."),

("npc17_morality_speech", "Captain. I don't like to {s21}. So many blades we have to dodge, and so many enemys not beaten..."),

("npc17_2ary_morality_speech", "Captain -- just so you know, I have no biggy that we {s21}. We do what we need to survive, and if we didnt do this someone worse would have come along and done it."),

("npc17_personalityclash_speech", "Hey, captain. I think -- there's something weird about {s11}. He has weird diagrams, and mutters to himself liek he was a devil worshiper."),

("npc17_personalityclash_speech_b", "I was afraid for all our safety, so I asked him about his problems, and he told me that if I know whats good for me I should mind my own business. So I realised he was kinda suspicious, and found strange drawings and books on fiction. I think he's a wizard of some sort, {sir/madame}, and if I catch him trying to hurt the rest of the group, Ill kill hime before he does."),

("npc17_personalityclash2_speech", "Excuse me, sir. {s11} might have been a very good thief, but he's not got what it takes to survive, but thats just my opinion."),

("npc17_personalityclash2_speech_b", "After our last battle, I was gathering some items from the field so we could sell them, and as someone who has to make ends meets or else we could be in trouble. He barked at me and called me a 'vulture.' I am only doing what we need to do to survive but he must see me as a threat to him or something, so please resolve this."), #leaf - borcha

("npc17_personalitymatch_speech", "Hey -- captain. As myself and {s11}, were having a chat after we had fought our enemies she told me her story and it wasnt nice."),

("npc17_personalitymatch_speech_b", "Have you heard her story? Can you believe the wrongs done to her? I tell you, it makes my skin crawl. I want to make sure something like this nevers happens again -- I'll do it, stop this from ever happening again."),

("npc17_retirement_speech", "I've had an easy life with everyonein this company, and I've realised that I could possibly settle down somewhere quiet. So Ive decided to leave you and find somewhere to live the rest of my life, goodbye."),

("npc17_rehire_speech", "Hi again! They say that you've done well for yourself since we last met. After I found a safe place to settle down a week or two later bandits raided the village and killed everyone but I managed to escape and decided to seek you out again and join back into your company because nowhere is safe."),

("npc17_home_intro", "Excuse me, captain, do you see that town? Thats where I am from the place called Paris."),

("npc17_home_description", "Its a crummy place where everyones out to get you. You can live a good life If you can afford it but most cant. Gangs control the wealth in the run-down areas and I wouldnt stay there long if I was you."),
 
("npc17_home_description_2", "Still, life is cheap, and there were always too many lost and forgotten people around. Those in charge of the city were always corrupt and only wanted money, they let the gangs control areas in exchange for cash. They did what they liked but what can I say life sucks."),
 
("npc17_home_recap", "Why, captain, Im from Paris and its a dump, dont ask again you'll get the same answer."),
 
("npc17_honorific", "captain"), #leaf

Yea as you see all this, this is how much work there is too do when you are making companions, all that was just for one person. Now just look at the companion tutorial and do it kinda like this.
 
Thank you.
I followed the instructions and it worked.

Second my question is:

How to add new companions in existing already mod(SoD)?
 
streetdog 说:
Sad. :sad: Any chance to get it by decompiling something?

Not morally/ legally. Respect the other's works. :smile:
But you can mix a mod whose author has made his Module System open source... And that means a lot of them are waiting for tweaking.


____
ps: I understand you perfectly.
 
You have 16 companions (disabled interactions) and want more. I don't understand why.
If you are bored with them, changing their troop data and dialog lines is much easier than adding new ones, and can be easily done with .txt files.
 
Because I wanna try to finish the game with a party of 30-40 strong warriors without any other troops at all(even for defense) :/
I have played already a lot that mode and I am trying to do fancy stuff like fighting the whole legion with almost no troops, but I need them to be well trained and they should not be able to die... because during the invasion I will not have time to train new troops and AI of the allied troops is low anyway.
I thought of making certain type of troops not possible to die, but this will disbalance the whole game + they have limited level
 
后退
顶部 底部