Kulyok Posted May 27, 2007 Posted May 27, 2007 Yep. What do I have to patch in my .tp2 to replace "Woodland Ale" and "Westgate Wine" with drinks of my choice in a new, custom-made tavern? And how do I patch the name of the tavern in my .tp2? *Here goes a long lament about how these drinks are good for nothing but intoxication, and how it is impossible to add poison, nausea, fear, luck and healing effects. *
Avenger Posted May 27, 2007 Posted May 27, 2007 You need to find the strref positions? I'm sure you got NI or IElister. (I'm sure you got NI). Or, if you got a brand new object, why don't you simply create the tp2 with weidu? Dltcep can call weidu, so it is just like loading the store, changing the strref then saving in tp2 format.
berelinde Posted May 27, 2007 Posted May 27, 2007 Yep. What do I have to patch in my .tp2 to replace "Woodland Ale" and "Westgate Wine" with drinks of my choice in a new, custom-made tavern? And how do I patch the name of the tavern in my .tp2? *Here goes a long lament about how these drinks are good for nothing but intoxication, and how it is impossible to add poison, nausea, fear, luck and healing effects. * Um, if you're going to have these drinks consumed in a tavern, with its own area number and all, you could always script in poison, nausea, fear, luck, or healing via spell using area check and intoxication level as a trigger. You could even set the triggering intoxication level to something really low, like one drink (intoxication level greater than 5, say). Sure, PC won't get any icons on his portrait while he's drinking! No, he'll notice them later, once he's pushed away from the bar... just like life.
berelinde Posted May 27, 2007 Posted May 27, 2007 Ah, but I think I've just spotted the flaw in my logic. All the drinks there would have the same effect. About the only way I could think of would be to sell the drinks as potions, like the Braeg in IWD2.
Kulyok Posted May 27, 2007 Author Posted May 27, 2007 Thank you for the advice! (Yes, Berelinde, I'm sorry, it won't work right away, so...) I mean, yes, patching the name with Weidu - I am going to enter completely new names for drinks, so these strings won't be in dialog.tlk. Something like patching the items'descriptions: SAY DESC @20 Which line do I have to scribe here? Something like DRINKNAME? But there are like six or seven drinknames, so I am at a loss here...
Kulyok Posted May 27, 2007 Author Posted May 27, 2007 (I do sound like a complete newbie. But, yes, it's the last component in a mod, except for the voicework, so I am kind of desperate to get it right at last.)
Miloch Posted May 27, 2007 Posted May 27, 2007 Which line do I have to scribe here? Something like DRINKNAME? But there are like six or seven drinknames, so I am at a loss here...Not sure what you mean. I think you would just look up the strings you want to change and use STRING_SET on them. So for example, string 2801 being ~Woodland Ale~:STRING_SET 2801 @x Where x = ~New Drink Name~ in your TRA file. Edit: If on the other hand, you want to add completely new drinks in a new tavern and keep the existing drinks in other taverns, you'd just add new strings to .tlk and reference them in your store (giving the string, price and rumour %).
Kulyok Posted May 27, 2007 Author Posted May 27, 2007 Thank you - this could indeed solve the problem; however, it will present a new one, because this way, Woodland Ale in all taverns would be named "A name from Kulyok's mod", and the players will not like it. I have one specific tavern - mine, and I want specific new strings to be written into its drink names. For this tavern only. Without butchering already existent strings. So I am wondering how this might be done via .tp2.
Kulyok Posted May 27, 2007 Author Posted May 27, 2007 Edit: If on the other hand, you want to add completely new drinks in a new tavern and keep the existing drinks in other taverns, you'd just add new strings to .tlk and reference them in your store (giving the string, price and rumour % This might prove impossible, because of different installation order, I'm afraid. By the way - is it hardcoded that a player becomes intoxicated after drinking twenty or so drinks, even if intoxication for every drink is zero? And is it hardcoded that rumors only show up, if player's intoxication level has risen?
the bigg Posted May 27, 2007 Posted May 27, 2007 If you load the store file in NI, there are Drinks entries. If you activate the option to show the offsets, you can get the offset where "Woodland Ale" is and simply SAY offset_I_got_before ~Whatever I want~ If you want automatic TP2 patching rather than hardcoding numbers from NI: COPY_EXISTING ~store.sto~ ~override~ READ_LONG 0x4c drinks_offset READ_LONG 0x50 drinks_count FOR (i = 0; i < drinks_count; i += 1) BEGIN READ_LONG drinks_offset + i * 0x14 + 8 drink_name PATCH_IF drink_name = 14750 /* #14750 = "Bitter Black Ale" */ BEGIN SAY drinks_offset + i * 0x14 + 8 ~A name from my mod~ END END BUT_ONLY_IF_IT_CHANGES To find out the strref for a drink, simply run `weidu --strfind "Bitter Black Ale"'. If you want to add new drinks (rather than replacing existing ones), you'll have to do the usual offset-juggling for adding stuff. I'll post code if you want. EDIT: Ny.* points out I have an eye-dee-ten-tee problem.
Miloch Posted May 27, 2007 Posted May 27, 2007 I don't think there are aliases in WeiDU for these strings, so you might have to use SAY with the offset, if that works. So: COPY ~MyMod/mytavern.sto~ ~override~ SAY 0xc ~Tavern Name~ SAY 0xa4 ~Drink Name 1~ Maybe there's a less hackish way to do it [i.e. what bigg posted]. There's an intoxication rate for each drink in NI/IESDP, though DLTCEP has this listed as rumor % - not sure which is right. You can also specify your own resource for rumours if you want.
the bigg Posted May 27, 2007 Posted May 27, 2007 There's an intoxication rate for each drink in NI/IESDP, though DLTCEP has this listed as rumor % - not sure which is right. You can also specify your own resource for rumours if you want. The order of trust is to trust the IESDP before modding tools, and DLTCEP before NI. IESDP says "Alcoholic strength". Though, it shouldn't be too difficult to verify by getting drunk in-game (not as good as doing that IRL, but at least you can still drive afterwards) - in my experience, getting drunk with a 10% and with a 80% drink seems to take the same time, although the rumor % seems to actually vary.
Kulyok Posted May 27, 2007 Author Posted May 27, 2007 Thank you very much, got it! (And, yes, seems like I have to enter a higher intoxication value to get these rumors).
devSin Posted May 27, 2007 Posted May 27, 2007 If you're using my build of NI, the order of trust is to trust NI before all else, and DLTCEP only before you give up. Bitches.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.