├── ZenNotesConfig.json ├── ZenNotesDefine ├── config.cpp └── scripts │ └── 3_game │ └── Define.c ├── classnames.txt ├── config.cpp ├── data ├── fonts │ ├── andthishappened.edds │ ├── andthishappened.fnt │ ├── andthishappened.tga │ ├── bringthanoize.edds │ ├── bringthanoize.fnt │ ├── bringthanoize.tga │ ├── jamesfajardo.edds │ ├── jamesfajardo.fnt │ ├── jamesfajardo.tga │ ├── ladylike.edds │ ├── ladylike.fnt │ ├── ladylike.tga │ ├── love.edds │ ├── love.fnt │ ├── love.tga │ ├── matthildur.edds │ ├── matthildur.fnt │ ├── matthildur.tga │ ├── multikultural.edds │ ├── multikultural.fnt │ ├── multikultural.tga │ ├── papernotes.edds │ ├── papernotes.fnt │ ├── papernotes.tga │ ├── scriptina.edds │ ├── scriptina.fnt │ ├── scriptina.tga │ ├── turntablz.edds │ ├── turntablz.fnt │ ├── turntablz.tga │ ├── youmurderer.edds │ ├── youmurderer.fnt │ └── youmurderer.tga ├── gui │ ├── images │ │ └── notebg.edds │ └── layouts │ │ └── NoteGUI.layout ├── stringtable.csv ├── textures │ ├── loot_pen_black_co.paa │ ├── loot_pen_blue_co.paa │ ├── loot_pen_color_co.psd │ ├── loot_pen_green_co.paa │ ├── loot_pen_orange_co.paa │ ├── loot_pen_pink_co.paa │ ├── loot_pen_purple_co.paa │ └── loot_pen_red_co.paa └── thumbnail.edds ├── mod.cpp ├── readme.txt ├── scripts ├── 3_game │ ├── ZenNotesClientConfig.c │ ├── ZenNotesConfig.c │ ├── ZenNotesConstants.c │ └── ZenNotesLogger.c ├── 4_world │ ├── classes │ │ ├── Hologram.c │ │ ├── JMAnimRegister.c │ │ ├── gui │ │ │ └── ZenNoteGUI.c │ │ ├── useractionscomponent │ │ │ ├── ActionConstructor.c │ │ │ └── actions │ │ │ │ ├── ActionDeployObject.c │ │ │ │ ├── continuous │ │ │ │ ├── ActionZenReadNoteHands.c │ │ │ │ └── ActionZenWritePaper.c │ │ │ │ └── interact │ │ │ │ └── ActionZenReadNoteTarget.c │ │ └── zennotedata │ │ │ └── ZenNoteData.c │ └── entities │ │ ├── itembase │ │ ├── FireplaceBase.c │ │ ├── Paper.c │ │ ├── Pen.c │ │ └── ZenNote.c │ │ └── manbase │ │ └── PlayerBase.c └── 5_mission │ └── mission │ ├── MissionBase.c │ ├── MissionGameplay.c │ └── MissionServer.c └── types.xml /ZenNotesConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConfigVersion": "1", 3 | "PenConsumeQuantity": 3, 4 | "NoteDateFormat": { 5 | "Format": 1, 6 | "DaySuffix": [ 7 | "st", 8 | "nd", 9 | "rd", 10 | "th" 11 | ], 12 | "MonthName": [ 13 | "January", 14 | "February", 15 | "March", 16 | "April", 17 | "May", 18 | "June", 19 | "July", 20 | "August", 21 | "September", 22 | "October", 23 | "November", 24 | "December" 25 | ] 26 | }, 27 | "WordBlacklist": [ 28 | "REALLY_NASTY_WORDS_YOU_DONT_WANT_WRITTEN" 29 | ], 30 | "SendPlayerWarning": "We don't tolerate that sort of language on our server. Your note has been logged and any repeat offenses may result in a permenent ban." 31 | } -------------------------------------------------------------------------------- /ZenNotesDefine/config.cpp: -------------------------------------------------------------------------------- 1 | class CfgPatches 2 | { 3 | class ZenNotesDefine 4 | { 5 | units[] = {}; 6 | requiredVersion = 1.0; 7 | requiredAddons[] = 8 | { 9 | "DZ_Data", 10 | "DZ_Scripts" 11 | }; 12 | }; 13 | }; 14 | 15 | class CfgMods 16 | { 17 | class ZenNotesDefine 18 | { 19 | dir = "ZenNotesDefine"; 20 | name = "ZenNotesDefine"; 21 | author = "Zenarchist"; 22 | authorID = "0"; 23 | version = "1.0"; 24 | extra = 0; 25 | type = "mod"; 26 | dependencies[] = 27 | { 28 | "World" 29 | }; 30 | class defs 31 | { 32 | class gameScriptModule 33 | { 34 | value = ""; 35 | files[] = { "ZenNotesDefine/scripts/3_game" }; 36 | }; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /ZenNotesDefine/scripts/3_game/Define.c: -------------------------------------------------------------------------------- 1 | #define ZEN_NOTES -------------------------------------------------------------------------------- /classnames.txt: -------------------------------------------------------------------------------- 1 | ZenNote 2 | Pen_Black 3 | Pen_Red 4 | Pen_Green 5 | Pen_Blue 6 | Pen_Pink 7 | Pen_Purple 8 | Pen_Orange -------------------------------------------------------------------------------- /config.cpp: -------------------------------------------------------------------------------- 1 | class CfgPatches 2 | { 3 | class ZenNotes 4 | { 5 | units[] = {}; 6 | requiredVersion = 1.0; 7 | requiredAddons[] = 8 | { 9 | "DZ_Data", 10 | "DZ_Scripts", 11 | "ZenNotesDefine" 12 | }; 13 | }; 14 | }; 15 | 16 | class CfgMods 17 | { 18 | class ZenNotes 19 | { 20 | dir = "ZenNotes"; 21 | name = "ZenNotes"; 22 | author = "Zenarchist"; 23 | authorID = "0"; 24 | version = "1.1"; 25 | extra = 0; 26 | type = "mod"; 27 | dependencies[] = 28 | { 29 | "World" 30 | }; 31 | class defs 32 | { 33 | class gameScriptModule 34 | { 35 | value = ""; 36 | files[] = { "ZenNotes/scripts/3_game" }; 37 | }; 38 | class worldScriptModule 39 | { 40 | value = ""; 41 | files[] = { "ZenNotes/scripts/4_world" }; 42 | }; 43 | class missionScriptModule 44 | { 45 | value = ""; 46 | files[] = { "ZenNotes/scripts/5_mission" }; 47 | }; 48 | }; 49 | }; 50 | }; 51 | 52 | class CfgVehicles 53 | { 54 | class Inventory_Base; 55 | 56 | // Make paper stackable up to 5 57 | class Paper : Inventory_Base 58 | { 59 | canBeSplit = 1; 60 | varQuantityInit = 1; 61 | varQuantityMin = 0; 62 | varQuantityMax = 5; 63 | varStackMax = 5; 64 | varQuantityDestroyOnMin = 1; 65 | }; 66 | 67 | // Define a written note (non-stackable) 68 | class ZenNote : Paper 69 | { 70 | scope = 2; 71 | model = "\dz\gear\consumables\Paper.p3d"; 72 | displayName = "$STR_ZenNoteTxt"; 73 | descriptionShort = "$STR_ZenNoteDesc"; 74 | canBeSplit = 0; 75 | varQuantityInit = 1; 76 | varQuantityMin = 0; 77 | varQuantityMax = 1; 78 | varStackMax = 1; 79 | }; 80 | 81 | // Define colored pens 82 | class Pen_ColorBase 83 | { 84 | quantityBar = 1; 85 | varQuantityInit = 100; 86 | varQuantityMin = 0; 87 | varQuantityMax = 100; 88 | stackedUnit = "percentage"; 89 | }; 90 | class Pen_Black : Pen_ColorBase 91 | { 92 | scope = 2; 93 | displayName = "$STR_ZenPen_Black"; 94 | penColor[] = { 10,10,10 }; 95 | hiddenSelections[] = { "zbytek" }; 96 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_black_co.paa" }; 97 | }; 98 | class Pen_Red : Pen_ColorBase 99 | { 100 | scope = 2; 101 | displayName = "$STR_ZenPen_Red"; 102 | penColor[] = { 200,20,20 }; 103 | hiddenSelections[] = { "zbytek" }; 104 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_red_co.paa" }; 105 | }; 106 | class Pen_Green : Pen_ColorBase 107 | { 108 | scope = 2; 109 | displayName = "$STR_ZenPen_Green"; 110 | penColor[] = { 24,150,24 }; 111 | hiddenSelections[] = { "zbytek" }; 112 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_green_co.paa" }; 113 | }; 114 | class Pen_Blue : Pen_ColorBase 115 | { 116 | scope = 2; 117 | displayName = "$STR_ZenPen_Blue"; 118 | penColor[] = { 0,65,200 }; 119 | hiddenSelections[] = { "zbytek" }; 120 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_blue_co.paa" }; 121 | }; 122 | class Pen_Pink : Pen_ColorBase 123 | { 124 | scope = 2; 125 | displayName = "$STR_ZenPen_Pink"; 126 | penColor[] = { 255,0,162 }; 127 | hiddenSelections[] = { "zbytek" }; 128 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_pink_co.paa" }; 129 | }; 130 | class Pen_Purple : Pen_ColorBase 131 | { 132 | scope = 2; 133 | displayName = "$STR_ZenPen_Purple"; 134 | penColor[] = { 144,0,255 }; 135 | hiddenSelections[] = { "zbytek" }; 136 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_purple_co.paa" }; 137 | }; 138 | class Pen_Orange : Pen_ColorBase 139 | { 140 | scope = 2; 141 | displayName = "$STR_ZenPen_Orange"; 142 | penColor[] = { 255,150,0 }; 143 | hiddenSelections[] = { "zbytek" }; 144 | hiddenSelectionsTextures[] = { "ZenNotes\data\textures\loot_pen_orange_co.paa" }; 145 | }; 146 | }; 147 | -------------------------------------------------------------------------------- /data/fonts/andthishappened.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/andthishappened.edds -------------------------------------------------------------------------------- /data/fonts/andthishappened.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/andthishappened.fnt -------------------------------------------------------------------------------- /data/fonts/andthishappened.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/andthishappened.tga -------------------------------------------------------------------------------- /data/fonts/bringthanoize.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/bringthanoize.edds -------------------------------------------------------------------------------- /data/fonts/bringthanoize.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/bringthanoize.fnt -------------------------------------------------------------------------------- /data/fonts/bringthanoize.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/bringthanoize.tga -------------------------------------------------------------------------------- /data/fonts/jamesfajardo.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/jamesfajardo.edds -------------------------------------------------------------------------------- /data/fonts/jamesfajardo.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/jamesfajardo.fnt -------------------------------------------------------------------------------- /data/fonts/jamesfajardo.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/jamesfajardo.tga -------------------------------------------------------------------------------- /data/fonts/ladylike.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/ladylike.edds -------------------------------------------------------------------------------- /data/fonts/ladylike.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/ladylike.fnt -------------------------------------------------------------------------------- /data/fonts/ladylike.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/ladylike.tga -------------------------------------------------------------------------------- /data/fonts/love.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/love.edds -------------------------------------------------------------------------------- /data/fonts/love.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/love.fnt -------------------------------------------------------------------------------- /data/fonts/love.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/love.tga -------------------------------------------------------------------------------- /data/fonts/matthildur.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/matthildur.edds -------------------------------------------------------------------------------- /data/fonts/matthildur.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/matthildur.fnt -------------------------------------------------------------------------------- /data/fonts/matthildur.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/matthildur.tga -------------------------------------------------------------------------------- /data/fonts/multikultural.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/multikultural.edds -------------------------------------------------------------------------------- /data/fonts/multikultural.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/multikultural.fnt -------------------------------------------------------------------------------- /data/fonts/multikultural.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/multikultural.tga -------------------------------------------------------------------------------- /data/fonts/papernotes.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/papernotes.edds -------------------------------------------------------------------------------- /data/fonts/papernotes.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/papernotes.fnt -------------------------------------------------------------------------------- /data/fonts/papernotes.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/papernotes.tga -------------------------------------------------------------------------------- /data/fonts/scriptina.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/scriptina.edds -------------------------------------------------------------------------------- /data/fonts/scriptina.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/scriptina.fnt -------------------------------------------------------------------------------- /data/fonts/scriptina.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/scriptina.tga -------------------------------------------------------------------------------- /data/fonts/turntablz.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/turntablz.edds -------------------------------------------------------------------------------- /data/fonts/turntablz.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/turntablz.fnt -------------------------------------------------------------------------------- /data/fonts/turntablz.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/turntablz.tga -------------------------------------------------------------------------------- /data/fonts/youmurderer.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/youmurderer.edds -------------------------------------------------------------------------------- /data/fonts/youmurderer.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/youmurderer.fnt -------------------------------------------------------------------------------- /data/fonts/youmurderer.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/fonts/youmurderer.tga -------------------------------------------------------------------------------- /data/gui/images/notebg.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/gui/images/notebg.edds -------------------------------------------------------------------------------- /data/gui/layouts/NoteGUI.layout: -------------------------------------------------------------------------------- 1 | FrameWidgetClass MainFrame { 2 | inheritalpha 0 3 | ignorepointer 1 4 | position 0 0 5 | size 1 1 6 | halign center_ref 7 | valign center_ref 8 | hexactpos 1 9 | vexactpos 1 10 | hexactsize 0 11 | vexactsize 0 12 | { 13 | ImageWidgetClass PageWidget { 14 | visible 1 15 | ignorepointer 1 16 | position 0 0 17 | size 600 800 18 | halign center_ref 19 | valign center_ref 20 | hexactpos 1 21 | vexactpos 1 22 | hexactsize 1 23 | vexactsize 1 24 | priority 1 25 | image0 "ZenNotes/data/gui/images/notebg.edds" 26 | imageTexture "{7819C907890D2FF0}ZenMods/ZenNotes/data/gui/images/notebg.edds" 27 | mode blend 28 | "src alpha" 1 29 | "no wrap" 1 30 | stretch 1 31 | { 32 | ButtonWidgetClass FontBtn { 33 | visible 1 34 | inheritalpha 1 35 | position 0 0.94 36 | size 1 0.03 37 | halign right_ref 38 | hexactpos 0 39 | vexactpos 0 40 | hexactsize 0 41 | vexactsize 0 42 | userID 2 43 | text "Select Style" 44 | font "gui/fonts/amorserifpro-bold22" 45 | "text color" 0.3922 0 0 1 46 | } 47 | ButtonWidgetClass CloseBtn { 48 | visible 1 49 | inheritalpha 1 50 | position 0.008 0.0125 51 | size 0.04 0.03 52 | halign right_ref 53 | hexactpos 0 54 | vexactpos 0 55 | hexactsize 0 56 | vexactsize 0 57 | userID 2 58 | text "X" 59 | font "gui/fonts/metron-bold22" 60 | "text color" 0.3922 0 0 1 61 | } 62 | MultilineEditBoxWidgetClass NoteText0 { 63 | disabled 1 64 | inheritalpha 0 65 | color 0 0 0 1 66 | position 0.01 0.02 67 | size 0.9 0.8 68 | halign center_ref 69 | valign center_ref 70 | hexactpos 0 71 | vexactpos 0 72 | hexactsize 0 73 | vexactsize 0 74 | style DayZNormal 75 | font "gui/fonts/amorserifpro22" 76 | "exact text" 0 77 | "size to text h" 0 78 | "size to text v" 0 79 | lines 30 80 | "limit visible" 1 81 | } 82 | MultilineEditBoxWidgetClass NoteText1 { 83 | visible 0 84 | disabled 1 85 | inheritalpha 0 86 | color 0 0 0 1 87 | position 0.01 0.02 88 | size 0.9 0.8 89 | halign center_ref 90 | valign center_ref 91 | hexactpos 0 92 | vexactpos 0 93 | hexactsize 0 94 | vexactsize 0 95 | style DayZNormal 96 | font "ZenNotes/data/fonts/papernotes" 97 | "exact text" 0 98 | "size to text h" 0 99 | "size to text v" 0 100 | lines 30 101 | "limit visible" 1 102 | } 103 | MultilineEditBoxWidgetClass NoteText2 { 104 | visible 0 105 | disabled 1 106 | inheritalpha 0 107 | color 0 0 0 1 108 | position 0.01 0.02 109 | size 0.9 0.8 110 | halign center_ref 111 | valign center_ref 112 | hexactpos 0 113 | vexactpos 0 114 | hexactsize 0 115 | vexactsize 0 116 | style DayZNormal 117 | font "ZenNotes/data/fonts/matthildur" 118 | "exact text" 0 119 | "size to text h" 0 120 | "size to text v" 0 121 | lines 30 122 | "limit visible" 1 123 | } 124 | MultilineEditBoxWidgetClass NoteText3 { 125 | visible 0 126 | disabled 1 127 | inheritalpha 0 128 | color 0 0 0 1 129 | position 0.01 0.02 130 | size 0.9 0.8 131 | halign center_ref 132 | valign center_ref 133 | hexactpos 0 134 | vexactpos 0 135 | hexactsize 0 136 | vexactsize 0 137 | style DayZNormal 138 | font "ZenNotes/data/fonts/turntablz" 139 | "exact text" 0 140 | "size to text h" 0 141 | "size to text v" 0 142 | lines 30 143 | "limit visible" 1 144 | } 145 | MultilineEditBoxWidgetClass NoteText4 { 146 | visible 0 147 | disabled 1 148 | inheritalpha 0 149 | color 0 0 0 1 150 | position 0.01 0.02 151 | size 0.9 0.8 152 | halign center_ref 153 | valign center_ref 154 | hexactpos 0 155 | vexactpos 0 156 | hexactsize 0 157 | vexactsize 0 158 | style DayZNormal 159 | font "ZenNotes/data/fonts/bringthanoize" 160 | "exact text" 0 161 | "size to text h" 0 162 | "size to text v" 0 163 | lines 30 164 | "limit visible" 1 165 | } 166 | MultilineEditBoxWidgetClass NoteText5 { 167 | visible 0 168 | disabled 1 169 | inheritalpha 0 170 | color 0 0 0 1 171 | position 0.01 0.02 172 | size 0.9 0.8 173 | halign center_ref 174 | valign center_ref 175 | hexactpos 0 176 | vexactpos 0 177 | hexactsize 0 178 | vexactsize 0 179 | style DayZNormal 180 | font "ZenNotes/data/fonts/jamesfajardo" 181 | "exact text" 0 182 | "size to text h" 0 183 | "size to text v" 0 184 | lines 30 185 | "limit visible" 1 186 | } 187 | MultilineEditBoxWidgetClass NoteText6 { 188 | visible 0 189 | disabled 1 190 | inheritalpha 0 191 | color 0 0 0 1 192 | position 0.01 0.02 193 | size 0.9 0.8 194 | halign center_ref 195 | valign center_ref 196 | hexactpos 0 197 | vexactpos 0 198 | hexactsize 0 199 | vexactsize 0 200 | style DayZNormal 201 | font "ZenNotes/data/fonts/ladylike" 202 | "exact text" 0 203 | "size to text h" 0 204 | "size to text v" 0 205 | lines 30 206 | "limit visible" 1 207 | } 208 | MultilineEditBoxWidgetClass NoteText7 { 209 | visible 0 210 | disabled 1 211 | inheritalpha 0 212 | color 0 0 0 1 213 | position 0.01 0.02 214 | size 0.9 0.8 215 | halign center_ref 216 | valign center_ref 217 | hexactpos 0 218 | vexactpos 0 219 | hexactsize 0 220 | vexactsize 0 221 | style DayZNormal 222 | font "ZenNotes/data/fonts/multikultural" 223 | "exact text" 0 224 | "size to text h" 0 225 | "size to text v" 0 226 | lines 30 227 | "limit visible" 1 228 | } 229 | MultilineEditBoxWidgetClass NoteText8 { 230 | visible 0 231 | disabled 1 232 | inheritalpha 0 233 | color 0 0 0 1 234 | position 0.01 0.02 235 | size 0.9 0.8 236 | halign center_ref 237 | valign center_ref 238 | hexactpos 0 239 | vexactpos 0 240 | hexactsize 0 241 | vexactsize 0 242 | style DayZNormal 243 | font "ZenNotes/data/fonts/scriptina" 244 | "exact text" 0 245 | "size to text h" 0 246 | "size to text v" 0 247 | lines 30 248 | "limit visible" 1 249 | } 250 | MultilineEditBoxWidgetClass NoteText9 { 251 | visible 0 252 | disabled 1 253 | inheritalpha 0 254 | color 0 0 0 1 255 | position 0.01 0.02 256 | size 0.9 0.8 257 | halign center_ref 258 | valign center_ref 259 | hexactpos 0 260 | vexactpos 0 261 | hexactsize 0 262 | vexactsize 0 263 | style DayZNormal 264 | font "ZenNotes/data/fonts/love" 265 | "exact text" 0 266 | "size to text h" 0 267 | "size to text v" 0 268 | lines 30 269 | "limit visible" 1 270 | } 271 | MultilineEditBoxWidgetClass NoteText10 { 272 | visible 0 273 | disabled 1 274 | inheritalpha 0 275 | color 0 0 0 1 276 | position 0.01 0.02 277 | size 0.9 0.8 278 | halign center_ref 279 | valign center_ref 280 | hexactpos 0 281 | vexactpos 0 282 | hexactsize 0 283 | vexactsize 0 284 | style DayZNormal 285 | font "ZenNotes/data/fonts/youmurderer" 286 | "exact text" 0 287 | "size to text h" 0 288 | "size to text v" 0 289 | lines 30 290 | "limit visible" 1 291 | } 292 | MultilineEditBoxWidgetClass NoteText11 { 293 | visible 0 294 | disabled 1 295 | inheritalpha 0 296 | color 0 0 0 1 297 | position 0.01 0.02 298 | size 0.9 0.8 299 | halign center_ref 300 | valign center_ref 301 | hexactpos 0 302 | vexactpos 0 303 | hexactsize 0 304 | vexactsize 0 305 | style DayZNormal 306 | font "ZenNotes/data/fonts/andthishappened" 307 | "exact text" 0 308 | "size to text h" 0 309 | "size to text v" 0 310 | lines 30 311 | "limit visible" 1 312 | } 313 | TextWidgetClass DateText0 { 314 | disabled 1 315 | inheritalpha 0 316 | color 0 0 0 1 317 | position 0 -0.43 318 | size 1 0.05 319 | halign center_ref 320 | valign center_ref 321 | hexactpos 0 322 | vexactpos 0 323 | hexactsize 0 324 | vexactsize 0 325 | style Normal 326 | text "28/8/2022" 327 | font "gui/fonts/amorserifpro22" 328 | "exact text" 0 329 | "size to text h" 0 330 | "size to text v" 0 331 | "text halign" center 332 | } 333 | TextWidgetClass DateText1 { 334 | visible 0 335 | disabled 1 336 | inheritalpha 0 337 | color 0 0 0 1 338 | position 0 -0.43 339 | size 1 0.05 340 | halign center_ref 341 | valign center_ref 342 | hexactpos 0 343 | vexactpos 0 344 | hexactsize 0 345 | vexactsize 0 346 | style Normal 347 | text "28/8/2022" 348 | font "ZenNotes/data/fonts/papernotes" 349 | "exact text" 0 350 | "size to text h" 0 351 | "size to text v" 0 352 | "text halign" center 353 | } 354 | TextWidgetClass DateText2 { 355 | visible 0 356 | disabled 1 357 | inheritalpha 0 358 | color 0 0 0 1 359 | position 0 -0.43 360 | size 1 0.05 361 | halign center_ref 362 | valign center_ref 363 | hexactpos 0 364 | vexactpos 0 365 | hexactsize 0 366 | vexactsize 0 367 | style Normal 368 | text "28/8/2022" 369 | font "ZenNotes/data/fonts/matthildur" 370 | "exact text" 0 371 | "size to text h" 0 372 | "size to text v" 0 373 | "text halign" center 374 | } 375 | TextWidgetClass DateText3 { 376 | visible 0 377 | disabled 1 378 | inheritalpha 0 379 | color 0 0 0 1 380 | position 0 -0.43 381 | size 1 0.05 382 | halign center_ref 383 | valign center_ref 384 | hexactpos 0 385 | vexactpos 0 386 | hexactsize 0 387 | vexactsize 0 388 | style Normal 389 | text "28/8/2022" 390 | font "ZenNotes/data/fonts/turntablz" 391 | "exact text" 0 392 | "size to text h" 0 393 | "size to text v" 0 394 | "text halign" center 395 | } 396 | TextWidgetClass DateText4 { 397 | visible 0 398 | disabled 1 399 | inheritalpha 0 400 | color 0 0 0 1 401 | position 0 -0.43 402 | size 1 0.05 403 | halign center_ref 404 | valign center_ref 405 | hexactpos 0 406 | vexactpos 0 407 | hexactsize 0 408 | vexactsize 0 409 | style Normal 410 | text "28/8/2022" 411 | font "ZenNotes/data/fonts/bringthanoize" 412 | "exact text" 0 413 | "size to text h" 0 414 | "size to text v" 0 415 | "text halign" center 416 | } 417 | TextWidgetClass DateText5 { 418 | visible 0 419 | disabled 1 420 | inheritalpha 0 421 | color 0 0 0 1 422 | position 0 -0.43 423 | size 1 0.05 424 | halign center_ref 425 | valign center_ref 426 | hexactpos 0 427 | vexactpos 0 428 | hexactsize 0 429 | vexactsize 0 430 | style Normal 431 | text "28/8/2022" 432 | font "ZenNotes/data/fonts/jamesfajardo" 433 | "exact text" 0 434 | "size to text h" 0 435 | "size to text v" 0 436 | "text halign" center 437 | } 438 | TextWidgetClass DateText6 { 439 | visible 0 440 | disabled 1 441 | inheritalpha 0 442 | color 0 0 0 1 443 | position 0 -0.43 444 | size 1 0.05 445 | halign center_ref 446 | valign center_ref 447 | hexactpos 0 448 | vexactpos 0 449 | hexactsize 0 450 | vexactsize 0 451 | style Normal 452 | text "28/8/2022" 453 | font "ZenNotes/data/fonts/ladylike" 454 | "exact text" 0 455 | "size to text h" 0 456 | "size to text v" 0 457 | "text halign" center 458 | } 459 | TextWidgetClass DateText7 { 460 | visible 0 461 | disabled 1 462 | inheritalpha 0 463 | color 0 0 0 1 464 | position 0 -0.43 465 | size 1 0.05 466 | halign center_ref 467 | valign center_ref 468 | hexactpos 0 469 | vexactpos 0 470 | hexactsize 0 471 | vexactsize 0 472 | style Normal 473 | text "28/8/2022" 474 | font "ZenNotes/data/fonts/multikultural" 475 | "exact text" 0 476 | "size to text h" 0 477 | "size to text v" 0 478 | "text halign" center 479 | } 480 | TextWidgetClass DateText8 { 481 | visible 0 482 | disabled 1 483 | inheritalpha 0 484 | color 0 0 0 1 485 | position 0 -0.43 486 | size 1 0.05 487 | halign center_ref 488 | valign center_ref 489 | hexactpos 0 490 | vexactpos 0 491 | hexactsize 0 492 | vexactsize 0 493 | style Normal 494 | text "28/8/2022" 495 | font "ZenNotes/data/fonts/scriptina" 496 | "exact text" 0 497 | "size to text h" 0 498 | "size to text v" 0 499 | "text halign" center 500 | } 501 | TextWidgetClass DateText9 { 502 | visible 0 503 | disabled 1 504 | inheritalpha 0 505 | color 0 0 0 1 506 | position 0 -0.43 507 | size 1 0.05 508 | halign center_ref 509 | valign center_ref 510 | hexactpos 0 511 | vexactpos 0 512 | hexactsize 0 513 | vexactsize 0 514 | style Normal 515 | text "28/8/2022" 516 | font "ZenNotes/data/fonts/love" 517 | "exact text" 0 518 | "size to text h" 0 519 | "size to text v" 0 520 | "text halign" center 521 | } 522 | TextWidgetClass DateText10 { 523 | visible 0 524 | disabled 1 525 | inheritalpha 0 526 | color 0 0 0 1 527 | position 0 -0.43 528 | size 1 0.05 529 | halign center_ref 530 | valign center_ref 531 | hexactpos 0 532 | vexactpos 0 533 | hexactsize 0 534 | vexactsize 0 535 | style Normal 536 | text "28/8/2022" 537 | font "ZenNotes/data/fonts/youmurderer" 538 | "exact text" 0 539 | "size to text h" 0 540 | "size to text v" 0 541 | "text halign" center 542 | } 543 | TextWidgetClass DateText11 { 544 | visible 0 545 | disabled 1 546 | inheritalpha 0 547 | color 0 0 0 1 548 | position 0 -0.43 549 | size 1 0.05 550 | halign center_ref 551 | valign center_ref 552 | hexactpos 0 553 | vexactpos 0 554 | hexactsize 0 555 | vexactsize 0 556 | style Normal 557 | text "28/8/2022" 558 | font "ZenNotes/data/fonts/andthishappened" 559 | "exact text" 0 560 | "size to text h" 0 561 | "size to text v" 0 562 | "text halign" center 563 | } 564 | MultilineTextWidgetClass NoteReadText0 { 565 | disabled 1 566 | inheritalpha 0 567 | color 0 0 0 1 568 | position 0.01 0.02 569 | size 0.9 0.8 570 | halign center_ref 571 | valign center_ref 572 | hexactpos 0 573 | vexactpos 0 574 | hexactsize 0 575 | vexactsize 0 576 | style DayZNormal 577 | font "gui/fonts/amorserifpro22" 578 | "exact text" 1 579 | "size to text h" 0 580 | "size to text v" 0 581 | lines 30 582 | "limit visible" 1 583 | } 584 | MultilineTextWidgetClass NoteReadText1 { 585 | visible 0 586 | disabled 1 587 | inheritalpha 0 588 | color 0 0 0 1 589 | position 0.01 0.02 590 | size 0.9 0.8 591 | halign center_ref 592 | valign center_ref 593 | hexactpos 0 594 | vexactpos 0 595 | hexactsize 0 596 | vexactsize 0 597 | style DayZNormal 598 | font "ZenNotes/data/fonts/papernotes" 599 | "exact text" 1 600 | "size to text h" 0 601 | "size to text v" 0 602 | lines 30 603 | "limit visible" 1 604 | } 605 | MultilineTextWidgetClass NoteReadText2 { 606 | visible 0 607 | disabled 1 608 | inheritalpha 0 609 | color 0 0 0 1 610 | position 0.01 0.02 611 | size 0.9 0.8 612 | halign center_ref 613 | valign center_ref 614 | hexactpos 0 615 | vexactpos 0 616 | hexactsize 0 617 | vexactsize 0 618 | style DayZNormal 619 | font "ZenNotes/data/fonts/matthildur" 620 | "exact text" 1 621 | "size to text h" 0 622 | "size to text v" 0 623 | lines 30 624 | "limit visible" 1 625 | } 626 | MultilineTextWidgetClass NoteReadText3 { 627 | visible 0 628 | disabled 1 629 | inheritalpha 0 630 | color 0 0 0 1 631 | position 0.01 0.02 632 | size 0.9 0.8 633 | halign center_ref 634 | valign center_ref 635 | hexactpos 0 636 | vexactpos 0 637 | hexactsize 0 638 | vexactsize 0 639 | style DayZNormal 640 | font "ZenNotes/data/fonts/turntablz" 641 | "exact text" 1 642 | "size to text h" 0 643 | "size to text v" 0 644 | lines 30 645 | "limit visible" 1 646 | } 647 | MultilineTextWidgetClass NoteReadText4 { 648 | visible 0 649 | disabled 1 650 | inheritalpha 0 651 | color 0 0 0 1 652 | position 0.01 0.02 653 | size 0.9 0.8 654 | halign center_ref 655 | valign center_ref 656 | hexactpos 0 657 | vexactpos 0 658 | hexactsize 0 659 | vexactsize 0 660 | style DayZNormal 661 | font "ZenNotes/data/fonts/bringthanoize" 662 | "exact text" 1 663 | "size to text h" 0 664 | "size to text v" 0 665 | lines 30 666 | "limit visible" 1 667 | } 668 | MultilineTextWidgetClass NoteReadText5 { 669 | visible 0 670 | disabled 1 671 | inheritalpha 0 672 | color 0 0 0 1 673 | position 0.01 0.02 674 | size 0.9 0.8 675 | halign center_ref 676 | valign center_ref 677 | hexactpos 0 678 | vexactpos 0 679 | hexactsize 0 680 | vexactsize 0 681 | style DayZNormal 682 | font "ZenNotes/data/fonts/jamesfajardo" 683 | "exact text" 1 684 | "size to text h" 0 685 | "size to text v" 0 686 | lines 30 687 | "limit visible" 1 688 | } 689 | MultilineTextWidgetClass NoteReadText6 { 690 | visible 0 691 | disabled 1 692 | inheritalpha 0 693 | color 0 0 0 1 694 | position 0.01 0.02 695 | size 0.9 0.8 696 | halign center_ref 697 | valign center_ref 698 | hexactpos 0 699 | vexactpos 0 700 | hexactsize 0 701 | vexactsize 0 702 | style DayZNormal 703 | font "ZenNotes/data/fonts/ladylike" 704 | "exact text" 1 705 | "size to text h" 0 706 | "size to text v" 0 707 | lines 30 708 | "limit visible" 1 709 | } 710 | MultilineTextWidgetClass NoteReadText7 { 711 | visible 0 712 | disabled 1 713 | inheritalpha 0 714 | color 0 0 0 1 715 | position 0.01 0.02 716 | size 0.9 0.8 717 | halign center_ref 718 | valign center_ref 719 | hexactpos 0 720 | vexactpos 0 721 | hexactsize 0 722 | vexactsize 0 723 | style DayZNormal 724 | font "ZenNotes/data/fonts/multikultural" 725 | "exact text" 1 726 | "size to text h" 0 727 | "size to text v" 0 728 | lines 30 729 | "limit visible" 1 730 | } 731 | MultilineTextWidgetClass NoteReadText8 { 732 | visible 0 733 | disabled 1 734 | inheritalpha 0 735 | color 0 0 0 1 736 | position 0.01 0.02 737 | size 0.9 0.8 738 | halign center_ref 739 | valign center_ref 740 | hexactpos 0 741 | vexactpos 0 742 | hexactsize 0 743 | vexactsize 0 744 | style DayZNormal 745 | font "ZenNotes/data/fonts/scriptina" 746 | "exact text" 1 747 | "size to text h" 0 748 | "size to text v" 0 749 | lines 30 750 | "limit visible" 1 751 | } 752 | MultilineTextWidgetClass NoteReadText9 { 753 | visible 0 754 | disabled 1 755 | inheritalpha 0 756 | color 0 0 0 1 757 | position 0.01 0.02 758 | size 0.9 0.8 759 | halign center_ref 760 | valign center_ref 761 | hexactpos 0 762 | vexactpos 0 763 | hexactsize 0 764 | vexactsize 0 765 | style DayZNormal 766 | font "ZenNotes/data/fonts/love" 767 | "exact text" 1 768 | "size to text h" 0 769 | "size to text v" 0 770 | lines 30 771 | "limit visible" 1 772 | } 773 | MultilineTextWidgetClass NoteReadText10 { 774 | visible 0 775 | disabled 1 776 | inheritalpha 0 777 | color 0 0 0 1 778 | position 0.01 0.02 779 | size 0.9 0.8 780 | halign center_ref 781 | valign center_ref 782 | hexactpos 0 783 | vexactpos 0 784 | hexactsize 0 785 | vexactsize 0 786 | style DayZNormal 787 | font "ZenNotes/data/fonts/youmurderer" 788 | "exact text" 1 789 | "size to text h" 0 790 | "size to text v" 0 791 | lines 30 792 | "limit visible" 1 793 | } 794 | MultilineTextWidgetClass NoteReadText11 { 795 | visible 0 796 | disabled 1 797 | inheritalpha 0 798 | color 0 0 0 1 799 | position 0.01 0.02 800 | size 0.9 0.8 801 | halign center_ref 802 | valign center_ref 803 | hexactpos 0 804 | vexactpos 0 805 | hexactsize 0 806 | vexactsize 0 807 | style DayZNormal 808 | font "ZenNotes/data/fonts/andthishappened" 809 | "exact text" 1 810 | "size to text h" 0 811 | "size to text v" 0 812 | lines 30 813 | "limit visible" 1 814 | } 815 | ImageWidgetClass DamageLayer { 816 | visible 0 817 | inheritalpha 0 818 | ignorepointer 1 819 | position 0.00033 -0.00626 820 | size 0.9967 0.9626 821 | halign center_ref 822 | valign center_ref 823 | hexactpos 0 824 | vexactpos 0 825 | hexactsize 0 826 | vexactsize 0 827 | image0 "DZ\characters\data\generic_worn_mc.paa" 828 | mode blend 829 | "src alpha" 1 830 | } 831 | } 832 | } 833 | ImageWidgetClass Background { 834 | visible 1 835 | clipchildren 0 836 | ignorepointer 1 837 | color 0 0 0 1 838 | position 0 0 839 | size 1 1 840 | halign center_ref 841 | valign center_ref 842 | hexactpos 1 843 | vexactpos 1 844 | hexactsize 0 845 | vexactsize 0 846 | imageTexture "{E6B3EF816E067499}gui/textures/inventory_bgvignette.edds" 847 | mode blend 848 | "src alpha" 1 849 | "no wrap" 0 850 | stretch 1 851 | filter 0 852 | "Transition width" 1 853 | } 854 | } 855 | } -------------------------------------------------------------------------------- /data/stringtable.csv: -------------------------------------------------------------------------------- 1 | Language,original,english,czech,german,russian,polish,hungarian,italian,spanish,french,chinese,japanese,portuguese,chinesesimp 2 | STR_ZenNoteTxt,"Note","Note","Poznámka","Notiz","Примечание","Notatka","jegyzet","Nota","Nota","Noter","筆記","ノート","Observação","笔记" 3 | STR_ZenNoteDesc,"It's a written note left behind by a survivor...","It's a written note left behind by a survivor...","Je to písemná poznámka, kterou po sobě zanechal přeživší...","Es ist eine schriftliche Notiz, die ein Überlebender hinterlassen hat...","Это письменная записка, оставленная выжившим...","To pisemna notatka pozostawiona przez ocalałego...","Ez egy írásos feljegyzés, amelyet egy túlélő hagyott hátra...","È una nota scritta lasciata da un sopravvissuto...","Es una nota escrita dejada por un sobreviviente...","C'est une note écrite laissée par un survivant... ","這是倖存者留下的一張紙條...","生存者が残したメモです...","É uma nota escrita deixada para trás por um sobrevivente...","这是幸存者留下的一张纸条..." 4 | STR_ZenNoteStyle,"Select Style","Select Style","Vyberte Styl","Wählen Sie Stil","Выберите стиль","Wybierz styl","Válassza a Stílus lehetőséget","Scegli Stile","Elige estilo","Choisissez le style","選擇風格","スタイルを選択","Escolha o estilo. ","选择风格. " 5 | STR_ZenPen_Black,"Black Pen","Black Pen","Černé pero","Schwarzer Stift","Черная ручка","Czarny długopis","Fekete toll","Penna Nera","Lápiz negro","Stylo noir","黑筆","黒ペン","Caneta preta","黑笔" 6 | STR_ZenPen_Red,"Red Pen","Red Pen","Červené pero","Roter Stift","Красной ручкой","Czerwony długopis","Piros toll","Penna rossa","Boligrafo rojo","Stylo rouge","紅筆","赤いペン","Caneta vermelha","红笔" 7 | STR_ZenPen_Green,"Green Pen","Green Pen","Zelené pero","Grüner Stift","Зеленая ручка","Zielony długopis","Zöld toll","Penna verde","bolígrafo verde","Stylo vert","綠筆","緑のペン","Caneta Verde","绿笔" 8 | STR_ZenPen_Blue,"Blue Pen","Blue Pen","Modré pero","Blauer Stift","Синяя ручка","Niebieski długopis","Kék toll","Penna blu","bolígrafo azul","Stylo bleu","藍筆","ブルーペン","Caneta azul","蓝笔" 9 | STR_ZenPen_Pink,"Pink Pen","Pink Pen","Růžové pero","Rosa Stift","Розовая ручка","Różowy długopis","Rózsaszín toll","Penna rosa","bolígrafo rosa","Stylo Rose","粉紅筆","ピンクペン","Caneta Rosa","粉红笔" 10 | STR_ZenPen_Purple,"Purple Pen","Purple Pen","Fialové pero","Lila Stift","Фиолетовая ручка","Fioletowe pióro","Lila toll","Penna viola","Bolígrafo Morado","Stylo violet","紫鋼筆","紫色のペン","Caneta Roxa","紫钢笔" 11 | STR_ZenPen_Orange,"Orange Pen","Orange Pen","Oranžové pero","Oranger Stift","Оранжевая ручка","Pomarańczowy długopis","Narancssárga toll","Penna arancione","bolígrafo naranja","Stylo orange","橙色筆","オレンジペン","Caneta Laranja","橙色笔" 12 | -------------------------------------------------------------------------------- /data/textures/loot_pen_black_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_black_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_blue_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_blue_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_color_co.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_color_co.psd -------------------------------------------------------------------------------- /data/textures/loot_pen_green_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_green_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_orange_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_orange_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_pink_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_pink_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_purple_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_purple_co.paa -------------------------------------------------------------------------------- /data/textures/loot_pen_red_co.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/textures/loot_pen_red_co.paa -------------------------------------------------------------------------------- /data/thumbnail.edds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZenarchistCode/ZenNotes/c27e73391c468bd64bb25c439ba6ded8e486ba6b/data/thumbnail.edds -------------------------------------------------------------------------------- /mod.cpp: -------------------------------------------------------------------------------- 1 | name = "Zenarchist's Notes Mod"; // name 2 | picture = "ZenNotes\data\thumbnail.edds"; // picture in expanded description 3 | logoSmall = "ZenNotes\data\thumbnail.edds"; // icon next to mod name when description is not expanded 4 | logo = "ZenNotes\data\thumbnail.edds"; // logo below game menu 5 | logoOver = "ZenNotes\data\thumbnail.edds"; // on mouse hover over logo 6 | tooltip = "Zenarchist's Notes Mod"; // tool tip on mouse hover 7 | overview = "Adds immersive notes to the game."; // overview 8 | action = "https://zenarchist.io/"; // link 9 | author = "Zenarchist"; // author 10 | version = "1.0"; // version -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | What Is This? 2 | 3 | This is another notes mod. 4 | 5 | The main advantage of this one is that it's open-source and I allow repacking so you have full control over it as a server admin, and it also allows you to select from several different font styles and colors (and you can easily add your own). 6 | 7 | It also allows you to blacklist certain words that you don't want on your server. It will log all player notes to a logs folder including player names, SteamIDs and note locations to make it easy to moderate. 8 | 9 | Here is a video showing how the notes work: https://youtu.be/UiiRnS5Zehs 10 | 11 | And here's a video guide on how to add/change fonts: https://youtu.be/KSwArPgOcwA 12 | 13 | Installation Instructions: 14 | 15 | Install this mod like any other mod - copy it into your server folder and add it to your mods list. It must be run on both server and client. Make sure to copy the .bikey into your server keys. 16 | 17 | Also don't forget to copy over the types.xml into your server types. You can either import my types.xml separately (here's a guide: https://www.youtube.com/watch?v=PAAEhdiQ_vE) - OR make sure to only copy & paste lines 3-36 into your vanilla types.xml file. 18 | 19 | ZenNote is the written note object - you'll want to set that to be persistent for at least a day, by default it's set to 2 weeks. The pens are all optional and you should adjust their spawn numbers according to your preference (remove any colors you don't want, and set the nominal/min/max values to whatever is appropriate for your map & server setup). 20 | 21 | Repack & Source Code: 22 | 23 | You can repack this mod if you like, and do anything else you want with it for that matter. Just keep in mind my future updates won't be applied so make sure to check back for new versions if you notice any bugs. The source code is on my GitHub at www.zenarchist.io 24 | 25 | Enjoy! 26 | 27 | ----------------------------------------------------------------------------------- 28 | 29 | JSON CONFIG: 30 | 31 | ConfigVersion - Don't touch this or it will reset your config settings 32 | PenConsumeQuantity - Pens have a max quantity of 100 and each use consumes this quantity. Set this to 0 to disable pen ink consumption 33 | Format - Options are 0 to 5. 0 = no date, 1 = 3rd September 2022, 2 = 03/09/2022, 3 = 3/9/2022, 4 = 09/03/2022, 5 = 9/3/2022 34 | DaySuffix - Only applies to date format #1. Sets the day suffix (eg. "3rd", "1st" etc) 35 | MonthName - Only applies to date format #1. Name of the current month. 36 | WordBlacklist - A list of blacklisted words. Separate each line like this: 37 | "badword1", 38 | "bad word 2", 39 | "bad word 3" 40 | 41 | No comma on the last line. These words are NOT case-sensitive. 42 | 43 | SendPlayerWarning - This is the message sent to the player if they write a blacklisted word. Set to blank "" to disable warnings. -------------------------------------------------------------------------------- /scripts/3_game/ZenNotesClientConfig.c: -------------------------------------------------------------------------------- 1 | class ZenNotesClientConfig 2 | { 3 | // Config location 4 | private const static string zenModFolder = "$profile:\\Zenarchist\\"; 5 | private const static string zenConfigName = "ZenNotesClientConfig.json"; 6 | 7 | // Main config data 8 | int LastUsedFontStyle; 9 | 10 | // Load config file 11 | void Load() 12 | { 13 | if (GetGame().IsClient()) 14 | { 15 | if (FileExist(zenModFolder + zenConfigName)) 16 | { // If config exists, load file 17 | JsonFileLoader.JsonLoadFile(zenModFolder + zenConfigName, this); 18 | } 19 | } 20 | } 21 | 22 | // Save config 23 | void Save() 24 | { 25 | if (!FileExist(zenModFolder)) 26 | { // If config folder doesn't exist, create it. 27 | MakeDirectory(zenModFolder); 28 | } 29 | 30 | // Save JSON config 31 | JsonFileLoader.JsonSaveFile(zenModFolder + zenConfigName, this); 32 | } 33 | } 34 | 35 | // Save config data 36 | ref ZenNotesClientConfig m_ZenNotesClientConfig; 37 | 38 | // Helper function to return Config data storage object 39 | static ZenNotesClientConfig GetZenNotesClientConfig() 40 | { 41 | if (!m_ZenNotesClientConfig) 42 | { 43 | Print("[ZenNotesClientConfig] Init"); 44 | m_ZenNotesClientConfig = new ZenNotesClientConfig; 45 | m_ZenNotesClientConfig.Load(); 46 | } 47 | 48 | return m_ZenNotesClientConfig; 49 | }; -------------------------------------------------------------------------------- /scripts/3_game/ZenNotesConfig.c: -------------------------------------------------------------------------------- 1 | class ZenNotesConfig 2 | { 3 | // Static constant config version (is NOT saved to json) 4 | static const string CONFIG_VERSION = "2"; 5 | 6 | // Config location 7 | private const static string zenModFolder = "$profile:\\Zenarchist\\"; 8 | private const static string zenConfigName = "ZenNotesConfig.json"; 9 | 10 | // Main config data 11 | string ConfigVersion = ""; 12 | bool AllowChangingFonts; 13 | int PenConsumeQuantity; 14 | ref ZenNoteDateFormat NoteDateFormat; 15 | ref array WordBlacklist = new array; 16 | string SendPlayerWarning; 17 | 18 | // Load config file or create default file if config doesn't exsit 19 | void Load() 20 | { 21 | if (!GetGame().IsDedicatedServer()) 22 | return; 23 | 24 | if (FileExist(zenModFolder + zenConfigName)) 25 | { // If config exists, load file 26 | JsonFileLoader.JsonLoadFile(zenModFolder + zenConfigName, this); 27 | 28 | // If version mismatch, backup old version of json before replacing it 29 | if (ConfigVersion != CONFIG_VERSION) 30 | { 31 | JsonFileLoader.JsonSaveFile(zenModFolder + zenConfigName + "_old", this); 32 | ConfigVersion = CONFIG_VERSION; 33 | } 34 | else 35 | { 36 | // Config exists and version matches, stop here. 37 | return; 38 | } 39 | } 40 | 41 | // Clear old config 42 | WordBlacklist.Clear(); 43 | 44 | // Set new config version 45 | ConfigVersion = CONFIG_VERSION; 46 | 47 | // Set default config 48 | AllowChangingFonts = true; 49 | SendPlayerWarning = "We don't tolerate that sort of language on our server. Your note has been logged and any repeat offenses may result in a permanent ban."; 50 | PenConsumeQuantity = 3; 51 | 52 | // Set default date format 53 | NoteDateFormat = new ZenNoteDateFormat; 54 | NoteDateFormat.Format = 1; 55 | NoteDateFormat.DaySuffix = new array; 56 | NoteDateFormat.DaySuffix.Insert("st"); 57 | NoteDateFormat.DaySuffix.Insert("nd"); 58 | NoteDateFormat.DaySuffix.Insert("rd"); 59 | NoteDateFormat.DaySuffix.Insert("th"); 60 | NoteDateFormat.MonthName = new array; 61 | NoteDateFormat.MonthName.Insert("January"); 62 | NoteDateFormat.MonthName.Insert("February"); 63 | NoteDateFormat.MonthName.Insert("March"); 64 | NoteDateFormat.MonthName.Insert("April"); 65 | NoteDateFormat.MonthName.Insert("May"); 66 | NoteDateFormat.MonthName.Insert("June"); 67 | NoteDateFormat.MonthName.Insert("July"); 68 | NoteDateFormat.MonthName.Insert("August"); 69 | NoteDateFormat.MonthName.Insert("September"); 70 | NoteDateFormat.MonthName.Insert("October"); 71 | NoteDateFormat.MonthName.Insert("November"); 72 | NoteDateFormat.MonthName.Insert("December"); 73 | 74 | // Set default blacklisted words 75 | WordBlacklist.Clear(); 76 | WordBlacklist.Insert("REALLY_NASTY_WORDS_THAT"); 77 | WordBlacklist.Insert("YOU_DONT_WANT_WRITTEN"); 78 | 79 | // Save config 80 | Save(); 81 | } 82 | 83 | // Save config 84 | void Save() 85 | { 86 | if (!FileExist(zenModFolder)) 87 | { // If config folder doesn't exist, create it. 88 | MakeDirectory(zenModFolder); 89 | } 90 | 91 | // Save JSON config 92 | JsonFileLoader.JsonSaveFile(zenModFolder + zenConfigName, this); 93 | } 94 | 95 | // Check if the given message contains a blacklisted word 96 | static const string STRIP_CHARS = " /~|!@#$%^&*()_-+=[{]};:'\",<.>/?`~\\"; 97 | bool IsBlacklisted(string msg) 98 | { 99 | // Trim whitespace & set msg to lower case 100 | msg = msg.Trim(); 101 | msg.ToLower(); 102 | 103 | // Cycle through all symbol chars and delete them 104 | for (int i = 0; i < STRIP_CHARS.Length(); i++) 105 | { 106 | msg.Replace(STRIP_CHARS.Get(i), ""); 107 | } 108 | 109 | // Cycle through all blacklisted words and check for match 110 | foreach (string s : WordBlacklist) 111 | { 112 | s.ToLower(); 113 | if (msg.Contains(s)) 114 | return true; 115 | } 116 | 117 | return false; 118 | } 119 | 120 | // Get readable date 121 | string GetDate() 122 | { 123 | // 0 = no date. 124 | if (NoteDateFormat.Format == 0) 125 | { 126 | return ""; 127 | } 128 | 129 | // Get date as numbers 130 | int year, month, day; 131 | GetYearMonthDay(year, month, day); 132 | 133 | // Prepare date strings 134 | string date; 135 | string dayNumber; 136 | string monthNumber; 137 | string dayStr; 138 | string monthStr; 139 | 140 | // Get day number (eg. convert 07 -> 7) 141 | dayNumber = day.ToStringLen(2); 142 | if (day <= 9) 143 | dayNumber = day.ToStringLen(1); 144 | 145 | // Get month number (eg. convert 07 -> 7) 146 | monthNumber = month.ToStringLen(2); 147 | if (month <= 9) 148 | monthNumber = month.ToStringLen(1); 149 | 150 | if (NoteDateFormat.Format == 1) // eg. 23rd September, 2022 151 | { 152 | // Get formatted date 153 | dayStr = GetNumberDateyThingy(day); 154 | monthStr = GetMonth(month); 155 | date = dayNumber + dayStr + " " + monthStr + ", " + year.ToStringLen(4); 156 | } 157 | else 158 | if (NoteDateFormat.Format == 2) // eg. 23/09/2022 159 | { 160 | date = day.ToStringLen(2) + "/" + month.ToStringLen(2) + "/" + year.ToStringLen(4); 161 | } 162 | else 163 | if (NoteDateFormat.Format == 3) // eg. 3/6/2022 164 | { 165 | date = dayNumber + "/" + monthNumber + "/" + year.ToStringLen(4); 166 | } 167 | else 168 | if (NoteDateFormat.Format == 4) // eg. 09/23/22 169 | { 170 | date = month.ToStringLen(2) + "/" + day.ToStringLen(2) + "/" + year.ToStringLen(4); 171 | } 172 | else 173 | if (NoteDateFormat.Format == 5) // eg. 12/9/22 174 | { 175 | date = monthNumber + "/" + dayNumber + "/" + year.ToStringLen(4); 176 | } 177 | else 178 | if (NoteDateFormat.Format == 6) // eg. 23rd September 179 | { 180 | // Get formatted date 181 | dayStr = GetNumberDateyThingy(day); 182 | monthStr = GetMonth(month); 183 | date = dayNumber + dayStr + " " + monthStr ; 184 | } 185 | 186 | return date; 187 | } 188 | 189 | // Returns the suffix of a date number (for lack of a more educated term) 190 | string GetNumberDateyThingy(int number) 191 | { 192 | // I tried this fancy solution I found on stack overflow but it made 12 look like 12nd instead of 12th... 193 | // And I'm not smart enough to think of a better solution than to just hard-code the fucker. 194 | 195 | /*switch (number % 10) 196 | { 197 | case 1: return NoteDateFormat.DaySuffix.Get(0); 198 | case 2: return NoteDateFormat.DaySuffix.Get(1); 199 | case 3: return NoteDateFormat.DaySuffix.Get(2); 200 | default: return NoteDateFormat.DaySuffix.Get(3); 201 | }*/ 202 | 203 | switch (number) 204 | { 205 | case 1: 206 | case 21: 207 | case 31: 208 | return NoteDateFormat.DaySuffix.Get(0); // 1st 209 | case 2: 210 | case 22: 211 | return NoteDateFormat.DaySuffix.Get(1); // 2nd 212 | case 3: 213 | case 23: 214 | return NoteDateFormat.DaySuffix.Get(2); // 3rd 215 | case 4: 216 | case 5: 217 | case 6: 218 | case 7: 219 | case 8: 220 | case 9: 221 | case 10: 222 | case 11: 223 | case 12: 224 | case 13: 225 | case 14: 226 | case 15: 227 | case 16: 228 | case 17: 229 | case 18: 230 | case 19: 231 | case 20: 232 | case 24: 233 | case 25: 234 | case 26: 235 | case 27: 236 | case 28: 237 | case 29: 238 | case 30: 239 | return NoteDateFormat.DaySuffix.Get(3); // 4th 240 | } 241 | 242 | return ""; 243 | } 244 | 245 | // Gets the month as a string 246 | string GetMonth(int month) 247 | { 248 | return NoteDateFormat.MonthName.Get(month - 1); 249 | } 250 | } 251 | 252 | // Define the date format 253 | class ZenNoteDateFormat 254 | { 255 | int Format; 256 | ref array DaySuffix; 257 | ref array MonthName; 258 | }; 259 | 260 | // Save config data 261 | ref ZenNotesConfig m_ZenNotesConfig; 262 | 263 | // Helper function to return Config data storage object 264 | static ZenNotesConfig GetZenNotesConfig() 265 | { 266 | if (!m_ZenNotesConfig) 267 | { 268 | Print("[ZenNotesConfig] Init"); 269 | m_ZenNotesConfig = new ZenNotesConfig; 270 | m_ZenNotesConfig.Load(); 271 | } 272 | 273 | return m_ZenNotesConfig; 274 | }; -------------------------------------------------------------------------------- /scripts/3_game/ZenNotesConstants.c: -------------------------------------------------------------------------------- 1 | const int MENU_ZEN_NOTE_GUI = 69835699; 2 | 3 | enum ZENNOTERPCs 4 | { 5 | WRITE_NOTE = 42069101, 6 | SEND_WRITTEN_NOTE = 42069102, 7 | RECEIVE_WRITTEN_NOTE = 42069103, 8 | RECEIVE_NOTE_DATE = 42069104; 9 | } -------------------------------------------------------------------------------- /scripts/3_game/ZenNotesLogger.c: -------------------------------------------------------------------------------- 1 | class ZenNotesLogger 2 | { 3 | const static string LOG_FOLDER = "$profile:\\Zenarchist\\Logs\\"; 4 | const static string LOG_FILE = "ZenNotes"; 5 | 6 | static void Log(string type, string txt) 7 | { 8 | if (!GetGame().IsDedicatedServer()) 9 | return; 10 | 11 | string file_path = LOG_FOLDER + LOG_FILE + "_" + type + ".log"; 12 | 13 | if (!FileExist(LOG_FOLDER)) 14 | { 15 | // If log folder doesn't exist, create it. 16 | MakeDirectory(LOG_FOLDER); 17 | } 18 | 19 | FileHandle logFile = OpenFile(file_path, FileMode.APPEND); 20 | if (logFile != 0) 21 | { 22 | FPrintln(logFile, GetDate() + " [ZenNotes] " + txt); 23 | CloseFile(logFile); 24 | } 25 | } 26 | 27 | static private string GetDate(bool fileFriendly = false) 28 | { 29 | int year, month, day, hour, minute, second; 30 | 31 | GetYearMonthDay(year, month, day); 32 | GetHourMinuteSecond(hour, minute, second); 33 | 34 | string date = day.ToStringLen(2) + "." + month.ToStringLen(2) + "." + year.ToStringLen(4) + " " + hour.ToStringLen(2) + ":" + minute.ToStringLen(2) + ":" + second.ToStringLen(2); 35 | if (fileFriendly) 36 | { 37 | date.Replace(" ", "_"); 38 | date.Replace(".", "-"); 39 | date.Replace(":", "-"); 40 | } 41 | 42 | return date; 43 | } 44 | } -------------------------------------------------------------------------------- /scripts/4_world/classes/Hologram.c: -------------------------------------------------------------------------------- 1 | // Allows notes to be placed anywhere 2 | modded class Hologram 3 | { 4 | override void EvaluateCollision(ItemBase action_item = null) 5 | { 6 | if (action_item && action_item.IsInherited(ZenNote)) 7 | { 8 | SetIsColliding(false); 9 | return; 10 | } 11 | 12 | super.EvaluateCollision(action_item); 13 | } 14 | } -------------------------------------------------------------------------------- /scripts/4_world/classes/JMAnimRegister.c: -------------------------------------------------------------------------------- 1 | // Registers item animations 2 | modded class JMAnimRegister 3 | { 4 | override void OnRegisterOneHanded(DayZPlayerType pType, DayzPlayerItemBehaviorCfg pBehavior) 5 | { 6 | super.OnRegisterOneHanded(pType, pBehavior); 7 | 8 | // Set note hand-held animation 9 | pType.AddItemInHandsProfileIK("ZenNote", "dz/anims/workspaces/player/player_main/player_main_1h.asi", pBehavior, "dz/anims/anm/player/ik/gear/paper.anm"); 10 | } 11 | }; -------------------------------------------------------------------------------- /scripts/4_world/classes/gui/ZenNoteGUI.c: -------------------------------------------------------------------------------- 1 | class ZenNoteGUI extends UIScriptedMenu 2 | { 3 | // Layout constants 4 | static const string LAYOUT_FILE = "ZenNotes/data/gui/layouts/NoteGUI.layout"; 5 | 6 | // Font variables 7 | int m_FontIndex = 0; 8 | 9 | // Text widgets 10 | ref array m_TextBoxes = {}; 11 | ref array m_Dates = {}; 12 | 13 | // Read-only widgets 14 | ref array m_TextReadBoxes = {}; 15 | 16 | // Button widgets 17 | ButtonWidget m_ExitBtn; 18 | ButtonWidget m_SelectFontBtn; 19 | 20 | // Damage layer image widget 21 | ImageWidget m_DamageLayer; 22 | 23 | // Pen & paper variables 24 | ItemBase m_Paper; 25 | int m_PenColour; 26 | static string DATE_TEXT = ""; 27 | static bool CAN_CHANGE_FONTS = false; 28 | 29 | // Not sure if this is necessary, but I always clean up after myself if you know what I mean 30 | void ~ZenNoteGUI() 31 | { 32 | // Cleanup - unlink widgets 33 | m_ExitBtn.Unlink(); 34 | m_SelectFontBtn.Unlink(); 35 | 36 | // Unlink arrays 37 | foreach (MultilineEditBoxWidget box1 : m_TextBoxes) 38 | { 39 | box1.Unlink(); 40 | } 41 | 42 | foreach(MultilineTextWidget box2 : m_TextReadBoxes) 43 | { 44 | box2.Unlink(); 45 | } 46 | 47 | foreach (TextWidget date : m_Dates) 48 | { 49 | date.Unlink(); 50 | } 51 | } 52 | 53 | // Init widgets 54 | override Widget Init() 55 | { 56 | // Load layout 57 | layoutRoot = GetGame().GetWorkspace().CreateWidgets(LAYOUT_FILE); 58 | 59 | // Load text widget arrays 60 | for (int i = 0; i < 100; i++) 61 | { 62 | MultilineEditBoxWidget box = MultilineEditBoxWidget.Cast(layoutRoot.FindAnyWidget("NoteText" + i)); 63 | MultilineTextWidget readBox = MultilineTextWidget.Cast(layoutRoot.FindAnyWidget("NoteReadText" + i)); 64 | TextWidget date = TextWidget.Cast(layoutRoot.FindAnyWidget("DateText" + i)); 65 | 66 | if (box && date && readBox) 67 | { 68 | m_TextReadBoxes.Insert(readBox); 69 | m_TextBoxes.Insert(box); 70 | m_Dates.Insert(date); 71 | date.SetText(DATE_TEXT); 72 | } 73 | else 74 | { 75 | break; // We've loaded all textboxes 76 | } 77 | } 78 | 79 | // Load required widgets 80 | m_ExitBtn = ButtonWidget.Cast(layoutRoot.FindAnyWidget("CloseBtn")); 81 | m_SelectFontBtn = ButtonWidget.Cast(layoutRoot.FindAnyWidget("FontBtn")); 82 | m_DamageLayer = ImageWidget.Cast(layoutRoot.FindAnyWidget("DamageLayer")); 83 | 84 | // Set select style language 85 | ButtonWidget fontBtn = ButtonWidget.Cast(layoutRoot.FindAnyWidget("FontBtn")); 86 | if (fontBtn) 87 | { 88 | fontBtn.SetText("#STR_ZenNoteStyle"); 89 | } 90 | 91 | if (!m_ExitBtn || !m_SelectFontBtn) 92 | { 93 | ErrorMsg("Failed to load widgets for ZenNotes!"); 94 | return NULL; 95 | } 96 | 97 | // Hide font button 98 | m_SelectFontBtn.Enable(false); 99 | m_SelectFontBtn.Show(false); 100 | 101 | // Prevent user controls while note is open 102 | GetGame().GetMission().PlayerControlDisable(INPUT_EXCLUDE_ALL); 103 | GetGame().GetMission().GetHud().Show(false); 104 | 105 | // Disable 3rd person view key while typing notes 106 | GetUApi().GetInputByName("UAPersonView").Lock(); 107 | 108 | return layoutRoot; 109 | } 110 | 111 | // Flag as a keyboard input menu 112 | override bool UseKeyboard() 113 | { 114 | return true; 115 | } 116 | 117 | // Set the paper reference object 118 | void SetPaper(ItemBase item) 119 | { 120 | m_Paper = item; 121 | 122 | int dmgState = m_Paper.GetHealthLevel(""); 123 | 124 | if (dmgState != GameConstants.STATE_PRISTINE) 125 | m_DamageLayer.Show(true); 126 | 127 | if (dmgState == GameConstants.STATE_WORN) 128 | m_DamageLayer.SetAlpha(0.3); 129 | else if (dmgState == GameConstants.STATE_DAMAGED) 130 | m_DamageLayer.SetAlpha(0.6); 131 | else if (dmgState <= GameConstants.STATE_BADLY_DAMAGED) 132 | m_DamageLayer.SetAlpha(0.9); 133 | } 134 | 135 | // READ-ONLY NOTE DATA SENT - we're reading a note that's already written and saved. 136 | void SetNoteData(ZenNoteData data) 137 | { 138 | // Set font index first 139 | SetFontIndex(data.m_FontIndex); 140 | 141 | // Get text boxes 142 | MultilineTextWidget read_box = m_TextReadBoxes.Get(m_FontIndex); 143 | TextWidget date = m_Dates.Get(m_FontIndex); 144 | 145 | if (!read_box || !date) 146 | { 147 | OnExitBtnClick(); 148 | return; 149 | } 150 | 151 | MultilineTextWidget temp_readBox; 152 | MultilineEditBoxWidget temp_box; 153 | TextWidget temp_date; 154 | 155 | // Hide all editboxes 156 | for (int i = 0; i < m_TextBoxes.Count(); i++) 157 | { 158 | temp_readBox = m_TextReadBoxes.Get(i); 159 | temp_box = m_TextBoxes.Get(i); 160 | temp_date = m_Dates.Get(i); 161 | temp_readBox.Enable(false); 162 | temp_readBox.Show(false); 163 | temp_box.Enable(false); 164 | temp_box.Show(false); 165 | temp_date.Enable(false); 166 | temp_date.Show(false); 167 | } 168 | 169 | read_box.Show(true); 170 | read_box.SetText(data.m_NoteText); 171 | date.Show(true); 172 | date.SetText(data.m_DateText); 173 | 174 | // Hide font selection 175 | m_SelectFontBtn.Enable(false); 176 | m_SelectFontBtn.Show(false); 177 | 178 | // Set text colour 179 | SetPenColour(data.m_ARGBColour); 180 | } 181 | 182 | // Set note date (formatted by server) 183 | void SetDate() 184 | { 185 | TextWidget dateWidget = m_Dates.Get(m_FontIndex); 186 | if (dateWidget) 187 | { 188 | dateWidget.SetText(DATE_TEXT); 189 | } 190 | } 191 | 192 | // Set whether or not font changing is enabled by server 193 | void SetFontEnabled() 194 | { 195 | m_SelectFontBtn.Enable(CAN_CHANGE_FONTS); 196 | m_SelectFontBtn.Show(CAN_CHANGE_FONTS); 197 | } 198 | 199 | // Set font index 200 | void SetFontIndex(int index) 201 | { 202 | m_FontIndex = index; 203 | } 204 | 205 | // Set pen text colour 206 | void SetPenColour(int colour) 207 | { 208 | // Set all edit box colours 209 | foreach (MultilineEditBoxWidget box : m_TextBoxes) 210 | { 211 | box.SetColor(colour); 212 | } 213 | 214 | // Set all read box colours 215 | foreach(MultilineTextWidget readBox : m_TextReadBoxes) 216 | { 217 | readBox.SetColor(colour); 218 | } 219 | 220 | // Set all date colours 221 | foreach (TextWidget date : m_Dates) 222 | { 223 | date.SetColor(colour); 224 | } 225 | 226 | m_ExitBtn.SetTextColor(colour); 227 | m_SelectFontBtn.SetTextColor(colour); 228 | m_PenColour = colour; 229 | } 230 | 231 | // Set read only 232 | void SetReadOnly(bool readOnly) 233 | { 234 | if (readOnly) 235 | { 236 | // Hide all edit boxes 237 | foreach(MultilineEditBoxWidget box : m_TextBoxes) 238 | { 239 | box.Enable(false); 240 | box.Show(false); 241 | } 242 | } 243 | 244 | // If note is NOT read-only, set last-used font 245 | if (!readOnly) 246 | HandleFontClick(-1, GetZenNotesClientConfig().LastUsedFontStyle); 247 | } 248 | 249 | // Handles clicks on button widgets 250 | override bool OnClick(Widget w, int x, int y, int button) 251 | { 252 | super.OnClick(w, x, y, button); 253 | 254 | if (w == m_ExitBtn) 255 | { 256 | return OnExitBtnClick(); 257 | } 258 | 259 | if (w == m_SelectFontBtn && CAN_CHANGE_FONTS) 260 | { 261 | return HandleFontClick(button); 262 | } 263 | 264 | return true; 265 | } 266 | 267 | // Suppress view key 268 | override void Update(float timeslice) 269 | { 270 | super.Update(timeslice); 271 | 272 | if (GetUApi()) 273 | GetUApi().GetInputByName("UAPersonView").Supress(); 274 | }; 275 | 276 | // Handle font click 277 | bool HandleFontClick(int btn, int savedIndex = -1) 278 | { 279 | // Hide all read-only boxes 280 | MultilineTextWidget read_box; 281 | for (int i = 0; i < m_TextBoxes.Count(); i++) 282 | { 283 | read_box = m_TextReadBoxes.Get(i); 284 | read_box.Show(false); 285 | read_box.Enable(false); 286 | } 287 | 288 | // Prepare txt string for swapping editbox contents 289 | string msgTxt; 290 | 291 | // Get old edit box 292 | MultilineEditBoxWidget edit_box_old = m_TextBoxes.Get(m_FontIndex); 293 | TextWidget date_old = m_Dates.Get(m_FontIndex); 294 | 295 | // Check button - left click = next font, right click = last font 296 | if (btn == 0) // Left click 297 | btn = 1; 298 | else // Right click 299 | btn = -1; 300 | 301 | if (edit_box_old) 302 | { 303 | // Check for saved font index override 304 | if (savedIndex != -1) 305 | m_FontIndex = savedIndex; 306 | else 307 | m_FontIndex = m_FontIndex + btn; 308 | 309 | // Validate lower font index range 310 | if (m_FontIndex <= -1) 311 | m_FontIndex = m_TextBoxes.Count() - 1; 312 | 313 | // Validate upper font index range 314 | if (m_FontIndex >= m_TextBoxes.Count()) 315 | m_FontIndex = 0; 316 | 317 | MultilineEditBoxWidget edit_box_new = m_TextBoxes.Get(m_FontIndex); 318 | TextWidget date_new = m_Dates.Get(m_FontIndex); 319 | 320 | // Update edit boxes 321 | if (edit_box_new && date_new) 322 | { 323 | edit_box_old.GetText(msgTxt); 324 | edit_box_new.SetText(msgTxt); 325 | date_new.SetText(DATE_TEXT); 326 | 327 | edit_box_old.Show(false); 328 | edit_box_old.Enable(false); 329 | date_old.Show(false); 330 | 331 | edit_box_new.Show(true); 332 | edit_box_new.Enable(true); 333 | date_new.Show(true); 334 | } 335 | else 336 | { 337 | ErrorMsg("NEW EDIT BOX NOT FOUND!"); 338 | } 339 | } 340 | else 341 | { 342 | ErrorMsg("OLD EDIT BOX NOT FOUND!"); 343 | } 344 | 345 | return true; 346 | } 347 | 348 | // Close GUI 349 | bool OnExitBtnClick() 350 | { 351 | string msgTxt; 352 | 353 | MultilineEditBoxWidget box = m_TextBoxes.Get(m_FontIndex); 354 | 355 | if (box) 356 | { 357 | box.GetText(msgTxt); 358 | } 359 | else 360 | { 361 | ErrorMsg("EDIT BOX NOT FOUND FOR FONT INDEX " + m_FontIndex); 362 | return false; 363 | } 364 | 365 | // Send written note data to server to save + sync to other clients 366 | if (m_Paper) 367 | { 368 | ZenNoteData note_data = new ZenNoteData; 369 | note_data.m_FontIndex = m_FontIndex; 370 | note_data.m_NoteText = msgTxt; 371 | note_data.m_DateText = DATE_TEXT; 372 | note_data.m_ARGBColour = m_PenColour; 373 | 374 | Param1 params = new Param1(note_data); 375 | 376 | if (msgTxt != "" && GetGame().GetPlayer()) 377 | { 378 | m_Paper.RPCSingleParam(ZENNOTERPCs.SEND_WRITTEN_NOTE, params, true, NULL); 379 | } 380 | } 381 | 382 | UIManager uiManager = GetGame().GetUIManager(); 383 | 384 | if (!uiManager) 385 | return true; 386 | 387 | // Exit menu and restore player controls 388 | UIScriptedMenu menu = uiManager.GetMenu(); 389 | if (menu) 390 | { 391 | ZenNoteGUI noteMenu = ZenNoteGUI.Cast(menu); 392 | if (noteMenu) 393 | { 394 | uiManager.HideScriptedMenu(noteMenu); 395 | 396 | Mission mission = GetGame().GetMission(); 397 | if (mission) 398 | { 399 | mission.PlayerControlEnable(true); 400 | mission.GetHud().Show(true); 401 | GetUApi().GetInputByName("UAPersonView").Unlock(); 402 | } 403 | } 404 | } 405 | 406 | // Save last used font client-side 407 | GetZenNotesClientConfig().LastUsedFontStyle = m_FontIndex; 408 | GetZenNotesClientConfig().Save(); 409 | 410 | return true; 411 | } 412 | 413 | // Display an error message 414 | private void ErrorMsg(string s) 415 | { 416 | Print("[ZenNotesGUI] Error - " + s); 417 | ZenNote_DebugMsg("[ZenNotesGUI] Error - " + s + ". Please tell the server admin to contact Zenarchist"); 418 | } 419 | 420 | // Used only for debugging 421 | private void ZenNote_DebugMsg(string msg) 422 | { 423 | GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(CCDirect, "", msg, "")); 424 | } 425 | } -------------------------------------------------------------------------------- /scripts/4_world/classes/useractionscomponent/ActionConstructor.c: -------------------------------------------------------------------------------- 1 | modded class ActionConstructor 2 | { 3 | override void RegisterActions(TTypenameArray actions) 4 | { 5 | super.RegisterActions(actions); 6 | 7 | actions.Insert(ActionZenWritePaper); 8 | actions.Insert(ActionZenReadNoteHands); 9 | actions.Insert(ActionZenReadNoteTarget); 10 | } 11 | } -------------------------------------------------------------------------------- /scripts/4_world/classes/useractionscomponent/actions/ActionDeployObject.c: -------------------------------------------------------------------------------- 1 | modded class ActionDeployObject 2 | { 3 | override void SetupAnimation(ItemBase item) 4 | { 5 | if (item.IsKindOf("Paper")) 6 | { 7 | m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT; 8 | return; 9 | } 10 | 11 | super.SetupAnimation(item); 12 | } 13 | 14 | override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) 15 | { 16 | if (GetGame().IsClient()) 17 | { 18 | if (player.IsPlacingLocal() && item.IsKindOf("Paper")) 19 | return true; 20 | } 21 | 22 | return super.ActionCondition(player, target, item); 23 | } 24 | } -------------------------------------------------------------------------------- /scripts/4_world/classes/useractionscomponent/actions/continuous/ActionZenReadNoteHands.c: -------------------------------------------------------------------------------- 1 | class ActionZenReadNoteHandsCB : ActionContinuousBaseCB {} 2 | 3 | class ActionZenReadNoteHands : ActionContinuousBase 4 | { 5 | void ActionZenReadNoteHands() 6 | { 7 | m_CallbackClass = ActionZenReadNoteHandsCB; 8 | m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_VIEWNOTE; 9 | m_FullBody = true; 10 | m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_PRONE; 11 | m_Text = "#read"; 12 | } 13 | 14 | override void CreateConditionComponents() 15 | { 16 | m_ConditionItem = new CCINonRuined; 17 | m_ConditionTarget = new CCTNone; 18 | } 19 | 20 | // Action condition 21 | override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) 22 | { 23 | // Return true on server 24 | if (GetGame().IsDedicatedServer()) 25 | return true; 26 | 27 | // If the player is currently looking at an object that is not a note, disable the read note action 28 | if (target.GetObject()) 29 | return false; 30 | 31 | // Otherwise return true if the item in the player's hand is a note and they are not placing it as a hologram 32 | return item && item.IsInherited(ZenNote) && !player.IsPlacingLocal(); 33 | } 34 | 35 | // Called server-side - when the action begins, send the note data to the client and display the note GUI 36 | override void OnStartServer(ActionData action_data) 37 | { 38 | ZenNote note = ZenNote.Cast(action_data.m_MainItem); 39 | 40 | if (note) 41 | { 42 | auto data = new Param1(note.GetNoteData()); 43 | note.RPCSingleParam(ZENNOTERPCs.RECEIVE_WRITTEN_NOTE, data, true, action_data.m_Player.GetIdentity()); 44 | note.IncreaseLifetime(); 45 | } 46 | } 47 | 48 | // For compatibility with @ZenCraftingSounds 49 | override string GetSoundCategory(ActionData action_data) 50 | { 51 | return "Zen_Paper"; 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /scripts/4_world/classes/useractionscomponent/actions/continuous/ActionZenWritePaper.c: -------------------------------------------------------------------------------- 1 | class ActionZenWritePaperCB : ActionContinuousBaseCB {} 2 | 3 | class ActionZenWritePaper : ActionContinuousBase 4 | { 5 | void ActionZenWritePaper() 6 | { 7 | m_CallbackClass = ActionZenWritePaperCB; 8 | m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_VIEWNOTE; 9 | m_FullBody = true; 10 | m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_PRONE; 11 | m_Text = "#write_note"; 12 | } 13 | 14 | override void CreateConditionComponents() 15 | { 16 | m_ConditionItem = new CCINonRuined; 17 | m_ConditionTarget = new CCTNonRuined(1.2); // 1.2 meters 18 | } 19 | 20 | // Check to make sure that we're using a pen on paper 21 | override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) 22 | { 23 | // If item or target doesn't exist, stop 24 | if (!item || !target.GetObject()) 25 | return false; 26 | 27 | // Make sure this item is not an already-written note 28 | if (item.IsInherited(ZenNote) || target.GetObject().IsInherited(ZenNote)) 29 | return false; 30 | 31 | // Is main item or target paper, and is main item or target a color-based item (ie. pen) 32 | if ((item.ConfigIsExisting("penColor") && Paper.Cast(target.GetObject())) || (target.GetObject().ConfigIsExisting("penColor") && Paper.Cast(item))) 33 | { 34 | return true; 35 | } 36 | 37 | return false; 38 | } 39 | 40 | // Called when action begins on client-side 41 | override void OnStartClient(ActionData action_data) 42 | { 43 | ZenNoteGUI gui = ZenNoteGUI.Cast(GetGame().GetUIManager().EnterScriptedMenu(MENU_ZEN_NOTE_GUI, NULL)); 44 | 45 | if (gui) 46 | { 47 | // Check if paper is main item or target 48 | Paper paper = Paper.Cast(action_data.m_MainItem); 49 | if (!paper) 50 | paper = Paper.Cast(action_data.m_Target.GetObject()); 51 | 52 | // Check if pen is main item or target 53 | Pen_ColorBase pen = Pen_ColorBase.Cast(action_data.m_MainItem); 54 | if (!pen) 55 | pen = Pen_ColorBase.Cast(action_data.m_Target.GetObject()); 56 | 57 | // Prepare note GUI for writing 58 | gui.SetPaper(paper); 59 | gui.SetReadOnly(false); 60 | gui.SetPenColour(GetPenColour(pen)); 61 | } 62 | } 63 | 64 | // Called when action begins on server-side 65 | override void OnStartServer(ActionData action_data) 66 | { 67 | // Check if paper is main item or target 68 | Paper paper = Paper.Cast(action_data.m_MainItem); 69 | if (!paper) 70 | paper = Paper.Cast(action_data.m_Target.GetObject()); 71 | 72 | // Check if pen is main item or target 73 | Pen_ColorBase pen = Pen_ColorBase.Cast(action_data.m_MainItem); 74 | if (!pen) 75 | pen = Pen_ColorBase.Cast(action_data.m_Target.GetObject()); 76 | 77 | // If no paper or pen, stop here 78 | if (!paper || !pen) 79 | return; 80 | 81 | // Save pen to paper (so that when note is written by client we can reduce pen quantity) 82 | if (GetZenNotesConfig().PenConsumeQuantity > 0) 83 | { 84 | paper.SetPen(pen); 85 | } 86 | 87 | // Check if date is disabled in config 88 | if (GetZenNotesConfig().NoteDateFormat.Format == 0) 89 | { 90 | // 0 = no date on notes, stop here 91 | return; 92 | } 93 | 94 | // Send server-side date formatted to client 95 | Param2 data = new Param2(GetZenNotesConfig().GetDate(), GetZenNotesConfig().AllowChangingFonts); 96 | paper.RPCSingleParam(ZENNOTERPCs.RECEIVE_NOTE_DATE, data, true, action_data.m_Player.GetIdentity()); 97 | } 98 | 99 | // Get the ARGB colour integer for the given pen 100 | static int GetPenColour(Pen_ColorBase pen) 101 | { 102 | if (!pen) 103 | return 0; 104 | 105 | // Get RGB pen color from config.cpp 106 | TIntArray rgbArray = new TIntArray(); 107 | pen.ConfigGetIntArray("penColor", rgbArray); 108 | 109 | // Return RGB converted to ARGB with 100% opacity (255 alpha) 110 | return ARGB(255, rgbArray[0], rgbArray[1], rgbArray[2]); 111 | } 112 | 113 | // For compatibility with @ZenCraftingSounds 114 | override string GetSoundCategory(ActionData action_data) 115 | { 116 | return "Zen_Paper"; 117 | } 118 | }; 119 | -------------------------------------------------------------------------------- /scripts/4_world/classes/useractionscomponent/actions/interact/ActionZenReadNoteTarget.c: -------------------------------------------------------------------------------- 1 | class ActionZenReadNoteTarget : ActionInteractBase 2 | { 3 | void ActionZenReadNote() 4 | { 5 | m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL; 6 | m_Text = "#read"; 7 | } 8 | 9 | override string GetText() 10 | { 11 | return "#read"; 12 | } 13 | 14 | override bool IsInstant() 15 | { 16 | return true; 17 | } 18 | 19 | override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) 20 | { 21 | if (target && target.GetObject().IsInherited(ZenNote)) 22 | return !player.IsPlacingLocal(); 23 | 24 | return false; 25 | } 26 | 27 | override void OnStartServer(ActionData action_data) 28 | { 29 | ZenNote note = ZenNote.Cast(action_data.m_Target.GetObject()); 30 | 31 | if (note) 32 | { 33 | auto data = new Param1(note.GetNoteData()); 34 | note.RPCSingleParam(ZENNOTERPCs.RECEIVE_WRITTEN_NOTE, data, true, action_data.m_Player.GetIdentity()); 35 | note.IncreaseLifetime(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /scripts/4_world/classes/zennotedata/ZenNoteData.c: -------------------------------------------------------------------------------- 1 | // Stores persistent written note data 2 | class ZenNoteData 3 | { 4 | int m_FontIndex = 0; 5 | string m_DateText; 6 | string m_NoteText; 7 | int m_ARGBColour; 8 | }; -------------------------------------------------------------------------------- /scripts/4_world/entities/itembase/FireplaceBase.c: -------------------------------------------------------------------------------- 1 | // Make notes flammable 2 | modded class FireplaceBase 3 | { 4 | typename ATTACHMENT_ZENNOTE = ZenNote; 5 | 6 | void FireplaceBase() 7 | { 8 | m_FireConsumableTypes.Insert(ATTACHMENT_ZENNOTE, new FireConsumableType(ATTACHMENT_ZENNOTE, 10, true, "ZenNote")); 9 | } 10 | }; -------------------------------------------------------------------------------- /scripts/4_world/entities/itembase/Paper.c: -------------------------------------------------------------------------------- 1 | modded class Paper 2 | { 3 | // Prepare required paper note variables 4 | private int m_NotePickupTries = 0; 5 | Pen_ColorBase m_Pen; 6 | 7 | // Delete paper object - clear pen reference 8 | void ~Paper() 9 | { 10 | m_Pen = NULL; 11 | } 12 | 13 | // Set note actions 14 | override void SetActions() 15 | { 16 | super.SetActions(); 17 | RemoveAction(ActionWritePaper); 18 | AddAction(ActionZenWritePaper); 19 | } 20 | 21 | // Set the pen object used to write with 22 | void SetPen(Pen_ColorBase pen) 23 | { 24 | m_Pen = pen; 25 | } 26 | 27 | // Receive note data from client, then convert paper to written note 28 | override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx) 29 | { 30 | super.OnRPC(sender, rpc_type, ctx); 31 | 32 | // Client-side receiver for server-formatted date 33 | if (rpc_type == ZENNOTERPCs.RECEIVE_NOTE_DATE) 34 | { 35 | Param2 data_from_server; 36 | 37 | if (ctx.Read(data_from_server)) 38 | { 39 | // Set static variables (date text formatted by server & whether or not font can be changed) 40 | ZenNoteGUI.DATE_TEXT = data_from_server.param1; 41 | ZenNoteGUI.CAN_CHANGE_FONTS = data_from_server.param2; 42 | 43 | // UI will be open before the above data is set, so we need to update it after data is received 44 | GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(UpdateGUI, 50, false); 45 | } 46 | 47 | return; 48 | } 49 | 50 | // Server-side receiver for note data written by client/player 51 | if (rpc_type == ZENNOTERPCs.SEND_WRITTEN_NOTE) 52 | { 53 | int highBits, lowBits; 54 | GetGame().GetPlayerNetworkIDByIdentityID(sender.GetPlayerId(), lowBits, highBits); 55 | PlayerBase player = PlayerBase.Cast(GetGame().GetObjectByNetworkId(lowBits, highBits)); 56 | 57 | if (!player) // If we can't identify the player who sent this note data, stop here. 58 | return; 59 | 60 | Param1 data_from_client; 61 | 62 | if (ctx.Read(data_from_client)) 63 | { 64 | if (data_from_client.param1) 65 | { 66 | // Check if the note contains any blacklisted words 67 | if (GetZenNotesConfig().IsBlacklisted(data_from_client.param1.m_NoteText)) 68 | { 69 | // Log the blacklisted note for server admins 70 | ZenNotesLogger.Log("Blacklist", "[BLACKLIST] " + sender.GetName() + " (" + sender.GetPlainId() + ") @ " + this.GetPosition() + " tried to write: " + data_from_client.param1.m_NoteText); 71 | 72 | // If player warning is set, send it 73 | if (GetZenNotesConfig().SendPlayerWarning != "") 74 | { 75 | Zen_NoteSendMessage(player, GetZenNotesConfig().SendPlayerWarning); 76 | } 77 | 78 | return; 79 | } 80 | 81 | // Convert to written note item 82 | ZenNoteData noteData = new ZenNoteData; 83 | noteData.m_FontIndex = data_from_client.param1.m_FontIndex; 84 | noteData.m_DateText = data_from_client.param1.m_DateText; // Server date 85 | noteData.m_NoteText = data_from_client.param1.m_NoteText; 86 | noteData.m_ARGBColour = data_from_client.param1.m_ARGBColour; 87 | 88 | // If quantity of this paper is 1, swap the actual item 89 | if (this.GetQuantity() == 1) 90 | { 91 | // Prepare item replacement lambda 92 | ReplacePaperWithNoteLambda lambda = new ReplacePaperWithNoteLambda(this, "ZenNote", noteData); 93 | 94 | // If player is holding the note, replace it in their hands - otherwise replace the item elsewhere 95 | if (player.GetItemInHands() == this) 96 | player.ServerReplaceItemInHandsWithNew(lambda); 97 | else 98 | player.ServerReplaceItemWithNew(lambda); 99 | } 100 | else 101 | { 102 | this.SetQuantity(this.GetQuantity() - 1); 103 | 104 | // Spawn a note on the ground 105 | ZenNote noteGround = ZenNote.Cast(GetGame().CreateObjectEx("ZenNote", this.GetPosition(), ECE_PLACE_ON_SURFACE)); 106 | 107 | // If note did not spawn, stop here. 108 | if (!noteGround) 109 | return; 110 | 111 | // Copy note data to the written note object 112 | MiscGameplayFunctions.TransferItemProperties(this, noteGround); 113 | noteGround.SetNoteData(noteData); 114 | 115 | // If player is holding the paper stack, replace it in their hands with a note and put paper back in inventory 116 | if (player.GetItemInHands() == this && noteGround) 117 | { 118 | // Put the paper stack back in its reserved location, and place note into player's hands 119 | HumanInventory inventory = player.GetHumanInventory(); 120 | 121 | if (!inventory) 122 | return; 123 | 124 | // Get reserved paper location in inventory (dst) 125 | InventoryLocation loc_dst = new InventoryLocation; 126 | int reservedIndex = inventory.FindUserReservedLocationIndex(this); 127 | inventory.GetUserReservedLocation(reservedIndex, loc_dst); 128 | 129 | // Get current paper inventory location (src) 130 | InventoryLocation loc_src = new InventoryLocation; 131 | this.GetInventory().GetCurrentInventoryLocation(loc_src); 132 | 133 | // If player has moved an item into the paper's reserved slot, or ServerTakeToDst fails, just take paper to anywhere in inventory. 134 | if (reservedIndex == -1 || !player.ServerTakeToDst(loc_src, loc_dst)) 135 | { 136 | // If we can't take the paper stack to inventory for whatever reason, do nothing, leave it in player's hands and spawn note on ground 137 | player.ServerTakeEntityToInventory(FindInventoryLocationType.ANY_CARGO, this); 138 | } 139 | 140 | // Used to loop & try to take note to hands a few times (necessary because it takes a moment to update hand state when paper is put away) 141 | m_NotePickupTries = 0; 142 | 143 | // Attempt to pick up the note from the ground 144 | GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TakeNoteToHands, 200, true, player, noteGround); 145 | } 146 | } 147 | 148 | // Consume pen quantity 149 | if (GetZenNotesConfig().PenConsumeQuantity > 0 && m_Pen) 150 | { 151 | m_Pen.SetQuantity(m_Pen.GetQuantity() - GetZenNotesConfig().PenConsumeQuantity); 152 | } 153 | 154 | // Log note for server admins 155 | ZenNotesLogger.Log("General", sender.GetName() + " (" + sender.GetPlainId() + ") @ " + this.GetPosition() + " wrote: " + noteData.m_NoteText); 156 | } 157 | } 158 | } 159 | } 160 | 161 | // Pick up the note from the ground (TODO: Convoluted, there must be a better/more efficient way to do this!) 162 | private void TakeNoteToHands(PlayerBase player, EntityAI item) 163 | { 164 | if (item && player && player.IsAlive() && !player.IsUnconscious() && !player.IsPlayerDisconnected()) 165 | { 166 | // For some reason this approach bugs the player's hands?? Seems to work in my other mods though, not sure what I'm doing wrong... 167 | //EntityAI note; 168 | //note = player.GetHumanInventory().CreateInHands("ZenNote"); 169 | 170 | // Get inventory location of note (should be ground) 171 | InventoryLocation loc_src = new InventoryLocation; 172 | item.GetInventory().GetCurrentInventoryLocation(loc_src); 173 | 174 | // Create new inventory location with note (but set it to Hands location) 175 | InventoryLocation loc_dst = new InventoryLocation; 176 | loc_dst.Copy(loc_src); 177 | loc_dst.SetHands(player, item); 178 | 179 | // Take the ground note item to hands 180 | player.ServerTakeToDst(loc_src, loc_dst); 181 | 182 | // Increment pickup tries 183 | m_NotePickupTries++; 184 | 185 | // Try to pick up note for ~1 second, if failed just abandon picking up the note and leave it on the ground 186 | if (m_NotePickupTries >= 5) 187 | { 188 | GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(this.TakeNoteToHands); 189 | } 190 | } 191 | else 192 | { 193 | // If there is no note, no player object, or they're dead, or they're uncon, or they're disconnected, stop trying to pick it up and leave note on ground. 194 | GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(this.TakeNoteToHands); 195 | } 196 | } 197 | 198 | // Updates the text GUI if it's visible 199 | void UpdateGUI() 200 | { 201 | UIScriptedMenu menu = GetGame().GetUIManager().GetMenu(); 202 | if (menu) 203 | { 204 | ZenNoteGUI noteMenu = ZenNoteGUI.Cast(menu); 205 | if (noteMenu) 206 | { 207 | noteMenu.SetDate(); 208 | noteMenu.SetFontEnabled(); 209 | } 210 | } 211 | } 212 | 213 | // For debug purposes / to send blacklist warnings 214 | void Zen_NoteSendMessage(PlayerBase player, string message) 215 | { 216 | Param1 m_MessageParam = new Param1(""); 217 | if (GetGame().IsDedicatedServer() && m_MessageParam && player.IsAlive() && !player.IsPlayerDisconnected() && message != "") 218 | { 219 | m_MessageParam.param1 = message; 220 | GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); 221 | } 222 | } 223 | } 224 | 225 | // Lambda for replacing paper with written note object 226 | class ReplacePaperWithNoteLambda extends ReplaceItemWithNewLambdaBase 227 | { 228 | ref ZenNoteData m_NoteData; 229 | 230 | void ~ReplacePaperWithNoteLambda() 231 | { 232 | m_NoteData = NULL; 233 | delete m_NoteData; 234 | } 235 | 236 | void ReplacePaperWithNoteLambda(EntityAI old_item, string new_item_type, ZenNoteData data) 237 | { 238 | m_NoteData = data; 239 | } 240 | 241 | override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item) 242 | { 243 | super.CopyOldPropertiesToNew(old_item, new_item); 244 | 245 | ZenNote note = ZenNote.Cast(new_item); 246 | note.SetNoteData(m_NoteData); 247 | MiscGameplayFunctions.TransferItemProperties(old_item, note); 248 | 249 | if (!note.GetParent()) // If not in player's hands, copy paper location & orientation to new object 250 | { 251 | note.SetOrientation(old_item.GetOrientation()); 252 | note.SetPosition(old_item.GetPosition()); 253 | } 254 | 255 | m_NoteData = NULL; 256 | } 257 | } -------------------------------------------------------------------------------- /scripts/4_world/entities/itembase/Pen.c: -------------------------------------------------------------------------------- 1 | modded class Pen_ColorBase : Inventory_Base 2 | { 3 | override void SetActions() 4 | { 5 | super.SetActions(); 6 | RemoveAction(ActionWritePaper); 7 | AddAction(ActionZenWritePaper); 8 | } 9 | }; -------------------------------------------------------------------------------- /scripts/4_world/entities/itembase/ZenNote.c: -------------------------------------------------------------------------------- 1 | class ZenNote extends Paper 2 | { 3 | // Store a reference to this note's data 4 | protected ref ZenNoteData m_ZenNoteData; 5 | 6 | // Get item description - if player has read the note, display some note text 7 | override string GetTooltip() 8 | { 9 | if (m_ZenNoteData && m_ZenNoteData.m_NoteText) 10 | { 11 | // Split all the lines in the note 12 | TStringArray lineArray = new TStringArray; 13 | m_ZenNoteData.m_NoteText.Split("\n", lineArray); 14 | 15 | // Trim the whitespace before/after the line 16 | string description = ""; 17 | foreach (string s : lineArray) 18 | { 19 | description = description + s.Trim() + ". "; 20 | } 21 | 22 | // Delete any whitespace within the line 23 | description.Replace(" ", ""); 24 | 25 | // If note is very long, shorten it 26 | if (description.Length() > 280) 27 | description = description.Substring(0, 280); 28 | 29 | // Display the note as a description tooltip 30 | return description; 31 | } 32 | 33 | return ConfigGetString("descriptionShort"); 34 | } 35 | 36 | // Set note actions 37 | override void SetActions() 38 | { 39 | super.SetActions(); 40 | 41 | // Remove actions that aren't related to notes (ie. attach to fireplace, take item by tapping F) 42 | RemoveAction(ActionTakeItem); 43 | RemoveAction(ActionAttach); 44 | 45 | // Add actions related to written notes 46 | AddAction(ActionZenReadNoteHands); 47 | AddAction(ActionZenReadNoteTarget); 48 | AddAction(ActionTogglePlaceObject); 49 | AddAction(ActionPlaceObject); 50 | } 51 | 52 | // Receive note data from server 53 | override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx) 54 | { 55 | super.OnRPC(sender, rpc_type, ctx); 56 | 57 | Param1 params = new Param1(m_ZenNoteData); 58 | 59 | // Client-side receiver 60 | if (rpc_type == ZENNOTERPCs.RECEIVE_WRITTEN_NOTE) 61 | { 62 | if (!ctx.Read(params) || !params.param1) 63 | { 64 | Print("ERROR! Failed to read ZenNote data ZENNOTERPCs.RECEIVE_WRITTEN_NOTE - tell Zenarchist he fucked up!"); 65 | return; 66 | } 67 | 68 | m_ZenNoteData = params.param1; 69 | 70 | // Show note GUI as read-only 71 | ZenNoteGUI gui = ZenNoteGUI.Cast(GetGame().GetUIManager().EnterScriptedMenu(MENU_ZEN_NOTE_GUI, NULL)); 72 | 73 | if (gui) 74 | { 75 | gui.SetPaper(this); 76 | gui.SetNoteData(m_ZenNoteData); 77 | gui.SetReadOnly(true); 78 | } 79 | 80 | // For compatibility with @ZenCraftingSounds 81 | if (GetGame().ConfigIsExisting("CfgSoundSets Zen_Paper_loop_SoundSet")) 82 | { 83 | EffectSound effect = SEffectManager.PlaySound("Zen_Paper_loop_SoundSet", GetPosition()); 84 | effect.SetAutodestroy(true); 85 | } 86 | } 87 | } 88 | 89 | // Return this note's data 90 | ZenNoteData GetNoteData() 91 | { 92 | return m_ZenNoteData; 93 | } 94 | 95 | // Set this note's data 96 | void SetNoteData(ZenNoteData data) 97 | { 98 | m_ZenNoteData = data; 99 | } 100 | 101 | // Load note data 102 | override bool OnStoreLoad(ParamsReadContext ctx, int version) 103 | { 104 | if (!super.OnStoreLoad(ctx, version)) 105 | return false; 106 | 107 | // Load the note's persistent data 108 | if (!ctx.Read(m_ZenNoteData)) 109 | { 110 | return false; 111 | } 112 | 113 | return true; 114 | } 115 | 116 | // Save note data 117 | override void OnStoreSave(ParamsWriteContext ctx) 118 | { 119 | super.OnStoreSave(ctx); 120 | 121 | // Save the note's persistent data 122 | ctx.Write(m_ZenNoteData); 123 | } 124 | }; -------------------------------------------------------------------------------- /scripts/4_world/entities/manbase/PlayerBase.c: -------------------------------------------------------------------------------- 1 | // Handle uncon/death while writing notes (TODO: Figure out how the fuck to drop the written note upon death, not as easy as it sounds) 2 | modded class PlayerBase 3 | { 4 | override void OnUnconsciousStart() 5 | { 6 | super.OnUnconsciousStart(); 7 | 8 | #ifndef SERVER 9 | // Check if note UI is open, if so, close it 10 | if (GetGame() && GetGame().GetUIManager()) 11 | { 12 | UIScriptedMenu menu = GetGame().GetUIManager().GetMenu(); 13 | if (menu) 14 | { 15 | ZenNoteGUI noteMenu = ZenNoteGUI.Cast(menu); 16 | if (noteMenu) 17 | { 18 | noteMenu.OnExitBtnClick(); 19 | } 20 | } 21 | } 22 | #endif 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /scripts/5_mission/mission/MissionBase.c: -------------------------------------------------------------------------------- 1 | modded class MissionBase 2 | { 3 | // Create user interface 4 | override UIScriptedMenu CreateScriptedMenu(int id) 5 | { 6 | UIScriptedMenu menu = super.CreateScriptedMenu(id); 7 | 8 | if (!menu) 9 | { 10 | switch (id) 11 | { 12 | case MENU_ZEN_NOTE_GUI: 13 | { 14 | menu = new ZenNoteGUI; 15 | break; 16 | } 17 | } 18 | } 19 | 20 | return menu; 21 | } 22 | } -------------------------------------------------------------------------------- /scripts/5_mission/mission/MissionGameplay.c: -------------------------------------------------------------------------------- 1 | modded class MissionGameplay 2 | { 3 | // Close menu if escape key is pressed 4 | override void OnKeyPress(int key) 5 | { 6 | super.OnKeyPress(key); 7 | 8 | if (key == KeyCode.KC_ESCAPE) // Escape key 9 | { 10 | UIScriptedMenu menu = m_UIManager.GetMenu(); 11 | if (menu) 12 | { 13 | ZenNoteGUI noteMenu = ZenNoteGUI.Cast(menu); 14 | if (noteMenu) 15 | { 16 | noteMenu.OnExitBtnClick(); // Enables user control & HUD etc. Call this instead of HideScriptedMenu() 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /scripts/5_mission/mission/MissionServer.c: -------------------------------------------------------------------------------- 1 | modded class MissionServer 2 | { 3 | override void OnInit() 4 | { 5 | super.OnInit(); 6 | Print("[ZenNotes] OnInit"); 7 | 8 | // Load notes config 9 | GetZenNotesConfig(); 10 | } 11 | }; -------------------------------------------------------------------------------- /types.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1944000 6 | 7 | 8 | 9 | 10 | 6 11 | 28800 12 | 0 13 | 4 14 | 10 15 | 100 16 | 100 17 | 18 | 19 | 20 | 21 | 22 | 23 | 6 24 | 28800 25 | 0 26 | 4 27 | 10 28 | 100 29 | 100 30 | 31 | 32 | 33 | 34 | 35 | 36 | 6 37 | 28800 38 | 0 39 | 4 40 | 10 41 | 100 42 | 100 43 | 44 | 45 | 46 | 47 | 48 | 49 | 6 50 | 28800 51 | 0 52 | 4 53 | 10 54 | 100 55 | 100 56 | 57 | 58 | 59 | 60 | 61 | 62 | 3 63 | 28800 64 | 0 65 | 1 66 | 10 67 | 100 68 | 100 69 | 70 | 71 | 72 | 73 | 74 | 75 | 3 76 | 28800 77 | 0 78 | 1 79 | 10 80 | 100 81 | 100 82 | 83 | 84 | 85 | 86 | 87 | 88 | 3 89 | 28800 90 | 0 91 | 1 92 | 10 93 | 100 94 | 100 95 | 96 | 97 | 98 | 99 | 100 | --------------------------------------------------------------------------------