Author Topic: Compilation of 82 little tweaks to the text files to change your gameplay(links)  (Read 536089 times)

0 Members and 6 Guests are viewing this topic.

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
They still use that dialog - thats the one where you ask them to leave. And it does work for towns the same as castles.

If you ask them to leave in the castle, seemingly nothing happens - but it probably sets things in the background that might screw something up later - Personally, I'd rather be safe than sorry.

If you're getting cloned companions, it must be some other change you've done to dialogs to make them use the other dialog. I never get that dialog with the changes I've made.

I did change a few things in scripts.txt and one of them was your fix to disable npc interactions. Maybe that's the reason.

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
I just did a test by turning off npc interactions with a new game, and no matter what I did I couldn't get the other dialog and the cloning npcs thing, stationed in the castle or not.

It must be some dialog editing or something else you've done, mostly likely dialog editing.

I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
Nope, the only thing I've changed in conversation.txt was your fix for village quests. I haven't touched dialog_states.txt. There's one more thing though, I've modified the "unmovable in party window" tag for heroes.

 

Btw, you've said that the 33 3 144115188075855885 360287970189639844 360287970189639860 line determines the range of troops. 60287970189639844 360287970189639860 range is for heroes, 360287970189639689 360287970189639805 range is for regular troops. How do you know which is which, is there documentation explaining this? I've added a few custom troops at the end of troops.txt and neither of these ranges include those and they keep saying "surrender or die" when I talk to them.

Ps. I'm using 1.003 btw.

I've checked it again in all three versions. In 0.960 they (companions) say "surrender or die", however in 1.x they say "My offer to rejoin you stil  stands". I haven't modified anything in 1.0 (press copy version) except troops.txt and item_kinds1.txt. So I don't think that's a dialog issue, but as I've said before, I changed the "unmovable in party window" flag to be able to garrison them.

bob505

  • Sergeant
  • *
  • Permanently Banned
    • View Profile
  • Faction: Neutral
Please keep adding more tweaks i love them.
Just when you thought i left. I came back. And i am meaner then ever.

Folthrik

  • the FatThrik
  • Grandmaster Knight
  • *
  • Víðar dwells within.
    • View Profile
  • Faction: Nord
  • MP nick: Shieldings_Gudrun
  • M&BWB
I wonder what else he can come up with. I swear the man works wonders.
Now I have caused the deaths
of thirteen of my enemies;
I kill without compunction
and remember all my killings.
Treason must be scotched
by fair means or foul
before it overwhelms me.
Oak trees grow from acorns.

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
360287970189639844 references the first hero, Borcha. 360287970189639860 references the trp_kingdom_heroes_including_player_begin (the one after the last hero). Its all in numerical order though, in the order that they appear in troops.txt. I didn't know this off hand, I took the range from another dialog dealing with heroes. If you add troops to the list before the heroes, or after the heroes, it will throw the numbers off - you'll get ALL kinds of errors, every single script that deals with ranges will be thrown off. Adding them to the end of the file like you did shouldn't cause a problem, though.

I looked up that dialog and the only thing that makes it trigger is if the history of the party history for the troop is set as indeterminate - that happens if you lose him somehow and then meet up with him later. This gets set at that and doesn't get re-set until you make him leave, so garrisoning him and then talking will cause the problem. However, for me it still does not cause the problem - and heres why:

Where your problem comes in at is where you put my new dialog entry. If you put it above that other line that you're getting, it would trigger first and thus yours wouldn't be displayed - you apparently didn't put it where I did, and thus the other line triggers first. Move the new dialog entry to where I put it on my post and everything should work fine.
« Last Edit: October 04, 2008, 04:58:46 AM by TheMageLord »
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
360287970189639844 references the first hero, Borcha. 360287970189639860 references the trp_kingdom_heroes_including_player_begin (the one after the last hero). Its all in numerical order though, in the order that they appear in troops.txt. I didn't know this off hand, I took the range from another dialog dealing with heroes. If you add troops to the list before the heroes, or after the heroes, it will throw the numbers off - you'll get ALL kinds of errors, every single script that deals with ranges will be thrown off. Adding them to the end of the file like you did shouldn't cause a problem, though.

