understanding the trader menu - help needed

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
AR_Starfighter
Posts: 52
Joined: Thu, 6. Jun 19, 06:02

understanding the trader menu - help needed

Post by AR_Starfighter » Wed, 17. Jul 19, 03:34

I need to understand how the md/NPC_ItemTrader works.

Code: Select all

<add_player_choice_sub text="readtext.{1002}.{$PlayerChoiceText}" section="cItemtrader_wares" position="top_left" choiceparam="[0, 0, $actor, $WareType, $WareList]" baseparam="event.param2" />
When you press that option, it's goes to 'section' code. What is choiceparm and baseparm2's purpose?

Code: Select all

<add_conversation_view view="closeupdetailmonitor" />
<open_conversation_menu menu="TraderTransferMenu" param="event.param2" param2="event.param3" />

Code: Select all

<add_conversation_view view="closeupdetailmonitor" />
<open_conversation_menu menu="TraderTransferMenu" param="event.param2" param2="event.param3" />

Where is the input and output? parm is the input? param2 is output for what button you select.

I need help how the data input and output is flowing.

Vectorial1024
Posts: 112
Joined: Mon, 30. Jul 18, 04:16
x4

Re: understanding the trader menu - help needed

Post by Vectorial1024 » Wed, 7. Aug 19, 11:21

A bit of my understanding:

When you click on one of the radial options the same MD cue catches this action again, this time with a different section ID. DUring this process the MD script receives a different set of params too (this is the choiceparam part) so your MD cue can do things correctly, e.g., know which NPC is being traded with, etc.

Not sure what the baseparam is. My guess is it's used to tell the game which section to go back to if the player presses Escape key.

<add_conversation_view view="closeupdetailmonitor" /> basically turns Ren Otani's chair from facing the front to facing Yisha Tarren, or that's how I understand it.

<open_conversation_menu menu="TraderTransferMenu" param="event.param2" param2="event.param3" /> , the input is the param and param2 attribute. But what is the output? From the MD cue you will never know, because here you need to go 1 layer deeper and enter the mysterious world of UI modding. The processing (i.e. actually moving the wares and transferring money) is also done in the UI scripts.
Computer Science student, reporting for duty. College gon be tough, so no need to be rush.

AR_Starfighter
Posts: 52
Joined: Thu, 6. Jun 19, 06:02

Re: understanding the trader menu - help needed

Post by AR_Starfighter » Wed, 14. Aug 19, 07:44

Not sure what the baseparam is. My guess is it's used to tell the game which section to go back to if the player presses Escape key.
I think it's a shift left. baseparm1 input->baseparm2 output.

That was helpful.

Also, I'm trying to solve a scope of variables problem. I'll post again about it. See if you can help or anyone else. I'm stuck. :gruebel:

Post Reply

Return to “X Rebirth - Scripts and Modding”