A couple of questions concerning companions (NPC) coding

正在查看此主题的用户

Aequites

Veteran
Greetings.

I'm currently working on custom companions and have a few questions.

First of all, in module_scripts there's a line that says "slot_troop_kingsupport_argument, argument_ruler" - what does it actually mean? I know that once you tell a companion you aspire to be the king he will start a dialogue with you with custom lines (that I've already created in module_strings). What does this value ('argument_ruler') influence on?

Also, in the next line saying slot_troop_kingsupport_opponent, "trp_npc3" is that the code of NPC that will approach you and scorn you for sending this guy you're coding on a mission or is that the code of NPC that you send on a mission and then the NPC you're coding approaches you with scorn?

What's more important, I've run into a problem that when I approach my companions in taverns (to check their look in game and dialogues) they just use absolutely random lines. I mean, npc1 is supposed to say only npc1 lines as I'm supposed to say npc1 response lines. But the player (in my name) and the NPC itself just have absolutely random lines of other NPCs and so on and I cannot determine the problem. There are no errors concerning this file in build_module.bat.
 
You know what, this could be much easier for you if you don't make your NPCs conform to Native companion conventions.
Just give them custom dialogs, both for tavern and party screen contexts and move them out of companion range.

Hopefully someone else would answer your questions, but it's a dreary business learning the ins and outs of all the stuff companions are required to have to conform to Native.
 
MadVader 说:
You know what, this could be much easier for you if you don't make your NPCs conform to Native companion conventions.
Just give them custom dialogs, both for tavern and party screen contexts and move them out of companion range.

Hopefully someone else would answer your questions, but it's a dreary business learning the ins and outs of all the stuff companions are required to have to conform to Native.

Well, the only guide I found suggests simply adding/altering native companions and that should work nicely. I can't imagine how to code/create custom stuff you're speaking about if not altering everything that is in native (which actually seems a great solution and fits right in. but something isn't working now and I can't determine what).

So is there a guide or something about what you're talking about? I've manually written hundreds of dialogue lines and altered some code. I hope I don't have to do it all over again to do what you propose. And I hope someone has the solution to my problem.
 
Altering existing companions is fine, but adding new ones is a chore, particularly if you are not interested in writing every little dialog line for every Warband use of companions.

What I was suggesting is simply creating a NPC that you can hire, without all the fluff of a Native companion.

Here's a guide! :smile:
1. Create a NPC troop (tf_hero), put it at the end of the troops file (or simply outside of the companion range)
2. Script it to spawn in different taverns or stand in one place or wherever
3. Write some dialog lines spoken when you meet him and which can lead to hiring.
E.g.
NPC: Hello.
Player: You are hired!
(NPC joins your party)

And that's really all. You can't make him a lord if you are king, and he doesn't quarrel, whine, talk about his silly village and so on, but he can fight, you can change his equipment and you can level him up.
 
Altering existing companions is fine, but adding new ones is a chore, particularly if you are not interested in writing every little dialog line for every Warband use of companions.
Actually I am and the huge beautiful world of Game of Thrones so requires. :smile:

What I was suggesting is simply creating a NPC that you can hire, without all the fluff of a Native companion.
Yeah I got it now, but as I said I need all that fluff, and the introduction and stories about home and other interactions.

Here's a guide! :smile:
1. Create a NPC troop (tf_hero), put it at the end of the troops file (or simply outside of the companion range)
2. Script it to spawn in different taverns or stand in one place or wherever
3. Write some dialog lines spoken when you meet him and which can lead to hiring.
E.g.
NPC: Hello.
Player: You are hired!
(NPC joins your party)

What I don't understand here (simply because I'm no real coder, what I know in coding ends @ editing companion-related stuff in strings, troops and scripts) is how to script a spawnpoint and create (in terms of proper code) custom dialogue lines.

So far my main question remains. Where can I search for some kind of connection or bond that is apparently broken in my case (because of what the dialogue lines follow an absolutely random route). Again, what I did was:
1. Edit dialogues in strings, add new lines so that the number of lines is the same as number of my companions.
2. Edit/add companion information in troops.
3. Edit/add companion information in scripts.

Did I miss anything? Because that seems simply altering and carefully adding pieces of Native code.
And thank you for the guide kindly :smile:
 
There are a couple of ways to end up with mismatched companion dialog strings.
1. Failing to insert all the lines of your additional companions in the strings. (or adding too many in some place)
2. Failure to change this little terrible line in the scripts:
(store_mul, ":string_addition", ":slot_addition", 16),
... to the real number of companions.

You need to start a new game for the strings to match again if any of this helps.
 
MadVader 说:
There are a couple of ways to end up with mismatched companion dialog strings.
1. Failing to insert all the lines of your additional companions in the strings. (or adding too many in some place)
2. Failure to change this little terrible line in the scripts:
(store_mul, ":string_addition", ":slot_addition", 16),

... to the real number of companions.

You need to start a new game for the strings to match again if any of this helps.

YES! As you were writing this, I went through that companion tutorial again and carefully checked every single line (and that tutorial is huge) and altering that line according to the number of my companions solved the issue! Talking to one of them now, everything's right!

Thank you! I was told you could help in this matter and you did. If there's anything I can do for you, ask, because you've saved all the custom-made, accurate, interesting and exciting companions of Game of Thrones mod :razz:

P.S. I don't even mention you being here answering my questions in the middle of the night.  :grin:
 
May I ask a question on the side apart from starting a new thread...

When creating new NPC's why does my NPC Names randomize and I can't find the new NPC's anywhere ?

I followed this tutorial : http://forums.taleworlds.com/index.php/topic,11902.0.html but poor little godfrey is nowhere to be found but Klethi is now all of a sudden named Godfrey and all the NPC's are mixed up they all use different Dialogues their names are randomized E.G. Katrin is Jeremus , Borcha is Ymira , Rolf is Artimenner and so on...

Any ideas ?  :neutral:
 
后退
顶部 底部