Well, since my custom troops (the ones I've added at the end of troops.txt) are out of the regular troops range so the dialog "how goes the watch, soldier" isn't shown instead I get the "surrender or die" dialog. And it looks like you can't define two different ranges in a single line, one for the regular troops and the other for the custom ones.

I looked up that dialog and the only thing that makes it trigger is if the history of the party history for the troop is set as indeterminate - that happens if you lose him somehow and then meet up with him later. This gets set at that and doesn't get re-set until you make him leave, so garrisoning him and then talking will cause the problem. However, for me it still does not cause the problem - and heres why:

Yes, I hired and released all of the companions once at the beginning of the game to be able to find where they are later in the game by asking travelers. So this causes the dialog difference?

Where your problem comes in at is where you put my new dialog entry. If you put it above that other line that you're getting, it would trigger first and thus yours wouldn't be displayed - you apparently didn't put it where I did, and thus the other line triggers first. Move the new dialog entry to where I put it on my post and everything should work fine.

As I said, I haven't tried your dialog fix yet.

PS. Thanks for your help, btw.  :wink:

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Ah, if you haven't tried the fix then that's why you're getting that. It is above the surrender or die dialog, and thus triggers first.

Them leaving and coming back sets up the dialog to appear, and it doesn't differentiate between them being left in a tavern and left in the castle - in the native game it doesn't need to. It is a bit sloppy to leave the variable set like that, but if they leave you in a normal fashion (ie, any way other than being garrisoned) the variable gets set again to what it's supposed to be anyway. It's your change to let them be garrisoned that causes it to be an issue.

See, the way dialog works is it goes down the list, from the top, until it reaches a dialog that can trigger. If two dialogs can both trigger, whichever one is higher on the list will be the one that displays.

If you put in my dialog at the appropriate spot, it will correct that (since a dialog higher in the list will trigger first), and everything should work fine.
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
Well, we call it a bug/problem, though for some, it's probably a nice feature. Having a clone that is, which doubles the number of companions. :mrgreen:

I'd like to ask you one last thing

Quote
dlga_start:member_talk 4095 0 4 33 3 144115188075855885 360287970189639844 360287970189639860 31 2 144115188075856039 1 520 3 1224979098644774912 144115188075855885 130 2320 2 5 1224979098644774912 Yes,_{s5}?  71  0

You've explained the blue numbers, thanks again, and I can work out what the green ones are for, but what are the red ones for? You have any idea?

It seems to me that since the triggering conditions are different, using
Quote
dlga_member_chat:member_talk 4095 13
, instead of
Quote
dlga_start:member_talk 4095 0
wouldn't make much difference, would it? Is there a particular reason to use dlga_start?

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Heres another little quick tweak: Number of mercenaries that spawn in towns.

Open up scripts.txt and find:
Quote
update_mercenary_units_of_towns -1
 6 6 3 1224979098644774912 648518346341351443 648518346341351461 2136 3 1224979098644774913 360287970189639706 360287970189639713 501 3 1224979098644774912 90 1224979098644774913 2136 3 1224979098644774914 3 8 501 3 1224979098644774912 91 1224979098644774914 3 0
The 3 8 is the range of the amount set whenever the script triggers. You can change it to whatever you like. It recalculates the mercenaries every time, not add to them, so you can't get multiple types in the same town.

The type of mercenaries being added are the numbers in blue, it's a range between 360287970189639706 (watchman) and 360287970189639713 (mercenaries_end). The actual range is between the first number and the second number minus 1 (so it never actually puts mercenaries_end in as a mercenary, it's just a placeholder for where mercenaries end at). Adding in mercenaries without the module system would prove difficult though, since adding troops to the troops.txt list would change all point of reference and screw up the game. You could edit it to include troops close to the list easily, though - by reducing the first number in the range by 2 it would reference farmers and townsmen (so it'd be 360287970189639704 360287970189639713) This is your best bet other than editing the current mercenaries to suit what you wanted. It would not, however, count them as mercenaries in the wage checks until they leveled up to Watchmen - but that's not really a big deal since they are cheap anyway.

and Lord Kinlar - I'll just explain it all :D

The first red number is who can trigger the dialog and who is speaking - 4095 is anyone with the npc talking (so it comes up top), and 69631 is anyone with the player talking (so it's a dialog option for you). That blue 0 is the dialog state (start). The green 4 is the number of lines of code to follow. The blue code is what I mentioned earlier (checking if one of the heroes then checking if they're in a castle). The red lines of code are first getting the honorific for the troop, and then storing that honorific as string 5, or {s5}. Thats how you get the "Yes, boss?" and "Yes, sir?" type things, differing between the companions. The 71 is the number for the dialog state that follows this one (member_talk). And that last 0 is the number for how many lines of code come after the fact - after you click through the text if its them saying it, or after you chose that option if its you. It's 0 here because nothing happens after the text comes up. All the dialog entries follow this structure.

It's MUCH easier to read in the module system, though - I have been using the .960 system to "translate" what things do exactly, which is very similar to the 1.003 (not quite, though - you have to pay attention to the text files to spot the differences). Once the 1.003 module system comes out, the editing of text files is no longer necessary - you can just edit the module system .py files and then compile the text files from them. Editing via the text files is kind of akin to reading machine code instead of a scripting language (although not quite so ridiculous).
« Last Edit: October 09, 2008, 08:13:04 PM by TheMageLord »
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Tachyon

  • Veteran
  • *
    • View Profile
  • Faction: Khergit
  • WB
Mills gives a one time bonus of 5%, which I admit kinda sucks... Changing it to a recurring means you have to add a new trigger (so might not be savegame compatible).

Heres a simple trigger that I made from scratch that you can add that will keep applying the bonus:
Quote
720.000000 3 6 3 1224979098644774912 648518346341351501 648518346341351591 541 3 1224979098644774912 131 1 1 3 936748722493063465 1224979098644774912 5
What this does is: Every 720 hours (30 days) it runs a check through all the villages. For each village without a mill, it triggers a script that increases prosperity by 5%. I highlighted the hours in red and the increase in blue in case you want to change that.

What you do is open up simple_triggers.txt and paste that whole thing in at the very bottom, then go up to the very top and increase the very first number in the file (84, on line 2) by 1 (so 85 unless you've added other triggers). That way it will read the trigger. Again, I don't know if this is savegame compatible - I don't have a save with a mill built to see if it is or not. Also note that while this trigger *should* work, im only human. I'll be using it myself, though - so I do trust it :)

That was some insane tweaking TheMageLord, I'll test it out. Finally, a mill is actually worth building.

Btw, TheMageLord... assuming a village already is at 100% prosperity, won't the Mill push it beyond that level and possibly screw up the game?

Ringwraith #5

  • Grandmaster Knight
  • *
  • The Rigid Designator
    • View Profile
  • Faction: Neutral
Heres a simple trigger that I made from scratch that you can add that will keep applying the bonus:
Quote
720.000000 3 6 3 1224979098644774912 648518346341351501 648518346341351591 541 3 1224979098644774912 131 1 1 3 936748722493063465 1224979098644774912 5
What this does is: Every 720 hours (30 days) it runs a check through all the villages. For each village without a mill, it triggers a script that increases prosperity by 5%. I highlighted the hours in red and the increase in blue in case you want to change that.
You mean with a mill, right? Great tweak, though. :D

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Whoops, yea, typo :) Script is checking for WITH a mill, haha.

It won't increase prosperity above 100 - my trigger uses the same script that everything else that increases prosperity uses. That script clamps the value to go no higher than 100 or lower than 0. All it does is call that script with a value of 5, thus increasing by 5.
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Charonte

  • Veteran
  • *
    • View Profile
  • Faction: Bandit
This might be helpful?

Great thread though :D And thanks for the tweaks!

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
That looks pretty good, Charonte. I'll add it to the list of tweaks :)
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...