Nebula

Member
  • Content count

    130
  • Joined

  • Last visited

About Nebula

  • Rank
    Advanced Member
  • Birthday 06/18/1973

Profile Information

  • Gender
    Man
  • Interests
    fantasy, supernatural, aliens, space, spirituality, hypnosis, astral travel, lucid dreaming

Recent Profile Visitors

1057 profile views
  1. Amulets & Talismans

    Amulets & Talismans v1.3 - Added an amulet - Cut off the ears of a zombie. - All the amulets have been added a basic effect that prevents a decrease in mood. - The influence of the effect is dependent on the phase of the moon. - You can see the phase of the moon in the window of Amulet and Talismans. - The window of the amulets is called by the key O (by default). You can change this key in the game settings.
  2. Help in writing code - Miscellaneous issues

    How in LUA to intercept the event - when the character wakes up? It is the moment of waking up (on an alarm clock) and separately when he wakes up, in a panic and himself.
  3. Help in writing code - Miscellaneous issues

    Solved the problem by going from the other side, reading the name of the equipment item and prescribing the conditions specifically for him with the help of - player:getInventory():getItemFromType(player:getModData().NeckAmulets):getDisplayName(); But it's inconvenient ... I had to create a bunch of additional code. Also I understood why the method of reading table elements does not work. elements of the table need to read by looping through them. But my knowledge is still not enough for this implementation. At the moment, there is the following question. How to make the text in the Tooltip.txt be added to the value from the LUA variable?
  4. I can help. Wrote you in private messages.
  5. And further... I have a button on the destination screen UI_optionscreen_binding_ As you warned, although I used the translation files ... Here is the code. local index = nil for i,b in ipairs(keyBinding) do if b.value == "Toggle UI" then index = i break end end if index then table.insert(keyBinding, index+1, {value = getText("IGUI_Show_window_of_equipped_items"), key = 24}) local oldCreate = MainOptions.create function MainOptions:create() oldCreate(self) for _, keyTextElement in pairs(MainOptions.keyText) do repeat if not keyTextElement or not keyTextElement.txt then break end local label = keyTextElement.txt if label.name == getText("IGUI_Show_window_of_equipped_items") then label:setTranslation(getText("IGUI_Show_window_of_equipped_items")) label:setX(label.x) label:setWidth(label.width) end until true end end end
  6. Yes. I need to have a designated key in the tooltip, besides the usual text. So, as a TXT file, then it does not work in it to use variables from LUA how to be?
  7. Thanks for the example! Everything worked out. But there is one problem. What about the Tooltip? It is necessary that in Tooltip_.txt - except for the text the value was displayed getCore():getKey(getText("Text")) how to do it?
  8. Help in writing code - Miscellaneous issues

    java.lang.RuntimeException: __concat not defined for operands: ERROR (not in table): item type and MAX Here in this line - print("ERROR (not in table): item type " .. item:getType())
  9. Help in writing code - Miscellaneous issues

    I think I'm beginning to understand ... in part Can you provide your code with comments? It will help me very well! That's what I do not understand at all. local atable = GlobalAmulets[item:getType()] if not atable then for key, value in pairs(GlobalAmulets) do print(key) end elseif (atable.Effect == "Unhappy") then Thank you again, you are one of the few who help beginners! Now I'm definitely sleep ... tomorrow I'll come.
  10. Help in writing code - Miscellaneous issues

    But he's recorded right here? WorkingAmulets = "ATTalismanCross"; GlobalAmulets[WorkingAmulets] = {}; GlobalAmulets[WorkingAmulets]["Location"] = getText("IGUI_Neck"); GlobalAmulets[WorkingAmulets]["Effect"] = "Unhappy";
  11. Help in writing code - Miscellaneous issues

    Before going to bed I decided to check the corrected code in the game. Sadness, trouble ... the problem has remained. Gives: function: ATEffectAmulets -- file: amulets.lua line # 146 java.lang.RuntimeException: attempted index: Effect of non-table: null If comment line 146 then it starts issuing the same error on line 147 146 if (GlobalAmulets[item:getType()]["Effect"] ~= nil) then 147 if (GlobalAmulets[item:getType()]["Effect"] == "Unhappy") then Maybe I'm somehow wrong trying to read the value from the field?
  12. Help in writing code - Miscellaneous issues

    Stiff! I've been fighting this mistake for 5 evenings. I tried everything that I can ... The problem is as always on the surface. I thank you cordially! I'm going to sleep ... in Russia 12 nights already, in the morning to work ...
  13. Help in writing code - Miscellaneous issues

    Fenris_Wolf - Please help! Again I have a problem ... You need to read the value from the "Effect" field The field is here WorkingAmulets = "ATTalismanCross"; GlobalAmulets[WorkingAmulets] = {}; GlobalAmulets[WorkingAmulets]["Location"] = getText("IGUI_Neck"); GlobalAmulets[WorkingAmulets]["Effect"] = "Unhappy"; Here I am trying to read it ... but again it returns value - nothing (nil) Preflight lines are in bold red function ATEffectAmulets(item, player,effect) if (NeckEquip == "true") then if (GlobalAmulets[item:getType()]["Effect"] ~= nil) then end elseif (GlobalAmulets[item:getType()]["Effect"] == "Unhappy") then UnhappyAmulets(item, player); end end What am I doing wrong?
  14. Hydrocraft Mod

    I wrote about this earlier ... So the equipped multi-tool almost instantly loses all charge in a battery.
  15. Amulets & Talismans

    Amulets & Talismans v1.2 - A complete translation into Russian is made - Other minor fixes Thank you Fenris_Volf for help Soon - More items ... and more amulets + effects for amulets To be continued...