That's exactly what I'm talking about.

Showing a single line does not mean that the whole process can be achieved with a single line! It is just the "command" line in a relevant
"XML" file which initiates the function. You need
a) a script, as of a function in a script file,
b) xml dialogs entry in the relevant xml file in "text" folder
c) another xml entry in the relevant xml file in "gameplay XML files." These depend on where (in what level in the game) you plan to apply this function. It can be globally accessed or on-level-base accessed.
For example, if you make a script file called:
info_snatcher.script, and then you make a function called:
function bribe_the_whistler 
Then you can call the function, say, in
dialogs_bar.xml like this:
<action>info_snatcher. bribe_the_whistler</action> in the "relevant dialog section" , not just inserting it in any place; and it should also correspond to a spoken/read dialog in a relevant text folder xml file.
...BUT, it does not mean that this line does the trick! No... it just
calls the function (script) in the relevant script fileSo you need a
script.Look, as an example, this is a script function, more or less similar function for what you are thinking:
- Code: Select all
function lost_money_500k(t1,t2)
-- dbg.mylog("actor_lost_money->500000") --/#........
local npc = t1
if npc:id() == db.actor:id() then
npc = t2
end
dialogs.relocate_money(npc, 500*ruz,"out")
end
(This is just an example, you can't just drop it like this and call it from xml file, it needs to check other things like t1 and t2) try to make it simpler and compatible with what you what )
Check my detailed explanation on how to call "function" through an XML dialog in this modding techniques section.