Actions

Template

JourneyMaterialsDebug: Difference between revisions

From Dune Awakening DB

mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly><!-- Debug version 2 - find correct columns -->
<includeonly><!-- Find actual column names -->
<div style="background: #333; border: 2px solid yellow; padding: 15px; color: white;">
<div style="background: #333; border: 2px solid yellow; padding: 15px; color: white;">
<h3>Finding Correct Column Names</h3>
<h3>Finding Actual Column Names</h3>


<h4>1. Journey Objectives Columns:</h4>
<h4>1. All Journey Task Components:</h4>
{{#get_external_data:source=externaldb
|from=data_journey_objectives
|data=id=id,journey_id=journey_id,objective_name=objective_name,description=description
|where=journey_id={{{id|{{{1|}}}}}}
|limit=1
}}
{{#for_external_table:|
ID: {{{id}}}, Journey: {{{journey_id}}}, Name: {{{objective_name}}}, Desc: {{{description}}}<br/>
}}
 
<h4>2. Journey Tasks for this Journey:</h4>
{{#get_external_data:source=externaldb
|from=data_journey_tasks
|join on=data_journey_objectives.id=data_journey_tasks.objective_id
|data=task_id=data_journey_tasks.id,task_name=data_journey_tasks.task_name,objective_id=data_journey_tasks.objective_id
|where=data_journey_objectives.journey_id={{{id|{{{1|}}}}}}
|limit=3
}}
{{#for_external_table:|
Task ID: {{{task_id}}}, Name: {{{task_name}}}, Objective: {{{objective_id}}}<br/>
}}
 
<h4>3. Task Components (what items are needed):</h4>
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=data_journey_task_components
  |from=data_journey_task_components
  |data=task_id=task_id,item_name=item_name,quantity=quantity
  |data=task_id=task_id,component_name=component_name
  |limit=5
  |limit=5
}}
}}
{{#for_external_table:|
{{#for_external_table:|
Task: {{{task_id}}}, Item: {{{item_name}}}, Qty: {{{quantity}}}<br/>
Task ID: {{{task_id}}}, Component: {{{component_name}}}<br/>
}}
}}


<h4>4. Components for Journey {{{id|{{{1|}}}}}}:</h4>
<h4>2. Components for Tasks in Journey {{{id|{{{1|}}}}}}:</h4>
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=data_journey_task_components
  |from=data_journey_task_components
  |join on=data_journey_tasks.id=data_journey_task_components.task_id,data_journey_objectives.id=data_journey_tasks.objective_id
  |join on=data_journey_tasks.id=data_journey_task_components.task_id,data_journey_objectives.id=data_journey_tasks.objective_id
  |data=item_name=data_journey_task_components.item_name,quantity=data_journey_task_components.quantity
  |data=component=data_journey_task_components.component_name
  |where=data_journey_objectives.journey_id={{{id|{{{1|}}}}}}
  |where=data_journey_objectives.journey_id={{{id|{{{1|}}}}}}
}}
}}
Items needed: {{#for_external_table:|{{{item_name}}} (x{{{quantity}}}) | }}
Components needed for this journey: {{#for_external_table:|{{{component}}} | }}


<h4>5. Sample data from recipe view:</h4>
<h4>3. Check if any components match recipe view items:</h4>
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=vw_recipe_inputs_by_level
  |from=vw_recipe_inputs_by_level
  |data=root_item=root_item,item_label=item_label,level=level,total_qty=total_qty
  |data=root_item=root_item,internal_name=internal_name
  |limit=5
|where=root_item IN ('Advanced_SurvivalFabricator_Placeable','T5DeepDesertShieldWallComponent','T2MachineComponent')
  |limit=10
}}
}}
{{#for_external_table:|
{{#for_external_table:|
{{{root_item}}} → Level {{{level}}}: {{{item_label}}} x{{{total_qty}}}<br/>
Root: {{{root_item}}}, Internal: {{{internal_name}}}<br/>
}}
}}


</div>
</div>
</includeonly><noinclude>
</includeonly><noinclude>
This finds the correct column names for the journey materials query.
This finds the actual column names in the tables.


Usage: <nowiki>{{JourneyMaterialsDebug2|id=4}}</nowiki>
Usage: <nowiki>{{JourneyMaterialsDebug3|id=4}}</nowiki>
</noinclude>
</noinclude>

Revision as of 14:00, 31 May 2025

This finds the actual column names in the tables.

Usage: {{JourneyMaterialsDebug3|id=4}}