Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
@Kable: That'd be possible except for the Moodlets. They are so deep in Java code that it hurts. I've heard it said that that IS on the TODO list for TIS, just pretty deep down.
That's interesting. I'll investigate this! PZ is using kahlua, which is actually slightly different from "normal" Lua in some areas.This might be such an area, or it might be a genuine bug that "just happened to work". I'll check it out!
I just felt compelled to at least report it (coder's duty). Pls ignore where applicable.
The escape thing I told you about? I think I wasn't clear before. You were talking about escaping the regex expression. I was actually referring to escaping the in-code string itself (for the lua parser) which seems to require changing the "\." in the regex string to "\\." to work with some lua implementations (actually just using Lua 5.2 on windows). It seems to report error no matter using dofile or require until I added escaped "\".
PZ may be using a more relaxed parser which means it does not really matter practically (nobody complained, so prob nothing needs to be done). Would be bad if PZ is actually doing something different completely (e.g. "properly" escaping the string actually breaks it in PZ) which I am hoping is not the case.
Thanks for the reply and sorry for troubling you over such inconsequential matter.
It's not the backslash that's escaped, but the "." (dot). In this case, it's to escape the special meaning of "." in regular expressions. In regular expressions a "." means "any character, once", whereas "\." (escaped dot) means a literal dot character.
Just wondering about bcUtils.lua:181 and similar :209
[code]
currentCat = string.match(line, "[a-zA-Z0-9/ \.]+");
[/code]
Is there a need to escape the backslash? I got an error when trying to load the file in a normal lua interpreter (picking up lua). I never seen that problem with PZ itself, so I don't know if it will cause any problem.
Just added a new readINI function to read files from mod directories to support my Mod Release Notes mod.
I don't have a "tool" or someting like that. Inserting maps to a running server will always require - at least a partial - reset. I can tell you more on the discord server, contact me there.
is there a way to check if a player has a skill?
like bcUtils.hasStreet (though in this case, hasSkill)?
and then swap a skill already in place?
Scenario:
the basic problem that leads me to ask this, is that a friend and i play on his server, and have made some progress so far including with hydrocraft.
but, we chose "all thumbs" LOL
bascally, we realise that this is considerably slowing down our actions, since hydrocraft is full of items, and because we dont have that much time to play, is there a way to swap a skill by an admin, so that we are not technically cheating, but instead able to use our limited playing time more efficiently, without having to make a fresh new character from the start?
503640135
Maybe you should head over to the PZ modding forum, there's a lot of helpful people there, too:
http://theindiestone.com/forums/index.php?/forum/45-pz-modding/
If I use "addItem"
Get the number of items will be the value of "numberToRemove"
local inv = getPlayer():getInventory();
local numberToRemove = 5;
local itemToRemove = "Base.Nails";
for i=1,numberToRemove do
local it = inv:FindAndReturn(itemToRemove);
if it then inv:Remove(it); end
end
inv:AddItem("Base.Axe"); --There should be only 1 axe, but I got 5 axe
Thank you for your help
There's nothing specifically about that in this toolkit, but something like this should work:
local inv = getPlayer():getInventory();
local numberToRemove = 5;
local itemToRemove = "Base.Nails";
for i=1,numberToRemove do
local it = inv:FindAndReturn(itemToRemove);
if it then inv:Remove(it); end
end