From 187c84c8ab12fce77fa7d74a0cc58a913e79b0c6 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Mon, 16 Feb 2026 02:13:15 +0300 Subject: [PATCH] Move fpga docs to wiremod/Miscellaneous It should be easier to update/maintain documentation, ZCPU already uses this --- data_static/fpgahelp.txt | 187 ------------------ .../client/node_editor/wire_fpga_editor.lua | 2 +- 2 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 data_static/fpgahelp.txt diff --git a/data_static/fpgahelp.txt b/data_static/fpgahelp.txt deleted file mode 100644 index 41d8e3ef7d..0000000000 --- a/data_static/fpgahelp.txt +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -

FPGA Help

- -

Types

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeColor
Normal
Vector
Angle
String
Array
Entity
Ranger
Wirelink
-
- -

Controls

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyEffect
Left mouse buttonUsed to move gates, draw connections, and draw selections
Double clickDraw connection from all the gates inputs / outputs
Right mouse buttonHold and drag mouse around to move around the internals of the FPGA
CCreates a gate at the cursor position. Select which gate in the gate selector on the right
XRemoves the gate under the cursor. If a selection has been made, it will delete all selected gates
EEdits a property of the gate under the cursor. Applicable for Input, Output and Constant gates
GToggles align to grid
Ctrl CCopies the selected gates
Ctrl VPastes the previously copied gates, and marks the pasted gates as selected
-
- -

Execution

-
-

The FPGA can be made to execute on different conditions. - As default, it will execute if one of the inputs changes, or if it has a timed gate (as marked by red) inside it. - It should be noted that if 2 different inputs change the same tick, the FPGA will execute twice, - where the first execution will be with an old value for one of the inputs. This is due to how Wiremod works, where only one input is triggered at a time. -

-

- To further customize chip execution, there are 3 different ways a chip can trigger an execution. -

-

Inputs

-
-

- The chip executes when an input is changed, and propagates the changes inside it, updating the gates affected by the input change. - Gates that aren't affected by the input change, will not execute. -

-
-

Timed

-
-

- Timed execution only affects gates which are timed (marked by red). - This includes gates such as 'OS Time' and 'Entity Position', which share the property that their output is time dependant. - For these gates to always have the correct output, timed execution needs to be on. - The frequency that these timed gates are updated with can be controlled with the Execution Interval setting. -

-
-

Trigger In

-
-

- For the greatest control over executions, the other options can be turned off and this one turned on. - The gate will get a "Trigger" input, which when set to something other than 0, will cause the chip to execute everything necessary. - The FPGA keeps a "lazy queue", such that it knows which gates will need to execute when the "Trigger" input is triggered. - This includes all timed gates, and input gates which have had their value changed since last trigger. -

-
-
-

Special execution gates

-
-

- To further customize how a chip executes, some special execution gates have been included. - They can be found under FPGA/Execution -

Execution Delta

-
-

- This chip will return the time between the current execution and the last one. - Useful for time critical circuitry - such as levitating - or calculations where the time difference is required. -

-
-

Execution Count

-
-

- Increments by one each time the chip executes -

-
-

Last (Normal/Vector/Angle/String)

-
-

- Mainly designed to allow looping circuitry. For example, a memory gate feeding it's own value + 1 into itself will produce an infinite loop. - If a Last gate is put somewhere in the loop, it will allow it to be executed. It does this by using the value the gate connected to it's input had last execution, - 'disengaging' the infinite loop. -

-
-

Previous (Normal/Vector/Angle/String)

-
-

- An alternative to the Last gate, that functions a bit differently. This gate will output the value the connected gate had the previous tick, - which differs from the Last gate behaviour both because multiple executions can happen each tick, which will cause the Last gate to change, but not the Previous gate. - The most important difference, is that the Previous gate will trigger a new execution during next tick, with the updated value. - This can cause a chain reaction, if this execution changes the Previous gate, causing it to trigger next tick again. - To avoid such chain reactions, the value should somehow stabilize - but the internal circuitry decides that. -

-
-

Last Timed (Normal/Vector/Angle/String)

-
-

- Alternative form of the Last gate, this one can trigger an execute if the FPGA is set to trigger on Timed. - This is useful for loops that are meant to execute every Execution Interval, where you don't care if the value has actually changed or not. -

-
-

-
-
- - - \ No newline at end of file diff --git a/lua/wire/client/node_editor/wire_fpga_editor.lua b/lua/wire/client/node_editor/wire_fpga_editor.lua index 92ef1d8e36..79a3fe5b7b 100644 --- a/lua/wire/client/node_editor/wire_fpga_editor.lua +++ b/lua/wire/client/node_editor/wire_fpga_editor.lua @@ -685,7 +685,7 @@ function Editor:InitComponents() self.C.Helper:SetScreenLock(true) local html = vgui.Create("DHTML" , self.C.Helper) html:Dock(FILL) - html:SetHTML(file.Read("data_static/fpgahelp.txt", "GAME") or "") + html:OpenURL("https://wiremod.github.io/Miscellaneous/fpgahelp.html") html:SetAllowLua(false) self.C.Help = vgui.Create("Button", self.C.Menu)