Initializing...
Compiling all global variables...
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Exporting strings...
...
exporting dialogs...
tell_joke
close_window
[]
********************************************************************************
**
ERROR: INPUT TOKEN NOT FOUND:tell_joke
********************************************************************************
**
********************************************************************************
**
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Checking global variable usages...
______________________________
Script processing has ended.
Press any key to exit. . .
FrisianDude said:I hate to be such a terrible pain and I thoroughly appreciate the help, but now I got;Initializing...
Compiling all global variables...
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Exporting strings...
...
exporting dialogs...
tell_joke
close_window
[]
********************************************************************************
**
ERROR: INPUT TOKEN NOT FOUND:tell_joke
********************************************************************************
**
********************************************************************************
**
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Checking global variable usages...
______________________________
Script processing has ended.
Press any key to exit. . .
[anyone, "tell_joke_or_story", [
(str_store_string, s10, "@bladiebla 1"),
(str_store_string, s11, "@bladiebla 2"),
(str_store_string, s12, "@bladiebla 3"),
(str_store_string, s13, "@bladiebla 4"),
(store_random_in_range, ":random", 10, 14),
(str_store_string_reg, s4, ":random"),
], "{s4}", "close_window", []],
[anyone ,"start", [is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end],
"welcome text here", "destination_dialog_here", []],
[anyone ,"start", [is_between, "$g_talk_troop", minstrels_begin, minstrels_end],
"Hey mate, want to hear a joke?", "minstrel_talk", []],
[anyone|plyr, "minstrel_talk", [], "Sure, hit me with your best shot.", "tell_joke_or_story", []],
[anyone|plyr, "minstrel_talk", [], "No, I hate bloody minstrels. Piss off or I'll rip off your head and piss down your neck", "close_window", []],
[anyone, "tell_joke_or_story", [
(str_store_string, s10, "@Horse walks into a bar. Bartender asks: 'why the long face?'"),
(str_store_string, s11, "@Jesus said onto John, come forth and you shall receive eternal life. John came fifth and got a toaster."),
(str_store_string, s12, "@Black man walks into a pet shop with a parrot on his shoulder. Pet shop owner asks 'where'd you get that?'. Parrot says 'Africa, there's loads of em!'"),
(str_store_string, s13, "@Sorry.. that's all the lame jokes I know by heart...."),
(store_random_in_range, ":random", 10, 14),
(str_store_string_reg, s4, ":random"),
], "{s4}", "tell_joke_or_story", []],
[anyone|plyr, "tell_joke_or_story", [], "That was horrible.. you are a complete wanker", "close_window", []],
[anyone|plyr, "tell_joke_or_story", [], "Wow! You, my friend, are a gifted comedian and -if you don't mind my saying so- quite a handsome devil!", "close_window", []],
MartinF said:FrisianDude said:I hate to be such a terrible pain and I thoroughly appreciate the help, but now I got;Initializing...
Compiling all global variables...
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Exporting strings...
...
exporting dialogs...
tell_joke
close_window
[]
********************************************************************************
**
ERROR: INPUT TOKEN NOT FOUND:tell_joke
********************************************************************************
**
********************************************************************************
**
Error in dialog line:
[4095, 'tell_joke', [(2320, 10, 'bladiebla 1'), (2320, 11, 'bladiebla 2'), (2320
, 12, 'bladiebla 3'), (2320, 13, 'bladiebla 4'), (2136, ':random', 10, 14), (232
1, 4, ':random')], 'close_window', []]
Checking global variable usages...
______________________________
Script processing has ended.
Press any key to exit. . .I'll test it out myself a little later and post back with my results, that's probably more constructive.
[edit]
Alright.. I didn't see this yesterday but you're missing the most important bit in your code, the part where you actually call the random string you're setting
[anyone, "tell_joke_or_story", [
(str_store_string, s10, "@bladiebla 1"),
(str_store_string, s11, "@bladiebla 2"),
(str_store_string, s12, "@bladiebla 3"),
(str_store_string, s13, "@bladiebla 4"),
(store_random_in_range, ":random", 10, 14),
(str_store_string_reg, s4, ":random"),
], "{s4}", "close_window", []],
The other thing was that I forgot the @ that you need if you're storing a string of dialog text in a string. Anyway this compiles. I just get the Error, Input Token Not Found error but that's because you're making an uncalled dialog. No conversation is currently linking to "tell_joke_or_story" so the compiler doesn't know wtf to do with this piece of code.
If you cange it to anyone, "start" (just as a test, this will create problems in-game of course), it compiles fine. So I think what you'll need to do is use a condition field to decide when it pops up. To make that work properly, you'll have to define something in the constants.py. I'm assuming here that you're putting a new type of NPC in the tavern. If you just want to use the tavernkeeper, you can do something this:
[anyone|plyr,"tavernkeeper_talk", [], "Got any good jokes, barkeep?", "tell_joke_or_story", []],
This will come up as an option after the tavernkeeper greets the player.
If you're using a new type of npc, it's a bit more complicated. You'll have to copy/paste and modify this bit:
Code:[anyone ,"start", [is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end], "welcome text here", "destination_dialog_here", []],
And where it says 'ransom_brokers_begin' and '_end', you replace that with the npc type you're using, so let's say for argument's sake you call them minstrels, you put in minstrels_begin, minstrels_end.
Then you look in troops.py to where you've put these new npcs and you write down the troop_id (first part) of the first minstrel and the troop_id for the troop after the last minstrel. Again, same as with random, the high end of the range is not counted, so you need to pick one extra.
Then you go to constants.py and look up the bit where all the kings_begin, heroes_begin, etc are defined and you make a new entry.
minstrels_begin = "trp_first_minstrel_troop_id"
minstrels_end = "trp_id_of_first_troop_after_minstrel"
So then the whole dialog would come out something like this...
Code:[anyone ,"start", [is_between, "$g_talk_troop", minstrels_begin, minstrels_end], "Hey mate, want to hear a joke?", "minstrel_talk", []], [anyone|plyr, "minstrel_talk", [], "Sure, hit me with your best shot.", "tell_joke_or_story", []], [anyone|plyr, "minstrel_talk", [], "No, I hate bloody minstrels. Piss off or I'll rip off your head and piss down your neck", "close_window", []], [anyone, "tell_joke_or_story", [ (str_store_string, s10, "@Horse walks into a bar. Bartender asks: 'why the long face?'"), (str_store_string, s11, "@Jesus said onto John, come forth and you shall receive eternal life. John came fifth and got a toaster."), (str_store_string, s12, "@Black man walks into a pet shop with a parrot on his shoulder. Pet shop owner asks 'where'd you get that?'. Parrot says 'Africa, there's loads of em!'"), (str_store_string, s13, "@Sorry.. that's all the lame jokes I know by heart...."), (store_random_in_range, ":random", 10, 14), (str_store_string_reg, s4, ":random"), ], "{s4}", "tell_joke_or_story", []], [anyone|plyr, "tell_joke_or_story", [], "That was horrible.. you are a complete wanker", "close_window", []], [anyone|plyr, "tell_joke_or_story", [], "Wow! You, my friend, are a gifted comedian and -if you don't mind my saying so- quite a handsome devil!", "close_window", []],
Of course you might want to change individual lines a little bit
More seriously, I don't know if you can actually use special characters in a string like that with without using a code, so you might get a compile error on that, just put the text in there to illustrate the point.
Like I said before, if you're not sure how it's supposed to work, just look at other examples in native. Try to work out how the tuple is built up, read the information at the start of the py file and then make sure your own tuple reflects this.
Jezze said:I have got a small question for you guys,
I relocated some towns and castles but I figured out that there are some lords disapered from the map. This is logical because there starting points are deleted or changed to another faction. Does someone know where I can find the start point of the lords?
MartinF said:Sorry Jezze, didn't see your original question.
# script_create_kingdom_hero_party
that's the script that's used for creating the actual parties. The input are the hero and a center_no
it's called from the "game_start", the first bit of the script.py where all the factions, banners, centers, etc get set.
It would seem that they get created from their castle/town, rather than being spawned separately so maybe if they're not assigned a castle at the start, they won't get spawned at all..
relocating a town shouldn't have any effect tho, since the script simply does (spawn_around_party) for the center in question...
I think that's what I'm going to do.MartinF said:well what you can do is just keep the item.txt and after you build your mod, copy the old one over the newly built one to keep your changes. But frankly I think you're much better off just redoing it, as much as it sucks.
Realy thanks..MartinF said:And yeah of course you're more than welcome to use the duel kit. In fact, that reminds me I really need to put my updated version up....