From c60e1a74f34588878b3679214efbebe739fb9b0a Mon Sep 17 00:00:00 2001 From: PaulWalcher <EthicalMonk@proton.me> Date: Thu, 7 Mar 2024 16:30:51 +0100 Subject: [PATCH] doc changed --- DOC/create_fact.txt | 13 +++++++++++++ DOC/create_gadget.txt | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 DOC/create_fact.txt create mode 100644 DOC/create_gadget.txt diff --git a/DOC/create_fact.txt b/DOC/create_fact.txt new file mode 100644 index 0000000..7fb1a92 --- /dev/null +++ b/DOC/create_fact.txt @@ -0,0 +1,13 @@ + +in gadget: use Factadder + +factadder adds the fact to the server, use standard method AddFactIfNotFound + +fact: fact to add +samestep: if the fact belongs conceptually to the previously added one + +Fact.cs: Caches all facts + +see TestFact as an example +parseFact interprets new MMT fact. + diff --git a/DOC/create_gadget.txt b/DOC/create_gadget.txt new file mode 100644 index 0000000..40c0a94 --- /dev/null +++ b/DOC/create_gadget.txt @@ -0,0 +1,24 @@ + +1.) create gadget class derived from Gadget in Assets\Scripts\InteractionEngine\Gadgets + +2.) add into enum in Gadget class in Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs +3.) add into dictionary in Gadget class in Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs +4.) add a line into the json-definitions at the start of: Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs + + -> follow examples, recommendation: always use the class name + +5.) go into: Assets\ScriptableObjects\Gadgets +6.) create Scriptable Object in Assets\ScriptableObjects\gadgets +7.) add into Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection +8.) in Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection add new Element into "Gadget Data" and + "Gadget Type" [same element index] +9.) In "Gadget Data" insert the ScriptableObject you created +10.) in "Gadget Type" insert the enum of the gadget you created + +-> in the ScriptableObject you created you can customize your gadget + - Rank: Position in toolbar + - UI Name: name of your gadget + - Button Indx: sets the index of the sprite that is used as the icon in the toolbar, + you can find the indices in Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection, + as "Button Sprites", all possible sprites are in Assets\Scripts\InventoryStuff\Items\images + \ No newline at end of file -- GitLab