Jump to content

Changing the names of the drinks in a tavern


Kulyok

Recommended Posts

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. :) *

Link to comment

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.

Link to comment
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.

Link to comment

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.

Link to comment

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...

Link to comment
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 %).

Link to comment

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.

Link to comment
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? :)

Link to comment

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.

Link to comment

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.

Link to comment
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.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...